Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Actors v7
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed Oct 17, 2021
1 parent 855f605 commit 85448e2
Show file tree
Hide file tree
Showing 124 changed files with 507 additions and 503 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ build:

test:
$(GO_BIN) test ./...
$(GO_BIN) test -race ./actors/migration/nv14/test
$(GO_BIN) test -race ./actors/migration/nv15/test
.PHONY: test

test-migration:
.PHONY: test-migration
$(GO_BIN) test -race ./actors/migration/nv14/test
$(GO_BIN) test -race ./actors/migration/nv15/test

test-coverage:
$(GO_BIN) test -coverprofile=coverage.out ./...
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/account/account_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/ipfs/go-cid"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/runtime"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
)

type Actor struct{}
Expand Down
8 changes: 4 additions & 4 deletions actors/builtin/account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v6/support/mock"
tutil "github.com/filecoin-project/specs-actors/v6/support/testing"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v7/support/mock"
tutil "github.com/filecoin-project/specs-actors/v7/support/testing"
)

type constructorTestCase struct {
Expand Down
2 changes: 1 addition & 1 deletion actors/builtin/account/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package account
import (
"github.com/filecoin-project/go-address"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
)

type StateSummary struct {
Expand Down
22 changes: 11 additions & 11 deletions actors/builtin/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ func init() {
builtinActors = make(map[cid.Cid]*actorInfo)

for id, info := range map[*cid.Cid]*actorInfo{ //nolint:nomaprange
&SystemActorCodeID: {name: "fil/6/system"},
&InitActorCodeID: {name: "fil/6/init"},
&CronActorCodeID: {name: "fil/6/cron"},
&StoragePowerActorCodeID: {name: "fil/6/storagepower"},
&StorageMinerActorCodeID: {name: "fil/6/storageminer"},
&StorageMarketActorCodeID: {name: "fil/6/storagemarket"},
&PaymentChannelActorCodeID: {name: "fil/6/paymentchannel"},
&RewardActorCodeID: {name: "fil/6/reward"},
&VerifiedRegistryActorCodeID: {name: "fil/6/verifiedregistry"},
&AccountActorCodeID: {name: "fil/6/account", signer: true},
&MultisigActorCodeID: {name: "fil/6/multisig", signer: true},
&SystemActorCodeID: {name: "fil/7/system"},
&InitActorCodeID: {name: "fil/7/init"},
&CronActorCodeID: {name: "fil/7/cron"},
&StoragePowerActorCodeID: {name: "fil/7/storagepower"},
&StorageMinerActorCodeID: {name: "fil/7/storageminer"},
&StorageMarketActorCodeID: {name: "fil/7/storagemarket"},
&PaymentChannelActorCodeID: {name: "fil/7/paymentchannel"},
&RewardActorCodeID: {name: "fil/7/reward"},
&VerifiedRegistryActorCodeID: {name: "fil/7/verifiedregistry"},
&AccountActorCodeID: {name: "fil/7/account", signer: true},
&MultisigActorCodeID: {name: "fil/7/multisig", signer: true},
} {
c, err := builder.Sum([]byte(info.name))
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/cron/cron_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
cron0 "github.com/filecoin-project/specs-actors/actors/builtin/cron"
"github.com/ipfs/go-cid"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/runtime"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
)

// The cron actor is a built-in singleton that sends messages to other registered actors at the end of each epoch.
Expand Down
2 changes: 1 addition & 1 deletion actors/builtin/cron/cron_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
addr "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
)

type State struct {
Expand Down
8 changes: 4 additions & 4 deletions actors/builtin/cron/cron_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/stretchr/testify/assert"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/cron"
"github.com/filecoin-project/specs-actors/v6/support/mock"
tutil "github.com/filecoin-project/specs-actors/v6/support/testing"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/cron"
"github.com/filecoin-project/specs-actors/v7/support/mock"
tutil "github.com/filecoin-project/specs-actors/v7/support/testing"
)

func TestExports(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/cron/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cron

import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

type StateSummary struct {
Expand Down
24 changes: 12 additions & 12 deletions actors/builtin/exported/actors.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package exported

import (
"github.com/filecoin-project/specs-actors/v6/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v6/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v6/actors/runtime"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v7/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
)

func BuiltinActors() []runtime.VMActor {
Expand Down
26 changes: 13 additions & 13 deletions actors/builtin/exported/actors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (
"testing"

"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v6/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v6/actors/runtime"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v7/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
"github.com/ipfs/go-cid"

"github.com/stretchr/testify/require"
Expand Down
6 changes: 3 additions & 3 deletions actors/builtin/init/init_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
init0 "github.com/filecoin-project/specs-actors/actors/builtin/init"
cid "github.com/ipfs/go-cid"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/runtime"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

// The init actor uniquely has the power to create new actors.
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/init/init_actor_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"
xerrors "golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

type State struct {
Expand Down
10 changes: 5 additions & 5 deletions actors/builtin/init/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
cid "github.com/ipfs/go-cid"
assert "github.com/stretchr/testify/assert"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
init_ "github.com/filecoin-project/specs-actors/v6/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v6/support/mock"
tutil "github.com/filecoin-project/specs-actors/v6/support/testing"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
init_ "github.com/filecoin-project/specs-actors/v7/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/support/mock"
tutil "github.com/filecoin-project/specs-actors/v7/support/testing"
)

func TestExports(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/init/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/filecoin-project/go-state-types/abi"
cbg "github.com/whyrusleeping/cbor-gen"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

type StateSummary struct {
Expand Down
12 changes: 6 additions & 6 deletions actors/builtin/market/market_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v6/actors/runtime"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v7/actors/runtime"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

type Actor struct{}
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/market/market_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/ipfs/go-cid"
xerrors "golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

const epochUndefined = abi.ChainEpoch(-1)
Expand Down
18 changes: 9 additions & 9 deletions actors/builtin/market/market_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import (
"github.com/filecoin-project/go-state-types/exitcode"
cid "github.com/ipfs/go-cid"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v6/support/mock"
tutil "github.com/filecoin-project/specs-actors/v6/support/testing"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/support/mock"
tutil "github.com/filecoin-project/specs-actors/v7/support/testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion actors/builtin/market/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
)

// The number of epochs between payment and other state processing for deals.
Expand Down
2 changes: 1 addition & 1 deletion actors/builtin/market/set_multimap.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

type SetMultimap struct {
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/market/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

type DealSummary struct {
Expand Down
2 changes: 1 addition & 1 deletion actors/builtin/market/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package market

import (
"github.com/filecoin-project/go-state-types/abi"
. "github.com/filecoin-project/specs-actors/v6/actors/util/adt"
. "github.com/filecoin-project/specs-actors/v7/actors/util/adt"

"github.com/ipfs/go-cid"
)
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/miner/bitfield_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

// Wrapper for working with an AMT[ChainEpoch]*Bitfield functioning as a queue, bucketed by epoch.
Expand Down
8 changes: 4 additions & 4 deletions actors/builtin/miner/bitfield_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v6/support/mock"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/support/mock"
)

const testAmtBitwidth = 3
Expand Down
6 changes: 3 additions & 3 deletions actors/builtin/miner/deadline_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/runtime/proof"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/runtime/proof"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

// Deadlines contains Deadline objects, describing the sectors due at the given
Expand Down
8 changes: 4 additions & 4 deletions actors/builtin/miner/deadline_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v6/support/ipld"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/support/ipld"
)

func TestDeadlines(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/miner/deadlines.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/filecoin-project/go-state-types/dline"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v6/actors/builtin"
"github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
)

// Returns deadline-related calculations for a deadline in some proving period and the current epoch.
Expand Down
Loading

0 comments on commit 85448e2

Please sign in to comment.