-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(ICRC_Ledger): FI-1589: Adapt icrc golden state tests to ledger V3 stable structures migration #2739
base: maciej-icrc-v3
Are you sure you want to change the base?
test(ICRC_Ledger): FI-1589: Adapt icrc golden state tests to ledger V3 stable structures migration #2739
Conversation
fb22395
to
e96ab18
Compare
The ICRC golden state tests succeeded for commit |
@@ -79,6 +79,10 @@ | |||
"rev": "e54d3fa34ded227c885d04e64505fa4b5d564743", | |||
"sha256": "3d808fa63a3d8ebd4510c0400aa078e99a31afaa0515f0b68778f929ce4b2a46" | |||
}, | |||
"sns_ledger_v2": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So does sns_ledger_v2
point to ledger V3? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This points to V2 of the ledger wrt. the migration to stable structures as define in the design doc, which supports reading both "raw" stable memory, as well as stable memory written using the MemoryManager
, in the post_upgrade
. In the pre_upgrade
, the serialized ledger state is written using the MemoryManager
.
Should we also adopt the tests from https://sourcegraph.com/github.com/dfinity/ic/-/blob/rs/nervous_system/integration_tests/tests/sns_ledger_upgrade.rs?L29 |
From a quick glance, neither of those test would seem to need updating, since they both first install the SNS using the mainnet canister versions (which is the latest blessed versions, i.e., for the ledger, "V2", which writes the ledger state using the The problem is with (SNS) ledgers that haven't upgraded to V2, since we don't support upgrading from a pre-V2 version to V3 or later (to migrate the Allowances in V3 to a virtual memory managed by the Since SNSs can (currently?) only upgrade one version at a time, and not skip versions, there shouldn't be any issues, but let's perhaps sync offline to see if there are any potential gaps that we haven't considered. |
The ICRC ledger does not support downgrading once allowances have been migrated to stable structures. This PR adapts the golden state tests accordingly.