Skip to content

Multisig - signature verification failed, during signer-2 #3

Open
githubckgoh1439 wants to merge 5 commits into
yenkhoon:masterfrom
githubckgoh1439:master
Open

Multisig - signature verification failed, during signer-2 #3
githubckgoh1439 wants to merge 5 commits into
yenkhoon:masterfrom
githubckgoh1439:master

Conversation

@githubckgoh1439

Copy link
Copy Markdown

Hi, YK

The debugger show the Error base on this file '/src.ts/multisig.ts', while come to the process signed by signer-2 (Issuer).

Attached comparison of :

  1. Tx format during signing process by signer-1
  2. Tx format during signing process by signer-2

Start from line-197 in /src.ts/multisig.ts :

debug-step-1. : file of /src.ts/multisig.ts

throw this.signer.provider.checkTransactionReceipt(receipt, errors.CALL_EXCEPTION, "confirm multisig transaction failed", 

debug-step-2. : file of /maxonrow-go/x/auth/handler.go

_, sigErr := utils.CheckTxSig(ctx, stdTx, accountKeeper, kycKeeper)

debug-step-3. : file of /maxonrow-go/utils/utils.go

return nil, sdkTypes.ErrUnauthorized("signature verification failed; verify correct account sequence and chain-id" + string(signBytes))

With below Error message :

 Error: signature verification failed (operation="", info={"code":4,"codespace":"sdk","message":"signature verification failed; verify correct account sequence and chain-id{\"account_number\":\"2315\",\"chain_id\":\"maxonrow-chain\",\"fee\":{\"amount\":[{\"amount\":\"1000000000\",\"denom\":\"cin\"}],\"gas\":\"0\"},\"memo\":\"pipipapipu\",\"msgs\":[{\"type\":\"mxw/msgSend\",\"value\":{\"amount\":[{\"amount\":\"1000000000000000000\",\"denom\":\"cin\"}],\"from_address\":\"mxw1nyraawpauuh4njdsvnl4vsnyuyluwczlhzvhwt\",\"to_address\":\"mxw1ktyq5damgnfqkj6qy2l8fqc54drnznlujckdnf\"}}],\"sequence\":\"0\"}","log":"{\"codespace\":\"sdk\",\"code\":4,\"message\":\"signature verification failed; verify correct account sequence and chain-id{\\\"account_number\\\":\\\"2315\\\",\\\"chain_id\\\":\\\"maxonrow-chain\\\",\\\"fee\\\":{\\\"amount\\\":[{\\\"amount\\\":\\\"1000000000\\\",\\\"denom\\\":\\\"cin\\\"}],\\\"gas\\\":\\\"0\\\"},\\\"memo\\\":\\\"pipipapipu\\\",\\\"msgs\\\":[{\\\"type\\\":\\\"mxw/msgSend\\\",\\\"value\\\":{\\\"amount\\\":[{\\\"amount\\\":\\\"1000000000000000000\\\",\\\"denom\\\":\\\"cin\\\"}],\\\"from_address\\\":\\\"mxw1nyraawpauuh4njdsvnl4vsnyuyluwczlhzvhwt\\\",\\\"to_address\\\":\\\"mxw1ktyq5damgnfqkj6qy2l8fqc54drnznlujckdnf\\\"}}],\\\"sequence\\\":\\\"0\\\"}\"}"}, response={"hash":"0xf93e658e6f68e67ba7c0a613b03b8bd4dfc216f642b5e372db1ff9eb1685bde2","status":0,"index":0,"blockNumber":1856,"result":{"events":[],"logs":[{"success":false,"info":{"hash":null,"message":"{\"codespace\":\"sdk\",\"code\":4,\"message\":\"signature verification failed; verify correct account sequence and chain-id{\\\"account_number\\\":\\\"2315\\\",\\\"chain_id\\\":\\\"maxonrow-chain\\\",\\\"fee\\\":{\\\"amount\\\":[{\\\"amount\\\":\\\"1000000000\\\",\\\"denom\\\":\\\"cin\\\"}],\\\"gas\\\":\\\"0\\\"},\\\"memo\\\":\\\"pipipapipu\\\",\\\"msgs\\\":[{\\\"type\\\":\\\"mxw/msgSend\\\",\\\"value\\\":{\\\"amount\\\":[{\\\"amount\\\":\\\"1000000000000000000\\\",\\\"denom\\\":\\\"cin\\\"}],\\\"from_address\\\":\\\"mxw1nyraawpauuh4njdsvnl4vsnyuyluwczlhzvhwt\\\",\\\"to_address\\\":\\\"mxw1ktyq5damgnfqkj6qy2l8fqc54drnznlujckdnf\\\"}}],\\\"sequence\\\":\\\"0\\\"}\"}"}}]},"payload":{"type":"cosmos-sdk/StdTx","value":{"fee":{"amount":[{"amount":"100000000","denom":"cin"}],"gas":"0"},"memo":"","msg":[{"type":"mxw/msgSignMultiSigTx","value":{"groupAddress":"mxw1nyraawpauuh4njdsvnl4vsnyuyluwczlhzvhwt","sender":"mxw146q365au852y3zrxvqs5j4su87pr4m8k4n0l0a","signature":{"signature":"CRILOMligCZNNOmu1CboHCFD6p3E7pt4rNgtG1B8YRtLhdOlf/Odnk/cnu2uuS9erjxJcpVPZDVoGAC42S0ZvQ==","pubKey":{"type":"tendermint/PubKeySecp256k1","value":"A4PwoBS8fl/2W+V1HXrWQBn5jXci5gnYUTQzDZFqD0vl"}},"txId":"0"}}],"signatures":[{"signature":"swvQqOTUoenPNtpqFfKcKttUWLnOi9ESFtF5AC8A5tM1qzsNBlrfPWAXi2h+GDEKuG9qKkjZGM7NgLl54te70g==","pubKey":{"type":"tendermint/PubKeySecp256k1","value":"A4PwoBS8fl/2W+V1HXrWQBn5jXci5gnYUTQzDZFqD0vl"}}]}},"nonce":null,"confirmations":3}, params={"method":"auth-signMutiSigTx","receipt":{"hash":"0xf93e658e6f68e67ba7c0a613b03b8bd4dfc216f642b5e372db1ff9eb1685bde2","status":0,"index":0,"blockNumber":1856,"result":{"events":[],"logs":[{"success":false,"info":{"hash":null,"message":"{\"codespace\":\"sdk\",\"code\":4,\"message\":\"signature verification failed; verify correct account sequence and chain-id{\\\"account_number\\\":\\\"2315\\\",\\\"chain_id\\\":\\\"maxonrow-chain\\\",\\\"fee\\\":{\\\"amount\\\":[{\\\"amount\\\":\\\"1000000000\\\",\\\"denom\\\":\\\"cin\\\"}],\\\"gas\\\":\\\"0\\\"},\\\"memo\\\":\\\"pipipapipu\\\",\\\"msgs\\\":[{\\\"type\\\":\\\"mxw/msgSend\\\",\\\"value\\\":{\\\"amount\\\":[{\\\"amount\\\":\\\"1000000000000000000\\\",\\\"denom\\\":\\\"cin\\\"}],\\\"from_address\\\":\\\"mxw1nyraawpauuh4njdsvnl4vsnyuyluwczlhzvhwt\\\",\\\"to_address\\\":\\\"mxw1ktyq5damgnfqkj6qy2l8fqc54drnznlujckdnf\\\"}}],\\\"sequence\\\":\\\"0\\\"}\"}"}}]},"payload":{"type":"cosmos-sdk/StdTx","value":{"fee":{"amount":[{"amount":"100000000","denom":"cin"}],"gas":"0"},"memo":"","msg":[{"type":"mxw/msgSignMultiSigTx","value":{"groupAddress":"mxw1nyraawpauuh4njdsvnl4vsnyuyluwczlhzvhwt","sender":"mxw146q365au852y3zrxvqs5j4su87pr4m8k4n0l0a","signature":{"signature":"CRILOMligCZNNOmu1CboHCFD6p3E7pt4rNgtG1B8YRtLhdOlf/Odnk/cnu2uuS9erjxJcpVPZDVoGAC42S0ZvQ==","pubKey":{"type":"tendermint/PubKeySecp256k1","value":"A4PwoBS8fl/2W+V1HXrWQBn5jXci5gnYUTQzDZFqD0vl"}},"txId":"0"}}],"signatures":[{"signature":"swvQqOTUoenPNtpqFfKcKttUWLnOi9ESFtF5AC8A5tM1qzsNBlrfPWAXi2h+GDEKuG9qKkjZGM7NgLl54te70g==","pubKey":{"type":"tendermint/PubKeySecp256k1","value":"A4PwoBS8fl/2W+V1HXrWQBn5jXci5gnYUTQzDZFqD0vl"}}]}},"nonce":null,"confirmations":3}}, version=0.8.0)

Tx_by_signer2.txt

Tx_by_signer1.txt

@githubckgoh1439

Copy link
Copy Markdown
Author

YK,

I already stated which part that Error was occurred, as above.

You can check while running in your local.

@yenkhoon

yenkhoon commented Apr 6, 2020

Copy link
Copy Markdown
Owner

can we have what blockchain is expecting? and what sdk send?

@githubckgoh1439

Copy link
Copy Markdown
Author

YK,

The 2 attached samples (from SDK sending to Core) by compared, u can see the tx json contents are different between signer-1 & signer-2. I assume that signer-1 tx json content is always correct as it can broadcast the tx to blockchain, while tx done by signer-2 failed to do that and above Error in that particular debug-point.

This my finding.

@githubckgoh1439

Copy link
Copy Markdown
Author

Dear all,

Pleace refer to latest of this :
#4

This pull request can be ignored.

yenkhoon pushed a commit that referenced this pull request Apr 30, 2020
Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	dist/_version.d.ts
#	dist/_version.js
#	docs/api-1wallet.rst
#	docs/api-2providers.rst
#	docs/api-3signers.rst
#	docs/api-4kyc.rst
#	docs/api-5tokens.rst
#	docs/api-6nft.rst
#	docs/api-8utils.rst
#	docs/api-9misc.rst
#	docs/conf.py
#	docs/cookbook.rst
#	docs/version.txt
#	package-lock.json
#	package.json
#	src.ts/_version.ts
#	tests/env.ts
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