Merge pull request #1675 from filecoin-project/frrist/puppet-actor
update chain-validation and add puppet actor
This commit is contained in:
commit
9597e4c501
@ -2,13 +2,13 @@ package validation
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||
"github.com/filecoin-project/specs-actors/actors/abi/big"
|
||||
"github.com/filecoin-project/specs-actors/actors/builtin"
|
||||
"github.com/filecoin-project/specs-actors/actors/crypto"
|
||||
"github.com/filecoin-project/specs-actors/actors/puppet"
|
||||
"github.com/ipfs/go-cid"
|
||||
|
||||
vtypes "github.com/filecoin-project/chain-validation/chain/types"
|
||||
@ -135,6 +135,10 @@ func (a *Applier) applyMessage(epoch abi.ChainEpoch, lm types.ChainMsg) (vtypes.
|
||||
base := a.stateWrapper.Root()
|
||||
|
||||
lotusVM, err := vm.NewVM(base, epoch, &vmRand{}, a.stateWrapper.bs, vdrivers.NewChainValidationSyscalls())
|
||||
// need to modify the VM invoker to add the puppet actor
|
||||
chainValInvoker := vm.NewInvoker()
|
||||
chainValInvoker.Register(puppet.PuppetActorCodeID, puppet.Actor{}, puppet.State{})
|
||||
lotusVM.SetInvoker(chainValInvoker)
|
||||
if err != nil {
|
||||
return vtypes.MessageReceipt{}, big.Zero(), big.Zero(), err
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package vm_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/filecoin-project/chain-validation/suites/message"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"strings"
|
||||
@ -34,6 +35,7 @@ var TestSuiteSkipper TestSkipper
|
||||
func init() {
|
||||
// initialize the test skipper with tests being skipped
|
||||
TestSuiteSkipper = TestSkipper{testSkips: []suites.TestCase{
|
||||
message.MessageTest_NestedSends,
|
||||
// tests to skip go here
|
||||
}}
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -13,7 +13,7 @@ require (
|
||||
github.com/docker/go-units v0.4.0
|
||||
github.com/drand/drand v0.8.1
|
||||
github.com/fatih/color v1.8.0
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200512155742-b6896edf7c52
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200512163011-8cf67ee7998d
|
||||
github.com/filecoin-project/filecoin-ffi v0.0.0-20200427223233-a0014b17f124
|
||||
github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef
|
||||
github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2
|
||||
|
9
go.sum
9
go.sum
@ -135,10 +135,8 @@ github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY=
|
||||
github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8=
|
||||
github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E=
|
||||
github.com/filecoin-project/chain-validation v0.0.3/go.mod h1:NCEGFjcWRjb8akWFSOXvU6n2efkWIqAeOKU6o5WBGQw=
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200506234205-5fe7d4aab7f9 h1:CK3t79ocoF35ZFr4ohfGkpEChnZ/a7TK14Dl1Be5L9w=
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200506234205-5fe7d4aab7f9/go.mod h1:tyI16CI6/S0TvluPzFyopPWcR+/5l6kUjyzeIgLFVfs=
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200512155742-b6896edf7c52 h1:nxNiXL8I/TJcYdnSUFdIWVKSHqWSMpLpzXzhmMUDGQ0=
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200512155742-b6896edf7c52/go.mod h1:cZHunl0Zy7CKljcDNJ56rL6m9IoKuuvqPpuGT4Gtgg8=
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200512163011-8cf67ee7998d h1:iMiPVOyRgfK5nHjW5R1LkPSyDP+Ka/qRULv760LGcPI=
|
||||
github.com/filecoin-project/chain-validation v0.0.6-0.20200512163011-8cf67ee7998d/go.mod h1:cZHunl0Zy7CKljcDNJ56rL6m9IoKuuvqPpuGT4Gtgg8=
|
||||
github.com/filecoin-project/go-address v0.0.0-20191219011437-af739c490b4f/go.mod h1:rCbpXPva2NKF9/J4X6sr7hbKBgQCxyFtRj7KOZqoIms=
|
||||
github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0=
|
||||
github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E=
|
||||
@ -195,9 +193,6 @@ github.com/filecoin-project/specs-actors v0.2.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVl
|
||||
github.com/filecoin-project/specs-actors v0.2.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y=
|
||||
github.com/filecoin-project/specs-actors v0.3.0 h1:QxgAuTrZr5TPqjyprZk0nTYW5o0JWpzbb5v+4UHHvN0=
|
||||
github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y=
|
||||
github.com/filecoin-project/specs-actors v0.4.0 h1:ywlvhg4V46D1jrhW8XeXD6K3+lP5r5E5jRHuYAClD1U=
|
||||
github.com/filecoin-project/specs-actors v0.4.0/go.mod h1:UW3ft23q6VS8wQoNqLWjENsu9gu1uh6lxOd+H8cwhT8=
|
||||
github.com/filecoin-project/specs-actors v0.4.1-0.20200509020627-3c96f54f3d7d h1:xK1KzVM6DAJABSnP5GhBMIk5zCDnJR5LSkxKJW1zFzA=
|
||||
github.com/filecoin-project/specs-actors v0.4.1-0.20200509020627-3c96f54f3d7d/go.mod h1:UW3ft23q6VS8wQoNqLWjENsu9gu1uh6lxOd+H8cwhT8=
|
||||
github.com/filecoin-project/specs-actors v0.4.1-0.20200512154829-da721a49952f h1:ZwXCgwXs9H/E2sJiuzO5llaPUaIIfFC2VWD8k5sjmLI=
|
||||
github.com/filecoin-project/specs-actors v0.4.1-0.20200512154829-da721a49952f/go.mod h1:r5btrNzZD0oBkEz1pohv80gSCXQnqGrD0kYwOTiExyE=
|
||||
|
Loading…
Reference in New Issue
Block a user