Skip to content

Commit

Permalink
Atree migration initial commit
Browse files Browse the repository at this point in the history
atree register migration interpreter fix

atree migration interpreter pool

atree migration create snapshot once

Atree migrator graceful shutdown

Atree migration GetOrLoadProgram fix

atree migration add extra logs

atree migration timer for long migrations

Atree migration overhaul logging

atree migration change interpreter pool design

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree migration trying to get program cache to actually work

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix

atree register migration fix
  • Loading branch information
janezpodhostnik committed Aug 25, 2023
1 parent 9d1c066 commit b8f10e9
Show file tree
Hide file tree
Showing 32 changed files with 1,432 additions and 235 deletions.
2 changes: 1 addition & 1 deletion cmd/util/cmd/checkpoint-list-tries/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func init() {
func run(*cobra.Command, []string) {

log.Info().Msgf("loading checkpoint %v", flagCheckpoint)
tries, err := wal.LoadCheckpoint(flagCheckpoint, &log.Logger)
tries, err := wal.LoadCheckpoint(flagCheckpoint, log.Logger)
if err != nil {
log.Fatal().Err(err).Msg("error while loading checkpoint")
}
Expand Down
13 changes: 10 additions & 3 deletions cmd/util/cmd/execution-state-extract/execution_state_extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/rs/zerolog"
"go.uber.org/atomic"

migrators "github.com/onflow/flow-go/cmd/util/ledger/migrations"
"github.com/onflow/flow-go/cmd/util/ledger/reporters"
"github.com/onflow/flow-go/ledger"
"github.com/onflow/flow-go/ledger/common/hash"
Expand Down Expand Up @@ -82,10 +83,15 @@ func extractExecutionState(
<-compactor.Done()
}()

var migrations []ledger.Migration
var migrations = []ledger.Migration{
migrators.MigrateAtreeRegisters(
log,
reporters.NewReportFileWriterFactory(dir, log),
nWorker),
}
newState := ledger.State(targetHash)

// migrate the trie if there migrations
// migrate the trie if there are migrations
newTrie, err := led.MigrateAt(
newState,
migrations,
Expand All @@ -97,7 +103,8 @@ func extractExecutionState(
}

// create reporter
reporter := reporters.NewExportReporter(log,
reporter := reporters.NewExportReporter(
log,
func() flow.StateCommitment { return targetHash },
)

Expand Down
Loading

0 comments on commit b8f10e9

Please sign in to comment.