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

Commit

Permalink
Feat/v5 (#1399)
Browse files Browse the repository at this point in the history
* v5 actors
* feat: Adjust consensus fault reward to meet FIL-0011
* feat: Allow VerifiedClient DataCap to be topped up (#1390)
* Remove out of date test
* Update to go 1.16
* Remove old migration and simplify agent tests

Co-authored-by: ZenGround0 <[email protected]>
Co-authored-by: Mike Greenberg <[email protected]>
  • Loading branch information
3 people authored May 4, 2021
1 parent 51c715d commit f6a8d2a
Show file tree
Hide file tree
Showing 129 changed files with 568 additions and 2,964 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
make test-coverage
mkdir -p /tmp/artifacts
mv coverage.out /tmp/artifacts/coverage.out
make test-migration
- codecov/upload:
file: /tmp/artifacts/coverage.out
- store_artifacts:
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ build:

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

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

test-coverage:
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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/runtime"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v4/support/mock"
tutil "github.com/filecoin-project/specs-actors/v4/support/testing"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v5/support/mock"
tutil "github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
)

type StateSummary struct {
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 @@ -6,8 +6,8 @@ import (
cron0 "github.com/filecoin-project/specs-actors/actors/builtin/cron"
"github.com/ipfs/go-cid"

"github.com/filecoin-project/specs-actors/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/runtime"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/cron"
"github.com/filecoin-project/specs-actors/v4/support/mock"
tutil "github.com/filecoin-project/specs-actors/v4/support/testing"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/cron"
"github.com/filecoin-project/specs-actors/v5/support/mock"
tutil "github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v4/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v4/actors/runtime"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v5/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v4/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v4/actors/runtime"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/account"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/cron"
init_ "github.com/filecoin-project/specs-actors/v5/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/multisig"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/paych"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/system"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/runtime"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/runtime"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
init_ "github.com/filecoin-project/specs-actors/v4/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v4/support/mock"
tutil "github.com/filecoin-project/specs-actors/v4/support/testing"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
init_ "github.com/filecoin-project/specs-actors/v5/actors/builtin/init"
"github.com/filecoin-project/specs-actors/v5/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/support/mock"
tutil "github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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 @@ -17,12 +17,12 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v4/actors/runtime"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v5/actors/runtime"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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 (
cid "github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen"

"github.com/filecoin-project/specs-actors/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v4/support/mock"
tutil "github.com/filecoin-project/specs-actors/v4/support/testing"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/market"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/power"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/reward"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg"
"github.com/filecoin-project/specs-actors/v5/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/support/mock"
tutil "github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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 @@ -9,7 +9,7 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/util/adt"
. "github.com/filecoin-project/specs-actors/v5/actors/util/adt"

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

"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/util/adt"
)

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

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

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

"github.com/filecoin-project/specs-actors/v4/actors/runtime/proof"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
"github.com/filecoin-project/specs-actors/v5/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/v4/actors/builtin"
"github.com/filecoin-project/specs-actors/v4/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v4/support/ipld"
"github.com/filecoin-project/specs-actors/v5/actors/builtin"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v5/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/support/ipld"
)

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

"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/util/adt"
)

// Returns deadline-related calculations for a deadline in some proving period and the current epoch.
Expand Down
2 changes: 1 addition & 1 deletion actors/builtin/miner/deadlines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/stretchr/testify/assert"

"github.com/filecoin-project/specs-actors/v4/actors/builtin/miner"
"github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
)

func TestProvingPeriodDeadlines(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions actors/builtin/miner/expiration_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"

"github.com/filecoin-project/specs-actors/v4/actors/util"
"github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/specs-actors/v5/actors/util"
"github.com/filecoin-project/specs-actors/v5/actors/util/adt"
)

// ExpirationSet is a collection of sector numbers that are expiring, either due to
Expand Down
Loading

0 comments on commit f6a8d2a

Please sign in to comment.