From 3ef05077a6a28b9a9d985c839c489e7f97598179 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Wed, 27 Nov 2024 16:26:38 -0500 Subject: [PATCH] Fix tests --- contracts/validator-manager/PoSValidatorManager.sol | 2 +- .../validator-manager/interfaces/IPoSValidatorManager.sol | 2 +- .../validator-manager/interfaces/IValidatorManager.sol | 2 +- .../validator-manager/tests/PoAValidatorManagerTests.t.sol | 2 +- .../validator-manager/tests/PoSValidatorManagerTests.t.sol | 2 +- .../validator-manager/tests/ValidatorMessagesTests.t.sol | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/validator-manager/PoSValidatorManager.sol b/contracts/validator-manager/PoSValidatorManager.sol index c4a3752d9..def1c8903 100644 --- a/contracts/validator-manager/PoSValidatorManager.sol +++ b/contracts/validator-manager/PoSValidatorManager.sol @@ -57,7 +57,7 @@ abstract contract PoSValidatorManager is uint256 _weightToValueFactor; /// @notice The reward calculator for this validator manager. IRewardCalculator _rewardCalculator; - /// @notice The ID of the blockchain that submits uptime proofs. This must be a blockchain validated by the subnetID that this contract manages. + /// @notice The ID of the blockchain that submits uptime proofs. This must be a blockchain validated by the l1ID that this contract manages. bytes32 _uptimeBlockchainID; /// @notice Maps the validation ID to its requirements. mapping(bytes32 validationID => PoSValidatorInfo) _posValidatorInfo; diff --git a/contracts/validator-manager/interfaces/IPoSValidatorManager.sol b/contracts/validator-manager/interfaces/IPoSValidatorManager.sol index 841f7d362..3b5798887 100644 --- a/contracts/validator-manager/interfaces/IPoSValidatorManager.sol +++ b/contracts/validator-manager/interfaces/IPoSValidatorManager.sol @@ -30,7 +30,7 @@ enum DelegatorStatus { * @notice weightToValueFactor is the factor used to convert validator weight to value * @notice rewardCalculator is the reward calculator used to calculate rewards for this validator manager * @notice uptimeBlockchainID is the ID of the blockchain that submits uptime proofs. - * This must be a blockchain validated by the subnetID that this contract manages. + * This must be a blockchain validated by the l1ID that this contract manages. */ struct PoSValidatorManagerSettings { ValidatorManagerSettings baseSettings; diff --git a/contracts/validator-manager/interfaces/IValidatorManager.sol b/contracts/validator-manager/interfaces/IValidatorManager.sol index 5e0304ea3..ebfc3eba7 100644 --- a/contracts/validator-manager/interfaces/IValidatorManager.sol +++ b/contracts/validator-manager/interfaces/IValidatorManager.sol @@ -51,7 +51,7 @@ struct ValidatorChurnPeriod { /** * @notice Validator Manager settings, used to initialize the Validator Manager - * @notice The subnetID is the ID of the subnet that the Validator Manager is managing + * @notice The l1ID is the ID of the subnet that the Validator Manager is managing * @notice The churnPeriodSeconds is the duration of the churn period in seconds * @notice The maximumChurnPercentage is the maximum percentage of the total weight that can be added or removed in a single churn period */ diff --git a/contracts/validator-manager/tests/PoAValidatorManagerTests.t.sol b/contracts/validator-manager/tests/PoAValidatorManagerTests.t.sol index f422a1398..0602df452 100644 --- a/contracts/validator-manager/tests/PoAValidatorManagerTests.t.sol +++ b/contracts/validator-manager/tests/PoAValidatorManagerTests.t.sol @@ -37,7 +37,7 @@ contract PoAValidatorManagerTest is ValidatorManagerTest { vm.expectRevert(abi.encodeWithSelector(Initializable.InvalidInitialization.selector)); app.initialize( ValidatorManagerSettings({ - subnetID: DEFAULT_L1_ID, + l1ID: DEFAULT_L1_ID, churnPeriodSeconds: DEFAULT_CHURN_PERIOD, maximumChurnPercentage: DEFAULT_MAXIMUM_CHURN_PERCENTAGE }), diff --git a/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol b/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol index 2d9cc07b3..3bd61b966 100644 --- a/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol +++ b/contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol @@ -2453,7 +2453,7 @@ abstract contract PoSValidatorManagerTest is ValidatorManagerTest { function _defaultPoSSettings() internal pure returns (PoSValidatorManagerSettings memory) { return PoSValidatorManagerSettings({ baseSettings: ValidatorManagerSettings({ - subnetID: DEFAULT_L1_ID, + l1ID: DEFAULT_L1_ID, churnPeriodSeconds: DEFAULT_CHURN_PERIOD, maximumChurnPercentage: DEFAULT_MAXIMUM_CHURN_PERCENTAGE }), diff --git a/contracts/validator-manager/tests/ValidatorMessagesTests.t.sol b/contracts/validator-manager/tests/ValidatorMessagesTests.t.sol index fb9086fde..5e68f3837 100644 --- a/contracts/validator-manager/tests/ValidatorMessagesTests.t.sol +++ b/contracts/validator-manager/tests/ValidatorMessagesTests.t.sol @@ -78,7 +78,7 @@ contract ValidatorMessagesTest is Test { ); ValidatorMessages.packRegisterL1ValidatorMessage( ValidatorMessages.ValidationPeriod({ - subnetID: DEFAULT_L1_ID, + l1ID: DEFAULT_L1_ID, nodeID: DEFAULT_NODE_ID, registrationExpiry: DEFAULT_EXPIRY, blsPublicKey: invalidBLSKey, @@ -288,7 +288,7 @@ contract ValidatorMessagesTest is Test { }); bytes memory packed = ValidatorMessages.packConversionData( ConversionData({ - subnetID: DEFAULT_L1_ID, + l1ID: DEFAULT_L1_ID, validatorManagerBlockchainID: DEFAULT_SUBNET_CONVERSION_ID, validatorManagerAddress: DEFAULT_OWNER, initialValidators: initialValidators @@ -341,7 +341,7 @@ contract ValidatorMessagesTest is Test { function _getPackedRegisterL1ValidatorMessage() internal returns (bytes memory) { (, bytes memory packed) = ValidatorMessages.packRegisterL1ValidatorMessage( ValidatorMessages.ValidationPeriod({ - subnetID: DEFAULT_L1_ID, + l1ID: DEFAULT_L1_ID, nodeID: DEFAULT_NODE_ID, registrationExpiry: DEFAULT_EXPIRY, blsPublicKey: DEFAULT_BLS_PUBLIC_KEY,