Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split out verifier parts of tendermint-light-client to tendermint-light-client-verifier (Backported to v0.23) #1072

Merged
merged 9 commits into from
Jan 12, 2022

Conversation

soareschen
Copy link
Contributor

@soareschen soareschen commented Jan 5, 2022

This is a copy of #1071 that targets the v0.23.x branch. Due to the conflicts caused by moved files, the patch has the be applied in a rather convoluted way:

In the first copy of tendermint-rs src:

  1. git checkout soares/light-client-verifier
  2. git checkout -b soares/light-client-verifier-v0.23
  3. git reset v0.23.x
  4. git add light-client*
  5. git add tools/kvstore-test
  6. git commit
  7. git clean -fd

In the second copy of tendermint-rs src:

  1. git checkout v0.23.x
  2. git reset master
  3. Note the unstaged changes in light-client and light-client-js.
    3.1. I'm not sure if git diff would automatically do any smart diff based on a merge base. So doing git reset is a more guaranteed way to see the real diffs.

Finally:

  1. Apply the unstaged changes in the second copy manually to the first copy of tendermint-rs.
    1.1. This cannot be automated due to moved files
  2. git commit on first copy.

Due to the complicated steps to construct this PR. I'd hope that #1071 and this PR can be merged with minimal further changes. Otherwise for every change made I'd have to carefully cherry-pick the new commits and hope that there are no conflict raised.

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Added entry in .changelog/

@soareschen soareschen force-pushed the soares/light-client-verifier-v0.23 branch from 704a726 to 3197709 Compare January 5, 2022 21:02
@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2022

Codecov Report

Merging #1072 (808fd46) into v0.23.x (578289e) will increase coverage by 1.6%.
The diff coverage is 78.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##           v0.23.x   #1072     +/-   ##
=========================================
+ Coverage     65.7%   67.3%   +1.6%     
=========================================
  Files          210     212      +2     
  Lines        20658   20171    -487     
=========================================
+ Hits         13575   13593     +18     
+ Misses        7083    6578    -505     
Impacted Files Coverage Δ
light-client-js/src/lib.rs 3.7% <ø> (ø)
light-client-js/tests/web.rs 100.0% <ø> (ø)
light-client-verifier/src/errors.rs 3.7% <ø> (ø)
...client-verifier/src/operations/commit_validator.rs 98.0% <ø> (ø)
light-client-verifier/src/operations/hasher.rs 100.0% <ø> (ø)
...ght-client-verifier/src/operations/voting_power.rs 98.0% <ø> (ø)
light-client-verifier/src/options.rs 0.0% <0.0%> (ø)
light-client-verifier/src/predicates.rs 97.4% <ø> (ø)
light-client-verifier/src/verifier.rs 87.9% <ø> (ø)
light-client/examples/light_client.rs 0.0% <0.0%> (ø)
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 578289e...808fd46. Read the comment docs.

soareschen and others added 3 commits January 6, 2022 20:11
…light-client` (#1074)

* Re-export tendermint_light_client_verifier as verifier from tendermint_light_client

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unnecessary tendermint-light-client import

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix crate docs to reflect verifier extraction

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entry

Signed-off-by: Thane Thomson <connect@thanethomson.com>
thanethomson and others added 2 commits January 12, 2022 17:14
* Merge latest changes from v0.23.x

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove redundant imports from kvstore test

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
@thanethomson thanethomson merged commit 7db7c01 into v0.23.x Jan 12, 2022
@thanethomson thanethomson deleted the soares/light-client-verifier-v0.23 branch January 12, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants