-
Notifications
You must be signed in to change notification settings - Fork 563
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
feat: Add Attribute header_hash To Update Client Event #5172
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5172 +/- ##
==========================================
+ Coverage 80.08% 80.11% +0.03%
==========================================
Files 189 189
Lines 13142 13147 +5
==========================================
+ Hits 10525 10533 +8
+ Misses 2203 2199 -4
- Partials 414 415 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @Pipello! I pushed a couple of commits, one of them replacing sha1
with sha256
, since I think that's the hash algorithm we use in the rest of the codebase and I guess CometBFT header is also hashed with this algorithm. Having said this, I would be very nice if you could do a sanity check and run these changes locally to make sure that the hash emitted in the events matches the hash generated by CometBFT and that can be used in the RPC endpoint header_by_hash
.
Thank you @crodriguezvega :)
I will try to check that |
@crodriguezvega I was able to run 1 test but not more, I am short in time to dedicate to open source work. If you think this single test is enough then that's good. Otherwise if you or somebody would like to be safer and run more tests no problems. |
Thank you, @Pipello! Just for confirmation: so you were able to run a chain and after the light client was updated, you could call |
@Pipello I did a quick test and unfortunately the hash emitted in the event doesn't match the expected header hash. I also took a quick look at CometBFT's code and it seems this is how the hash is calculated (so it's not just a sha 256 hash of the header bytes). Therefore I am not sure how useful it is to emit the sha 256 hash, since it will not be possible to use it to query CometBFT's RPC to retrieve the header... |
Thanks for the PR, @Pipello, but I think it's best for now to not add the attribute, since it's not as simple as we thought it would be to calculate the hash of the header that can be used with the |
Description
This PR adds the header_hash attribute to the update client evemt
closes: #5168
docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.