-
Notifications
You must be signed in to change notification settings - Fork 140
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
Testnet state migration preview.22 health check after migration error #3288
Comments
@j1010001 status of this is "in-progress" (since yesterday afternoon). |
@turbolent I looked into this today and it looks like the problem is in Cadence 1.0 migration's cadence/migrations/migration.go Line 165 in e29e0f3
It seems when dictionary element is migrated, cadence/migrations/migration.go Lines 363 to 365 in e29e0f3
With testnet data:
I am going to look into this more tomorrow. Please let me know if you have some questions. |
Thank you for the investigation @fxamacker! I was able to reproduce this in flow-go, and started working on reproducer in the Cadence repo here: feature/atree-register-inlining-v1.0...bastian/debug-lost-slab-during-migration. So far I'm not able to reproduce it |
@turbolent Thanks for working on this! I created a reproducer just now (~9pm) in Cadence repo (without flow-go migration program). I'll let you know in the morning after I double-check and clean it up before we chat. Not being familiar with Cadence 1.0 migration code tripped me up a few times while creating the reproducer. |
The problem was initially detected in testnet migration of atree inlined data with Cadence 1.0 migration. The bug happened with 5 nested levels of data while this reproducer is simplified to use 3 nested levels. More info at: #3288
The problem was initially detected in testnet migration of atree inlined data with Cadence 1.0 migration. The bug happened with 5 nested levels of data while this reproducer is simplified to use 3 nested levels. More info at: #3288
Awesome work @fxamacker! 👏 I'm going to look into it |
@turbolent Sounds great! I opened a PR with a test and a reproducer for you to use. The testnet data for this bug happened at 5 nested levels, so I simplified the reproducer to 3 nested levels. Hope this reproducer saves time while you resolve this issue. 🙏 @j1010001 The reproducer doesn't include a fix. |
This commit fixes Cadence 1.0 migration when using atree inlined data. See issue: #3288 Previously, MigrateNestedValue() migrates dictionary by using readonly iterator and migrating values in place. This commit migrates keys first using readonly iterator and then migrates values using mutable iterator.
This commit fixes Cadence 1.0 migration when using atree inlined data. See issue: #3288 Previously, MigrateNestedValue() migrates dictionary by using readonly iterator and migrating values in place. This commit migrates keys first using readonly iterator and then migrates values using mutable iterator.
flow-go build: v0.34.0-crescendo-preview.15-atree-inlining
migration doc: https://www.notion.so/flowfoundation/TN-state-migration-test-Atree-inlining-C1-0-Apr-24-preview-15-71afa024d73042da9c2bc020cb734850?pvs=4
error:
migration-inlined-payloads-apr24-preview15-check2-output.txt
The text was updated successfully, but these errors were encountered: