Skip to content

Commit

Permalink
chg: merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Mar 15, 2024
2 parents f848064 + 6d4bef8 commit fe23fc4
Show file tree
Hide file tree
Showing 20 changed files with 706 additions and 1,971 deletions.
8 changes: 4 additions & 4 deletions baseapp/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1779,8 +1779,8 @@ func TestABCI_PrepareProposal_VoteExtensions(t *testing.T) {
pubkey := privkey.PubKey()
addr := sdk.AccAddress(pubkey.Address())
tmPk := cmtprotocrypto.PublicKey{
Sum: &cmtprotocrypto.PublicKey_Secp256K1{
Secp256K1: pubkey.Bytes(),
Sum: &cmtprotocrypto.PublicKey_Secp256K1Uncompressed{
Secp256K1Uncompressed: pubkey.Bytes(),
},
}

Expand Down Expand Up @@ -2059,8 +2059,8 @@ func TestBaseApp_VoteExtensions(t *testing.T) {
privKey := secp256k1.GenPrivKey()
pubKey := privKey.PubKey()
tmPk := cmtprotocrypto.PublicKey{
Sum: &cmtprotocrypto.PublicKey_Secp256K1{
Secp256K1: pubKey.Bytes(),
Sum: &cmtprotocrypto.PublicKey_Secp256K1Uncompressed{
Secp256K1Uncompressed: pubKey.Bytes(),
},
}
valStore.EXPECT().GetPubKeyByConsAddr(gomock.Any(), gomock.Any()).Return(tmPk, nil).AnyTimes()
Expand Down
4 changes: 2 additions & 2 deletions baseapp/abci_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func newTestValidator() testValidator {
privkey := secp256k1.GenPrivKey()
pubkey := privkey.PubKey()
tmPk := cmtprotocrypto.PublicKey{
Sum: &cmtprotocrypto.PublicKey_Secp256K1{
Secp256K1: pubkey.Bytes(),
Sum: &cmtprotocrypto.PublicKey_Secp256K1Uncompressed{
Secp256K1Uncompressed: pubkey.Bytes(),
},
}

Expand Down
10 changes: 6 additions & 4 deletions crypto/codec/cmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ func FromCmtProtoPublicKey(protoPk cmtprotocrypto.PublicKey) (cryptotypes.PubKey
return &ed25519.PubKey{
Key: protoPk.Ed25519,
}, nil
case *cmtprotocrypto.PublicKey_Secp256K1:
// NOTE(Heimdall-v2): heimdall needs uncompressed secp256k1 public key for ECDSA
case *cmtprotocrypto.PublicKey_Secp256K1Uncompressed:
return &secp256k1.PubKey{
Key: protoPk.Secp256K1,
Key: protoPk.Secp256K1Uncompressed,
}, nil
default:
return nil, errors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk)
Expand All @@ -40,8 +41,9 @@ func ToCmtProtoPublicKey(pk cryptotypes.PubKey) (cmtprotocrypto.PublicKey, error
}, nil
case *secp256k1.PubKey:
return cmtprotocrypto.PublicKey{
Sum: &cmtprotocrypto.PublicKey_Secp256K1{
Secp256K1: pk.Key,
// NOTE(Heimdall-v2): heimdall needs uncompressed secp256k1 public key for ECDSA
Sum: &cmtprotocrypto.PublicKey_Secp256K1Uncompressed{
Secp256K1Uncompressed: pk.Key,
},
}, nil
default:
Expand Down
46 changes: 26 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/cosmos/gogoproto v1.4.11
github.com/cosmos/ledger-cosmos-go v0.13.3
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
github.com/ethereum/go-ethereum v1.13.2
github.com/ethereum/go-ethereum v1.13.4
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.3
github.com/google/go-cmp v0.6.0
Expand All @@ -51,17 +51,17 @@ require (
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/common v0.45.0
github.com/rs/zerolog v1.31.0
github.com/spf13/cast v1.5.1
github.com/spf13/cobra v1.7.0
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/spf13/viper v1.18.1
github.com/stretchr/testify v1.8.4
github.com/tendermint/go-amino v0.16.0
golang.org/x/crypto v0.16.0
golang.org/x/crypto v0.18.0
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/sync v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a
google.golang.org/grpc v1.59.0
golang.org/x/sync v0.5.0
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17
google.golang.org/grpc v1.60.0
google.golang.org/protobuf v1.31.0
gotest.tools/v3 v3.5.1
pgregory.net/rapid v1.1.0
Expand All @@ -87,7 +87,7 @@ require (
github.com/cosmos/iavl v1.0.0 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
Expand All @@ -97,7 +97,7 @@ require (
github.com/emicklei/dot v1.6.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/sentry-go v0.25.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand All @@ -116,6 +116,7 @@ require (
github.com/hashicorp/go-plugin v1.5.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
Expand All @@ -136,30 +137,33 @@ require (
github.com/nxadm/tail v1.4.8 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand All @@ -176,6 +180,8 @@ require (
replace (
// use cosmos fork of keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// TODO HV2: Point to 0xPolygon comet fork once the PR is merged: https://github.com/0xPolygon/cometbft/pull/2
github.com/cometbft/cometbft => github.com/0xPolygon/cometbft v0.1.0-beta
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
Expand Down
Loading

0 comments on commit fe23fc4

Please sign in to comment.