From 30e019d27918c28873ee0c0195e745ab84cf6a88 Mon Sep 17 00:00:00 2001 From: joanestebanr <129153821+joanestebanr@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:40:14 +0100 Subject: [PATCH] feat: l1infotreesync can be run as individual component --- cmd/run.go | 6 ++++-- common/components.go | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/run.go b/cmd/run.go index 6042e935..727533e8 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -529,7 +529,7 @@ func runL1InfoTreeSyncerIfNeeded( reorgDetector *reorgdetector.ReorgDetector, ) *l1infotreesync.L1InfoTreeSync { if !isNeeded([]string{cdkcommon.AGGORACLE, cdkcommon.RPC, - cdkcommon.SEQUENCE_SENDER, cdkcommon.AGGSENDER}, components) { + cdkcommon.SEQUENCE_SENDER, cdkcommon.AGGSENDER, cdkcommon.L1INFOTREESYNC}, components) { return nil } l1InfoTreeSync, err := l1infotreesync.New( @@ -560,6 +560,7 @@ func runL1ClientIfNeeded(components []string, urlRPCL1 string) *ethclient.Client cdkcommon.SEQUENCE_SENDER, cdkcommon.AGGREGATOR, cdkcommon.AGGORACLE, cdkcommon.RPC, cdkcommon.AGGSENDER, + cdkcommon.L1INFOTREESYNC, }, components) { return nil } @@ -594,7 +595,8 @@ func runReorgDetectorL1IfNeeded( ) (*reorgdetector.ReorgDetector, chan error) { if !isNeeded([]string{ cdkcommon.SEQUENCE_SENDER, cdkcommon.AGGREGATOR, - cdkcommon.AGGORACLE, cdkcommon.RPC, cdkcommon.AGGSENDER}, + cdkcommon.AGGORACLE, cdkcommon.RPC, cdkcommon.AGGSENDER, + cdkcommon.L1INFOTREESYNC}, components) { return nil, nil } diff --git a/common/components.go b/common/components.go index 7ef9d285..2c8ab188 100644 --- a/common/components.go +++ b/common/components.go @@ -15,4 +15,6 @@ const ( PROVER = "prover" // AGGSENDER name to identify the aggsender component AGGSENDER = "aggsender" + // L1INFOTREESYNC name to identify the l1infotreesync component + L1INFOTREESYNC = "l1infotreesync" )