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

Atree Migration cleanup #5284

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions cmd/util/ledger/migrations/atree_register_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,16 @@ var domains = []string{
common.PathDomainPublic.Identifier(),
runtime.StorageDomainContract,
stdlib.InboxStorageDomain,
stdlib.CapabilityControllerStorageDomain,
}

var domainsLookupMap = map[string]struct{}{
common.PathDomainStorage.Identifier(): {},
common.PathDomainPrivate.Identifier(): {},
common.PathDomainPublic.Identifier(): {},
runtime.StorageDomainContract: {},
stdlib.InboxStorageDomain: {},
common.PathDomainStorage.Identifier(): {},
common.PathDomainPrivate.Identifier(): {},
common.PathDomainPublic.Identifier(): {},
runtime.StorageDomainContract: {},
stdlib.InboxStorageDomain: {},
stdlib.CapabilityControllerStorageDomain: {},
}

// migrationProblem is a struct for reporting errors
Expand Down
7 changes: 0 additions & 7 deletions cmd/util/ledger/migrations/atree_register_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ func TestAtreeRegisterMigration(t *testing.T) {
log := zerolog.New(zerolog.NewTestWriter(t))
dir := t.TempDir()

validation := migrations.NewCadenceDataValidationMigrations(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not needed anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, validation is done differently now, this was just a thing from the past we forgot to remove. The validation is now in cmd/util/ledger/migrations/cadence_value_validation.go.

reporters.NewReportFileWriterFactory(dir, log),
2,
)

// Localnet v0.31 was used to produce an execution state that can be used for the tests.
t.Run(
"test v0.31 state",
Expand All @@ -35,9 +30,7 @@ func TestAtreeRegisterMigration(t *testing.T) {
"test-data/bootstrapped_v0.31",
migrations.CreateAccountBasedMigration(log, 2,
[]migrations.AccountBasedMigration{
validation.PreMigration(),
migrations.NewAtreeRegisterMigrator(reporters.NewReportFileWriterFactory(dir, log), true, false),
validation.PostMigration(),
},
),
func(t *testing.T, oldPayloads []*ledger.Payload, newPayloads []*ledger.Payload) {
Expand Down
329 changes: 0 additions & 329 deletions cmd/util/ledger/migrations/cadence_data_validation.go

This file was deleted.

Loading