From 5a99637ffc14715db2b21c53f4d6ff38e75c28a4 Mon Sep 17 00:00:00 2001 From: anorth <445306+anorth@users.noreply.github.com> Date: Tue, 19 Jan 2021 20:49:51 +1100 Subject: [PATCH] Rename package nv9 to nv10 --- Makefile | 4 ++-- actors/migration/{nv9 => nv10}/init.go | 2 +- actors/migration/{nv9 => nv10}/market.go | 2 +- actors/migration/{nv9 => nv10}/miner.go | 2 +- actors/migration/{nv9 => nv10}/multisig.go | 2 +- actors/migration/{nv9 => nv10}/paych.go | 2 +- actors/migration/{nv9 => nv10}/power.go | 2 +- .../{nv9 => nv10}/test/modify_pending_proposals_test.go | 4 ++-- .../{nv9 => nv10}/test/parallel_migration_test.go | 8 ++++---- actors/migration/{nv9 => nv10}/test/util_test.go | 0 actors/migration/{nv9 => nv10}/top.go | 2 +- actors/migration/{nv9 => nv10}/util.go | 2 +- actors/migration/{nv9 => nv10}/verifreg.go | 2 +- go.mod | 2 +- go.sum | 2 ++ 15 files changed, 20 insertions(+), 18 deletions(-) rename actors/migration/{nv9 => nv10}/init.go (98%) rename actors/migration/{nv9 => nv10}/market.go (99%) rename actors/migration/{nv9 => nv10}/miner.go (99%) rename actors/migration/{nv9 => nv10}/multisig.go (99%) rename actors/migration/{nv9 => nv10}/paych.go (98%) rename actors/migration/{nv9 => nv10}/power.go (99%) rename actors/migration/{nv9 => nv10}/test/modify_pending_proposals_test.go (98%) rename actors/migration/{nv9 => nv10}/test/parallel_migration_test.go (73%) rename actors/migration/{nv9 => nv10}/test/util_test.go (100%) rename actors/migration/{nv9 => nv10}/top.go (99%) rename actors/migration/{nv9 => nv10}/util.go (99%) rename actors/migration/{nv9 => nv10}/verifreg.go (98%) diff --git a/Makefile b/Makefile index ab9c29acb..7ad31fa0b 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,11 @@ build: test: $(GO_BIN) test ./... - $(GO_BIN) test -race ./actors/migration/nv9/test + $(GO_BIN) test -race ./actors/migration/nv10/test .PHONY: test test-migration: - $(GO_BIN) test -race ./actors/migration/nv9/test + $(GO_BIN) test -race ./actors/migration/nv10/test .PHONY: test-migration test-coverage: diff --git a/actors/migration/nv9/init.go b/actors/migration/nv10/init.go similarity index 98% rename from actors/migration/nv9/init.go rename to actors/migration/nv10/init.go index df58c58cb..c4f742ad6 100644 --- a/actors/migration/nv9/init.go +++ b/actors/migration/nv10/init.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/market.go b/actors/migration/nv10/market.go similarity index 99% rename from actors/migration/nv9/market.go rename to actors/migration/nv10/market.go index f1a946fb4..dc5cd2ed0 100644 --- a/actors/migration/nv9/market.go +++ b/actors/migration/nv10/market.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/miner.go b/actors/migration/nv10/miner.go similarity index 99% rename from actors/migration/nv9/miner.go rename to actors/migration/nv10/miner.go index 515481d4e..cb8e1e210 100644 --- a/actors/migration/nv9/miner.go +++ b/actors/migration/nv10/miner.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/multisig.go b/actors/migration/nv10/multisig.go similarity index 99% rename from actors/migration/nv9/multisig.go rename to actors/migration/nv10/multisig.go index abbd258fa..99278b892 100644 --- a/actors/migration/nv9/multisig.go +++ b/actors/migration/nv10/multisig.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/paych.go b/actors/migration/nv10/paych.go similarity index 98% rename from actors/migration/nv9/paych.go rename to actors/migration/nv10/paych.go index df6b5f933..bc226ba95 100644 --- a/actors/migration/nv9/paych.go +++ b/actors/migration/nv10/paych.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/power.go b/actors/migration/nv10/power.go similarity index 99% rename from actors/migration/nv9/power.go rename to actors/migration/nv10/power.go index 51e1faf20..fbcf3e1ac 100644 --- a/actors/migration/nv9/power.go +++ b/actors/migration/nv10/power.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/test/modify_pending_proposals_test.go b/actors/migration/nv10/test/modify_pending_proposals_test.go similarity index 98% rename from actors/migration/nv9/test/modify_pending_proposals_test.go rename to actors/migration/nv10/test/modify_pending_proposals_test.go index 9ff44f219..04ac6cd65 100644 --- a/actors/migration/nv9/test/modify_pending_proposals_test.go +++ b/actors/migration/nv10/test/modify_pending_proposals_test.go @@ -27,7 +27,7 @@ import ( exported3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/exported" market3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/market" miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner" - "github.com/filecoin-project/specs-actors/v3/actors/migration/nv9" + "github.com/filecoin-project/specs-actors/v3/actors/migration/nv10" states3 "github.com/filecoin-project/specs-actors/v3/actors/states" tutil "github.com/filecoin-project/specs-actors/v3/support/testing" vm3 "github.com/filecoin-project/specs-actors/v3/support/vm" @@ -74,7 +74,7 @@ func TestUpdatePendingDealsMigration(t *testing.T) { } // run migration - nextRoot, err := nv9.MigrateStateTree(ctx, v.Store(), v.StateRoot(), v.GetEpoch(), nv9.Config{MaxWorkers: 1}, log, nv9.NewMemMigrationCache()) + nextRoot, err := nv10.MigrateStateTree(ctx, v.Store(), v.StateRoot(), v.GetEpoch(), nv10.Config{MaxWorkers: 1}, log, nv10.NewMemMigrationCache()) require.NoError(t, err) lookup := map[cid.Cid]rt.VMActor{} diff --git a/actors/migration/nv9/test/parallel_migration_test.go b/actors/migration/nv10/test/parallel_migration_test.go similarity index 73% rename from actors/migration/nv9/test/parallel_migration_test.go rename to actors/migration/nv10/test/parallel_migration_test.go index df597e646..dd4461eca 100644 --- a/actors/migration/nv9/test/parallel_migration_test.go +++ b/actors/migration/nv10/test/parallel_migration_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" - "github.com/filecoin-project/specs-actors/v3/actors/migration/nv9" + "github.com/filecoin-project/specs-actors/v3/actors/migration/nv10" ) func TestParallelMigrationCalls(t *testing.T) { @@ -27,7 +27,7 @@ func TestParallelMigrationCalls(t *testing.T) { // Run migration adtStore := adt2.WrapStore(ctx, cbor.NewCborStore(bs)) startRoot := vm.StateRoot() - endRootSerial, err := nv9.MigrateStateTree(ctx, adtStore, startRoot, abi.ChainEpoch(0), nv9.Config{MaxWorkers: 1}, log, nv9.NewMemMigrationCache()) + endRootSerial, err := nv10.MigrateStateTree(ctx, adtStore, startRoot, abi.ChainEpoch(0), nv10.Config{MaxWorkers: 1}, log, nv10.NewMemMigrationCache()) require.NoError(t, err) // Migrate in parallel @@ -35,12 +35,12 @@ func TestParallelMigrationCalls(t *testing.T) { grp, ctx := errgroup.WithContext(ctx) grp.Go(func() error { var err1 error - endRootParallel1, err1 = nv9.MigrateStateTree(ctx, adtStore, startRoot, abi.ChainEpoch(0), nv9.Config{MaxWorkers: 2}, log, nv9.NewMemMigrationCache()) + endRootParallel1, err1 = nv10.MigrateStateTree(ctx, adtStore, startRoot, abi.ChainEpoch(0), nv10.Config{MaxWorkers: 2}, log, nv10.NewMemMigrationCache()) return err1 }) grp.Go(func() error { var err2 error - endRootParallel2, err2 = nv9.MigrateStateTree(ctx, adtStore, startRoot, abi.ChainEpoch(0), nv9.Config{MaxWorkers: 2}, log, nv9.NewMemMigrationCache()) + endRootParallel2, err2 = nv10.MigrateStateTree(ctx, adtStore, startRoot, abi.ChainEpoch(0), nv10.Config{MaxWorkers: 2}, log, nv10.NewMemMigrationCache()) return err2 }) require.NoError(t, grp.Wait()) diff --git a/actors/migration/nv9/test/util_test.go b/actors/migration/nv10/test/util_test.go similarity index 100% rename from actors/migration/nv9/test/util_test.go rename to actors/migration/nv10/test/util_test.go diff --git a/actors/migration/nv9/top.go b/actors/migration/nv10/top.go similarity index 99% rename from actors/migration/nv9/top.go rename to actors/migration/nv10/top.go index 9982932cd..d62e3d03c 100644 --- a/actors/migration/nv9/top.go +++ b/actors/migration/nv10/top.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/actors/migration/nv9/util.go b/actors/migration/nv10/util.go similarity index 99% rename from actors/migration/nv9/util.go rename to actors/migration/nv10/util.go index e474d2465..3c3e11b4d 100644 --- a/actors/migration/nv9/util.go +++ b/actors/migration/nv10/util.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "bytes" diff --git a/actors/migration/nv9/verifreg.go b/actors/migration/nv10/verifreg.go similarity index 98% rename from actors/migration/nv9/verifreg.go rename to actors/migration/nv10/verifreg.go index d836abd77..30baead95 100644 --- a/actors/migration/nv9/verifreg.go +++ b/actors/migration/nv10/verifreg.go @@ -1,4 +1,4 @@ -package nv9 +package nv10 import ( "context" diff --git a/go.mod b/go.mod index 501ba783c..bf5de2076 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/filecoin-project/go-bitfield v0.2.0 github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 github.com/filecoin-project/go-hamt-ipld/v3 v3.0.0-20201203140949-5cdbb5191437 - github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc + github.com/filecoin-project/go-state-types v0.0.0-20210119062722-4adba5aaea71 github.com/filecoin-project/specs-actors v0.9.13 github.com/filecoin-project/specs-actors/v2 v2.3.4 github.com/ipfs/go-block-format v0.0.2 diff --git a/go.sum b/go.sum index 984b0719c..982bbf8ab 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,8 @@ github.com/filecoin-project/go-hamt-ipld/v3 v3.0.0-20201203140949-5cdbb5191437/g github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc h1:+hbMY4Pcx2oizrfH08VWXwrj5mU8aJT6g0UNxGHFCGU= github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.0.0-20210119062722-4adba5aaea71 h1:Cas/CUB4ybYpdxvW7LouaydE16cpwdq3vvS3qgZuU+Q= +github.com/filecoin-project/go-state-types v0.0.0-20210119062722-4adba5aaea71/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/specs-actors/v2 v2.3.4 h1:NZK2oMCcA71wNsUzDBmLQyRMzcCnX9tDGvwZ53G67j8=