Skip to content

header: verify NextValidatorsHash for light nodes - #844

Merged
Manav-Aggarwal merged 17 commits into
mainfrom
tux/verify-next-validatorset-hash
Sep 29, 2023
Merged

header: verify NextValidatorsHash for light nodes#844
Manav-Aggarwal merged 17 commits into
mainfrom
tux/verify-next-validatorset-hash

Conversation

@tuxcanfly

@tuxcanflytuxcanfly commented Apr 6, 2023

Copy link
Copy Markdown
Collaborator

Fixes: #835

@codecov-commenter

codecov-commenter commented Apr 7, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (497c015) 56.24% compared to head (eea19d1) 56.12%.

Additional details and impacted files
@@ Coverage Diff @@## main #844 +/- ##
==========================================
- Coverage 56.24% 56.12% -0.12% 
==========================================
Files 64 64 Lines 6815 6820 +5 ==========================================
- Hits 3833 3828 -5 - Misses 2593 2603 +10 
Partials 389 389 
FilesCoverage Δ
conv/abci/block.go89.88% <100.00%> (ø)
types/hashing.go72.97% <100.00%> (ø)
types/serialization.go61.30% <100.00%> (+0.29%)⬆️
types/test_utils.go84.53% <100.00%> (+0.32%)⬆️
types/header.go50.00% <33.33%> (-30.96%)⬇️
block/manager.go8.18% <0.00%> (-0.17%)⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tuxcanfly
tuxcanfly marked this pull request as ready for review April 7, 2023 00:30
Comment threadstate/executor.go Outdated
Comment threadtypes/header.go Outdated
Comment threadtypes/pb/tendermint/abci/types.pb.go Outdated
Comment threadstate/executor.go Outdated
Comment threadtypes/header.go Outdated
Comment threadproto/rollkit/rollkit.proto

@tzdybaltzdybal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@nashqueue
nashqueueforce-pushed the tux/verify-next-validatorset-hash branch from ac79826 to a4b01d3CompareApril 24, 2023 13:36
tzdybal
tzdybal previously approved these changes Apr 24, 2023
@gupadhyaya

gupadhyaya commented May 10, 2023

Copy link
Copy Markdown
Contributor

the PR #858 is currently blocked, but it has a commit that refactors the execute function, which you can copy-paste: d08e4d6

i will later pull your changes.

@tuxcanfly
tuxcanflyforce-pushed the tux/verify-next-validatorset-hash branch 3 times, most recently from 0ca992a to a980000CompareMay 17, 2023 13:50
@tuxcanfly
tuxcanflyforce-pushed the tux/verify-next-validatorset-hash branch from a980000 to 156de39CompareMay 23, 2023 13:48
@tuxcanfly
tuxcanflyforce-pushed the tux/verify-next-validatorset-hash branch from 156de39 to 59772abCompareJune 21, 2023 16:14
@Manav-Aggarwal
Manav-Aggarwal self-requested a review June 21, 2023 23:32
Manav-Aggarwal
Manav-Aggarwal previously approved these changes Jun 21, 2023

@Manav-AggarwalManav-Aggarwal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment threadstate/executor.go Outdated
@tuxcanfly
tuxcanflyforce-pushed the tux/verify-next-validatorset-hash branch from b7a9bdb to 1ae6386CompareJune 26, 2023 18:39
@tuxcanfly
tuxcanflyforce-pushed the tux/verify-next-validatorset-hash branch from 6efd18e to aaf1921CompareSeptember 29, 2023 02:27
@tuxcanfly

Copy link
Copy Markdown
CollaboratorAuthor

Using newState after applyBlock refers to the correct NextValidators set and assigns the correct NextAggregatorsHash. Updated.

Comment threadstate/executor.go
gupadhyaya
gupadhyaya previously approved these changes Sep 29, 2023

@gupadhyayagupadhyaya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Minor comment on removing the Validate from ApplyBlock. I am fine either removing or not removing, as it should not have any security implications.

@Manav-Aggarwal
Manav-Aggarwal added this pull request to the merge queueSep 29, 2023
Merged via the queue into main with commit d9eb2daSep 29, 2023
@Manav-Aggarwal
Manav-Aggarwal deleted the tux/verify-next-validatorset-hash branch September 29, 2023 15:57
chandiniv1 pushed a commit to chandiniv1/rollkit that referenced this pull request Oct 19, 2023
Fixes: evstack#835
---------
Co-authored-by: Ganesha Upadhyaya <gupadhyaya@Ganeshas-MacBook-Pro-2.local>
gupadhyaya pushed a commit that referenced this pull request Oct 20, 2023
Fixes: #835
---------
Co-authored-by: Ganesha Upadhyaya <gupadhyaya@Ganeshas-MacBook-Pro-2.local>
chandiniv1 pushed a commit to chandiniv1/rollkit that referenced this pull request Oct 31, 2023
Fixes: evstack#835
---------
Co-authored-by: Ganesha Upadhyaya <gupadhyaya@Ganeshas-MacBook-Pro-2.local>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the next validator set hash into the header, verify that the current validator set matches with the hash from the previous block

8 participants

@tuxcanfly@codecov-commenter@gupadhyaya@Manav-Aggarwal@S1nus@tzdybal@Wondertan@nashqueue