Skip to content
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

eth_sendRawTransactionConditional L2 RPC endpoint #13488

Open
hamdiallam opened this issue Dec 20, 2024 · 13 comments
Open

eth_sendRawTransactionConditional L2 RPC endpoint #13488

hamdiallam opened this issue Dec 20, 2024 · 13 comments
Labels
C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@hamdiallam
Copy link

hamdiallam commented Dec 20, 2024

Describe the feature

The eth_sendRawTransactionConditional endpoint is implemented in op-geth and live on OPM. This endpoint is becoming a blocked for broader 4337 adoption on chains like Base as op-reth is used in production.

We should get this implemented in this client as well. See the diff in 4337 improvements

  1. Conditional type, checks against header & state
  2. Sequencer RPC. (ratelimit, conditional check prior to mempool submission)
  3. Conditional checks prior to block inclusion when blockbuilding
  4. Tx Rejection -> Rejection from mempool as well
  5. Filter from p2p tx gossip

Although (5) filters conditional txs from p2p gossip, this will be implemented as a followup between op-geth/op-reth to remove the need for a broadcast to all possible block builders

Additional context

Related op-geth PRs:

@hamdiallam hamdiallam added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Dec 20, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started and removed S-needs-triage This issue needs to be labelled labels Dec 22, 2024
@oac1771
Copy link

oac1771 commented Dec 22, 2024

Hello! Can I take this if it is still available?

@hamdiallam
Copy link
Author

@oac1771 yes! feel free to take a stab at it

@mattsse
Copy link
Collaborator

mattsse commented Dec 23, 2024

@oac1771 since this an optimism specific extension I'd like to add the API trait to

https://github.com/alloy-rs/op-alloy/blob/b756ac9a5088813dd52eb7cebfce79ed351112f1/crates/rpc-jsonrpsee/src/traits.rs#L139-L142

like OpEthApiExt

@mattsse
Copy link
Collaborator

mattsse commented Dec 23, 2024

we already have the conditonal options type alloy-rs/alloy#1823

@yoavw
Copy link

yoavw commented Dec 23, 2024

@oac1771 since this an optimism specific extension I'd like to add the API trait to

https://github.com/alloy-rs/op-alloy/blob/b756ac9a5088813dd52eb7cebfce79ed351112f1/crates/rpc-jsonrpsee/src/traits.rs#L139-L142

like OpEthApiExt

ERC-7796 (eth_sendRawTransactionConditional) is not optimism specific. Supported by other chains such as Arbitrum and Polygon. It'll be relevant for other rollups that use reth.

@mattsse
Copy link
Collaborator

mattsse commented Dec 23, 2024

I see, then we can add the extension trait to alloy's rpc-api crate instead

@hamdiallam
Copy link
Author

hamdiallam commented Dec 23, 2024

@yoavw @mattsse

Since it's common to have active/passive sequencer setups, it would be great if we could also consolidate the gossip mechanism for these conditional txs to avoid having to broadcast to all replicas. With it being upstreamed into reth, all L2 clients could leverage this.

I can put some more detailed thoughts but my thinking is to have a node flag to enable/disable p2p conditional tx gossip. When enabled, using a separate message to gossip these txs from the existing ones to separate concerns (the conditional is not apart of the rlp serialized tx)

@aidenwong812
Copy link

Can I take this from here?

@oac1771
Copy link

oac1771 commented Dec 25, 2024

@aidenwong812, I am still working on this

@oac1771
Copy link

oac1771 commented Dec 26, 2024

Hey @hamdiallam,

I am a bit confused on the scope of this issue and wanted to clarify.

It seems like the rpc endpoint for this has been defined here, but it doesnt seem like the L2EthApiExtServer trait has been implemented. Is this issue about implementing the server trait?

@VyuduInc
Copy link

Would love to tackle this!

@mymiracle0118
Copy link

May I try my hand at this?

@oac1771
Copy link

oac1771 commented Jan 2, 2025

Hey @hamdiallam,

I am a bit confused on the scope of this issue and wanted to clarify.

It seems like the rpc endpoint for this has been defined here, but it doesnt seem like the L2EthApiExtServer trait has been implemented. Is this issue about implementing the server trait?

Hello @mattsse, do you have any idea on this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

No branches or pull requests

7 participants