cosmostation / cosmosjs

:star: CosmosJS - Cosmos JavaScript Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internal error with codespace undefined while broadcasting transaction

poojachigitey opened this issue · comments

Hi,

We get an internal error while broadcasting a tx.

Here is our signedTx :

signedTx = {
"tx": {
"msg": stdSignMsg.msg,
"fee": stdSignMsg.fee,
"signatures": [
{
"signature": signatureBase64,
"pub_key": getPubKeyBase64(ecpairPriv)
}
],
"memo": stdSignMsg.memo
},
"mode": "block"
}

The response while broadcasting is:

{
height: '0',
txhash: '6EC99CB505644B8B515B5D130A693FD84F8FCF122BE720F114D93E91D773CABE',
codespace: 'undefined',
code: 111222,
raw_log: 'internal error',
gas_used: '6408'
}

returning checkTx false

Can we get same pub_key from the blockchain and CosmosJS for a signedTx? Right now, we are getting 2 different keys listed as below:

from CosmosJS {"pub_key":"A3LntVjxVBwPyMV1hSi3iFdlAj1mKRtsicozGzqkP5g8"}
from the blockchain {"pub_key":"61rphyEDcue1WPFUHA/IxXWFKLeIV2UCPWYpG2yJyjMbOqQ/mDw="}

I've been looking through the data you've upload. There are several questions.

  1. What did you modify the address part of cosmos sdk? Did you set CosmosJS' prefix and HD path to be the same as cosmos sdk?

  2. What version of cosmos sdk did you use?

  3. When the last sign, is the signature value the same?

The most important problem seems to be that pub_key is different. It is recommended to download CosmosJS and try the same.

Do you solve your issue?