Merge pull request #8942 from filecoin-project/asr/migrate-nv16-shed
feat: shed: migrate-nv16
This commit is contained in:
commit
9288526867
@ -21,8 +21,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var migrationsCmd = &cli.Command{
|
var migrationsCmd = &cli.Command{
|
||||||
Name: "migrate-nv15",
|
Name: "migrate-nv16",
|
||||||
Description: "Run the specified migration",
|
Description: "Run the nv16 migration",
|
||||||
ArgsUsage: "[block to look back from]",
|
ArgsUsage: "[block to look back from]",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
@ -92,14 +92,14 @@ var migrationsCmd = &cli.Command{
|
|||||||
return err
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
startTime := time.Now()
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ var migrationsCmd = &cli.Command{
|
|||||||
fmt.Println("completed round 1, took ", time.Since(startTime))
|
fmt.Println("completed round 1, took ", time.Since(startTime))
|
||||||
startTime = time.Now()
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ var migrationsCmd = &cli.Command{
|
|||||||
|
|
||||||
fmt.Println("new cid", newCid1)
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user