-
Notifications
You must be signed in to change notification settings - Fork 27
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
Staking contract E2E test setup #492
Conversation
tests/utils/teleporter_utils.go
Outdated
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 changes of substance in this file.
tests/utils/chain_utils.go
Outdated
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 changes of substance in this file.
tests/utils/erc20_utils.go
Outdated
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 changes of substance in this file.
tests/utils/governance_utils.go
Outdated
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 changes of substance in this file.
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.
Generally makes sense to me. Left a comment about how we pack a message.
// the P-Chain will reject the registration, and the stake can be returned to the staker after the registration | ||
// expiry has passed. | ||
require(signature.length == 64, "StakingManager: Invalid signature length"); | ||
require(blsPublicKey.length == 48, "StakingManager: Invalid blsPublicKey length"); |
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.
can have a constant for the length
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.
Since these packing/unpacking methods are likely to be refactored/optimized significantly in the future, I'm going to hold off on making further changes for now. Also pointing out that there were no length constants in the previous implementation.
Co-authored-by: minghinmatthewlam <[email protected]> Signed-off-by: cam-schultz <[email protected]>
Co-authored-by: minghinmatthewlam <[email protected]> Signed-off-by: cam-schultz <[email protected]>
Why this should be merged
Fixes #433
Fixes #434
Fixes #470
Fixes #493
Supercedes #479
Demonstrates how to write E2E tests for the staking contracts
How this works
awm-relayer
andavalanchego
branches with up-to-date ACP-118 and ACP-77 implementationstests/utils
into multiple more focused files. The only relevant code changes here are instaking_utils.go
How this was tested
Added E2E test for registering and delisting a validator. Additional E2E tests to follow.
How is this documented
N/A