Repository navigation
fix(revenue_pool): feed real layout hashes into pool upgrade validation (#1164) - #1388
Open
lienhoatienphung-svg wants to merge 1 commit into
Conversation
…to upgrade validation (CalloraOrg#1164)
lienhoatienphung-svg
force-pushed
the
feature/1164-pool-upgrade-layout-hashes
branch
from
October 16, 2026 08:15
8356c6f to
f9a508b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the hardcoded
zero_layout_hashplaceholder and static version1inRevenuePool::upgradewith real storage-layout descriptor hashes (callora_storage_migration::layout_hash) recorded atinitand validated across sequential upgrades.Closes #1164
Changes
STORAGE_LAYOUT_DESCRIPTORforrevenue_pooland recorded the initial layout hash andSTORAGE_MIGRATION_VERSION(1) inRevenuePool::initviaStorageMigrationValidator::record_deployed_schema.RevenuePool::upgrade_with_layout(and updatedRevenuePool::upgradeto advancecurrent_version + 1using the deployed layout hash) so sequential upgrades (v1 -> v2 -> v3) succeed and schema drift is caught before the WASM swap.current_layout_hash,get_storage_migration_version,get_storage_layout_hash) with complete rustdoc comments.contracts/revenue_pool/src/test_storage_migration.rsverifyingv1 -> v2 -> v3sequential upgrades and assertingStorageMigrationError::SchemaMismatchwhenexpected_source_layoutdoes not match the recorded layout.Payout / Settlement
0x3806cd592a508d1992Ed007C2F53de251C2E7452