Parity-ethereum: parity_composeTransaction rejects txs with `chainId` field

Created on 22 Mar 2019  路  6Comments  路  Source: openethereum/parity-ethereum

  • Parity Ethereum version: Parity-Ethereum/v2.3.8-stable-a39aaac-20190322/x86_64-linux-gnu/rustc1.33.0
  • Operating system: Ubuntu bionic
  • Installation: pulled from github release page
  • Fully synchronized: yes
  • Network: kovan
  • Restarted: yes

Calling parity_composeTransaction RPC endpoint with a transaction which contains a chainId results in the following error, instead of returning the transaction with other fields filled in.

{'code': -32602, 'message': 'Invalid params: unknown field `chainId`, expected one of `from`, `to`, `gasPrice`, `gas`, `value`, `data`, `nonce`, `condition`.'}

Possibly related to https://github.com/paritytech/parity-ethereum/issues/10411.

F3-annoyance 馃挬 M6-rpcapi 馃摚

All 6 comments

Parity should be using the chainId/networkId of the chain it is currently running. If you want to composeTransaction for a different network than parity is on, you should probably be building your transactions on the client side. (and tbh, you should be doing that anyway as account management is deprecated as of parity 2.4.x)

If you want to composeTransaction for a different network than parity is on, you should probably be building your transactions on the client side. (and tbh, you should be doing that anyway as account management is deprecated as of parity 2.4.x)

I would expect parity_composeTransaction to check the supplied chainId is equal to the chain that it is on and reject the input if it is not

Yes, and that's what #10411 is asking for.

Will close as duplicate for now. lmk if you disagree.

While related, I don't think this is a duplicate of #10411. That issue is that sendTransaction does not validate that chainId is the same as the chainId that the node is on. This issue that composeTransaction rejects transactions with the chainId field entirely.

Closing issue due to its stale state.

Was this page helpful?
0 / 5 - 0 ratings