Skip to content

Commit

Permalink
Merge pull request #173 from filecoin-project/chore/bump-v1.17.0-rc1
Browse files Browse the repository at this point in the history
chore: bump version to v1.17.0-rc1
  • Loading branch information
0x5459 authored Oct 22, 2024
2 parents 48b1e02 + a4ed350 commit 44a7bc9
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
test_all:
executor:
name: go/default
tag: "cimg/go:1.21.7"
tag: "cimg/go:1.22.8"
steps:
- go/setup_env:
install_ffi: true
Expand Down
14 changes: 8 additions & 6 deletions crypto/key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ func TestSecpPrivateKey(t *testing.T) {
if err != nil {
t.Fatalf("private key parse address error:%s", err)
}
assert.Equal(t, addr.String(), "t17rmoshisxovfjkrox2gpryaupmsalzy2tlaluiq")
assert.Equal(t, addr.String(), "f17rmoshisxovfjkrox2gpryaupmsalzy2tlaluiq")

signData := []byte("hello filecoin")
signature, err := prv.Sign(signData)
if err != nil {
t.Fatalf("private key sign data err:%s", err)
}
assert.Equal(t, fmt.Sprintf("%x", signature.Data), "4c49bacbd5a1e9734595d77a7ae8909ae35859e182344c0f1c081d8fdc6749302d50ae81d0d80c9c4be9cf3071bf7b0c465a19aea1023b21239b8bbdffd0ca8d01")

err = Verify(signature, addr, signData)
if err != nil {
t.Fatalf("private key verify data err:%s", err)
}
}

func TestBls2KGen(t *testing.T) {
Expand All @@ -60,7 +64,7 @@ func TestBLSPrivateKey(t *testing.T) {
if err != nil {
t.Fatalf("private key parse address error:%s", err)
}
assert.Equal(t, addr.String(), "t3tho7tbdrw3xuy6ybz6p5tfc7nsqqa2ozhsrnmhwynrb3keeaeywe3felidbpgvy2wcxktmxcezlpz7pbu5pq")
assert.Equal(t, addr.String(), "f3tho7tbdrw3xuy6ybz6p5tfc7nsqqa2ozhsrnmhwynrb3keeaeywe3felidbpgvy2wcxktmxcezlpz7pbu5pq")

signData := []byte("hello filecoin")
signature, err := prv.Sign(signData)
Expand Down Expand Up @@ -88,14 +92,12 @@ func TestDelegatedPrivateKey(t *testing.T) {
if err != nil {
t.Fatalf("private key parse address error:%s", err)
}
assert.Equal(t, addr.String(), "t410fnz6o7a4owcgw33z2zvsxtuf64aoxlmcn4dh5hzy")
assert.Equal(t, addr.String(), "f410fnz6o7a4owcgw33z2zvsxtuf64aoxlmcn4dh5hzy")

signData := []byte("hello filecoin")
signature, err := prv.Sign(signData)
if err != nil {
t.Fatalf("private key sign data err:%s", err)
}
assert.Equal(t, fmt.Sprintf("%x", signature.Data), "e8f6ad5958dde03013e45fc77f71238cd0013af0d05ec5569007f70ffa7d2453007e7a581dcdf6d9f8e89846de210b74b188d8e1d2629f2d351e9e92f08be29600")

assert.NilError(t, delegatedVerify(signature.Data, addr, signData))
}
8 changes: 4 additions & 4 deletions crypto/secp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-crypto"
"github.com/filecoin-project/venus/venus-shared/types"
"github.com/minio/blake2b-simd"
"golang.org/x/crypto/blake2b"

c1 "github.com/filecoin-project/go-state-types/crypto"
c2 "github.com/filecoin-project/go-state-types/crypto"
)

type secpPrivateKey struct {
Expand Down Expand Up @@ -36,13 +36,13 @@ func (p *secpPrivateKey) Public() []byte {
return crypto.PublicKey(p.key)
}

func (p *secpPrivateKey) Sign(msg []byte) (*c1.Signature, error) {
func (p *secpPrivateKey) Sign(msg []byte) (*c2.Signature, error) {
b2sum := blake2b.Sum256(msg)
sig, err := crypto.Sign(p.key, b2sum[:])
if err != nil {
return nil, err
}
return &c1.Signature{
return &c2.Signature{
Data: sig,
Type: p.Type(),
}, nil
Expand Down
60 changes: 30 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
module github.com/filecoin-project/venus-wallet

go 1.21
go 1.22

require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1
github.com/BurntSushi/toml v1.3.0
github.com/BurntSushi/toml v1.3.2
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef
github.com/etherlabsio/healthcheck/v2 v2.0.0
github.com/filecoin-project/go-address v1.1.0
github.com/filecoin-project/go-address v1.2.0
github.com/filecoin-project/go-cbor-util v0.0.1
github.com/filecoin-project/go-crypto v0.0.1
github.com/filecoin-project/go-jsonrpc v0.1.8
github.com/filecoin-project/go-state-types v0.14.0
github.com/filecoin-project/venus v1.16.0
github.com/filecoin-project/go-crypto v0.1.0
github.com/filecoin-project/go-jsonrpc v0.6.0
github.com/filecoin-project/go-state-types v0.15.0-rc1
github.com/filecoin-project/venus v1.17.0-rc2
github.com/fsnotify/fsnotify v1.6.0
github.com/gbrlsnchs/jwt/v3 v3.0.1
github.com/google/uuid v1.6.0
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
github.com/ipfs-force-community/sophon-auth v1.16.0
github.com/ipfs-force-community/sophon-gateway v1.16.0
github.com/ipfs-force-community/sophon-gateway v1.17.0-rc1
github.com/ipfs/go-log/v2 v2.5.1
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-multiaddr v0.12.4
github.com/multiformats/go-multiaddr v0.13.0
github.com/spf13/cast v1.5.0
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.9.0
github.com/supranational/blst v0.3.11
github.com/urfave/cli/v2 v2.25.5
go.opencensus.io v0.24.0
go.uber.org/fx v1.22.1
golang.org/x/crypto v0.24.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/crypto v0.27.0
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e
gorm.io/driver/sqlite v1.5.1
gorm.io/gorm v1.25.0
gotest.tools v2.2.0+incompatible
Expand Down Expand Up @@ -60,14 +59,15 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 // indirect
github.com/filecoin-project/go-amt-ipld/v3 v3.1.0 // indirect
github.com/filecoin-project/go-amt-ipld/v4 v4.2.0 // indirect
github.com/filecoin-project/go-amt-ipld/v4 v4.4.0 // indirect
github.com/filecoin-project/go-bitfield v0.2.4 // indirect
github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc6 // indirect
github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 // indirect
github.com/filecoin-project/go-ds-versioning v0.1.2 // indirect
github.com/filecoin-project/go-f3 v0.7.0 // indirect
github.com/filecoin-project/go-fil-markets v1.28.2 // indirect
github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect
github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 // indirect
github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 // indirect
github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0 // indirect
github.com/filecoin-project/go-padreader v0.0.1 // indirect
github.com/filecoin-project/go-statemachine v1.0.3 // indirect
github.com/filecoin-project/go-statestore v0.2.0 // indirect
Expand Down Expand Up @@ -130,17 +130,16 @@ require (
github.com/ipld/go-car v0.6.2 // indirect
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
github.com/ipld/go-ipld-prime v0.21.0 // indirect
github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-libp2p v0.35.4 // indirect
github.com/libp2p/go-libp2p v0.35.5 // indirect
github.com/libp2p/go-libp2p-pubsub v0.11.0 // indirect
github.com/libp2p/go-msgio v0.3.0 // indirect
github.com/magefile/mage v1.11.0 // indirect
Expand Down Expand Up @@ -184,11 +183,12 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/uber/jaeger-client-go v2.25.0+incompatible // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/whyrusleeping/cbor-gen v0.1.1 // indirect
github.com/whyrusleeping/cbor-gen v0.1.2 // indirect
github.com/whyrusleeping/go-logging v0.0.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/c-for-go v1.2.0 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect
Expand All @@ -201,15 +201,15 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/api v0.81.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
Expand Down
Loading

0 comments on commit 44a7bc9

Please sign in to comment.