Skip to content

Conversation

@Galadrin
Copy link

Description

With the current binary (evm v0.4.2), we are not able to use Ledger.
patch made on the branch feat/fork-v0.4.2 and rebased to main

After this patch is applied, we are able to sign and verify a transaction
But the transaction is rejected by the RPC if it doesn't have the fix.

~/go/bin/kiichaind tx staking create-validator validator.json  --from validator --gas-prices 333333333akii --gas-adjustment 1.3 --gas="auto" --sign-mode amino-json --chain-id kiichain_1783-1 --generate-only > /tmp/test_unsigned_ledger_only.json
gas estimate: 263750

~/go/bin/kiichaind tx sign /tmp/test_unsigned_ledger_only.json --from validator --chain-id kiichain_1783-1 --ledger --output-document /tmp/sig_ledger0.json
Generating payload, please check your Ledger...
Signing the following payload with EIP-712:
- Domain: 0x857D23F003A8F85CD56740ED5213ADC2FFC7F43DBA482B3DF997CF9ECC387500
- Message: 0x7CD80E63EBC2CACC4CB41FE50FC2D1E4D8E3A3ABFDFADE2FB8F2294AEE1D3513

~/go/bin/kiichaind tx validate-signatures  /tmp/sig_ledger0.json --chain-id kiichain_1783-1
Signers:
  0: kii13ew33d4tur5xe3aap89ehcegqy5e6085a9q480

Signatures:
  0: kii13ew33d4tur5xe3aap89ehcegqy5e6085a9q480      [OK]

~/go/bin/kiichaind tx broadcast  /tmp/sig_ledger0.json --chain-id kiichain_1783-1
code: 4
codespace: sdk
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: 'signature verification failed; please verify account number (51), sequence
  (0) and chain-id (kiichain_1783-1): unauthorized'
timestamp: ""
tx: null
txhash: 3B1144EFCB6257EB24168EDC30ABC8090669245E3FCFC4092566CE1F61FC2153

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • [ X ] discussed with a team member
  • [ X ] left instructions on how to review the changes
  • [ X ] targeted the main branch

vladjdk and others added 3 commits January 20, 2026 00:55
* Clean up events on EVM reversion in try-catch

* backport v0.4.x-specific function layout

* yihuang-patch adaptation for v0.4.x

Adds balance handler factory to un-refactored precompile code, adapting it for Distribution, Staking, Slashing, ICS20, and Gov. Skips the ERC20 as that one did not yet make use of the balance handler in v0.4.x.

* Fix unit test

* Add adapted test for v0.4.x

Added balance handler test, adapted for the v0.4.x precompile structure. Uses a decomposed version of the p.RunSetup function without the method checks.

* Add debug json

* add debug comments

* fix imports
see: cosmos/evm#607

Signed-off-by: David Pierret <dapie@cros-nest.com>
…ual chain id

see: cosmos/evm#918

Signed-off-by: David Pierret <dapie@cros-nest.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants