update to latest ffi

This commit is contained in:
Jeromy 2020-05-22 09:26:14 -07:00
parent ffd340086e
commit 646800b8a8
7 changed files with 32 additions and 29 deletions

View File

@ -225,10 +225,10 @@ func (ss *syscallShim) VerifySeal(info abi.SealVerifyInfo) error {
} }
ticket := []byte(info.Randomness) ticket := []byte(info.Randomness)
proof := []byte(info.OnChain.Proof) proof := []byte(info.Proof)
seed := []byte(info.InteractiveRandomness) seed := []byte(info.InteractiveRandomness)
log.Debugf("Verif r:%x; d:%x; m:%s; t:%x; s:%x; N:%d; p:%x", info.OnChain.SealedCID, info.UnsealedCID, miner, ticket, seed, info.SectorID.Number, proof) log.Debugf("Verif r:%x; d:%x; m:%s; t:%x; s:%x; N:%d; p:%x", info.SealedCID, info.UnsealedCID, miner, ticket, seed, info.SectorID.Number, proof)
//func(ctx context.Context, maddr address.Address, ssize abi.SectorSize, commD, commR, ticket, proof, seed []byte, sectorID abi.SectorNumber) //func(ctx context.Context, maddr address.Address, ssize abi.SectorSize, commD, commR, ticket, proof, seed []byte, sectorID abi.SectorNumber)
ok, err := ss.verifier.VerifySeal(info) ok, err := ss.verifier.VerifySeal(info)

View File

@ -527,16 +527,11 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, mid
if !skipc2 { if !skipc2 {
svi := abi.SealVerifyInfo{ svi := abi.SealVerifyInfo{
SectorID: abi.SectorID{Miner: mid, Number: i}, SectorID: abi.SectorID{Miner: mid, Number: i},
OnChain: abi.OnChainSealVerifyInfo{ SealedCID: cids.Sealed,
SealedCID: cids.Sealed, RegisteredProof: sb.SealProofType(),
InteractiveEpoch: seed.Epoch, Proof: proof,
RegisteredProof: sb.SealProofType(), DealIDs: nil,
Proof: proof,
DealIDs: nil,
SectorNumber: i,
SealRandEpoch: 0,
},
Randomness: ticket, Randomness: ticket,
InteractiveRandomness: seed.Value, InteractiveRandomness: seed.Value,
UnsealedCID: cids.Unsealed, UnsealedCID: cids.Unsealed,

View File

@ -87,15 +87,10 @@ var verifySealProofCmd = &cli.Command{
Miner: abi.ActorID(mid), Miner: abi.ActorID(mid),
Number: snum, Number: snum,
}, },
OnChain: abi.OnChainSealVerifyInfo{ SealedCID: commr,
SealedCID: commr, RegisteredProof: abi.RegisteredProof(cctx.Int64("proof-type")),
InteractiveEpoch: 0, Proof: proof,
RegisteredProof: abi.RegisteredProof(cctx.Int64("proof-type")), DealIDs: nil,
Proof: proof,
DealIDs: nil,
SectorNumber: snum,
SealRandEpoch: 0,
},
Randomness: abi.SealRandomness(ticket), Randomness: abi.SealRandomness(ticket),
InteractiveRandomness: abi.InteractiveSealRandomness(proofRand), InteractiveRandomness: abi.InteractiveSealRandomness(proofRand),
UnsealedCID: commd, UnsealedCID: commd,

2
extern/filecoin-ffi vendored

@ -1 +1 @@
Subproject commit 2e02f06e433cfa18313b14eb8151f014f31e7dc9 Subproject commit 6109b6ad2fa9968941c206161dd01ac059011d4e

13
go.mod
View File

@ -8,6 +8,7 @@ require (
github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml v0.3.1
github.com/GeertJohan/go.rice v1.0.0 github.com/GeertJohan/go.rice v1.0.0
github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/coreos/go-systemd/v22 v22.0.0 github.com/coreos/go-systemd/v22 v22.0.0
github.com/docker/go-units v0.4.0 github.com/docker/go-units v0.4.0
github.com/drand/drand v0.8.2-0.20200518165838-d61135e6e2c8 github.com/drand/drand v0.8.2-0.20200518165838-d61135e6e2c8
@ -15,6 +16,7 @@ require (
github.com/filecoin-project/chain-validation v0.0.6-0.20200518190139-483332336e8e github.com/filecoin-project/chain-validation v0.0.6-0.20200518190139-483332336e8e
github.com/filecoin-project/filecoin-ffi v0.0.0-20200427223233-a0014b17f124 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-address v0.0.2-0.20200504173055-8b6f2fb2b3ef
github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc // indirect
github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2 github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2
github.com/filecoin-project/go-bitfield v0.0.1 github.com/filecoin-project/go-bitfield v0.0.1
github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2
@ -25,13 +27,15 @@ require (
github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200520183639-7c6ee2e066b4 github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200520183639-7c6ee2e066b4
github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6
github.com/filecoin-project/go-paramfetch v0.0.2-0.20200505180321-973f8949ea8e github.com/filecoin-project/go-paramfetch v0.0.2-0.20200505180321-973f8949ea8e
github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200203173614-42d67726bb62 // indirect
github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-statestore v0.1.0
github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b
github.com/filecoin-project/sector-storage v0.0.0-20200516212231-e620df4c43a4 github.com/filecoin-project/sector-storage v0.0.0-20200522011946-a59ca7536a95
github.com/filecoin-project/specs-actors v0.5.3 github.com/filecoin-project/specs-actors v0.5.4-0.20200521014528-0df536f7e461
github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102 github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102
github.com/filecoin-project/storage-fsm v0.0.0-20200427182014-01487d5ad3c8 github.com/filecoin-project/storage-fsm v0.0.0-20200522010518-83fd743db8bc
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/google/uuid v1.1.1 github.com/google/uuid v1.1.1
github.com/gorilla/mux v1.7.4 github.com/gorilla/mux v1.7.4
github.com/gorilla/websocket v1.4.2 github.com/gorilla/websocket v1.4.2
@ -41,6 +45,7 @@ require (
github.com/ipfs/go-bitswap v0.2.8 github.com/ipfs/go-bitswap v0.2.8
github.com/ipfs/go-block-format v0.0.2 github.com/ipfs/go-block-format v0.0.2
github.com/ipfs/go-blockservice v0.1.3 github.com/ipfs/go-blockservice v0.1.3
github.com/ipfs/go-car v0.0.3-0.20200121013634-f188c0e24291 // indirect
github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00 github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00
github.com/ipfs/go-datastore v0.4.4 github.com/ipfs/go-datastore v0.4.4
github.com/ipfs/go-ds-badger2 v0.1.0 github.com/ipfs/go-ds-badger2 v0.1.0
@ -106,11 +111,13 @@ require (
go.uber.org/fx v1.9.0 go.uber.org/fx v1.9.0
go.uber.org/multierr v1.5.0 go.uber.org/multierr v1.5.0
go.uber.org/zap v1.15.0 go.uber.org/zap v1.15.0
go4.org v0.0.0-20190313082347-94abd6928b1d // indirect
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 golang.org/x/sys v0.0.0-20200519105757-fe76b779f299
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8 gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8
gotest.tools v2.2.0+incompatible gotest.tools v2.2.0+incompatible
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect
) )
replace github.com/golangci/golangci-lint => github.com/golangci/golangci-lint v1.18.0 replace github.com/golangci/golangci-lint => github.com/golangci/golangci-lint v1.18.0

6
go.sum
View File

@ -188,6 +188,8 @@ github.com/filecoin-project/sector-storage v0.0.0-20200411000242-61616264b16d/go
github.com/filecoin-project/sector-storage v0.0.0-20200508203401-a74812ba12f3/go.mod h1:B+xzopr/oWZJz2hBL5Ekb7Obcum5ntmfbaAUlaaho28= github.com/filecoin-project/sector-storage v0.0.0-20200508203401-a74812ba12f3/go.mod h1:B+xzopr/oWZJz2hBL5Ekb7Obcum5ntmfbaAUlaaho28=
github.com/filecoin-project/sector-storage v0.0.0-20200516212231-e620df4c43a4 h1:am8Jl4jJ+y7y2fQHrsKaV9aa8uZmwR0/VTP1wlCy0jM= github.com/filecoin-project/sector-storage v0.0.0-20200516212231-e620df4c43a4 h1:am8Jl4jJ+y7y2fQHrsKaV9aa8uZmwR0/VTP1wlCy0jM=
github.com/filecoin-project/sector-storage v0.0.0-20200516212231-e620df4c43a4/go.mod h1:AeiT6Szz4XSnSJwHF1+flTRMspkwekbTP8zX8/wlhbY= github.com/filecoin-project/sector-storage v0.0.0-20200516212231-e620df4c43a4/go.mod h1:AeiT6Szz4XSnSJwHF1+flTRMspkwekbTP8zX8/wlhbY=
github.com/filecoin-project/sector-storage v0.0.0-20200522011946-a59ca7536a95 h1:wNpbsUY11P7+3yBfHOXsH+tAyferf1BVSe5S+HRm+7s=
github.com/filecoin-project/sector-storage v0.0.0-20200522011946-a59ca7536a95/go.mod h1:1UpuWCUC7XNfgyufyQQq+/40JSzhfGdgcwauK55C8gk=
github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
github.com/filecoin-project/specs-actors v0.0.0-20200409043918-e569f4a2f504/go.mod h1:mdJraXq5vMy0+/FqVQIrnNlpQ/Em6zeu06G/ltQ0/lA= github.com/filecoin-project/specs-actors v0.0.0-20200409043918-e569f4a2f504/go.mod h1:mdJraXq5vMy0+/FqVQIrnNlpQ/Em6zeu06G/ltQ0/lA=
github.com/filecoin-project/specs-actors v0.2.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.2.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y=
@ -197,11 +199,15 @@ github.com/filecoin-project/specs-actors v0.4.1-0.20200509020627-3c96f54f3d7d/go
github.com/filecoin-project/specs-actors v0.5.2/go.mod h1:r5btrNzZD0oBkEz1pohv80gSCXQnqGrD0kYwOTiExyE= github.com/filecoin-project/specs-actors v0.5.2/go.mod h1:r5btrNzZD0oBkEz1pohv80gSCXQnqGrD0kYwOTiExyE=
github.com/filecoin-project/specs-actors v0.5.3 h1:fdq8Gx0izhnUKl6sYEtI4SUEjT2U6W2w06HeqLz5vmw= github.com/filecoin-project/specs-actors v0.5.3 h1:fdq8Gx0izhnUKl6sYEtI4SUEjT2U6W2w06HeqLz5vmw=
github.com/filecoin-project/specs-actors v0.5.3/go.mod h1:r5btrNzZD0oBkEz1pohv80gSCXQnqGrD0kYwOTiExyE= github.com/filecoin-project/specs-actors v0.5.3/go.mod h1:r5btrNzZD0oBkEz1pohv80gSCXQnqGrD0kYwOTiExyE=
github.com/filecoin-project/specs-actors v0.5.4-0.20200521014528-0df536f7e461 h1:yyAoJ9dNboljDWj0uBdJEbdaTak/YhkjYUQt0GzlY0A=
github.com/filecoin-project/specs-actors v0.5.4-0.20200521014528-0df536f7e461/go.mod h1:r5btrNzZD0oBkEz1pohv80gSCXQnqGrD0kYwOTiExyE=
github.com/filecoin-project/specs-storage v0.0.0-20200410185809-9fbaaa08f275/go.mod h1:xJ1/xl9+8zZeSSSFmDC3Wr6uusCTxyYPI0VeNVSFmPE= github.com/filecoin-project/specs-storage v0.0.0-20200410185809-9fbaaa08f275/go.mod h1:xJ1/xl9+8zZeSSSFmDC3Wr6uusCTxyYPI0VeNVSFmPE=
github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102 h1:T3f/zkuvgtgqcXrb0NO3BicuveGOxxUAMPa/Yif2kuE= github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102 h1:T3f/zkuvgtgqcXrb0NO3BicuveGOxxUAMPa/Yif2kuE=
github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102/go.mod h1:xJ1/xl9+8zZeSSSFmDC3Wr6uusCTxyYPI0VeNVSFmPE= github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102/go.mod h1:xJ1/xl9+8zZeSSSFmDC3Wr6uusCTxyYPI0VeNVSFmPE=
github.com/filecoin-project/storage-fsm v0.0.0-20200427182014-01487d5ad3c8 h1:2/Dc5e3/rOUOfzRy3lgmwkR6JWJwSnYpT9Ugks5UV7o= github.com/filecoin-project/storage-fsm v0.0.0-20200427182014-01487d5ad3c8 h1:2/Dc5e3/rOUOfzRy3lgmwkR6JWJwSnYpT9Ugks5UV7o=
github.com/filecoin-project/storage-fsm v0.0.0-20200427182014-01487d5ad3c8/go.mod h1:3r93oPxn/GOmi83xxkkIMhbdulA8zjXcnecfcToeQl0= github.com/filecoin-project/storage-fsm v0.0.0-20200427182014-01487d5ad3c8/go.mod h1:3r93oPxn/GOmi83xxkkIMhbdulA8zjXcnecfcToeQl0=
github.com/filecoin-project/storage-fsm v0.0.0-20200522010518-83fd743db8bc h1:6du9HB53x8frk+Cky9ymGYsRbvXZDE91EsaOJoCb5Ok=
github.com/filecoin-project/storage-fsm v0.0.0-20200522010518-83fd743db8bc/go.mod h1:S0u14Wr55mpe22lElCSKbXrhtWg/jquVTTMhefQ8f4Q=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0= github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0=

View File

@ -170,18 +170,18 @@ func (s SealingAPIAdapter) StateSectorPreCommitInfo(ctx context.Context, maddr a
return &pci, nil return &pci, nil
} }
func (s SealingAPIAdapter) StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, tok sealing.TipSetToken) (market.DealProposal, market.DealState, error) { func (s SealingAPIAdapter) StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, tok sealing.TipSetToken) (market.DealProposal, error) {
tsk, err := types.TipSetKeyFromBytes(tok) tsk, err := types.TipSetKeyFromBytes(tok)
if err != nil { if err != nil {
return market.DealProposal{}, market.DealState{}, err return market.DealProposal{}, err
} }
deal, err := s.delegate.StateMarketStorageDeal(ctx, dealID, tsk) deal, err := s.delegate.StateMarketStorageDeal(ctx, dealID, tsk)
if err != nil { if err != nil {
return market.DealProposal{}, market.DealState{}, err return market.DealProposal{}, err
} }
return deal.Proposal, deal.State, nil return deal.Proposal, nil
} }
func (s SealingAPIAdapter) SendMsg(ctx context.Context, from, to address.Address, method abi.MethodNum, value, gasPrice big.Int, gasLimit int64, params []byte) (cid.Cid, error) { func (s SealingAPIAdapter) SendMsg(ctx context.Context, from, to address.Address, method abi.MethodNum, value, gasPrice big.Int, gasLimit int64, params []byte) (cid.Cid, error) {