Skip to content

Commit

Permalink
Merge pull request #8942 from filecoin-project/asr/migrate-nv16-shed
Browse files Browse the repository at this point in the history
feat: shed: migrate-nv16
  • Loading branch information
magik6k authored Jul 7, 2022
2 parents 7e7343c + 324cad3 commit 9288526
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/lotus-shed/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
)

var migrationsCmd = &cli.Command{
Name: "migrate-nv15",
Description: "Run the specified migration",
Name: "migrate-nv16",
Description: "Run the nv16 migration",
ArgsUsage: "[block to look back from]",
Flags: []cli.Flag{
&cli.StringFlag{
Expand Down Expand Up @@ -92,30 +92,30 @@ var migrationsCmd = &cli.Command{
return err
}

ts1, err := cs.GetTipsetByHeight(ctx, blk.Height-240, migrationTs, false)
ts1, err := cs.GetTipsetByHeight(ctx, blk.Height-180, migrationTs, false)
if err != nil {
return err
}

startTime := time.Now()

err = filcns.PreUpgradeActorsV7(ctx, sm, cache, ts1.ParentState(), ts1.Height()-1, ts1)
err = filcns.PreUpgradeActorsV8(ctx, sm, cache, ts1.ParentState(), ts1.Height()-1, ts1)
if err != nil {
return err
}

fmt.Println("completed round 1, took ", time.Since(startTime))
startTime = time.Now()

newCid1, err := filcns.UpgradeActorsV7(ctx, sm, cache, nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
newCid1, err := filcns.UpgradeActorsV8(ctx, sm, cache, nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
if err != nil {
return err
}
fmt.Println("completed round actual (with cache), took ", time.Since(startTime))

fmt.Println("new cid", newCid1)

newCid2, err := filcns.UpgradeActorsV7(ctx, sm, nv15.NewMemMigrationCache(), nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
newCid2, err := filcns.UpgradeActorsV8(ctx, sm, nv15.NewMemMigrationCache(), nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
if err != nil {
return err
}
Expand Down

0 comments on commit 9288526

Please sign in to comment.