Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
56fda78
buf plugin draft
pompon0 Dec 10, 2025
9e34cae
plugin has been placed
pompon0 Dec 10, 2025
e4ecde6
fmt
pompon0 Dec 11, 2025
29364aa
WIP
pompon0 Dec 11, 2025
e74e728
separate module
pompon0 Dec 12, 2025
3f5798b
added canonical encoding
pompon0 Dec 12, 2025
f8753b7
IsHashable
pompon0 Dec 12, 2025
510c3b9
fix and test
pompon0 Dec 12, 2025
d1b30ff
test updates
pompon0 Dec 12, 2025
9ad06cf
everything in place
pompon0 Dec 12, 2025
117563c
go fmt
pompon0 Dec 12, 2025
c27f7e6
Merge remote-tracking branch 'origin/main' into gprusak-proto
pompon0 Dec 12, 2025
77dc3a7
Merge branch 'main' into gprusak-proto
pompon0 Dec 12, 2025
4c7826a
changed location of the plugin
pompon0 Dec 12, 2025
24a2e25
Merge branch 'gprusak-proto' of https://github.com/sei-protocol/sei-c…
pompon0 Dec 12, 2025
118d566
nits
pompon0 Dec 12, 2025
0189653
panic msg
pompon0 Dec 12, 2025
c0a0ec5
moved all hashable stuff together
pompon0 Dec 15, 2025
15faaa5
moved testonly proto to internal
pompon0 Dec 15, 2025
9794896
fmt
pompon0 Dec 15, 2025
a82ac92
moved under internal
pompon0 Dec 15, 2025
50ae626
comment fix
pompon0 Dec 15, 2025
6160058
Merge branch 'main' into gprusak-proto
pompon0 Dec 15, 2025
51c83d6
ed25519 cleanup wip
pompon0 Dec 15, 2025
e571075
missing changes
pompon0 Dec 15, 2025
bf6e999
compilation fix
pompon0 Dec 15, 2025
f435bee
Merge branch 'gprusak-proto' of https://github.com/sei-protocol/sei-c…
pompon0 Dec 15, 2025
ac44467
Merge branch 'gprusak-proto' into gprusak-validator-proto
pompon0 Dec 15, 2025
9a3edcb
wip - what about non-validator mode?
pompon0 Dec 15, 2025
28bd678
wip
pompon0 Dec 15, 2025
f007432
wip; json is shit
pompon0 Dec 16, 2025
111028e
crypto test
pompon0 Dec 17, 2025
788f2c7
cleanup of typeRegistry
pompon0 Dec 17, 2025
09a5926
test for sig
pompon0 Dec 17, 2025
45766d7
fmt
pompon0 Dec 17, 2025
b0ce59f
copied from sei-v3
pompon0 Dec 17, 2025
ba9aedd
test
pompon0 Dec 17, 2025
afcacab
codex
pompon0 Dec 17, 2025
025fd15
codex tests
pompon0 Dec 18, 2025
72a985f
optional sig
pompon0 Dec 18, 2025
5b90ba9
codex tests
pompon0 Dec 18, 2025
cd7ed89
tests wip
pompon0 Dec 18, 2025
efd3576
Merge remote-tracking branch 'origin/main' into gprusak-validator-proto
pompon0 Dec 18, 2025
a9975f7
tendermint tests pass
pompon0 Dec 18, 2025
e866fc2
all tests compile
pompon0 Dec 18, 2025
e0043d0
fmt
pompon0 Dec 18, 2025
50d521b
Merge remote-tracking branch 'origin/main' into gprusak-validator-proto
pompon0 Dec 18, 2025
7aacf5b
moved roles to separate pr
pompon0 Dec 18, 2025
408f6b4
gofmt
pompon0 Dec 18, 2025
469c57d
stupid encoder
pompon0 Dec 18, 2025
b9c22b9
cachingVerifier
pompon0 Dec 18, 2025
2c4dc33
Merge branch 'main' into gprusak-validator-proto
pompon0 Dec 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ func (s *KeeperTestHelper) BuildTx(
func CreateRandomAccounts(numAccts int) []sdk.AccAddress {
testAddrs := make([]sdk.AccAddress, numAccts)
for i := 0; i < numAccts; i++ {
pk := ed25519.GenPrivKey().PubKey()
pk := ed25519.GenerateSecretKey().Public()
testAddrs[i] = sdk.AccAddress(pk.Address())
}

return testAddrs
}

func GenerateTestAddrs() (string, string) {
pk1 := ed25519.GenPrivKey().PubKey()
pk1 := ed25519.GenerateSecretKey().Public()
validAddr := sdk.AccAddress(pk1.Address()).String()
invalidAddr := sdk.AccAddress("invalid").String()
return validAddr, invalidAddr
Expand Down
8 changes: 5 additions & 3 deletions sei-cosmos/client/rpc/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ func StatusCommand() *cobra.Command {
return err
}

var addr cryptotypes.Address
var pk cryptotypes.PubKey
// `status` has TM pubkeys, we need to convert them to our pubkeys.
if status.ValidatorInfo.PubKey != nil {
pk, err = cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey)
if k, ok := status.ValidatorInfo.PubKey.Get(); ok {
addr = k.Address()
pk, err = cryptocodec.FromTmPubKeyInterface(k)
if err != nil {
return err
}
Expand All @@ -63,7 +65,7 @@ func StatusCommand() *cobra.Command {
NodeInfo: status.NodeInfo,
SyncInfo: status.SyncInfo,
ValidatorInfo: validatorInfo{
Address: status.ValidatorInfo.Address,
Address: addr,
PubKey: pk,
VotingPower: status.ValidatorInfo.VotingPower,
},
Expand Down
9 changes: 2 additions & 7 deletions sei-cosmos/crypto/codec/tm.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,14 @@ func ToTmProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error)

// FromTmPubKeyInterface converts TM's tmcrypto.PubKey to our own PubKey.
func FromTmPubKeyInterface(tmPk tmcrypto.PubKey) (cryptotypes.PubKey, error) {
tmProtoPk, err := encoding.PubKeyToProto(tmPk)
if err != nil {
return nil, err
}

return FromTmProtoPublicKey(tmProtoPk)
return FromTmProtoPublicKey(encoding.PubKeyToProto(tmPk))
}

// ToTmPubKeyInterface converts our own PubKey to TM's tmcrypto.PubKey.
func ToTmPubKeyInterface(pk cryptotypes.PubKey) (tmcrypto.PubKey, error) {
tmProtoPk, err := ToTmProtoPublicKey(pk)
if err != nil {
return nil, err
return tmcrypto.PubKey{}, err
}

return encoding.PubKeyFromProto(tmProtoPk)
Expand Down
14 changes: 7 additions & 7 deletions sei-cosmos/crypto/keys/ed25519/ed25519_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestMarshalAmino(t *testing.T) {
testCases := []struct {
desc string
msg codec.AminoMarshaler
typ interface{}
typ any
expBinary []byte
expJSON string
}{
Expand Down Expand Up @@ -187,17 +187,17 @@ func TestMarshalAmino(t *testing.T) {
func TestMarshalAmino_BackwardsCompatibility(t *testing.T) {
aminoCdc := codec.NewLegacyAmino()
// Create Tendermint keys.
tmPrivKey := tmed25519.GenPrivKey()
tmPubKey := tmPrivKey.PubKey()
tmPrivKey := tmed25519.GenerateSecretKey()
tmPubKey := tmPrivKey.Public()
// Create our own keys, with the same private key as Tendermint's.
privKey := &ed25519.PrivKey{Key: []byte(tmPrivKey)}
privKey := &ed25519.PrivKey{Key: tmPrivKey.SecretBytes()}
pubKey := privKey.PubKey().(*ed25519.PubKey)

testCases := []struct {
desc string
tmKey interface{}
ourKey interface{}
marshalFn func(o interface{}) ([]byte, error)
tmKey any
ourKey any
marshalFn func(o any) ([]byte, error)
}{
{
"ed25519 private key, binary",
Expand Down
14 changes: 2 additions & 12 deletions sei-cosmos/crypto/keys/sr25519/internal/privkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,16 @@ import (
"github.com/oasisprotocol/curve25519-voi/primitives/sr25519"
)

var (
signingCtx = sr25519.NewSigningContext([]byte{})
)

const (
PrivKeyName = "tendermint/PrivKeySr25519"
// PrivKeySize is the size of a sr25519 signature in bytes.
PrivKeySize = sr25519.MiniSecretKeySize
var signingCtx = sr25519.NewSigningContext([]byte{})

KeyType = "sr25519"
)
const KeyType = "sr25519"

// PrivKey implements crypto.PrivKey.
type PrivKey struct {
msk sr25519.MiniSecretKey
kp *sr25519.KeyPair
}

// TypeTag satisfies the jsontypes.Tagged interface.
func (PrivKey) TypeTag() string { return PrivKeyName }
func (privKey PrivKey) Type() string { return KeyType }

// Bytes returns the byte-encoded PrivKey.
Expand Down
Loading
Loading