-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
l2geth: forward tx to sequencer #2011
Conversation
|
Codecov Report
@@ Coverage Diff @@
## develop #2011 +/- ##
========================================
Coverage 74.58% 74.58%
========================================
Files 79 79
Lines 2554 2554
Branches 401 401
========================================
Hits 1905 1905
Misses 649 649
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
c0e7da0
to
6f2e29d
Compare
This looks good to me, some thoughts:
const signed = await env.l2Wallet.signTransaction(tx)
const result = await env.replicaProvider.sendTransaction(signed)
let receipt: TransactionReceipt
while (!receipt) {
receipt = await env.replicaProvider.getTransactionReceipt(result.hash)
await sleep(200)
}
|
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.
Good work! Will approve once the integration test is added :)
Thanks, added the integration test. |
Add missing changeset for #2011 A replica can be configured with the flag `--sequencer.clienthttp` or the env var `SEQUENCER_CLIENT_HTTP` which points to the sequencer and when users hit the RPC endpoint `eth_sendRawTransaction` it will forward the value to the sequencer. If running a mainnet node, this value should be set to `https://mainnet.optimism.io` or an infrastructure provider such as Quiknode, Infura or Alchemy.
Description
This PR makes it easier for replica nodes to handle a transaction submitted via RPC and to transparently forward it to the sequencer, based on the configured endpoint.
This allows the consumer of the replica node's RPC to directly submit transactions instead of having to rely on third-party applications.
Metadata