diff --git a/api/cosmos/crypto/secp256k1/keys.pulsar.go b/api/cosmos/crypto/secp256k1/keys.pulsar.go index 21e3eb1c6fec..2aede10bbf3f 100644 --- a/api/cosmos/crypto/secp256k1/keys.pulsar.go +++ b/api/cosmos/crypto/secp256k1/keys.pulsar.go @@ -1875,36 +1875,36 @@ var file_cosmos_crypto_secp256k1_keys_proto_rawDesc = []byte{ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x31, 0x98, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, - 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x54, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x4e, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x38, 0x98, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, 0x21, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x2f, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x70, 0x32, - 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, - 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x4e, - 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x4f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x2e, - 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, - 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x52, - 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x8a, 0xe7, 0xb0, - 0x2a, 0x22, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x53, - 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x64, 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x42, 0xd0, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, - 0x6b, 0x31, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x28, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, - 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x53, 0xaa, - 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xca, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, - 0x36, 0x6b, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x63, 0x70, - 0x32, 0x35, 0x36, 0x6b, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x32, 0x98, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x53, 0x65, + 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x65, 0x74, 0x68, 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, + 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x4e, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, + 0x4b, 0x65, 0x79, 0x4f, 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x2e, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, + 0x79, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, + 0x65, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x4c, 0x0a, 0x07, 0x50, 0x72, 0x69, 0x76, + 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x2f, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x63, 0x70, + 0x32, 0x35, 0x36, 0x6b, 0x31, 0x65, 0x74, 0x68, 0x92, 0xe7, 0xb0, 0x2a, 0x09, 0x6b, 0x65, 0x79, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0xd0, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x63, + 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x42, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x43, 0x53, 0xaa, 0x02, 0x17, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xca, 0x02, 0x17, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, + 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x3a, 0x3a, + 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/client/keys/output_test.go b/client/keys/output_test.go index ce76b0eb4f5a..120c24629467 100644 --- a/client/keys/output_test.go +++ b/client/keys/output_test.go @@ -41,7 +41,7 @@ func TestBech32KeysOutput(t *testing.T) { out, err := MkAccKeyOutput(k) require.NoError(t, err) require.Equal(t, expectedOutput, out) - require.Equal(t, "{Name:multisig Type:multi Address:0x16a035adce9fe233cec9cd50699922c90618bc7a PubKey:{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":1,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"BOrroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJRBvMr2v1o7/Tt5MFOm9RcJhxfM8axlq8SseN3Dl07xg=\"}]} Mnemonic:}", fmt.Sprintf("%+v", out)) + require.Equal(t, "{Name:multisig Type:multi Address:0xe7e1add937d6cd091d6a0db2ea44eef5c1613c72 PubKey:{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":1,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"BOrroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJRBvMr2v1o7/Tt5MFOm9RcJhxfM8axlq8SseN3Dl07xg=\"}]} Mnemonic:}", fmt.Sprintf("%+v", out)) } // TestBech32KeysOutputNestedMsig tests that the output of a nested multisig key is correct @@ -65,7 +65,7 @@ func TestBech32KeysOutputNestedMsig(t *testing.T) { require.NoError(t, err) require.Equal(t, expectedOutput, out) - require.Equal(t, "{Name:multisig Type:multi Address:0xf03f3dfbd4f8973f5c48ef53297d746e141983c2 PubKey:{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":2,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"BOrroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJRBvMr2v1o7/Tt5MFOm9RcJhxfM8axlq8SseN3Dl07xg=\"},{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":1,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"BOrroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJRBvMr2v1o7/Tt5MFOm9RcJhxfM8axlq8SseN3Dl07xg=\"}]}]} Mnemonic:}", fmt.Sprintf("%+v", out)) + require.Equal(t, "{Name:multisig Type:multi Address:0x7d1c3ef842dcc796df25d46a0716005d30de5a9a PubKey:{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":2,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"BOrroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJRBvMr2v1o7/Tt5MFOm9RcJhxfM8axlq8SseN3Dl07xg=\"},{\"@type\":\"/cosmos.crypto.multisig.LegacyAminoPubKey\",\"threshold\":1,\"public_keys\":[{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"BOrroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJRBvMr2v1o7/Tt5MFOm9RcJhxfM8axlq8SseN3Dl07xg=\"}]}]} Mnemonic:}", fmt.Sprintf("%+v", out)) } func TestProtoMarshalJSON(t *testing.T) { diff --git a/client/keys/show_test.go b/client/keys/show_test.go index bff3fbc0be58..abe8649abbd7 100644 --- a/client/keys/show_test.go +++ b/client/keys/show_test.go @@ -33,11 +33,11 @@ func Test_multiSigKey_Properties(t *testing.T) { pub, err := k.GetPubKey() require.NoError(t, err) - require.Equal(t, "D2B8E5992CF6A3F5904E537F65F27B8FE85DDD38", pub.Address().String()) + require.Equal(t, "8F86E3DB26D754696569401A2933FD740C1389EA", pub.Address().String()) addr, err := k.GetAddress() require.NoError(t, err) - require.Equal(t, "0xd2b8e5992cf6a3f5904e537f65f27b8fe85ddd38", sdk.MustHexifyAddressBytes(addr)) + require.Equal(t, "0x8f86e3db26d754696569401a2933fd740c1389ea", sdk.MustHexifyAddressBytes(addr)) } func Test_showKeysCmd(t *testing.T) { diff --git a/crypto/keys/secp256k1/keys.pb.go b/crypto/keys/secp256k1/keys.pb.go index 5822933060d8..a8b7804e1a76 100644 --- a/crypto/keys/secp256k1/keys.pb.go +++ b/crypto/keys/secp256k1/keys.pb.go @@ -216,7 +216,7 @@ func init() { } var fileDescriptor_e0835e68ebdcb224 = []byte{ - // 298 bytes of a gzipped FileDescriptorProto + // 289 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x4e, 0x4d, 0x2e, 0x30, 0x32, 0x35, 0xcb, 0x36, 0xd4, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, @@ -226,16 +226,16 @@ var fileDescriptor_e0835e68ebdcb224 = []byte{ 0x62, 0xce, 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x02, 0x31, 0xad, 0x0c, 0x67, 0x2c, 0x90, 0x67, 0xe8, 0x7a, 0xbe, 0x41, 0x4b, 0xaa, 0x24, 0x35, 0x2f, 0x25, 0xb5, 0x28, 0x37, 0x33, 0xaf, 0x44, 0x1f, 0xa2, 0x21, 0x18, 0x66, 0xd9, 0xa4, 0xe7, 0x1b, 0xb4, 0x38, 0xb3, 0x53, - 0x2b, 0xe3, 0xd3, 0x32, 0x53, 0x73, 0x52, 0x94, 0x42, 0xb8, 0xd8, 0x20, 0x0a, 0xb0, 0x18, 0x67, - 0x01, 0x33, 0x4e, 0x31, 0x39, 0x3f, 0x37, 0x15, 0xc3, 0xa4, 0xd0, 0xbc, 0xe4, 0xfc, 0xdc, 0x82, - 0xa2, 0xd4, 0xe2, 0xe2, 0xd4, 0x14, 0x34, 0x53, 0xfd, 0xb8, 0xb8, 0x02, 0x8a, 0x32, 0xcb, 0x70, - 0x3a, 0x54, 0x0f, 0x64, 0xaa, 0x34, 0xb2, 0x23, 0x21, 0xaa, 0x71, 0xb9, 0x32, 0x88, 0x8b, 0x1d, - 0xaa, 0x02, 0x8b, 0x61, 0xa6, 0x20, 0xc3, 0x94, 0xa0, 0x4e, 0x44, 0x33, 0x07, 0xb7, 0x1b, 0x9d, - 0x7c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, - 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x28, 0x3d, 0xb3, 0x24, - 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x16, 0xad, 0x60, 0x4a, 0xb7, 0x38, 0x25, 0x1b, - 0x16, 0xc3, 0xa0, 0x78, 0x45, 0x44, 0x73, 0x12, 0x1b, 0x38, 0x82, 0x8c, 0x01, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x26, 0x0c, 0x30, 0x7d, 0x08, 0x02, 0x00, 0x00, + 0x2b, 0xe3, 0xd3, 0x32, 0x53, 0x73, 0x52, 0x94, 0xfc, 0xb8, 0xd8, 0x20, 0x0a, 0xb0, 0x18, 0x67, + 0x04, 0x33, 0x4e, 0x3a, 0x39, 0x3f, 0x37, 0xb5, 0x24, 0x29, 0x0d, 0xc3, 0xb0, 0xd4, 0x92, 0x0c, + 0x0c, 0xf3, 0xb8, 0x02, 0x8a, 0x32, 0xcb, 0x70, 0x3a, 0x51, 0x0f, 0x6c, 0x1e, 0xb2, 0xf3, 0x20, + 0xaa, 0x71, 0xb9, 0xcf, 0x87, 0x8b, 0x1d, 0xaa, 0x02, 0x8b, 0x61, 0xfa, 0x20, 0xc3, 0x64, 0x10, + 0x8e, 0x43, 0x33, 0x0a, 0xc3, 0x75, 0x4e, 0x3e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, + 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, + 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x8b, + 0x4a, 0x30, 0xa5, 0x5b, 0x9c, 0x92, 0x0d, 0x8b, 0x55, 0x50, 0x5c, 0x22, 0xa2, 0x36, 0x89, 0x0d, + 0x1c, 0x29, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0xd5, 0x9b, 0x34, 0xfc, 0x01, 0x00, + 0x00, } func (m *PubKeyOld) Marshal() (dAtA []byte, err error) { diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index e0946b842b99..d782c24cb77c 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -31,8 +31,8 @@ const ( keyType = "secp256k1" PrivKeyNameOld = "tendermint/PrivKeySecp256k1" PubKeyNameOld = "tendermint/PubKeySecp256k1" - PrivKeyName = "comet/PrivKeySecp256k1Uncompressed" - PubKeyName = "comet/PubKeySecp256k1Uncompressed" + PrivKeyName = "cometbft/PrivKeySecp256k1eth" + PubKeyName = "cometbft/PubKeySecp256k1eth" ) func (privKey *PrivKeyOld) Bytes() []byte { diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 08f56c466820..29a6342a1097 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -34,7 +34,7 @@ func TestPublicKeyUnsafe(t *testing.T) { func checkDefaultPubKey(t *testing.T, priv types.LedgerPrivKey) { require.NotNil(t, priv) expectedPkStr := "PubKeySecp256k1{034FEF9CD7C4C63588D3B03FEB5281B9D232CBA34D6F3D71AEE59211FFBFE1FE870000000000000000000000000000000000000000000000000000000000000000}" - require.Equal(t, "7277b5e741034fef9cd7c4c63588d3b03feb5281b9d232cba34d6f3d71aee59211ffbfe1fe870000000000000000000000000000000000000000000000000000000000000000", + require.Equal(t, "6ca3b68f41034fef9cd7c4c63588d3b03feb5281b9d232cba34d6f3d71aee59211ffbfe1fe870000000000000000000000000000000000000000000000000000000000000000", fmt.Sprintf("%x", cdc.Amino.MustMarshalBinaryBare(priv.PubKey())), "Is your device using test mnemonic: %s ?", testdata.TestMnemonic) require.Equal(t, expectedPkStr, priv.PubKey().String()) diff --git a/proto/cosmos/crypto/secp256k1/keys.proto b/proto/cosmos/crypto/secp256k1/keys.proto index 9fdd7b5fdeab..a787f5490eb4 100644 --- a/proto/cosmos/crypto/secp256k1/keys.proto +++ b/proto/cosmos/crypto/secp256k1/keys.proto @@ -29,7 +29,7 @@ message PubKeyOld { // PubKey defines a comet uncompressed secp256k1 public key // Key is the uncompressed form of the pubkey. message PubKey { - option (amino.name) = "comet/PubKeySecp256k1Uncompressed"; + option (amino.name) = "cometbft/PubKeySecp256k1eth"; // The Amino encoding is simply the inner bytes field, and not the Amino // encoding of the whole PubKey struct. // @@ -56,7 +56,7 @@ message PrivKeyOld { // PrivKey defines a comet secp256k1 private key. message PrivKey { - option (amino.name) = "comet/PrivKeySecp256k1Uncompressed"; + option (amino.name) = "cometbft/PrivKeySecp256k1eth"; option (amino.message_encoding) = "key_field"; bytes key = 1;