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

Revert "Optimise merge registers for migrations" #5594

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

turbolent
Copy link
Member

Reverts #5522

On feature/stable-cadence, TestCadenceValuesMigration currently randomly succeeds or fails with various causes, e.g.

=== RUN   TestCadenceValuesMigration
=== PAUSE TestCadenceValuesMigration
=== CONT  TestCadenceValuesMigration
    cadence_values_migration_test.go:134:
                Error Trace:    /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:134
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106
                Error:          Not equal:
                                expected: 12
                                actual  : 1
                Test:           TestCadenceValuesMigration
--- FAIL: TestCadenceValuesMigration (0.46s)
=== RUN   TestCadenceValuesMigration
=== PAUSE TestCadenceValuesMigration
=== CONT  TestCadenceValuesMigration
panic: internal error: invalid ordered map type info: interpreter.EmptyTypeInfo
goroutine 210 [running]:
runtime/debug.Stack()
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/runtime/debug/stack.go:24 +0x6c
github.com/onflow/cadence/runtime/errors.NewUnexpectedError({0x10242cc3a, 0x21}, {0xc0005d95e8, 0x1, 0x1})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/errors/errors.go:156 +0x64
github.com/onflow/cadence/runtime/interpreter.ConvertStoredValue({0x102dd6020, 0xc000a7ae40}, {0x102dd5480?, 0xc0021d5e90?})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/storage.go:93 +0x2e4
github.com/onflow/cadence/runtime/interpreter.MustConvertStoredValue(...)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/storage.go:45
github.com/onflow/cadence/runtime/interpreter.StorageMapIterator.Next({{0x102dd6020, 0xc000a7ae40}, 0xc0021d4a80, {0x102def770, 0xc010d8e640}})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/storagemap.go:219 +0x5c
github.com/onflow/cadence/migrations.(*AccountStorage).MigrateStorageMap(0xc0005d99d8, 0xc0015c8330?, {0x1023f894b, 0x8}, {0x102de0340, 0xc0015c8330}, 0x102dc8150)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/migrations/account_storage.go:155 +0x230
github.com/onflow/cadence/migrations.(*AccountStorage).MigrateStringKeys(0x102c3a180?, 0x0?, {0x1023f894b, 0x8}, {0x102de0340, 0xc0015c8330})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/migrations/account_storage.go:104 +0x5c
github.com/onflow/cadence/migrations.(*StorageMigration).MigrateAccount(0xc0015c8310, {0xf8, 0xd6, 0xe0, 0x58, 0x6b, 0xa, 0x20, 0xc7}, {0x102de0340, ...})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/migrations/migration.go:90 +0x1b0
github.com/onflow/flow-go/cmd/util/ledger/migrations.(*CadenceBaseMigrator).MigrateAccount(0xc0004f4600, {0xc7200a6b58e0d6f8?, 0x0?}, {0xf8, 0xd6, 0xe0, 0x58, 0x6b, 0xa, 0x20, ...}, ...)
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration.go:119 +0x4a0
github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently.func1()
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:215 +0x608
created by github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:163 +0x290


goroutine 210 [running]:
github.com/onflow/cadence/runtime/interpreter.MustConvertStoredValue(...)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/storage.go:47
github.com/onflow/cadence/runtime/interpreter.StorageMapIterator.Next({{0x102dd6020, 0xc000a7ae40}, 0xc0021d4a80, {0x102def770, 0xc010d8e640}})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/storagemap.go:219 +0xb8
github.com/onflow/cadence/migrations.(*AccountStorage).MigrateStorageMap(0xc0005d99d8, 0xc0015c8330?, {0x1023f894b, 0x8}, {0x102de0340, 0xc0015c8330}, 0x102dc8150)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/migrations/account_storage.go:155 +0x230
github.com/onflow/cadence/migrations.(*AccountStorage).MigrateStringKeys(0x102c3a180?, 0x0?, {0x1023f894b, 0x8}, {0x102de0340, 0xc0015c8330})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/migrations/account_storage.go:104 +0x5c
github.com/onflow/cadence/migrations.(*StorageMigration).MigrateAccount(0xc0015c8310, {0xf8, 0xd6, 0xe0, 0x58, 0x6b, 0xa, 0x20, 0xc7}, {0x102de0340, ...})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/migrations/migration.go:90 +0x1b0
github.com/onflow/flow-go/cmd/util/ledger/migrations.(*CadenceBaseMigrator).MigrateAccount(0xc0004f4600, {0xc7200a6b58e0d6f8?, 0x0?}, {0xf8, 0xd6, 0xe0, 0x58, 0x6b, 0xa, 0x20, ...}, ...)
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration.go:119 +0x4a0
github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently.func1()
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:215 +0x608
created by github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:163 +0x290
exit status 2
FAIL    github.com/onflow/flow-go/cmd/util/ledger/migrations    2.698s
==================
WARNING: DATA RACE
Read at 0x00c00000e1e0 by goroutine 85:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*writer).Write()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:39 +0x50
  github.com/rs/zerolog.levelWriterAdapter.WriteLevel()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/writer.go:25 +0x64
  github.com/rs/zerolog.(*levelWriterAdapter).WriteLevel()
      <autogenerated>:1 +0x20
  github.com/rs/zerolog.(*Event).write()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:78 +0x248
  github.com/rs/zerolog.(*Event).msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:149 +0x30c
  github.com/rs/zerolog.(*Event).Msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:108 +0x58c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*CadenceBaseMigrator).MigrateAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration.go:134 +0x56c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:215 +0x604

Previous write at 0x00c00000e1e0 by goroutine 86:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*writer).Write()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:39 +0xf4
  github.com/rs/zerolog.levelWriterAdapter.WriteLevel()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/writer.go:25 +0x64
  github.com/rs/zerolog.(*levelWriterAdapter).WriteLevel()
      <autogenerated>:1 +0x20
  github.com/rs/zerolog.(*Event).write()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:78 +0x248
  github.com/rs/zerolog.(*Event).msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:149 +0x30c
  github.com/rs/zerolog.(*Event).Msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:108 +0x58c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*CadenceBaseMigrator).MigrateAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration.go:134 +0x56c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:215 +0x604

Goroutine 85 (running) created at:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:163 +0x28c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:101 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.withMigrations()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:140 +0xc8
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:98 +0x52c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.NewAccountBasedMigration.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:52 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:95 +0x338
  testing.tRunner()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x188
  testing.(*T).Run.func1()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x40

Goroutine 86 (finished) created at:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:163 +0x28c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:101 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.withMigrations()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:140 +0xc8
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:98 +0x52c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.NewAccountBasedMigration.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:52 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:95 +0x338
  testing.tRunner()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x188
  testing.(*T).Run.func1()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x40
==================
==================
WARNING: DATA RACE
Read at 0x00c010d58e50 by goroutine 85:
  runtime.growslice()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/runtime/slice.go:157 +0x0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*writer).Write()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:39 +0x88
  github.com/rs/zerolog.levelWriterAdapter.WriteLevel()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/writer.go:25 +0x64
  github.com/rs/zerolog.(*levelWriterAdapter).WriteLevel()
      <autogenerated>:1 +0x20
  github.com/rs/zerolog.(*Event).write()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:78 +0x248
  github.com/rs/zerolog.(*Event).msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:149 +0x30c
  github.com/rs/zerolog.(*Event).Msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:108 +0x58c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*CadenceBaseMigrator).MigrateAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration.go:134 +0x56c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:215 +0x604

Previous write at 0x00c010d58e50 by goroutine 86:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*writer).Write()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:39 +0xb0
  github.com/rs/zerolog.levelWriterAdapter.WriteLevel()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/writer.go:25 +0x64
  github.com/rs/zerolog.(*levelWriterAdapter).WriteLevel()
      <autogenerated>:1 +0x20
  github.com/rs/zerolog.(*Event).write()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:78 +0x248
  github.com/rs/zerolog.(*Event).msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:149 +0x30c
  github.com/rs/zerolog.(*Event).Msg()
      /Users/bastian/go/pkg/mod/github.com/rs/zerolog@v1.29.0/event.go:108 +0x58c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.(*CadenceBaseMigrator).MigrateAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration.go:134 +0x56c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:215 +0x604

Goroutine 85 (running) created at:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:163 +0x28c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:101 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.withMigrations()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:140 +0xc8
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:98 +0x52c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.NewAccountBasedMigration.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:52 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:95 +0x338
  testing.tRunner()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x188
  testing.(*T).Run.func1()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x40

Goroutine 86 (finished) created at:
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateGroupConcurrently()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:163 +0x28c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:101 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.withMigrations()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:140 +0xc8
  github.com/onflow/flow-go/cmd/util/ledger/migrations.MigrateByAccount()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:98 +0x52c
  github.com/onflow/flow-go/cmd/util/ledger/migrations.NewAccountBasedMigration.func1()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/account_based_migration.go:52 +0xd0
  github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration()
      /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:95 +0x338
  testing.tRunner()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x188
  testing.(*T).Run.func1()
      /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x40
==================
    cadence_values_migration_test.go:394:
                Error Trace:    /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:394
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:139
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106
                Error:          Not equal:
                                expected: 0x3
                                actual  : 0x2
                Test:           TestCadenceValuesMigration
    cadence_values_migration_test.go:377:
                Error Trace:    /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:377
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106
                Error:          extra item in actual values: {1: nil, 2: nil}
                Test:           TestCadenceValuesMigration
    cadence_values_migration_test.go:377:
                Error Trace:    /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:377
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106
                Error:          extra item in actual values: {Type<&A.01cf0e2f2f715450.Test.R>(): "auth_ref"}
                Test:           TestCadenceValuesMigration
    cadence_values_migration_test.go:377:
                Error Trace:    /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:377
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106
                Error:          extra item in actual values: {Type<&A.01cf0e2f2f715450.Test.R>(): "non_auth_ref"}
                Test:           TestCadenceValuesMigration
    cadence_values_migration_test.go:377:
                Error Trace:    /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:377
                                                        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106
                Error:          extra item in actual values: Type<AuthAccount>()
                Test:           TestCadenceValuesMigration
    testing.go:1446: race detected during execution of test
--- FAIL: TestCadenceValuesMigration (0.45s)
panic: internal error: cannot convert deprecated type AuthAccountContracts
goroutine 15 [running]:
runtime/debug.Stack()
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/runtime/debug/stack.go:24 +0x6c
github.com/onflow/cadence/runtime/errors.NewUnexpectedError({0x10497feb5, 0x21}, {0xc000440ca0, 0x1, 0x1})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/errors/errors.go:156 +0x64
github.com/onflow/cadence/runtime/interpreter.PrimitiveStaticType.SemaType(0x5d)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/primitivestatictype.go:660 +0x1518
github.com/onflow/cadence/runtime/interpreter.PrimitiveStaticType.ID(0x10534e500?)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/primitivestatictype.go:425 +0x2c
github.com/onflow/cadence/runtime/interpreter.TypeValue.HashInput({{0x105346f10?, 0x1061bc208?}}, 0xc000440e68?, {{0x102bbacb4?, 0xc000440e58?}, {0x102bb64b4?, 0xc000440e68?}}, {0xc010cb96a8, 0x20, 0x20})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:521 +0x4c
github.com/onflow/cadence/runtime/interpreter.newHashInputProvider.func1({0x10532efa0, 0xc001f60c60}, {0xc010cb96a8, 0x20, 0x20})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/hashablevalue.go:34 +0xc0
github.com/onflow/atree.(*basicDigesterBuilder).Digest(0xc0106455a0, 0xc000afbc20, {0x10532efa0, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/atree@v0.6.1-0.20240308163425-dc825c20b1a2/hash.go:107 +0x114
github.com/onflow/atree.(*OrderedMap).Get(0xc0000af080, 0x0?, 0x0?, {0x10532efa0, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/atree@v0.6.1-0.20240308163425-dc825c20b1a2/map.go:3579 +0x78
github.com/onflow/cadence/runtime/interpreter.(*DictionaryValue).Get(0xc0000af0b0, 0xc010cb8780?, {{0x0?, 0x0?}, {0x0?, 0x0?}}, {0x10534e500?, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:18984 +0xdc
github.com/onflow/cadence/runtime/interpreter.(*DictionaryValue).Equal(0xc0000ae330, 0xc000582820?, {{0x0?, 0x0?}, {0x0?, 0x0?}}, {0x10534d540?, 0xc0000af0b0})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:19573 +0x224
github.com/onflow/flow-go/cmd/util/ledger/migrations.checkMigratedPayloads(0xc000582820?, {0x1, 0xcf, 0xe, 0x2f, 0x2f, 0x71, 0x54, 0x50}, {0xc0017e2300, ...})
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:369 +0x2b34
github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration(0x0?)
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106 +0x420
testing.tRunner(0xc000582820, 0x10531d4d0)
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x18c
created by testing.(*T).Run
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x5e8
 [recovered]
        panic: internal error: cannot convert deprecated type AuthAccountContracts
goroutine 15 [running]:
runtime/debug.Stack()
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/runtime/debug/stack.go:24 +0x6c
github.com/onflow/cadence/runtime/errors.NewUnexpectedError({0x10497feb5, 0x21}, {0xc000440ca0, 0x1, 0x1})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/errors/errors.go:156 +0x64
github.com/onflow/cadence/runtime/interpreter.PrimitiveStaticType.SemaType(0x5d)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/primitivestatictype.go:660 +0x1518
github.com/onflow/cadence/runtime/interpreter.PrimitiveStaticType.ID(0x10534e500?)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/primitivestatictype.go:425 +0x2c
github.com/onflow/cadence/runtime/interpreter.TypeValue.HashInput({{0x105346f10?, 0x1061bc208?}}, 0xc000440e68?, {{0x102bbacb4?, 0xc000440e58?}, {0x102bb64b4?, 0xc000440e68?}}, {0xc010cb96a8, 0x20, 0x20})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:521 +0x4c
github.com/onflow/cadence/runtime/interpreter.newHashInputProvider.func1({0x10532efa0, 0xc001f60c60}, {0xc010cb96a8, 0x20, 0x20})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/hashablevalue.go:34 +0xc0
github.com/onflow/atree.(*basicDigesterBuilder).Digest(0xc0106455a0, 0xc000afbc20, {0x10532efa0, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/atree@v0.6.1-0.20240308163425-dc825c20b1a2/hash.go:107 +0x114
github.com/onflow/atree.(*OrderedMap).Get(0xc0000af080, 0x0?, 0x0?, {0x10532efa0, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/atree@v0.6.1-0.20240308163425-dc825c20b1a2/map.go:3579 +0x78
github.com/onflow/cadence/runtime/interpreter.(*DictionaryValue).Get(0xc0000af0b0, 0xc010cb8780?, {{0x0?, 0x0?}, {0x0?, 0x0?}}, {0x10534e500?, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:18984 +0xdc
github.com/onflow/cadence/runtime/interpreter.(*DictionaryValue).Equal(0xc0000ae330, 0xc000582820?, {{0x0?, 0x0?}, {0x0?, 0x0?}}, {0x10534d540?, 0xc0000af0b0})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:19573 +0x224
github.com/onflow/flow-go/cmd/util/ledger/migrations.checkMigratedPayloads(0xc000582820?, {0x1, 0xcf, 0xe, 0x2f, 0x2f, 0x71, 0x54, 0x50}, {0xc0017e2300, ...})
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:369 +0x2b34
github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration(0x0?)
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106 +0x420
testing.tRunner(0xc000582820, 0x10531d4d0)
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x18c
created by testing.(*T).Run
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x5e8


goroutine 15 [running]:
testing.tRunner.func1.2({0x1051ccd80, 0xc000afbc50})
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1526 +0x278
testing.tRunner.func1()
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1529 +0x448
panic({0x1051ccd80, 0xc000afbc50})
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/runtime/panic.go:890 +0x258
github.com/onflow/cadence/runtime/interpreter.PrimitiveStaticType.SemaType(0x5d)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/primitivestatictype.go:660 +0x1564
github.com/onflow/cadence/runtime/interpreter.PrimitiveStaticType.ID(0x10534e500?)
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/primitivestatictype.go:425 +0x2c
github.com/onflow/cadence/runtime/interpreter.TypeValue.HashInput({{0x105346f10?, 0x1061bc208?}}, 0xc000440e68?, {{0x102bbacb4?, 0xc000440e58?}, {0x102bb64b4?, 0xc000440e68?}}, {0xc010cb96a8, 0x20, 0x20})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:521 +0x4c
github.com/onflow/cadence/runtime/interpreter.newHashInputProvider.func1({0x10532efa0, 0xc001f60c60}, {0xc010cb96a8, 0x20, 0x20})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/hashablevalue.go:34 +0xc0
github.com/onflow/atree.(*basicDigesterBuilder).Digest(0xc0106455a0, 0xc000afbc20, {0x10532efa0, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/atree@v0.6.1-0.20240308163425-dc825c20b1a2/hash.go:107 +0x114
github.com/onflow/atree.(*OrderedMap).Get(0xc0000af080, 0x0?, 0x0?, {0x10532efa0, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/atree@v0.6.1-0.20240308163425-dc825c20b1a2/map.go:3579 +0x78
github.com/onflow/cadence/runtime/interpreter.(*DictionaryValue).Get(0xc0000af0b0, 0xc010cb8780?, {{0x0?, 0x0?}, {0x0?, 0x0?}}, {0x10534e500?, 0xc001f60c60})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:18984 +0xdc
github.com/onflow/cadence/runtime/interpreter.(*DictionaryValue).Equal(0xc0000ae330, 0xc000582820?, {{0x0?, 0x0?}, {0x0?, 0x0?}}, {0x10534d540?, 0xc0000af0b0})
        /Users/bastian/go/pkg/mod/github.com/onflow/cadence@v1.0.0-preview.16/runtime/interpreter/value.go:19573 +0x224
github.com/onflow/flow-go/cmd/util/ledger/migrations.checkMigratedPayloads(0xc000582820?, {0x1, 0xcf, 0xe, 0x2f, 0x2f, 0x71, 0x54, 0x50}, {0xc0017e2300, ...})
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:369 +0x2b34
github.com/onflow/flow-go/cmd/util/ledger/migrations.TestCadenceValuesMigration(0x0?)
        /Users/bastian/Documents/work/flow-go/cmd/util/ledger/migrations/cadence_values_migration_test.go:106 +0x420
testing.tRunner(0xc000582820, 0x10531d4d0)
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1576 +0x18c
created by testing.(*T).Run
        /opt/homebrew/Cellar/go@1.20/1.20.14/libexec/src/testing/testing.go:1629 +0x5e8
exit status 2
FAIL    github.com/onflow/flow-go/cmd/util/ledger/migrations    2.601s

A git bisect identified #5522 as the cause, but the reason is still unknown.

Temporary revert the PR until we know what is causing the issues.

@turbolent turbolent requested review from a team March 27, 2024 17:12
@turbolent turbolent merged commit 1b7ecca into feature/stable-cadence Mar 27, 2024
55 checks passed
@turbolent turbolent deleted the revert-5522-janez/optimise-merge branch March 27, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants