aleth
aleth copied to clipboard
Generate replay-protected transactions
Currently eth_sendTransction and eth_signTransaction RPC methods create transactions without replay protection introduced in EIP-155.
The backend for replay protection (encoding transaction RLP given some ChainID value) already exists in TransactionBase class. The task here is to make this class accept arbitrary ChainID for new transactions, and then make aforementioned RPC methods pass there ChainID from the ChainParams of the current chain.
To make this all work unit tests can be added to https://github.com/ethereum/aleth/blob/master/test/unittests/libweb3jsonrpc/jsonrpc.cpp (note eth_sendTransaction and eth_signTransaction tests there for insparation).
To make it work in test environment https://github.com/ethereum/aleth/blob/master/doc/private_net_remix.rst guide can provide instructions for sending transaction with aleth.
@gumb0 I will also try this one in parallel with #4613