Closed bermuell closed 2 weeks ago
x/ccv/provider/migrations/v6/migrations.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/migrations/migrator.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/keeper/legacy_proposal.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/types/keys_test.go (2)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations. --- Pattern `**/*_test.go`: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/ccv/provider/keeper/grpc_query_test.go (2)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations. --- Pattern `**/*_test.go`: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/ccv/provider/keeper/partial_set_security.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/keeper/grpc_query.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/keeper/relay.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/types/keys.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/keeper/proposal.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/ccv/provider/keeper/partial_set_security_test.go (2)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations. --- Pattern `**/*_test.go`: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/ccv/provider/keeper/keeper_test.go (2)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations. --- Pattern `**/*_test.go`: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"x/ccv/provider/keeper/keeper.go (1)
Pattern `**/*.go`: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
x/ccv/provider/migrations/migrator.go (1)
`57-61`: The function `Migrate5to6` effectively orchestrates multiple migration steps. Ensure comprehensive testing, particularly integration tests, to verify the correct migration of both minimal power settings and legacy parameters.x/ccv/provider/types/keys_test.go (1)
`64-64`: The addition of `MinimumPowerInTopNBytePrefix` to the test `TestNoDuplicates` ensures that the new key prefix does not conflict with existing ones. Good proactive testing approach.x/ccv/provider/types/keys.go (2)
`186-188`: The new byte prefix for storing minimum power for top N validators is correctly defined and follows existing naming and structuring conventions. --- `620-622`: The function `MinimumPowerInTopNKey` is correctly implemented to generate keys using the new byte prefix and chain IDs. It adheres to the established patterns in this file.x/ccv/provider/keeper/proposal.go (1)
`180-180`: The addition of `k.DeleteMinimumPowerInTopN(ctx, chainID)` in the `StopConsumerChain` function is crucial for ensuring that all related data is cleaned up when a consumer chain is stopped. This avoids potential data integrity issues with stale entries.x/ccv/provider/keeper/keeper_test.go (1)
`835-863`: The new test function `TestMinimumPowerInTopN` adequately covers the functionality for setting, retrieving, and updating the minimum power in top N validators. It also correctly handles edge cases, such as non-existent chain IDs.x/ccv/provider/keeper/keeper.go (1)
`1576-1584`: **Properly handle deletion operations.** The method `DeleteMinimumPowerInTopN` is straightforward and correctly deletes the minimum power entry from the store. This method is crucial for cleanup operations and appears to be implemented correctly. No changes are necessary here.
backport of (#1952)
Store the minimal power among the top N in EndBlock
Finish merge
Fix unit tests
Fix store method for the min power
Fix migration
Revert migration changes
Change comment to proper name for key
Add staking keeper to migration
Revert "Add staking keeper to migration"
This reverts commit 575cfd3ccec7732e0d1488d80bda7f6172110cf7.
Rename migration
Update x/ccv/provider/keeper/grpc_query.go
Clean up minimal power in top N on StopConsumerChain
Set min power in consumer modification proposal
Address comments
Use GetLastBondedValidators instead of GetLastValidators
Add migration
Add comment for migration
Improve comment in migration
Handle case where topN is not found
Add test for updating minimum power in top N
Merged tests
Rename updatedMinPower->newUpdatedMinPower
Address comments
Please go to the
Preview
tab and select the appropriate sub-template:fix
,feat
, andrefactor
.Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests