-
Notifications
You must be signed in to change notification settings - Fork 473
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
state proofs: add block hash to LightBlockHeader #5663
Conversation
Replace the `Seed` value in the state proof light header with `BlockHash`. It serves a similar purpose in terms of the second-order consideration of defending against potential future hash-collision attacks (albeit a little bit weaker), but has the benefit of allowing validating the entire blockchain, by committing to the block hash itself in the state proof.
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.
This looks good to me with respect to the cryptographic considerations Nickolai and I discussed (namely, replacing Seed
with BlockHash
in LightBlockHeader
).
TestStateProofMessageCommitmentVerification is failing, which is an E2E test that looks like it spins up using vFuture |
The test set a configurable consensus protocol, "test-fast-stateproofs", and propagated the configuration to the child algod processes spawned by the test, but did not update the supported consensus params in the test process itself. As a result, when the test code tried to compute the light block header, it didn't have the block protocol (test-fast-stateproofs) in its config.Consensus.
Looks like a slight oversight in |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5663 +/- ##
==========================================
- Coverage 55.81% 55.79% -0.03%
==========================================
Files 476 476
Lines 67138 67146 +8
==========================================
- Hits 37476 37464 -12
- Misses 27141 27152 +11
- Partials 2521 2530 +9 ☔ View full report in Codecov by Sentry. |
Corresponding go-algorand-sdk change: algorand/go-algorand-sdk#589 |
do the other sdks need updates as well? |
Probably so, yes. Nobody is likely to be using the light block headers (which gained an extra field), but it might be that some users will be looking at the protocol config values (which also gained an extra field). What have we done in the past when adding new protocol configuration parameters to |
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.
LGTM
Replace the
Seed
value in the state proof light header withBlockHash
. It serves a similar purpose in terms of the second-order consideration of defending against potential future hash-collision attacks (albeit a little bit weaker), but has the benefit of allowing validating the entire blockchain, by committing to the block hash itself in the state proof.