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
fix(migration): Migrate contract slots from mono- to modular- in deterministic order #10310
fix(migration): Migrate contract slots from mono- to modular- in deterministic order #10310
Conversation
Nodes added to the merkle tree _must be added in deterministic order_. Especially for the migrators, which add so many nodes they cross _commit_ boundaries. Remove the concurrent sinking of contract slots; replace with accumulating all `fromState` slots into a concurrent queue, then placing them in an array, and then sorting them. Fixes #10293 Signed-off-by: David S Bakin <117694041+david-bakin-sl@users.noreply.github.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #10310 +/- ##
=============================================
- Coverage 63.51% 63.51% -0.01%
- Complexity 30953 30989 +36
=============================================
Files 3337 3341 +4
Lines 134351 134558 +207
Branches 13965 13994 +29
=============================================
+ Hits 85334 85464 +130
- Misses 45661 45732 +71
- Partials 3356 3362 +6 ☔ View full report in Codecov by Sentry. |
Node: E2E Test Results 1 files ± 0 1 suites ±0 23m 29s ⏱️ + 23m 29s Results for commit fcd2182. ± Comparison against base commit ce367a4. This pull request removes 1 and adds 311 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
...ce/src/main/java/com/hedera/node/app/service/mono/state/migration/ContractStateMigrator.java
Outdated
Show resolved
Hide resolved
(remove misleading no-longer-needed comment) Signed-off-by: David S Bakin <117694041+david-bakin-sl@users.noreply.github.com>
Description:
Nodes added to the merkle tree must be added in deterministic order.
Especially for the migrators, which add so many nodes they cross commit boundaries.
Remove the concurrent sinking of contract slots; replace with accumulating all
fromState
slots into a concurrent queue, then placing them in an array, and then sorting them.Related issue(s):
Fixes #10293
Checklist