[Bug]: signature verification failed on BnB Beacon Chain
j75689 opened this issue · comments
Impacted Library name
@ledgerhq/app-binance
Impacted Library version
1.1.7
Describe the bug
- Sign a tx with
bnbcli/tbnbcli
, and broadcast to the chain.
./bin/tbnbcli send --amount 10000001:BNB --to tbnb1v4wm6hexfkxgv7gu2va6adn2qg7udz3l73g9cc --from ld0 --chain-id Binance-Chain-Ganges --node https://data-seed-pre-0-s1.bnbchain.org:443 --ledger --trust-node --memo "abc"
- return
signature verification failed
![image](https://private-user-images.githubusercontent.com/25412254/308852128-9fb334b6-a000-4f22-9550-6760e217cc20.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjc5NzYsIm5iZiI6MTcyNDI2NzY3NiwicGF0aCI6Ii8yNTQxMjI1NC8zMDg4NTIxMjgtOWZiMzM0YjYtYTAwMC00ZjIyLTk1NTAtNjc2MGUyMTdjYzIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE5MTQzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkMmRhOWNmZTQwZjYyMWUzMTNlNWYwZTgxNzhhYzVkYTViMTM3OWQyMjAwNTgyZWI5NWM0ZjM2ZTFlMzc0NWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.49pWUzO4x4pfhp8YXTFn5BHTkzKXnpW3Cm-s8ZoqlLQ)
- But try cmd with different text in
--memo
(e.g. "123"), that will succeed.
![image](https://private-user-images.githubusercontent.com/25412254/308851697-a5cb4520-3b26-4557-9d82-fb8bea77c9e5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjc5NzYsIm5iZiI6MTcyNDI2NzY3NiwicGF0aCI6Ii8yNTQxMjI1NC8zMDg4NTE2OTctYTVjYjQ1MjAtM2IyNi00NTU3LTlkODItZmI4YmVhNzdjOWU1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE5MTQzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhYTE2MzlkYjI5MjgwZjY2ZmQxZGE4YmIxNDczMTBjZGI2Nzg2MzNhZTlmOTg5M2JkMTdhYzZkMDNlZmEzYWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qgSZfi45j2xqcZ2PypoUysuhp1A-xwgKKnphyY-H_cc)
Expected behavior
Attempting any of the --memo
fields should succeed and no signature verification errors should occur.
Additional context
This problem never occurred when trying to send transactions without using ledger hardware for signing (using the local key of bnbcli/tbnbcli).
There may be inconsistencies in the encoding conversion on the ledger app (not 100% sure)
resolved: bnb-chain/bnc-cosmos-sdk#390