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

enhance(l1-info-sync): sync l1 info table from l2 rpc id an rpc node #1696

Open
wants to merge 1 commit into
base: zkevm
Choose a base branch
from

Conversation

elliothllm
Copy link
Collaborator

@elliothllm elliothllm commented Jan 29, 2025

The L2 Info Tree syncer will collect all the Info Tree from the L2 in a configurable batch size. zkevm.l2-info-tree-updates-batch-size. You will need to enable this using flag zkevm.l2-info-tree-updates-enabled. It will try to use zkevm_getExitRootTable with updated params "to" and "from".

A fail safe is in place. If we error out during L2 sync phase then we continue to use L1 method, if we succeed then return. We only enter the L2 sync phase when (RPC node, progress == 0, config enabled).

@cla-bot cla-bot bot added the cla-signed label Jan 29, 2025
@elliothllm elliothllm marked this pull request as draft January 29, 2025 21:08
@elliothllm elliothllm force-pushed the enhance/l1-info-sync-speed branch from f7255e3 to c068e1e Compare January 30, 2025 14:12
@elliothllm elliothllm marked this pull request as ready for review January 30, 2025 14:20
@elliothllm elliothllm linked an issue Jan 30, 2025 that may be closed by this pull request
enhance(l1-info-sync): l2 syncer wip

enhance(l1-info-sync): l2 syncer

enhance(l1-info-sync): fix tests
@elliothllm elliothllm force-pushed the enhance/l1-info-sync-speed branch from c068e1e to 41a0266 Compare January 31, 2025 12:18
EXIT_ROOT_TABLE = "zkevm_getExitRootTable"
)

type L2InfoTreeSyncer struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this name is a bit misleading. Can we change the name? Smth like L2RpcL1InfoTreeSyncer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RPC] slow L1 info tree sync
2 participants