-
Notifications
You must be signed in to change notification settings - Fork 50
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
Deterministic L1InfoTreeRoot #793
Comments
Hi @mandrigin Jerry confirmed this feature would be helpful for the rollback feature (RPC node only) to address the case where only L1InfoTree index is change and no re-org in L2 blocks. Who in Gateway FM can implemented? Then we can incorporate it into Stefan’s PR and 100% of the rollback events will be automatically detected by RPC nodes. |
Hi @Sharonbc01 - we need confirmation on what the new event will look like and if there are any topic changes before we can implement this. |
@cffls FYI |
New event type: https://github.com/0xPolygonHermez/zkevm-contracts/blob/feature/update-l1-info-tree-v2/contracts/v2/PolygonZkEVMGlobalExitRootV2.sol#L39-L44 Topic for this event will be Work log >>> from web3 import Web3
>>> event_signature = "UpdateL1InfoTreeV2(bytes32,uint32,uint256,uint64)"
>>> topic_hash = Web3.keccak(text=event_signature).hex()
>>> print(f"Topic hash: {topic_hash}")
Topic hash: 0xaf6c6cd7790e0180a4d22eb8ed846e55846f54ed10e5946db19972b5a0813a59 |
Thanks @cffls - this is useful but we lose two important values here the mainnet and rollup exit roots. We use these to calculate the GER and also then later to retrieve these exit roots for the zkevm_getBatchByNumber call. Could we add Carlos/Jesus into this thread, not sure on their github handles. |
Tagging @krlosMata & @invocamanman can you please advise |
ye, already anwered on slack but can do it here as well ^^ It was ofc more optimal to emit jsut a new event with all the info, but this woudl mean that would be needed an orchetrated updated of all the networks. Even if we start the audit this monday, this kind of event information can be changed^^ |
@hexoscott / @cffls can this be closed now? |
Not yet, there is work to do around gathering the new events and making use of them in the node |
Hi @hexoscott can you review this again. The vTeam have successfully tested the banana rollback feature on Bali. Is there there still work to do on gathering new events and making use of them in the node? Is this a sow stopper item for fork 12? cc: @ToniRamirezM |
If the network worked as expected with bridging and we picked up L1 info tree leaves as expected in the tested networks then this won't be a show stopper, it would simply speed up the L1 info tree sync. Originally we anticipated this to change the way the events were broadcast at fork12, but instead new events were created to make things better for backwards compatibility. Because the original events were kept in tact the existing code can continue to work as normal. |
@ToniRamirezM let revalidate this as part of testing the rollback feature on the Bali alternative. |
Agreed with Scott, this could be closed (at least for cdk-erigon). To me, the deterministic L1InfoTree is more useful to the sequence sender, which can now check if the L1InfoTreeIndex already exists in L1 before sending the sequence. This is, in fact, already implemented in cdk here. |
The l1 info tree event will no emit the index and the parent hash. We have enough detail there now to build the L1 info tree without asking for headers so it will be much faster.
We need to support the new and old ways of building the tree and if possible detect when the move to banana has happened so that we can stop requesting headers at that point.
The text was updated successfully, but these errors were encountered: