-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(evm): Raw Ethereum transaction relay support #3773
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for changing the type of chain_id
from u128
to u64
?
@bowenwang1996 because |
To be pedantic, "Chain ID is a 256-bit value" per EIP-1344. However, in terms of OpenEthereum's APIs, they do only take a 64-bit value. And all registered chain IDs do fit within 64 bits, and certainly our own chain IDs do, so probably no good reason to need it be larger. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good overall, and significantly increases our out-of-the-box Eth1 compatibility.
My only comments are some nits that can be addressed in a later iteration.
…ransactions that will get executed on behalf of the sender
f30839a
to
b3f4a09
Compare
…alid and invalid sigs. Adding proper errors for invalid sigs and chain_id
b3f4a09
to
e66ca4a
Compare
@ilblackdragon @ailisp FYI, I've rebased this pull request against the current master branch just now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to bump EVM protocol version to hardfork betanet.
@bowenwang1996 Need your review as code owner to be able to merge this. |
Done, just pushed now. @bowenwang1996 This is all good to go as far as @ilblackdragon and I are concerned, if you would have a chance to review. |
@olonho @willemneal Could we get a review from you guys as well, pretty please, to unblock merging this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just one logic question.
Adds support for relaying signed transactions from Ethereum.
Can be used by MetaMask configured to the right RPC proxy or NEAR's Web3 provider in
sendRawTransaction
method.Addresses few collateral issues:
chain_id
to u64, as prior it was u128 which didn't match OE EVM interfaceview_call
function when it's used for contract deployment (this is used for dry_run)Test plan
Adding unit test for sending signed transactions: transfer, deploy code and function call. Testing invalid signature and chain_id passes inside the transaction.
Adding support for sendRawTransaction in near-web3-provider repo: aurora-is-near/near-web3-provider#70