Merge pull request #1758 from filecoin-project/fix/lotus-bench-secp

register secp signatures for lotus bench usage
This commit is contained in:
Whyrusleeping 2020-05-15 13:05:27 -07:00 committed by GitHub
commit 54b3eafd6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,8 @@ import (
"github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/vm" "github.com/filecoin-project/lotus/chain/vm"
_ "github.com/filecoin-project/lotus/lib/sigs/bls"
_ "github.com/filecoin-project/lotus/lib/sigs/secp"
"github.com/filecoin-project/sector-storage/ffiwrapper" "github.com/filecoin-project/sector-storage/ffiwrapper"
"github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi"
"golang.org/x/xerrors" "golang.org/x/xerrors"
@ -111,7 +113,14 @@ var importBenchCmd = &cli.Command{
cur := tschain[i] cur := tschain[i]
log.Infof("computing state (height: %d, ts=%s)", cur.Height(), cur.Cids()) log.Infof("computing state (height: %d, ts=%s)", cur.Height(), cur.Cids())
if cur.ParentState() != lastState { if cur.ParentState() != lastState {
return xerrors.Errorf("tipset chain had state mismatch at height %d", cur.Height()) lastTrace := out[len(out)-1].Trace
d, err := json.MarshalIndent(lastTrace, "", " ")
if err != nil {
panic(err)
}
fmt.Println("TRACE")
fmt.Println(string(d))
return xerrors.Errorf("tipset chain had state mismatch at height %d (%s != %s)", cur.Height(), cur.ParentState(), lastState)
} }
start := time.Now() start := time.Now()
st, trace, err := stm.ExecutionTrace(context.TODO(), cur) st, trace, err := stm.ExecutionTrace(context.TODO(), cur)