-
Notifications
You must be signed in to change notification settings - Fork 38
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
L2 builder preparation #34
Conversation
|
||
// It seems that both the 8545 RPC server (L1) and 10110 (L2 dedicated RPC) is routing into here BUT the send ether (sendATxnToL2Rpc.py) execution is happening on the correct chain. | ||
// We (as builders) somehow gotta: | ||
// 1. recognize the source (?) -> If L2 rpc/port then route towards the builder and not yet build L2 blocks | ||
// 2. If block builder is full (or profitable, or some other sophisticated mechanism (?)) then flush towards TaikoL1 as calldata (or blob), then the 'BlockProposed' event is what will trigger the L2 execution. | ||
println!("Dani debug: Raw txn bytes:{:?}", tx); |
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.
@Brechtpd Could you please have a look on the above comments:
- Is it the correct understanding ? Is the comment valid ?
- Currently i'm trying to distinguish based on
chain_id
, tho i could not find a way to extract it fromSignature
Maybe it is not even the best approach to distinguish tho seems obvious ?
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.
I would guess ideally the node is configured differently in some way between L1 and L2. With L2 having a somewhat custom payload builder likely, and then instead of propegating the block through the network like done on L1, it would instead propose the block to the gwyneth smart contract (probably something related to the engine api, but haven't looked up the normal flow for this).
On the other hand, we can also just make it easy for now and just collect the tx here and propose the block to the smart contract when it's configured as an L2 node and then we can see later. Normally, the block building wil be done through something like rbuilder, so reth itself only really needs to be able to sync with a given tx list (and the internal payload builder would only be a fallback path).
@Brechtpd some debug observations regarding L2 block building. Currently we are building L2 blocks 2 ways: If i trigger the TaikoL1's ProposeBlock event with
If i sent some ether from Bob to Alice via a python script, directly via the L2 rpc. (
AFAIK we shall only allow one way of advancing our chain (maybe the former !?) and not sure which one is the desired, best but we also need to go thru L1 For now i just put some debug prints into the code if you wanna try out all and inspect! (For sending raw eth transaction triggered via rpc, you can run in My 0.02: |
I think the two things we need to support (syncing nodes and proposing nodes) are not special and the same that also needs to happen for standard Ethereum nodes, which is why I would prefer us doing the exact same thing that is done for that (which I currently do not know the exact mechanism). On the other hand, if supporting block building inside reth is tricky, may as well just do all block building using rbuilder because that's how it will likely only be done in practice, and inside the reth node directly we only support syncing from L1 through proposeBlock events/calls like we currently already do. |
Other observations during today debug. For some reason block building is failing if we do it in this order:
I know i shall get rid of the rpc_type block building,but just not modified the code yet because i'm still figuring out the best place to interrupt the background process and hijack it with an L1 contract proposeBlock() forwarding. Maybe it is in |
Closing as |
No description provided.