Merge pull request #10786 from filecoin-project/asr/calibnet-hack

chore: deps: update to FVM 3.3.1
This commit is contained in:
Aayush Rajasekaran 2023-05-01 12:37:59 -04:00 committed by GitHub
commit c05204f1d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 1 deletions

View File

@ -86,6 +86,7 @@ func main() {
replayOfflineCmd,
msgindexCmd,
FevmAnalyticsCmd,
mismatchesCmd,
}
app := &cli.App{

View File

@ -0,0 +1,54 @@
package main
import (
"fmt"
"github.com/urfave/cli/v2"
lcli "github.com/filecoin-project/lotus/cli"
)
var mismatchesCmd = &cli.Command{
Name: "mismatches",
Description: "Walk up the chain, recomputing state, and reporting any mismatches",
Action: func(cctx *cli.Context) error {
srv, err := lcli.GetFullNodeServices(cctx)
if err != nil {
return err
}
defer srv.Close() //nolint:errcheck
api := srv.FullNodeAPI()
ctx := lcli.ReqContext(cctx)
checkTs, err := api.ChainHead(ctx)
if err != nil {
return err
}
for checkTs.Height() != 0 {
if checkTs.Height()%10000 == 0 {
fmt.Println("Reached height ", checkTs.Height())
}
execTsk := checkTs.Parents()
execTs, err := api.ChainGetTipSet(ctx, execTsk)
if err != nil {
return err
}
st, err := api.StateCompute(ctx, execTs.Height(), nil, execTsk)
if err != nil {
return err
}
if st.Root != checkTs.ParentState() {
fmt.Println("consensus mismatch found at height ", execTs.Height())
}
checkTs = execTs
}
return nil
},
}

2
extern/filecoin-ffi vendored

@ -1 +1 @@
Subproject commit 86698251ab87eec6944320a01998623155c01276
Subproject commit de34caff946d598edb299566d951b44b9b7f7dd4