Open bernardoaraujor opened 1 year ago
to elaborate a bit more on the methodology to reproduce this issue, first I started the template via ./target/release/frontier-template-node --dev
then I sent a tx via ethersjs
and observed its parameters via hardhat
then I re-started the template by killing the previous execution and running ./target/release/frontier-template-node --dev
again
for some reason the v == 0
field is being considered invalid there, which is weird since it was taken from a tx that was successfully executed via ethersjs
we did some new tests taking a different tx coming from another EVM, for which v
is a big value (403643
), and then replaying this tx in a frontier parachain with the same chain_id
of this origin EVM... the error does not happen under those circumstances
so we are no longer blocked by this, because our main goal is to simply replay txs from an origin EVM into this Frontier parachain
but it would be good to improve the implementation of the transact
extrinsic so that it handles this edge case of invalid signatures gracefully without a runtime panic
Some information to note: I dug a little deeper and found that the error message Invalid signature
comes from https://github.com/rust-blockchain/ethereum/blob/master/src/transaction.rs#L166. Fortunately, the transaction causing the runtime panic is be validate false and is not be included in the block. No idea what to do next about this now.
This is expected. If we do not panic on invalid signatures, then the extrinsic will be included in a block but will not be paying any fees.
You should not use ethereum.transact
on the Substrate RPC. That'll submit the extrinsic from a signed source, rather than the unsigned Ethereum source. It'll always fail even if you have the correct signature. Use the Ethereum RPC instead.
Description
I am trying to submit a transaction via
pallet-ethereum
'stransact
extrinsic.I encounter errors on PolkadotJS UI as well as on the node's logs.
Steps to Reproduce
Build frontier template from
master
branchStart the template node via
./target/release/frontier-template-node --dev
Craft a transact with the following parameters (known to work via
ethersjs
):See error on PolkadotJS UI:
See error on node logs:
this shows as soon as I click
Submit Transaction
on the UI (before confirmation)... if I then clickSign and Submit
, the error logs show up once again:Expected vs. Actual Behavior
I would expect a successful execution on the EVM. Or at least the EVM to reject the transaction for some specific reason (e.g.: invalid
v,r,s
).