Skip to content
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

[Cadence 1.0 migration] Add EVM storage account creation migration #6422

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

turbolent
Copy link
Member

Reported in https://discord.com/channels/613813861610684416/1278736553795129374

After migrating an Emulator state snapshot to Cadence 1.0, sending any transaction against the migrated state fails:

Transaction ID: 7c2bf8e9f491fa0b033b984a677304897c7eaecab85586adff163a874bd9345a
❌ Command Error: failed to submit transaction: client: rpc error: code = Internal desc = [Error Code: 1201] error caused by: 1 error occurred:
    * transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed:
  --> 4b77dc12dc452df7174ff3f73b70dfe4d1e5434d8b40e78deefe3b7b6ae7105d:14:8
   |
14 |         evmHeartbeat.heartbeat()
   |         ^^^^^^^^^^^^^^^^^^^^^^^^

error: unexpected error: backend error: set value failed: failed to update storage for 01cf0e2f2f715450/#4c6174657374426c6f636b50726f706f73616c: failed to get storage used: [Error Code: 1201] account not found for address 01cf0e2f2f715450
...
  --> f8d6e0586b0a20c7.EVM:828:12
    |
828 |             InternalEVM.commitBlockProposal()
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This error occurs, because the EVM storage account does not exist yet in the Emulator state.

Add a new migration to the Cadence 1.0 migration pipeline which creates the EVM storage account, if the migrated state is for the Emulator.

@turbolent turbolent requested review from a team August 29, 2024 23:00
@turbolent turbolent self-assigned this Aug 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 41.43%. Comparing base (9708618) to head (68d88f1).

Files with missing lines Patch % Lines
cmd/util/ledger/migrations/account.go 0.00% 30 Missing ⚠️
cmd/util/ledger/migrations/cadence.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6422   +/-   ##
=======================================
  Coverage   41.43%   41.43%           
=======================================
  Files        2019     2020    +1     
  Lines      143861   143901   +40     
=======================================
+ Hits        59607    59631   +24     
- Misses      78082    78101   +19     
+ Partials     6172     6169    -3     
Flag Coverage Δ
unittests 41.43% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@turbolent turbolent enabled auto-merge August 30, 2024 01:55
@turbolent turbolent added this pull request to the merge queue Aug 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 30, 2024
@turbolent turbolent added this pull request to the merge queue Aug 30, 2024
Merged via the queue into master with commit 1a9e9d5 Aug 30, 2024
55 checks passed
@turbolent turbolent deleted the bastian/evm-storage-account-creation-migration branch August 30, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants