Skip to content

Commit

Permalink
Update tm pubkey references (cosmos#7102)
Browse files Browse the repository at this point in the history
* Update pubkey references

* Update ledger_mock

* Migrate encoding from tm

* Update pubkey prefix

* revert ed25519 to tendermint key

* random account revert

* Revert ed25519 references

* revert secp key name

* test revert

* remove ed25519

* Update x/staking/types/validator.go

Co-authored-by: Amaury Martiny <[email protected]>

* Revert "remove ed25519"

This reverts commit 66d2e1d.

* remove ed25519 & sr25519

* Apply suggestions from code review

* remove codec

Co-authored-by: Marko Baricevic <[email protected]>
Co-authored-by: Amaury Martiny <[email protected]>
  • Loading branch information
3 people authored Aug 28, 2020
1 parent df4eca3 commit 23a9f46
Show file tree
Hide file tree
Showing 59 changed files with 145 additions and 563 deletions.
2 changes: 1 addition & 1 deletion client/keys/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"github.com/stretchr/testify/require"

"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1"

"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/crypto/types/multisig"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion crypto/armor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import (
"github.com/tendermint/crypto/bcrypt"
tmcrypto "github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/armor"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/crypto/xsalsa20symmetric"

"github.com/cosmos/cosmos-sdk/codec/legacy"
"github.com/cosmos/cosmos-sdk/crypto"
cryptoAmino "github.com/cosmos/cosmos-sdk/crypto/codec"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/types"
)

Expand Down
2 changes: 1 addition & 1 deletion crypto/codec/amino.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package codec
import (
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/crypto/sr25519"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/crypto/types/multisig"
)

Expand Down
3 changes: 2 additions & 1 deletion crypto/hd/algo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package hd
import (
bip39 "github.com/cosmos/go-bip39"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1"

"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
)

// PubKeyType defines an algorithm to derive key-pairs which can be used for cryptographic signing.
Expand Down
2 changes: 1 addition & 1 deletion crypto/hd/fundraiser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
bip39 "github.com/cosmos/go-bip39"

"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1"

"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
)

type addrData struct {
Expand Down
2 changes: 1 addition & 1 deletion crypto/keyring/keyring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/stretchr/testify/require"
tmcrypto "github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/secp256k1"

"github.com/cosmos/cosmos-sdk/crypto"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/crypto/types/multisig"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion crypto/keyring/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1"

"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/crypto/types/multisig"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
2 changes: 1 addition & 1 deletion crypto/keyring/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/tendermint/tendermint/crypto/secp256k1"

"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand Down
27 changes: 0 additions & 27 deletions crypto/keys/ed25519/bench_test.go

This file was deleted.

163 changes: 0 additions & 163 deletions crypto/keys/ed25519/ed25519.go

This file was deleted.

30 changes: 0 additions & 30 deletions crypto/keys/ed25519/ed25519_test.go

This file was deleted.

2 changes: 2 additions & 0 deletions crypto/keys/secp256k1/secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ var _ crypto.PrivKey = PrivKey{}
const (
PrivKeySize = 32
keyType = "secp256k1"
PrivKeyName = "tendermint/PrivKeySecp256k1"
PubKeyName = "tendermint/PubKeySecp256k1"
)

// PrivKey implements PrivKey.
Expand Down
2 changes: 1 addition & 1 deletion crypto/keys/secp256k1/secp256k1_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package secp256k1

import (
"github.com/cosmos/cosmos-sdk/crypto/secp256k1/internal/secp256k1"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1/internal/secp256k1"
)

// Sign creates an ECDSA signature on curve Secp256k1, using SHA256 on the msg.
Expand Down
3 changes: 2 additions & 1 deletion crypto/keys/secp256k1/secp256k1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (
"github.com/stretchr/testify/require"

"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1"

underlyingSecp256k1 "github.com/btcsuite/btcd/btcec"

"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
)

type keyData struct {
Expand Down
27 changes: 0 additions & 27 deletions crypto/keys/sr25519/bench_test.go

This file was deleted.

13 changes: 0 additions & 13 deletions crypto/keys/sr25519/encoding.go

This file was deleted.

Loading

0 comments on commit 23a9f46

Please sign in to comment.