From a404d535eeb7873ec01adde6891c7ea1f3e4ee49 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 22 Jan 2020 12:03:12 -0800 Subject: [PATCH] Make it buld without cgo Signed-off-by: Jakub Sztandera --- chain/types/blockheader.go | 18 ------------------ extern/filecoin-ffi | 2 +- go.mod | 4 ++-- go.sum | 4 ++++ 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/chain/types/blockheader.go b/chain/types/blockheader.go index ff4c6467f..bdfee6161 100644 --- a/chain/types/blockheader.go +++ b/chain/types/blockheader.go @@ -2,7 +2,6 @@ package types import ( "bytes" - "context" "math/big" "github.com/filecoin-project/go-sectorbuilder" @@ -11,7 +10,6 @@ import ( "github.com/ipfs/go-cid" "github.com/minio/sha256-simd" "github.com/multiformats/go-multihash" - "go.opencensus.io/trace" xerrors "golang.org/x/xerrors" "github.com/filecoin-project/go-address" @@ -116,22 +114,6 @@ func (blk *BlockHeader) SigningBytes() ([]byte, error) { return blkcopy.Serialize() } -func (blk *BlockHeader) CheckBlockSignature(ctx context.Context, worker address.Address) error { - _, span := trace.StartSpan(ctx, "checkBlockSignature") - defer span.End() - - if blk.BlockSig == nil { - return xerrors.New("block signature not present") - } - - sigb, err := blk.SigningBytes() - if err != nil { - return xerrors.Errorf("failed to get block signing bytes: %w", err) - } - - return blk.BlockSig.Verify(worker, sigb) -} - type MsgMeta struct { BlsMessages cid.Cid SecpkMessages cid.Cid diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index f261762ff..58761d3dc 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit f261762ff8ede465f22b364a214ed01d8b0d64c3 +Subproject commit 58761d3dca0f3617023240eb8b7f8b324db75b2a diff --git a/go.mod b/go.mod index 914691b7f..81e54f3d5 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/docker/go-units v0.4.0 github.com/filecoin-project/chain-validation v0.0.3 github.com/filecoin-project/filecoin-ffi v0.0.0-20191219131535-bb699517a590 - github.com/filecoin-project/go-address v0.0.0-20191219011437-af739c490b4f + github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5 github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc github.com/filecoin-project/go-amt-ipld/v2 v2.0.0 github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 @@ -20,7 +20,7 @@ require ( github.com/filecoin-project/go-data-transfer v0.0.0-20191219005021-4accf56bd2ce github.com/filecoin-project/go-fil-markets v0.0.0-20200114015428-74d100f305f8 github.com/filecoin-project/go-paramfetch v0.0.1 - github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200114015900-4103afa82689 + github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200122195713-697609991669 github.com/filecoin-project/go-statestore v0.1.0 github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 github.com/go-ole/go-ole v1.2.4 // indirect diff --git a/go.sum b/go.sum index 47f2659a5..7cba49333 100644 --- a/go.sum +++ b/go.sum @@ -99,6 +99,8 @@ github.com/filecoin-project/chain-validation v0.0.3 h1:luT/8kJ0WdMIqQ9Bm31W4JkuY github.com/filecoin-project/chain-validation v0.0.3/go.mod h1:NCEGFjcWRjb8akWFSOXvU6n2efkWIqAeOKU6o5WBGQw= github.com/filecoin-project/go-address v0.0.0-20191219011437-af739c490b4f h1:L2jaVU8TvWTx7iZPhlYvUE8vkoOnj778XuKavz8W36g= 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 h1:/MmWluswvDIbuPvBct4q6HeQgVm62O2DzWYTB38kt4A= +github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc h1:cODZD2YzpTUtrOSxbEnWFcQHidNRZiRdvLxySjGvG/M= github.com/filecoin-project/go-amt-ipld v0.0.0-20191205011053-79efc22d6cdc/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= github.com/filecoin-project/go-amt-ipld/v2 v2.0.0 h1:rQ7GTJbWE5XqUCPiBgs4gbTKD2wC7MynZhSaf7ZzlUM= @@ -117,6 +119,8 @@ github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifo github.com/filecoin-project/go-sectorbuilder v0.0.1/go.mod h1:3OZ4E3B2OuwhJjtxR4r7hPU9bCfB+A+hm4alLEsaeDc= github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200114015900-4103afa82689 h1:2cT5bhm/5I0RY+HBIPdRRrtjCwLj33Qx6DHRs9TCslY= github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200114015900-4103afa82689/go.mod h1:3OZ4E3B2OuwhJjtxR4r7hPU9bCfB+A+hm4alLEsaeDc= +github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200122195713-697609991669 h1:SpwORqUXMVB2Ejr8c4zIGiihxGM5Tu15skOWa5pvRr8= +github.com/filecoin-project/go-sectorbuilder v0.0.2-0.20200122195713-697609991669/go.mod h1:ahsryULdwYoZ94K09HcfqX3QBwevWVldENSV/EdCbNg= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=