Open p-offtermatt opened 1 week ago
The recent changes primarily involve refactoring nomenclature, enhancing test configurations, updating import paths, adjusting function signatures, and correcting minor errors. Key updates include renaming and generalizing the ConsumerValidator
to ConsensusValidator
, refining staking operations for validators, adding testing configurations, and correcting typos in error messages. Additionally, there are modifications to return types and error handling within high-level functions.
File Path | Change Summary |
---|---|
app/consumer-democracy/proposals_whitelisting.go |
Corrected a typo in a comment related to legacy parameters. |
app/provider/app.go |
Updated imports and modified AppModuleBasic declaration for staking. |
app/sovereign/export.go |
Removed a line converting a validator address to bytes in prepForZeroHeightGenesis affecting commission withdrawal logic. |
proto/.../v1/genesis.proto & provider.proto |
Added new field last_provider_consensus_validators . Renamed ConsumerValidator to ConsensusValidator . Updated related comments and field names. |
tests/e2e/... |
Introduced new TestConfigType , implemented InactiveProviderValsTestConfig() , added stepChoices map entry, and enhanced GetReward and GetProposal . |
tests/integration/slashing.go |
Replaced providertypes.ConsumerValidator with providertypes.ConsensusValidator in TestOnRecvSlashPacketErrors . |
testutil/keeper/mocks.go |
Added GetBondedValidatorsByPower method to MockStakingKeeper . |
x/ccv/consumer/types/codec.go |
Removed an empty line in RegisterInterfaces function. |
x/ccv/democracy/governance/module.go |
Removed a line in the EndBlock function within AppModule . |
x/ccv/.../genutil/doc.go & module.go |
Introduced a wrapper around the native staking module, overriding the EndBlock function to return no validator set updates. |
x/ccv/.../genutil/doc.go & module.go |
Introduced a wrapper around the native staking module, overriding the EndBlock function to return no validator set updates. |
x/ccv/.../staking/module.go |
Defined new types and functions for module initialization and block processing within the staking package to handle validator updates differently. |
x/ccv/provider/... |
Updated function signatures and imported types to align with the shift from ConsumerValidator to ConsensusValidator . Modified function returns and added related comments. |
x/ccv/provider/.../genesis_test.go |
Added staking functionalities, including validation creation, manipulation, and staking operations within test scenarios. |
x/ccv/provider/.../relay.go |
Modified EndBlockVSU to return []abci.ValidatorUpdate and added ProviderValidatorUpdates function. |
x/ccv/provider/.../grpc_query_test.go |
Replaced ConsumerValidator with ConsensusValidator in test functions. |
sequenceDiagram
participant App
participant ValidatorSet
participant StakingModule
Note right of App: Renamed ConsumerValidator to ConsensusValidator
App ->> ValidatorSet: Request validator list
ValidatorSet ->> StakingModule: Forward request
StakingModule -->> ValidatorSet: Return validator list
ValidatorSet -->> App: Return generalized validator list (ConsensusValidator)
App ->> App: Use ConsensusValidator list for further processing
Note left of App: Modified return types for EndBlock functions
StakingModule ->> App: EndBlock process
App ->> App: Return []abci.ValidatorUpdate and error
Note over App, StakingModule: Adjusted naming and function returns to enhance clarity and functionality.
This diagram illustrates the control flow changes related to the renaming from ConsumerValidator
to ConsensusValidator
and the updates in the EndBlock
function to return []abci.ValidatorUpdate
and error.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Closes: Part of #1913
Main changes:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.
I have...
!
to the type prefix if the change is state-machine breakingCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.
I have...
!
the type prefix if the change is state-machine breakingSummary by CodeRabbit
New Features
Bug Fixes
Documentation
staking
package in thegenutil
module.Tests
ConsumerValidator
toConsensusValidator
.Refactor
ConsumerValidator
toConsensusValidator
for clarity and consistency.Chores