·
19 commits
to main
since this release
Contract Structure
- Validator Manager contracts are refactored to consist of multiple deployed contracts that interact via external function calls.
- PoA Validator Managers consist of a single
ValidatorManager
contract instance. See the migration guide for instructions on how to safely upgrade a v1 PoA contract to the v2 contract. - PoS Validator Managers consist of the core
ValidatorManager
contract instance and a standaloneStakingManager
contract instance. Migration to v2 is not supported for v1 PoS contracts.
- PoA Validator Managers consist of a single
Renamed Methods
- Validator and Delegator registration and removal initiation methods renamed from
initialize
toinitiate
- ex:
initializeValidatorRegistration
changed toinitiateValidatorRegistration
- ex:
- End Validation methods renamed from
endValidation
tovalidatorRemoval
- ex:
completeEndValidation
changed tocompleteValidatorRemoval
- ex:
Changes to Reward Recipients
Reward recipients for both Validators and Delegators are now provided at registration time, rather than at removal. Reward recipients may still be updated after registration using changeValidatorRewardRecipient
and changeDelegatorRewardRecipient
. As such, the validator and delegator removal function overloads that specify a rewardRecipient
have been removed.
initiateValidatorRegistration
registrationExpiry
removed frominitiateValidatorRegistration
methods.ValidatorRegistrationInput
helper struct removed in favor of specifying each field as its own argumentrewardRecipient
added as a parameter.
contract IERC20TokenStakingManager
- struct ValidatorRegistrationInput {
- bytes nodeID;
- bytes blsPublicKey;
- uint64 registrationExpiry;
- PChainOwner remainingBalanceOwner;
- PChainOwner disableOwner;
- }
- function initializeValidatorRegistration(
+ function initiateValidatorRegistration(
- ValidatorRegistrationInput calldata registrationInput,
+ bytes memory nodeID,
+ bytes memory blsPublicKey,
+ PChainOwner memory remainingBalanceOwner,
+ PChainOwner memory disableOwner,
uint16 delegationFeeBips,
uint64 minStakeDuration,
uint256 stakeAmount,
address rewardRecipient
) external returns (bytes32 validationID);
}
initiateDelegatorRegistration
rewardRecipient
added as a parameter
-function initializeDelegatorRegistration(
+function initiateDelegatorRegistration(
bytes32 validationID,
+ address rewardRecipient
) external payable returns (bytes32);
ACP-99 Compliance
- The Validator Manager contracts are now compliant with ACP-99, which specifies a standard set of public and private methods that must be implemented, and corresponding events that must be emitted, to manage an L1's validator set as specified in ACP-77.
- Many of the functions, events, error types, and struct definitions that were previously defined in
IValidatorManager
have been moved intact toIACP99Manager
. - PoA validators may now update their weights by calling
_initiateValidatorWeightUpdate
andcompleteValidatorWeightUpdate
as specified in ACP-99.
Bug Fixes and Feature Requests
- Numerous bug fixes and feature requests were implemented. See the full release notes and the recent audit conducted by OpenZeppelin for details.
What's Changed
- Bump github.com/onsi/ginkgo/v2 to 2.23.4 by @dependabot in #754
- Bump google.golang.org/protobuf to 1.36.6 by @dependabot in #750
- Bump github.com/onsi/gomega to 1.37.0 by @dependabot in #752
- Bump golang.org/x/crypto to 0.31.0 by @dependabot in #686
- Bump golang.org/x/tools to 0.33.0 by @dependabot in #781
- Bump github.com/spf13/cobra to 1.9.1 by @dependabot in #721
- Bump github/codeql-action from 2 to 3 by @dependabot in #708
- Bump avago and subnet-evm by @iansuvak in #724
- Update foundry by @geoff-vball in #729
- Update formatting to conform to solhint 5.1.0 by @geoff-vball in #782
- Update go to 1.23.9 by @geoff-vball in #785
- filter non-teleporter major releases by @cam-schultz in #685
- Rename l1ID -> subnetID by @cam-schultz in #695
- remove icm-services as a go dependency by @iansuvak in #694
- Event indexing improvements by @cam-schultz in #698
- Replace Snyk with Semgrep by @chriselbring-avalabs in #705
- ValidatorManager is PoA when deployed on its own by @cam-schultz in #711
- ACP 99 reference implementation by @cam-schultz in #700
- ACP 99 reference implementation improvements by @cam-schultz in #702
- Refactor validator manager into multiple contracts by @cam-schultz in #707
- Reduce NativeTokenHome's receive method gas cost by @cam-schultz in #723
- Explicitly enable optimizer by @cam-schultz in #728
- Support migration from V1 PoA by @cam-schultz in #734
- Address TODO for static ports across tmpnet node restarts by @iansuvak in #740
- [Docs] fix broken links and change to absolute paths by @ashucoder9 in #770
- images updated from subnet to L1 by @alejandro99so in #726
- N-01-Fix SPDXs License Identifier by @iansuvak in #773
- N-02 Misleading Documentation by @geoff-vball in #775
- N-03 Missing Getter Functions by @cam-schultz in #777
- N-04 Code Quality and Readability Suggestions by @geoff-vball in #756
- N-05 Variable Initialized With Its Default Value by @geoff-vball in #757
- N-06 Unused Error by @geoff-vball in #758
- N-07 unused named return by @geoff-vball in #759
- N-08 Unused State Variables by @geoff-vball in #760
- N-10 Potential Storage Collision by @cam-schultz in #779
- N-11 Inconsistent Usage of Interfaces by @geoff-vball in #778
- L-01 Validators May Not Be Able to Exit Due to Churn Limits by @cam-schultz in #780
- L-04 Use RewardRecipient in claimDelegationFees by @iansuvak in #772
- L-05 Missing Check for Duplicate Addresses in _validatePChainOwner by @geoff-vball in #765
- L-06 _validatePChainOwner Does Not Check for Zero Addresses by @geoff-vball in #763
- L-08 Emit rewards events by @cam-schultz in #766
- L-12 Wrong Usage of reinitializer Modifier by @cam-schultz in #767
- L-11 Lack of Input Validation by @cam-schultz in #762
- L-13 prioritize conversion id check by @iansuvak in #769
- L-14 Consistent imports by @cam-schultz in #768
- M-01 Churn Tracker May Be Ineffective by @cam-schultz in #776
- M-01 Limit churn period to 24 hours by @cam-schultz in #784
- M-02 Clarify selection of PoA weights by @cam-schultz in #783
- H-01 ValidatorManager and P-Chain Can Go Out of Sync by @geoff-vball in #771
- PoA to PoS Migration Guide by @cam-schultz in #764
- Move rewardRecipient fields from removal to registration methods by @iansuvak in #787
- Latest validator manager audit by @cam-schultz in #788
New Contributors
- @chriselbring-avalabs made their first contribution in #705
- @ashucoder9 made their first contribution in #770
- @alejandro99so made their first contribution in #726
Full Changelog: validator-manager-v1.0.0...validator-manager-v2.0.0