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.
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.