-
Notifications
You must be signed in to change notification settings - Fork 126
Use StakeTableV2 and new events in the GCL #3289
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
db1ed76
WIP: use StakeTableV2
sveitser c789fc2
Use bytes for schnorr sig in stake table contract
sveitser 0166bb0
add bls key verify function
alxiong fb2ca09
Merge remote-tracking branch 'origin/main' into ma/staking-cli-signat…
sveitser a056f32
stake table: verify validator event signatures
sveitser d8d7c1f
test: deploy stake table upgrade
sveitser 6c46aea
stake table: verify event signatures in GCL
sveitser 20a17ad
clippy
sveitser 8a0e31e
use stake-table v2 for local demo
sveitser 7617c22
update comment
sveitser afcb93c
fix: append v2 to new functions in v2 contract
sveitser 05e7511
fix: assert version is 2 after upgrade
sveitser 6e5b45e
use deployer code in staking-cli test system
sveitser fa60b98
staking-cli: allow using stake table V1 in tests
sveitser b027d6f
test: run staking-cli against contract v1 and v2
sveitser a659eee
test: use rstest to parametrize tests
sveitser fd2889e
Merge remote-tracking branch 'origin/main' into ma/staking-cli-signat…
sveitser 8fc8a52
fix: contract upgrade test
sveitser 3f86bdf
cleanup and documentation
sveitser ad7c6b9
espresso-types: stake table v2 unit tests
sveitser e839954
cleanup, comment regarding ABI and race condition
sveitser 24bbdd4
commit missing file
sveitser 88d7de7
persistence tests with both stake table versions
sveitser 75e761a
remove testing modules
sveitser 5e4ad53
stake table fetching: authenticate events early
sveitser 294d222
test: filter unauthenticated stake table events
sveitser 0584e25
update comments
sveitser a756313
fix TODO comment
sveitser d84e850
fix clippy
sveitser 985ce8d
add unittests for bls sig verification
sveitser 62f1923
remove unused error variants
sveitser 521a764
move copy impl to copy.rs
sveitser e43169e
fix: maybe better function, plus doc comment
sveitser 5011b37
Merge remote-tracking branch 'origin/main' into ma/staking-cli-signat…
sveitser 06144cc
fix: staking-cli, actually use V2
sveitser ebe7026
staking-cli: be more explicit about ABI compat
sveitser 8bf2101
fix: move dev dependency to dev-dependencies
sveitser 2a4749f
fix: sqlite lock file
sveitser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// The bindings types are small and pure data, there is no reason they | ||
// shouldn't be Copy. However some of them do have a bytes field which cannot be Copy. | ||
impl Copy for crate::sol_types::G1PointSol {} | ||
impl Copy for crate::sol_types::G2PointSol {} | ||
impl Copy for crate::sol_types::EdOnBN254PointSol {} | ||
impl Copy for crate::sol_types::StakeTableV2::ValidatorRegistered {} | ||
// schnorr sig in ValidatorRegisteredV2 uses Bytes, cannot implement copy | ||
impl Copy for crate::sol_types::StakeTableV2::ValidatorExit {} | ||
impl Copy for crate::sol_types::StakeTableV2::ConsensusKeysUpdated {} | ||
// schnorr sig in ConsensusKeysUpdatedV2 Bytes, cannot implement copy | ||
impl Copy for crate::sol_types::StakeTableV2::Delegated {} | ||
impl Copy for crate::sol_types::StakeTableV2::Undelegated {} | ||
impl Copy for crate::sol_types::staketablev2::BN254::G1Point {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
not totally sure but would this also need to be called ValidatorRegisteredV2?
Uh oh!
There was an error while loading. Please reload this page.
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.
No this is the the V1 event defined in the V2 abi. The rust code is now written to always use the V2 ABI/bindings (except for when deploying the original StakeTable contract) because the V2 ABI it's a superset of the V1 ABI. I think I left some comments about this in the stake table contract.