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

Re-add block_by_hash Tendermint endpoint #1206

Merged
merged 9 commits into from
Oct 7, 2022

Conversation

fmorency
Copy link
Contributor

@fmorency fmorency commented Oct 4, 2022

Links #832.

Re-implements the block_by_hash RPC, which returns an optional block.

I applied the patch from #1089 and fixed the tendermint::Hash encoding/decoding to accommodate discrepancies in how the Tendermint RPC encodes this field for different RPC interfaces.

Relates to #942

CC @hansl

  • 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/

hansl and others added 7 commits October 3, 2022 10:39
Signed-off-by: Felix C. Morency <1102868+fmorency@users.noreply.github.com>
Signed-off-by: Felix C. Morency <1102868+fmorency@users.noreply.github.com>
Signed-off-by: Felix C. Morency <1102868+fmorency@users.noreply.github.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
Signed-off-by: Felix C. Morency <1102868+fmorency@users.noreply.github.com>
Signed-off-by: Felix C. Morency <1102868+fmorency@users.noreply.github.com>
- Add base64 `tendermint::hash::Hash` encoding/decoding support
- Add base64 `Option<tendermint::hash::Hash>` encoding/decoding support
- Add missing `FromStr` import
- Rename `hash_base64` serializer to `tx_hash_base64`

Relates informalsystems#942
Links informalsystems#832
@fmorency fmorency changed the title Readd block by hash Re-add block_by_hash Tendermint endpoint Oct 5, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1206 (018f1db) into main (00401ae) will decrease coverage by 0.0%.
The diff coverage is 43.0%.

@@           Coverage Diff           @@
##            main   #1206     +/-   ##
=======================================
- Coverage   64.0%   63.9%   -0.1%     
=======================================
  Files        250     253      +3     
  Lines      21554   21634     +80     
=======================================
+ Hits       13798   13836     +38     
- Misses      7756    7798     +42     
Impacted Files Coverage Δ
rpc/src/abci/tag.rs 42.8% <ø> (ø)
rpc/src/client.rs 4.8% <0.0%> (-0.2%) ⬇️
rpc/src/client/bin/main.rs 0.3% <0.0%> (-0.1%) ⬇️
rpc/src/endpoint/tx.rs 25.0% <ø> (ø)
rpc/src/serializers/tx_hash_base64.rs 52.1% <ø> (ø)
tools/rpc-probe/src/common.rs 0.0% <0.0%> (ø)
rpc/src/endpoint/block_by_hash.rs 10.0% <10.0%> (ø)
rpc/src/method.rs 31.2% <50.0%> (+0.1%) ⬆️
rpc/src/serializers/tm_hash_base64.rs 52.1% <52.1%> (ø)
rpc/src/serializers/opt_tm_hash_base64.rs 57.1% <57.1%> (ø)
... and 7 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@thanethomson thanethomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @fmorency!

@thanethomson thanethomson merged commit 12362fc into informalsystems:main Oct 7, 2022
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.

4 participants