From e887adac80a13a37194b785cfcc9914274ed433c Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Tue, 29 Apr 2025 11:29:20 -0700 Subject: [PATCH 01/23] chore: forge init --- counter-sei/.github/workflows/test.yml | 43 +++++++++++++++++ counter-sei/.gitignore | 14 ++++++ counter-sei/README.md | 66 ++++++++++++++++++++++++++ counter-sei/foundry.toml | 6 +++ counter-sei/script/Counter.s.sol | 19 ++++++++ counter-sei/src/Counter.sol | 14 ++++++ counter-sei/test/Counter.t.sol | 24 ++++++++++ 7 files changed, 186 insertions(+) create mode 100644 counter-sei/.github/workflows/test.yml create mode 100644 counter-sei/.gitignore create mode 100644 counter-sei/README.md create mode 100644 counter-sei/foundry.toml create mode 100644 counter-sei/script/Counter.s.sol create mode 100644 counter-sei/src/Counter.sol create mode 100644 counter-sei/test/Counter.t.sol diff --git a/counter-sei/.github/workflows/test.yml b/counter-sei/.github/workflows/test.yml new file mode 100644 index 00000000..34a4a527 --- /dev/null +++ b/counter-sei/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +env: + FOUNDRY_PROFILE: ci + +jobs: + check: + strategy: + fail-fast: true + + name: Foundry project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - name: Show Forge version + run: | + forge --version + + - name: Run Forge fmt + run: | + forge fmt --check + id: fmt + + - name: Run Forge build + run: | + forge build --sizes + id: build + + - name: Run Forge tests + run: | + forge test -vvv + id: test diff --git a/counter-sei/.gitignore b/counter-sei/.gitignore new file mode 100644 index 00000000..85198aaa --- /dev/null +++ b/counter-sei/.gitignore @@ -0,0 +1,14 @@ +# Compiler files +cache/ +out/ + +# Ignores development broadcast logs +!/broadcast +/broadcast/*/31337/ +/broadcast/**/dry-run/ + +# Docs +docs/ + +# Dotenv file +.env diff --git a/counter-sei/README.md b/counter-sei/README.md new file mode 100644 index 00000000..9265b455 --- /dev/null +++ b/counter-sei/README.md @@ -0,0 +1,66 @@ +## Foundry + +**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** + +Foundry consists of: + +- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). +- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. +- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. +- **Chisel**: Fast, utilitarian, and verbose solidity REPL. + +## Documentation + +https://book.getfoundry.sh/ + +## Usage + +### Build + +```shell +$ forge build +``` + +### Test + +```shell +$ forge test +``` + +### Format + +```shell +$ forge fmt +``` + +### Gas Snapshots + +```shell +$ forge snapshot +``` + +### Anvil + +```shell +$ anvil +``` + +### Deploy + +```shell +$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key +``` + +### Cast + +```shell +$ cast +``` + +### Help + +```shell +$ forge --help +$ anvil --help +$ cast --help +``` diff --git a/counter-sei/foundry.toml b/counter-sei/foundry.toml new file mode 100644 index 00000000..25b918f9 --- /dev/null +++ b/counter-sei/foundry.toml @@ -0,0 +1,6 @@ +[profile.default] +src = "src" +out = "out" +libs = ["lib"] + +# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options diff --git a/counter-sei/script/Counter.s.sol b/counter-sei/script/Counter.s.sol new file mode 100644 index 00000000..cdc1fe9a --- /dev/null +++ b/counter-sei/script/Counter.s.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Script, console} from "forge-std/Script.sol"; +import {Counter} from "../src/Counter.sol"; + +contract CounterScript is Script { + Counter public counter; + + function setUp() public {} + + function run() public { + vm.startBroadcast(); + + counter = new Counter(); + + vm.stopBroadcast(); + } +} diff --git a/counter-sei/src/Counter.sol b/counter-sei/src/Counter.sol new file mode 100644 index 00000000..aded7997 --- /dev/null +++ b/counter-sei/src/Counter.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +contract Counter { + uint256 public number; + + function setNumber(uint256 newNumber) public { + number = newNumber; + } + + function increment() public { + number++; + } +} diff --git a/counter-sei/test/Counter.t.sol b/counter-sei/test/Counter.t.sol new file mode 100644 index 00000000..54b724f7 --- /dev/null +++ b/counter-sei/test/Counter.t.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {Test, console} from "forge-std/Test.sol"; +import {Counter} from "../src/Counter.sol"; + +contract CounterTest is Test { + Counter public counter; + + function setUp() public { + counter = new Counter(); + counter.setNumber(0); + } + + function test_Increment() public { + counter.increment(); + assertEq(counter.number(), 1); + } + + function testFuzz_SetNumber(uint256 x) public { + counter.setNumber(x); + assertEq(counter.number(), x); + } +} From 8621059f2c545fcaa001f1aa97f35193a7955d7f Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Tue, 29 Apr 2025 11:29:21 -0700 Subject: [PATCH 02/23] forge install: forge-std v1.9.7 --- .gitmodules | 3 +++ counter-sei/lib/forge-std | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 counter-sei/lib/forge-std diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..c2e0d66e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "counter-sei/lib/forge-std"] + path = counter-sei/lib/forge-std + url = https://github.com/foundry-rs/forge-std diff --git a/counter-sei/lib/forge-std b/counter-sei/lib/forge-std new file mode 160000 index 00000000..77041d2c --- /dev/null +++ b/counter-sei/lib/forge-std @@ -0,0 +1 @@ +Subproject commit 77041d2ce690e692d6e03cc812b57d1ddaa4d505 From 9fac641e5cdc24dc7de9e4704208a61bdb75ae5c Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 14:57:07 -0700 Subject: [PATCH 03/23] - Change the default type of coin to 60 --- client/keys/add.go | 4 +++- types/address.go | 3 +++ types/config.go | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/keys/add.go b/client/keys/add.go index 11a6326a..cae1f187 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -282,6 +282,9 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf // Hide mnemonic from output showMnemonic = false mnemonic = "" + fmt.Fprintln(cmd.ErrOrStderr(), "\n**Important** Default coin type has been changed to ETH type 60. "+ + "Your address will be different if it was created with previous default ATOM coin type. "+ + "Try using '--coin-type 118' flag for recovery.") } return printCreate(cmd, info, showMnemonic, mnemonic, outputFormat) @@ -316,7 +319,6 @@ func printCreate(cmd *cobra.Command, info keyring.Info, showMnemonic bool, mnemo } cmd.Println(string(jsonString)) - default: return fmt.Errorf("invalid output format %s", outputFormat) } diff --git a/types/address.go b/types/address.go index c9f420a5..0af62876 100644 --- a/types/address.go +++ b/types/address.go @@ -41,6 +41,9 @@ const ( // CoinType is the ATOM coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md) CoinType = 118 + // CoinType60 is the ETH (EVM) coin type as defined in SLIP44 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md) + CoinType60 = 60 + // FullFundraiserPath is the parts of the BIP44 HD path that are fixed by // what we used during the ATOM fundraiser. FullFundraiserPath = "m/44'/118'/0'/0/0" diff --git a/types/config.go b/types/config.go index 00b701a0..8a38b25d 100644 --- a/types/config.go +++ b/types/config.go @@ -49,7 +49,7 @@ func NewConfig() *Config { fullFundraiserPath: FullFundraiserPath, purpose: Purpose, - coinType: CoinType, + coinType: CoinType60, txEncoder: nil, } } @@ -91,7 +91,8 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// and returns the config instance +// +// and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { config.assertNotSealed() config.bech32AddressPrefix["validator_addr"] = addressPrefix From c64595cf99d1b0a5bd09dc0533cdb5baa3b0b0db Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 15:00:57 -0700 Subject: [PATCH 04/23] - get rid of redundant code --- .gitmodules | 3 -- counter-sei/.github/workflows/test.yml | 43 ----------------- counter-sei/.gitignore | 14 ------ counter-sei/README.md | 66 -------------------------- counter-sei/foundry.toml | 6 --- counter-sei/lib/forge-std | 1 - counter-sei/script/Counter.s.sol | 19 -------- counter-sei/src/Counter.sol | 14 ------ counter-sei/test/Counter.t.sol | 24 ---------- 9 files changed, 190 deletions(-) delete mode 100644 .gitmodules delete mode 100644 counter-sei/.github/workflows/test.yml delete mode 100644 counter-sei/.gitignore delete mode 100644 counter-sei/README.md delete mode 100644 counter-sei/foundry.toml delete mode 160000 counter-sei/lib/forge-std delete mode 100644 counter-sei/script/Counter.s.sol delete mode 100644 counter-sei/src/Counter.sol delete mode 100644 counter-sei/test/Counter.t.sol diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c2e0d66e..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "counter-sei/lib/forge-std"] - path = counter-sei/lib/forge-std - url = https://github.com/foundry-rs/forge-std diff --git a/counter-sei/.github/workflows/test.yml b/counter-sei/.github/workflows/test.yml deleted file mode 100644 index 34a4a527..00000000 --- a/counter-sei/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CI - -on: - push: - pull_request: - workflow_dispatch: - -env: - FOUNDRY_PROFILE: ci - -jobs: - check: - strategy: - fail-fast: true - - name: Foundry project - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Show Forge version - run: | - forge --version - - - name: Run Forge fmt - run: | - forge fmt --check - id: fmt - - - name: Run Forge build - run: | - forge build --sizes - id: build - - - name: Run Forge tests - run: | - forge test -vvv - id: test diff --git a/counter-sei/.gitignore b/counter-sei/.gitignore deleted file mode 100644 index 85198aaa..00000000 --- a/counter-sei/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Compiler files -cache/ -out/ - -# Ignores development broadcast logs -!/broadcast -/broadcast/*/31337/ -/broadcast/**/dry-run/ - -# Docs -docs/ - -# Dotenv file -.env diff --git a/counter-sei/README.md b/counter-sei/README.md deleted file mode 100644 index 9265b455..00000000 --- a/counter-sei/README.md +++ /dev/null @@ -1,66 +0,0 @@ -## Foundry - -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** - -Foundry consists of: - -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. - -## Documentation - -https://book.getfoundry.sh/ - -## Usage - -### Build - -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt -``` - -### Gas Snapshots - -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy - -```shell -$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key -``` - -### Cast - -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` diff --git a/counter-sei/foundry.toml b/counter-sei/foundry.toml deleted file mode 100644 index 25b918f9..00000000 --- a/counter-sei/foundry.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile.default] -src = "src" -out = "out" -libs = ["lib"] - -# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options diff --git a/counter-sei/lib/forge-std b/counter-sei/lib/forge-std deleted file mode 160000 index 77041d2c..00000000 --- a/counter-sei/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 77041d2ce690e692d6e03cc812b57d1ddaa4d505 diff --git a/counter-sei/script/Counter.s.sol b/counter-sei/script/Counter.s.sol deleted file mode 100644 index cdc1fe9a..00000000 --- a/counter-sei/script/Counter.s.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script, console} from "forge-std/Script.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterScript is Script { - Counter public counter; - - function setUp() public {} - - function run() public { - vm.startBroadcast(); - - counter = new Counter(); - - vm.stopBroadcast(); - } -} diff --git a/counter-sei/src/Counter.sol b/counter-sei/src/Counter.sol deleted file mode 100644 index aded7997..00000000 --- a/counter-sei/src/Counter.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -contract Counter { - uint256 public number; - - function setNumber(uint256 newNumber) public { - number = newNumber; - } - - function increment() public { - number++; - } -} diff --git a/counter-sei/test/Counter.t.sol b/counter-sei/test/Counter.t.sol deleted file mode 100644 index 54b724f7..00000000 --- a/counter-sei/test/Counter.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Test, console} from "forge-std/Test.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterTest is Test { - Counter public counter; - - function setUp() public { - counter = new Counter(); - counter.setNumber(0); - } - - function test_Increment() public { - counter.increment(); - assertEq(counter.number(), 1); - } - - function testFuzz_SetNumber(uint256 x) public { - counter.setNumber(x); - assertEq(counter.number(), x); - } -} From 17b7823cf31010096ceea581b74ce39e9c4a7d20 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 15:06:16 -0700 Subject: [PATCH 05/23] remove unintended change --- types/config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/types/config.go b/types/config.go index 8a38b25d..edf35418 100644 --- a/types/config.go +++ b/types/config.go @@ -91,7 +91,6 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// // and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { config.assertNotSealed() From 59f63bbf28f58b14b727f562056b59a7d0631208 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 15:09:52 -0700 Subject: [PATCH 06/23] remove unintended change 2 --- types/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/config.go b/types/config.go index edf35418..ccb28f51 100644 --- a/types/config.go +++ b/types/config.go @@ -91,7 +91,7 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// and returns the config instance +// and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { config.assertNotSealed() config.bech32AddressPrefix["validator_addr"] = addressPrefix From 4854668eb4f2606bffd6cb975de234fe944b56d1 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 15:47:38 -0700 Subject: [PATCH 07/23] - update TestBeach32ifPbKey test --- types/bech32/legacybech32/pk_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/bech32/legacybech32/pk_test.go b/types/bech32/legacybech32/pk_test.go index 26183475..e5c75733 100644 --- a/types/bech32/legacybech32/pk_test.go +++ b/types/bech32/legacybech32/pk_test.go @@ -13,7 +13,7 @@ import ( func TestBeach32ifPbKey(t *testing.T) { require := require.New(t) - path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) + path := *hd.NewFundraiserParams(0, sdk.GetConfig().GetCoinType(), 0) priv, err := ledger.NewPrivKeySecp256k1Unsafe(path) require.Nil(err, "%s", err) require.NotNil(priv) From d6aff7d9c432c55c08f3fadf1821e45601622def Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 15:49:44 -0700 Subject: [PATCH 08/23] - update TestBeach32ifPbKey test 2 --- types/bech32/legacybech32/pk_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/bech32/legacybech32/pk_test.go b/types/bech32/legacybech32/pk_test.go index e5c75733..dc4f6a73 100644 --- a/types/bech32/legacybech32/pk_test.go +++ b/types/bech32/legacybech32/pk_test.go @@ -20,6 +20,6 @@ func TestBeach32ifPbKey(t *testing.T) { pubKeyAddr, err := MarshalPubKey(AccPK, priv.PubKey()) require.NoError(err) - require.Equal("cosmospub1addwnpepqd87l8xhcnrrtzxnkql7k55ph8fr9jarf4hn6udwukfprlalu8lgw0urza0", + require.Equal("cosmospub1addwnpepqgv98kf4ysgea6e34v9sduwukp50sj2rhv3sm7ssky5j73a0vs6h2cgfmwy", pubKeyAddr, "Is your device using test mnemonic: %s ?", testdata.TestMnemonic) } From 80505b8ddd0324db661eb981502f1a0ef1ec914c Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 15:53:09 -0700 Subject: [PATCH 09/23] - update ledger tests --- crypto/ledger/ledger_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 9f4bf942..a5c1307b 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -22,7 +22,7 @@ func TestErrorHandling(t *testing.T) { } func TestPublicKeyUnsafe(t *testing.T) { - path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) + path := *hd.NewFundraiserParams(0, sdk.GetConfig().GetCoinType(), 0) priv, err := NewPrivKeySecp256k1Unsafe(path) require.NoError(t, err) checkDefaultPubKey(t, priv) @@ -60,7 +60,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { // Check with device for i := uint32(0); i < 10; i++ { - path := *hd.NewFundraiserParams(0, sdk.CoinType, i) + path := *hd.NewFundraiserParams(0, sdk.GetConfig().GetCoinType(), i) t.Logf("Checking keys at %v\n", path) priv, err := NewPrivKeySecp256k1Unsafe(path) @@ -94,7 +94,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { } func TestPublicKeySafe(t *testing.T) { - path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) + path := *hd.NewFundraiserParams(0, sdk.GetConfig().GetCoinType(), 0) priv, addr, err := NewPrivKeySecp256k1(path, "cosmos") require.NoError(t, err) @@ -139,7 +139,7 @@ func TestPublicKeyHDPath(t *testing.T) { // Check with device for i := 0; i < len(expectedAddrs); i++ { - path := *hd.NewFundraiserParams(0, sdk.CoinType, uint32(i)) + path := *hd.NewFundraiserParams(0, sdk.GetConfig().GetCoinType(), uint32(i)) t.Logf("Checking keys at %s\n", path) priv, addr, err := NewPrivKeySecp256k1(path, "cosmos") @@ -192,7 +192,7 @@ func TestSignaturesHD(t *testing.T) { for account := uint32(0); account < 100; account += 30 { msg := getFakeTx(account) - path := *hd.NewFundraiserParams(account, sdk.CoinType, account/5) + path := *hd.NewFundraiserParams(account, sdk.GetConfig().GetCoinType(), account/5) t.Logf("Checking signature at %v --- PLEASE REVIEW AND ACCEPT IN THE DEVICE\n", path) priv, err := NewPrivKeySecp256k1Unsafe(path) @@ -209,7 +209,7 @@ func TestSignaturesHD(t *testing.T) { func TestRealDeviceSecp256k1(t *testing.T) { msg := getFakeTx(50) - path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) + path := *hd.NewFundraiserParams(0, sdk.GetConfig().GetCoinType(), 0) priv, err := NewPrivKeySecp256k1Unsafe(path) require.NoError(t, err) From 2bdcf9ca2b692e5e5905c6db83bf27bef1d1b67f Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 16:27:05 -0700 Subject: [PATCH 10/23] - further updates --- crypto/keyring/keyring_ledger_test.go | 10 +++++----- crypto/ledger/ledger_test.go | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index 4a025639..b9ad098a 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -42,7 +42,7 @@ func TestInMemoryCreateLedger(t *testing.T) { path, err := restoredKey.GetPath() require.NoError(t, err) - require.Equal(t, "m/44'/118'/3'/0/1", path.String()) + require.Equal(t, "m/44'/60'/3'/0/1", path.String()) } // TestSignVerify does some detailed checks on how we sign and validate @@ -53,7 +53,7 @@ func TestSignVerifyKeyRingWithLedger(t *testing.T) { kb, err := New("keybasename", "test", dir, nil) require.NoError(t, err) - i1, err := kb.SaveLedgerKey("key", hd.Secp256k1, "cosmos", 118, 0, 0) + i1, err := kb.SaveLedgerKey("key", hd.Secp256k1, "cosmos", 60, 0, 0) if err != nil { require.Equal(t, "ledger nano S: support for ledger devices is not available in this executable", err.Error()) t.Skip("ledger nano S: support for ledger devices is not available in this executable") @@ -91,11 +91,11 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { require.NoError(t, err) // Test unsupported Algo - _, err = keyring.SaveLedgerKey("key", notSupportedAlgo{}, "cosmos", 118, 0, 0) + _, err = keyring.SaveLedgerKey("key", notSupportedAlgo{}, "cosmos", 60, 0, 0) require.Error(t, err) require.Contains(t, err.Error(), ErrUnsupportedSigningAlgo.Error()) - ledger, err := keyring.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 118, 3, 1) + ledger, err := keyring.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 60, 3, 1) if err != nil { require.Equal(t, "ledger nano S: support for ledger devices is not available in this executable", err.Error()) t.Skip("ledger nano S: support for ledger devices is not available in this executable") @@ -119,5 +119,5 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { path, err := restoredKey.GetPath() require.NoError(t, err) - require.Equal(t, "m/44'/118'/3'/0/1", path.String()) + require.Equal(t, "m/44'/60'/3'/0/1", path.String()) } diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index a5c1307b..fd9e6c19 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -31,18 +31,18 @@ func TestPublicKeyUnsafe(t *testing.T) { func checkDefaultPubKey(t *testing.T, priv types.LedgerPrivKey) { require.NotNil(t, priv) expectedPkStr := "PubKeySecp256k1{034FEF9CD7C4C63588D3B03FEB5281B9D232CBA34D6F3D71AEE59211FFBFE1FE87}" - require.Equal(t, "eb5ae98721034fef9cd7c4c63588d3b03feb5281b9d232cba34d6f3d71aee59211ffbfe1fe87", + require.Equal(t, "eb5ae98721021853d93524119eeb31ab0b06f1dcb068f84943bb230dfa10b1292f47af643575", fmt.Sprintf("%x", cdc.Amino.MustMarshalBinaryBare(priv.PubKey())), "Is your device using test mnemonic: %s ?", testdata.TestMnemonic) require.Equal(t, expectedPkStr, priv.PubKey().String()) addr := sdk.AccAddress(priv.PubKey().Address()).String() - require.Equal(t, "cosmos1w34k53py5v5xyluazqpq65agyajavep2rflq6h", + require.Equal(t, "cosmos1ndgvlye77dmuct2ncr4m8ghmfkwp7p8slz6zxm", addr, "Is your device using test mnemonic: %s ?", testdata.TestMnemonic) } func TestPublicKeyUnsafeHDPath(t *testing.T) { expectedAnswers := []string{ - "PubKeySecp256k1{034FEF9CD7C4C63588D3B03FEB5281B9D232CBA34D6F3D71AEE59211FFBFE1FE87}", + "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", "PubKeySecp256k1{0260D0487A3DFCE9228EEE2D0D83A40F6131F551526C8E52066FE7FE1E4A509666}", "PubKeySecp256k1{03A2670393D02B162D0ED06A08041E80D86BE36C0564335254DF7462447EB69AB3}", "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", @@ -121,7 +121,7 @@ func TestPublicKeyHDPath(t *testing.T) { } expectedAddrs := []string{ - "cosmos1w34k53py5v5xyluazqpq65agyajavep2rflq6h", + "cosmos1ndgvlye77dmuct2ncr4m8ghmfkwp7p8slz6zxm", "cosmos19ewxwemt6uahejvwf44u7dh6tq859tkyvarh2q", "cosmos1a07dzdjgjsntxpp75zg7cgatgq0udh3pcdcxm3", "cosmos1qvw52lmn9gpvem8welghrkc52m3zczyhlqjsl7", From c45d94fe48b8ebc9e2cfa4c1e9c53ab43c8cc032 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 16:48:21 -0700 Subject: [PATCH 11/23] - update expected keys --- crypto/keyring/keyring_ledger_test.go | 6 +++--- crypto/ledger/ledger_test.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/keyring/keyring_ledger_test.go b/crypto/keyring/keyring_ledger_test.go index b9ad098a..c8c46b81 100644 --- a/crypto/keyring/keyring_ledger_test.go +++ b/crypto/keyring/keyring_ledger_test.go @@ -16,7 +16,7 @@ import ( func TestInMemoryCreateLedger(t *testing.T) { kb := NewInMemory() - ledger, err := kb.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 118, 3, 1) + ledger, err := kb.SaveLedgerKey("some_account", hd.Secp256k1, "cosmos", 60, 3, 1) if err != nil { require.Error(t, err) @@ -28,7 +28,7 @@ func TestInMemoryCreateLedger(t *testing.T) { // The mock is available, check that the address is correct pubKey := ledger.GetPubKey() - expectedPkStr := "PubKeySecp256k1{03602C0CB4D8C0081FEE794BDE96E7B95FA16F2B5283B764AC070584327B2C7202}" + expectedPkStr := "PubKeySecp256k1{02522FC5F8F6C109A7D167871FCC74AAC406DF47F4F0E54BA212D9DFEEFBD86C58}" require.Equal(t, expectedPkStr, pubKey.String()) // Check that restoring the key gets the same results @@ -105,7 +105,7 @@ func TestAltKeyring_SaveLedgerKey(t *testing.T) { // The mock is available, check that the address is correct require.Equal(t, "some_account", ledger.GetName()) pubKey := ledger.GetPubKey() - expectedPkStr := "PubKeySecp256k1{03602C0CB4D8C0081FEE794BDE96E7B95FA16F2B5283B764AC070584327B2C7202}" + expectedPkStr := "PubKeySecp256k1{02522FC5F8F6C109A7D167871FCC74AAC406DF47F4F0E54BA212D9DFEEFBD86C58}" require.Equal(t, expectedPkStr, pubKey.String()) // Check that restoring the key gets the same results diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index fd9e6c19..b38f7a2b 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -30,7 +30,7 @@ func TestPublicKeyUnsafe(t *testing.T) { func checkDefaultPubKey(t *testing.T, priv types.LedgerPrivKey) { require.NotNil(t, priv) - expectedPkStr := "PubKeySecp256k1{034FEF9CD7C4C63588D3B03FEB5281B9D232CBA34D6F3D71AEE59211FFBFE1FE87}" + expectedPkStr := "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}" require.Equal(t, "eb5ae98721021853d93524119eeb31ab0b06f1dcb068f84943bb230dfa10b1292f47af643575", fmt.Sprintf("%x", cdc.Amino.MustMarshalBinaryBare(priv.PubKey())), "Is your device using test mnemonic: %s ?", testdata.TestMnemonic) @@ -43,7 +43,7 @@ func checkDefaultPubKey(t *testing.T, priv types.LedgerPrivKey) { func TestPublicKeyUnsafeHDPath(t *testing.T) { expectedAnswers := []string{ "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", - "PubKeySecp256k1{0260D0487A3DFCE9228EEE2D0D83A40F6131F551526C8E52066FE7FE1E4A509666}", + "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", "PubKeySecp256k1{03A2670393D02B162D0ED06A08041E80D86BE36C0564335254DF7462447EB69AB3}", "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", @@ -108,8 +108,8 @@ func TestPublicKeySafe(t *testing.T) { func TestPublicKeyHDPath(t *testing.T) { expectedPubKeys := []string{ - "PubKeySecp256k1{034FEF9CD7C4C63588D3B03FEB5281B9D232CBA34D6F3D71AEE59211FFBFE1FE87}", - "PubKeySecp256k1{0260D0487A3DFCE9228EEE2D0D83A40F6131F551526C8E52066FE7FE1E4A509666}", + "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", + "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", "PubKeySecp256k1{03A2670393D02B162D0ED06A08041E80D86BE36C0564335254DF7462447EB69AB3}", "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", From f90d4429770dc52dd4bfc9b082e84d015a6c9eba Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:02:25 -0700 Subject: [PATCH 12/23] - update expected keys 2 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index b38f7a2b..abeacc1b 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -44,7 +44,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { expectedAnswers := []string{ "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", - "PubKeySecp256k1{03A2670393D02B162D0ED06A08041E80D86BE36C0564335254DF7462447EB69AB3}", + "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", @@ -122,7 +122,7 @@ func TestPublicKeyHDPath(t *testing.T) { expectedAddrs := []string{ "cosmos1ndgvlye77dmuct2ncr4m8ghmfkwp7p8slz6zxm", - "cosmos19ewxwemt6uahejvwf44u7dh6tq859tkyvarh2q", + "cosmos148thdqj6vnkkmsfd58ej4xjuacmqq7qwawg0ak", "cosmos1a07dzdjgjsntxpp75zg7cgatgq0udh3pcdcxm3", "cosmos1qvw52lmn9gpvem8welghrkc52m3zczyhlqjsl7", "cosmos17m78ka80fqkkw2c4ww0v4xm5nsu2drgrlm8mn2", From f93b29c736dfc1ce7fa5172bd23919bc03baba25 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:05:43 -0700 Subject: [PATCH 13/23] - update expected keys 3 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index abeacc1b..d93c4fac 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -45,7 +45,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", - "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", + "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", @@ -123,7 +123,7 @@ func TestPublicKeyHDPath(t *testing.T) { expectedAddrs := []string{ "cosmos1ndgvlye77dmuct2ncr4m8ghmfkwp7p8slz6zxm", "cosmos148thdqj6vnkkmsfd58ej4xjuacmqq7qwawg0ak", - "cosmos1a07dzdjgjsntxpp75zg7cgatgq0udh3pcdcxm3", + "cosmos1dj36dxe0sgxygfya5ghggvrhe92qqwm2xcqhtu", "cosmos1qvw52lmn9gpvem8welghrkc52m3zczyhlqjsl7", "cosmos17m78ka80fqkkw2c4ww0v4xm5nsu2drgrlm8mn2", "cosmos1ferh9ll9c452d2p8k2v7heq084guygkn43up9e", From 7774955f4297f2303dae2862dd1bf0e99b4ab061 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:08:46 -0700 Subject: [PATCH 14/23] - update expected keys 4 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index d93c4fac..9eb81b61 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -46,7 +46,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", - "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", + "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", "PubKeySecp256k1{031B75C84453935AB76F8C8D0B6566C3FCC101CC5C59D7000BFC9101961E9308D9}", @@ -110,7 +110,7 @@ func TestPublicKeyHDPath(t *testing.T) { expectedPubKeys := []string{ "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", - "PubKeySecp256k1{03A2670393D02B162D0ED06A08041E80D86BE36C0564335254DF7462447EB69AB3}", + "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", From b8c65f71c49f2db655c400f8e018a3278be8a1b1 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:13:47 -0700 Subject: [PATCH 15/23] - update expected keys 5 --- crypto/ledger/ledger_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 9eb81b61..471b6a69 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -112,7 +112,7 @@ func TestPublicKeyHDPath(t *testing.T) { "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", - "PubKeySecp256k1{03F577473348D7B01E7AF2F245E36B98D181BC935EC8B552CDE5932B646DC7BE04}", + "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", "PubKeySecp256k1{031B75C84453935AB76F8C8D0B6566C3FCC101CC5C59D7000BFC9101961E9308D9}", From cc7c20ef4ed8f69bf3a48a649c311caee280dfca Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:16:18 -0700 Subject: [PATCH 16/23] - update expected keys 6 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 471b6a69..a73e0193 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -47,7 +47,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", - "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", + "PubKeySecp256k1{025FEB9BB0D950EFACAEBC163F17E76FAA4984B3FF3D41DD06DB79B9EEBBD930F9}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", "PubKeySecp256k1{031B75C84453935AB76F8C8D0B6566C3FCC101CC5C59D7000BFC9101961E9308D9}", "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", @@ -124,7 +124,7 @@ func TestPublicKeyHDPath(t *testing.T) { "cosmos1ndgvlye77dmuct2ncr4m8ghmfkwp7p8slz6zxm", "cosmos148thdqj6vnkkmsfd58ej4xjuacmqq7qwawg0ak", "cosmos1dj36dxe0sgxygfya5ghggvrhe92qqwm2xcqhtu", - "cosmos1qvw52lmn9gpvem8welghrkc52m3zczyhlqjsl7", + "cosmos1zhjvvpr8skduawtkz2gqdvpe3w8jj60z637arr", "cosmos17m78ka80fqkkw2c4ww0v4xm5nsu2drgrlm8mn2", "cosmos1ferh9ll9c452d2p8k2v7heq084guygkn43up9e", "cosmos10vf3sxmjg96rqq36axcphzfsl74dsntuehjlw5", From ab20603baca32942922f04c61ed8a0579459ba41 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:18:46 -0700 Subject: [PATCH 17/23] - update expected keys 7 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index a73e0193..0f9fb459 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -48,7 +48,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{025FEB9BB0D950EFACAEBC163F17E76FAA4984B3FF3D41DD06DB79B9EEBBD930F9}", - "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", + "PubKeySecp256k1{02E59347ED32D311543F1E82B4467684DC4995EEC4700437386E668D3D9E14C1E0}", "PubKeySecp256k1{031B75C84453935AB76F8C8D0B6566C3FCC101CC5C59D7000BFC9101961E9308D9}", "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", "PubKeySecp256k1{038BE7F348902D8C20BC88D32294F4F3B819284548122229DECD1ADF1A7EB0848B}", @@ -111,7 +111,7 @@ func TestPublicKeyHDPath(t *testing.T) { "PubKeySecp256k1{021853D93524119EEB31AB0B06F1DCB068F84943BB230DFA10B1292F47AF643575}", "PubKeySecp256k1{022374F2DACD71042B5A888E3839E4BA54752AD6A51D35B54F6ABB899C4329D4BF}", "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", - "PubKeySecp256k1{033222FC61795077791665544A90740E8EAD638A391A3B8F9261F4A226B396C042}", + "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", From d8812251f73ec6cf196e5d4afdec2580a8bfe70d Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:21:09 -0700 Subject: [PATCH 18/23] - update expected keys 8 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 0f9fb459..4bdb1591 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -115,7 +115,7 @@ func TestPublicKeyHDPath(t *testing.T) { "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", - "PubKeySecp256k1{031B75C84453935AB76F8C8D0B6566C3FCC101CC5C59D7000BFC9101961E9308D9}", + "PubKeySecp256k1{039D92D20650624E2C4A8CAE0421154FC59F885E9518D337BC2105DF8BF13E151B}", "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", "PubKeySecp256k1{038BE7F348902D8C20BC88D32294F4F3B819284548122229DECD1ADF1A7EB0848B}", } @@ -125,7 +125,7 @@ func TestPublicKeyHDPath(t *testing.T) { "cosmos148thdqj6vnkkmsfd58ej4xjuacmqq7qwawg0ak", "cosmos1dj36dxe0sgxygfya5ghggvrhe92qqwm2xcqhtu", "cosmos1zhjvvpr8skduawtkz2gqdvpe3w8jj60z637arr", - "cosmos17m78ka80fqkkw2c4ww0v4xm5nsu2drgrlm8mn2", + "cosmos1r3amgzyuktpfzez9gyhj5dnpwm207gc32zcejc", "cosmos1ferh9ll9c452d2p8k2v7heq084guygkn43up9e", "cosmos10vf3sxmjg96rqq36axcphzfsl74dsntuehjlw5", "cosmos1cq83av8cmnar79h0rg7duh9gnr7wkh228a7fxg", From b1cfdafb8c56c6c19eb17ca9ca2714b9e89844dd Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:23:31 -0700 Subject: [PATCH 19/23] - update expected keys 9 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 4bdb1591..8605853d 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -49,7 +49,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{025FEB9BB0D950EFACAEBC163F17E76FAA4984B3FF3D41DD06DB79B9EEBBD930F9}", "PubKeySecp256k1{02E59347ED32D311543F1E82B4467684DC4995EEC4700437386E668D3D9E14C1E0}", - "PubKeySecp256k1{031B75C84453935AB76F8C8D0B6566C3FCC101CC5C59D7000BFC9101961E9308D9}", + "PubKeySecp256k1{039D92D20650624E2C4A8CAE0421154FC59F885E9518D337BC2105DF8BF13E151B}", "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", "PubKeySecp256k1{038BE7F348902D8C20BC88D32294F4F3B819284548122229DECD1ADF1A7EB0848B}", } @@ -126,7 +126,7 @@ func TestPublicKeyHDPath(t *testing.T) { "cosmos1dj36dxe0sgxygfya5ghggvrhe92qqwm2xcqhtu", "cosmos1zhjvvpr8skduawtkz2gqdvpe3w8jj60z637arr", "cosmos1r3amgzyuktpfzez9gyhj5dnpwm207gc32zcejc", - "cosmos1ferh9ll9c452d2p8k2v7heq084guygkn43up9e", + "cosmos146hlrlypx59e5sl50cfys75zcw6s5mymnqm4dj", "cosmos10vf3sxmjg96rqq36axcphzfsl74dsntuehjlw5", "cosmos1cq83av8cmnar79h0rg7duh9gnr7wkh228a7fxg", "cosmos1dszhfrt226jy5rsre7e48vw9tgwe90uerfyefa", From a290186654585378c30d265c7d92e311d1d1b0d8 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Fri, 8 Aug 2025 17:25:57 -0700 Subject: [PATCH 20/23] - update expected keys 10 --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index 8605853d..a317c864 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -50,7 +50,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{025FEB9BB0D950EFACAEBC163F17E76FAA4984B3FF3D41DD06DB79B9EEBBD930F9}", "PubKeySecp256k1{02E59347ED32D311543F1E82B4467684DC4995EEC4700437386E668D3D9E14C1E0}", "PubKeySecp256k1{039D92D20650624E2C4A8CAE0421154FC59F885E9518D337BC2105DF8BF13E151B}", - "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", + "PubKeySecp256k1{03BE014D2A23A2D46ED95201DDA9D685DA0086B1A2978E3AC770E03E1C19A778F3}", "PubKeySecp256k1{038BE7F348902D8C20BC88D32294F4F3B819284548122229DECD1ADF1A7EB0848B}", } @@ -113,7 +113,7 @@ func TestPublicKeyHDPath(t *testing.T) { "PubKeySecp256k1{03B7B924449C6C983CCA4CF01D7AC53811874C384D1EB18E04916EE9486AE89023}", "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", - "PubKeySecp256k1{0222B1A5486BE0A2D5F3C5866BE46E05D1BDE8CDA5EA1C4C77A9BC48D2FA2753BC}", + "PubKeySecp256k1{025FEB9BB0D950EFACAEBC163F17E76FAA4984B3FF3D41DD06DB79B9EEBBD930F9}", "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", "PubKeySecp256k1{039D92D20650624E2C4A8CAE0421154FC59F885E9518D337BC2105DF8BF13E151B}", "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", From b73bff11acd42b17e7e28eda123bd323491b83a2 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Mon, 11 Aug 2025 10:25:25 -0700 Subject: [PATCH 21/23] - update expected keys --- crypto/ledger/ledger_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index a317c864..e1cb313f 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -51,7 +51,7 @@ func TestPublicKeyUnsafeHDPath(t *testing.T) { "PubKeySecp256k1{02E59347ED32D311543F1E82B4467684DC4995EEC4700437386E668D3D9E14C1E0}", "PubKeySecp256k1{039D92D20650624E2C4A8CAE0421154FC59F885E9518D337BC2105DF8BF13E151B}", "PubKeySecp256k1{03BE014D2A23A2D46ED95201DDA9D685DA0086B1A2978E3AC770E03E1C19A778F3}", - "PubKeySecp256k1{038BE7F348902D8C20BC88D32294F4F3B819284548122229DECD1ADF1A7EB0848B}", + "PubKeySecp256k1{0325E57703629DB24D61697147674FCB10B94ACA0136A89D37C00FC5CFD31B443A}", } const numIters = 10 @@ -127,7 +127,7 @@ func TestPublicKeyHDPath(t *testing.T) { "cosmos1zhjvvpr8skduawtkz2gqdvpe3w8jj60z637arr", "cosmos1r3amgzyuktpfzez9gyhj5dnpwm207gc32zcejc", "cosmos146hlrlypx59e5sl50cfys75zcw6s5mymnqm4dj", - "cosmos10vf3sxmjg96rqq36axcphzfsl74dsntuehjlw5", + "cosmos1cwus47jk96mpc9t8aczzthwq2eshsfygxhrjlj", "cosmos1cq83av8cmnar79h0rg7duh9gnr7wkh228a7fxg", "cosmos1dszhfrt226jy5rsre7e48vw9tgwe90uerfyefa", "cosmos1734d7qsylzrdt05muhqqtpd90j8mp4y6rzch8l", From 497ae5abc83320645974db8c9879c0ad1f2874aa Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Mon, 11 Aug 2025 10:49:57 -0700 Subject: [PATCH 22/23] - update expected keys in all tests --- crypto/ledger/ledger_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index e1cb313f..6663d739 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -114,10 +114,10 @@ func TestPublicKeyHDPath(t *testing.T) { "PubKeySecp256k1{037795D6F3A390A2B83838DEE4F7DDBCE7FC9B745516B1F3031D858BCC5044B0A3}", "PubKeySecp256k1{033729F993AE4D3347454A0D37D13C6E3484E7DC7DE7A63DDB4BCA556CCA3886E1}", "PubKeySecp256k1{025FEB9BB0D950EFACAEBC163F17E76FAA4984B3FF3D41DD06DB79B9EEBBD930F9}", - "PubKeySecp256k1{0377A1C826D3A03CA4EE94FC4DEA6BCCB2BAC5F2AC0419A128C29F8E88F1FF295A}", + "PubKeySecp256k1{02E59347ED32D311543F1E82B4467684DC4995EEC4700437386E668D3D9E14C1E0}", "PubKeySecp256k1{039D92D20650624E2C4A8CAE0421154FC59F885E9518D337BC2105DF8BF13E151B}", - "PubKeySecp256k1{038905A42433B1D677CC8AFD36861430B9A8529171B0616F733659F131C3F80221}", - "PubKeySecp256k1{038BE7F348902D8C20BC88D32294F4F3B819284548122229DECD1ADF1A7EB0848B}", + "PubKeySecp256k1{03BE014D2A23A2D46ED95201DDA9D685DA0086B1A2978E3AC770E03E1C19A778F3}", + "PubKeySecp256k1{0325E57703629DB24D61697147674FCB10B94ACA0136A89D37C00FC5CFD31B443A}", } expectedAddrs := []string{ @@ -128,9 +128,9 @@ func TestPublicKeyHDPath(t *testing.T) { "cosmos1r3amgzyuktpfzez9gyhj5dnpwm207gc32zcejc", "cosmos146hlrlypx59e5sl50cfys75zcw6s5mymnqm4dj", "cosmos1cwus47jk96mpc9t8aczzthwq2eshsfygxhrjlj", - "cosmos1cq83av8cmnar79h0rg7duh9gnr7wkh228a7fxg", - "cosmos1dszhfrt226jy5rsre7e48vw9tgwe90uerfyefa", - "cosmos1734d7qsylzrdt05muhqqtpd90j8mp4y6rzch8l", + "cosmos17g7vlqppmur95dlcgrflxp3et5f26q3mx5xu86", + "cosmos1nl69yryav4d2rxgwwzanft7frl63pe4ydqxy6x", + "cosmos1sufp46z4jp8v8wse096ytxv0nee3mm2zekjqhf", } const numIters = 10 From 2aeb05f5596fdc8d5dd81de8008dfb77a1b9ce69 Mon Sep 17 00:00:00 2001 From: _dssei_ Date: Mon, 11 Aug 2025 14:23:58 -0700 Subject: [PATCH 23/23] - update the warning wording --- client/keys/add.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/keys/add.go b/client/keys/add.go index cae1f187..726a8bf0 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -282,9 +282,9 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf // Hide mnemonic from output showMnemonic = false mnemonic = "" - fmt.Fprintln(cmd.ErrOrStderr(), "\n**Important** Default coin type has been changed to ETH type 60. "+ - "Your address will be different if it was created with previous default ATOM coin type. "+ - "Try using '--coin-type 118' flag for recovery.") + fmt.Fprintln(cmd.ErrOrStderr(), "\n**Important** The default coin type has been changed to ETH (60). "+ + "Your address will differ if it was created with the previous default ATOM (118) coin type. "+ + "Try using the '--coin-type 118' flag to recover it.") } return printCreate(cmd, info, showMnemonic, mnemonic, outputFormat)