Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9055ae1
coordinator: add Web3j.getWeb3jService to help instantiate Web3jServi…
fluentcrafter Feb 11, 2026
5865229
coordinator: LineaRollupContractClient implement getLatestFinalizedSt…
fluentcrafter Feb 11, 2026
a01eb3e
coordinator: add FORCED_TRANSACTION trigger list
fluentcrafter Feb 11, 2026
c14bb3a
coordinator: add INVALIDITY_PROOF to trigger list
fluentcrafter Feb 11, 2026
8449c48
coordinator: add ForcedTransactions APP to conflation (without confla…
fluentcrafter Feb 11, 2026
55ef69c
coordinator: add conflation and invalidity proof aggregation calculat…
fluentcrafter Feb 11, 2026
8ff8d73
coordinator: extend forced transactions with block number deadline, r…
fluentcrafter Feb 12, 2026
7b88777
coordinator: refine InvalidityProofRequest and FileBasedInvalidityPro…
fluentcrafter Feb 12, 2026
bda988f
state-recovery: update LineaContractClient initialization to include …
fluentcrafter Feb 12, 2026
e214ed8
coordinator: remove unused proofIndex field from ForcedTransactionRecord
fluentcrafter Feb 12, 2026
a409555
domain-models: add `contains` method for interval containment checks …
fluentcrafter Feb 12, 2026
36cfb17
coordinator: replace custom predicate with `contains` method, refacto…
fluentcrafter Feb 12, 2026
242b6e9
coordinator: add InvalidityProverClientV1 support and corresponding m…
fluentcrafter Feb 12, 2026
d284e3e
coordinator: simplify Logger import in TracesClientFactory configuration
fluentcrafter Feb 12, 2026
6d4f8d0
coordinator: traces client add placeholder for generateVirtualBlockCo…
fluentcrafter Feb 12, 2026
93b3414
coordinator: integrate invalidity proof generation with ForcedTransac…
fluentcrafter Feb 12, 2026
a89305f
coordinator: refactor AggregationTriggerCalculator to support dynamic…
fluentcrafter Feb 12, 2026
57b5f8a
coordinator: add dependency on besu-libs in ForcedTransactions build …
fluentcrafter Feb 12, 2026
afda5ae
coordinator: add ForcedTransactionsConflationCoordinator and integrat…
fluentcrafter Feb 12, 2026
bdb1684
coordinator: update environment variable for coordinator disabling to…
fluentcrafter Feb 12, 2026
482d808
coordinator: add `invalidity` prover configuration support
fluentcrafter Feb 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@ fun createAppClients(
stateManagerRequestRetry: RetryConfig = RetryConfig(backoffDelay = 1.seconds),
zkStateManagerVersion: String = "2.3.0",
): AppClients {
val lineaContractClient =
Web3JLineaRollupSmartContractClientReadOnly(
contractAddress = smartContractAddress,
web3j =
createWeb3jHttpClient(
rpcUrl = l1RpcEndpoint.toString(),
log = LogManager.getLogger("linea.plugin.staterecovery.clients.l1.smart-contract"),
),
)
val ethLogsSearcher =
run {
val log = LogManager.getLogger("linea.plugin.staterecovery.clients.l1.logs-searcher")
Expand All @@ -127,6 +118,16 @@ fun createAppClients(
log = log,
)
}
val lineaContractClient =
Web3JLineaRollupSmartContractClientReadOnly(
contractAddress = smartContractAddress,
web3j =
createWeb3jHttpClient(
rpcUrl = l1RpcEndpoint.toString(),
log = LogManager.getLogger("linea.plugin.staterecovery.clients.l1.smart-contract"),
),
ethLogsClient = ethLogsSearcher,
)
val blobScanClient =
BlobScanClient.create(
vertx = vertx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ fs-responses-directory = "tmp/local/prover/v3/execution/responses"
[prover.blob-compression]
fs-requests-directory = "tmp/local/prover/v3/compression/requests"
fs-responses-directory = "tmp/local/prover/v3/compression/responses"
[prover.invalidity]
fs-requests-directory = "tmp/local/prover/v3/invalidity/requests"
fs-responses-directory = "tmp/local/prover/v3/invalidity/responses"
[prover.proof-aggregation]
fs-requests-directory = "tmp/local/prover/v3/aggregation/requests"
fs-responses-directory = "tmp/local/prover/v3/aggregation/responses"
Expand Down
3 changes: 3 additions & 0 deletions config/coordinator/coordinator-config-v2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ fs-responses-directory = "/data/prover/v3/execution/responses"
[prover.blob-compression]
fs-requests-directory = "/data/prover/v3/compression/requests"
fs-responses-directory = "/data/prover/v3/compression/responses"
[prover.invalidity]
fs-requests-directory = "/data/prover/v3/invalidity/requests"
fs-responses-directory = "/data/prover/v3/invalidity/responses"
[prover.proof-aggregation]
fs-requests-directory = "/data/prover/v3/aggregation/requests"
fs-responses-directory = "/data/prover/v3/aggregation/responses"
Expand Down
2 changes: 2 additions & 0 deletions coordinator/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ dependencies {
implementation project(':coordinator:clients:traces-generator-api-client')
implementation project(':coordinator:clients:prover-client:file-based-client')
implementation project(':coordinator:clients:smart-contract-client')
implementation project(':coordinator:clients:forced-transactions-client')
implementation project(':coordinator:ethereum:finalization-monitor')
implementation project(':coordinator:ethereum:common')
implementation project(':coordinator:ethereum:models-helper')
implementation project(':coordinator:ethereum:blob-submitter')
implementation project(':coordinator:ethereum:message-anchoring')
implementation project(':coordinator:ethereum:forced-transactions')
implementation project(':coordinator:clients:web3signer-client')
implementation project(':coordinator:persistence:blob')
implementation project(':coordinator:persistence:aggregation')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ data class ForcedTransactionsConfig(
val processingDelay: Duration = Duration.ZERO,
val l1EventScraping: L1EventScraping = L1EventScraping(),
val processingBatchSize: UInt = 10u,
val invalidityProofCheckInterval: Duration = 2.minutes,
) : FeatureToggle {
init {
require(processingTickInterval >= 1.milliseconds) {
Expand All @@ -28,6 +29,12 @@ data class ForcedTransactionsConfig(
require(processingDelay >= Duration.ZERO) {
"processingDelay=$processingDelay must be equal or greater than 0ms"
}
require(processingBatchSize >= 1u) {
"processingBatchSize=$processingBatchSize must be equal or greater than 1"
}
require(invalidityProofCheckInterval >= 1.milliseconds) {
"invalidityProofCheckInterval=$invalidityProofCheckInterval must be equal or greater than 1ms"
}
}

data class L1EventScraping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data class ProverToml(
val fsPollingTimeout: Duration = Duration.INFINITE,
val execution: ProverDirectoriesToml,
val blobCompression: ProverDirectoriesToml,
val invalidity: ProverDirectoriesToml,
val proofAggregation: ProverDirectoriesToml,
val switchBlockNumberInclusive: ULong? = null,
val new: ProverToml? = null,
Expand Down Expand Up @@ -47,6 +48,14 @@ data class ProverToml(
pollingInterval = this.fsPollingInterval,
pollingTimeout = this.fsPollingTimeout,
),
invalidity = FileBasedProverConfig(
requestsDirectory = Path.of(this.invalidity.fsRequestsDirectory),
responsesDirectory = Path.of(this.invalidity.fsResponsesDirectory),
inprogressProvingSuffixPattern = this.fsInprogressProvingSuffixPattern,
inprogressRequestWritingSuffix = this.fsInprogressRequestWritingSuffix,
pollingInterval = this.fsPollingInterval,
pollingTimeout = this.fsPollingTimeout,
),
proofAggregation =
FileBasedProverConfig(
requestsDirectory = Path.of(this.proofAggregation.fsRequestsDirectory),
Expand Down Expand Up @@ -79,6 +88,14 @@ data class ProverToml(
pollingInterval = newProverConfig.fsPollingInterval,
pollingTimeout = newProverConfig.fsPollingTimeout,
),
invalidity = FileBasedProverConfig(
requestsDirectory = Path.of(newProverConfig.invalidity.fsRequestsDirectory),
responsesDirectory = Path.of(newProverConfig.invalidity.fsResponsesDirectory),
inprogressProvingSuffixPattern = newProverConfig.fsInprogressProvingSuffixPattern,
inprogressRequestWritingSuffix = newProverConfig.fsInprogressRequestWritingSuffix,
pollingInterval = newProverConfig.fsPollingInterval,
pollingTimeout = newProverConfig.fsPollingTimeout,
),
proofAggregation =
FileBasedProverConfig(
requestsDirectory = Path.of(newProverConfig.proofAggregation.fsRequestsDirectory),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import io.vertx.micrometer.backends.NoopBackendRegistry
import io.vertx.sqlclient.SqlClient
import linea.coordinator.config.v2.CoordinatorConfig
import linea.coordinator.config.v2.DatabaseConfig
import linea.persistence.ftx.PostgresForcedTransactionsDao
import linea.persistence.ftx.RetryingPostgresForcedTransactionsDao
import net.consensys.linea.async.toSafeFuture
import net.consensys.linea.jsonrpc.client.LoadBalancingJsonRpcClient
import net.consensys.linea.jsonrpc.client.VertxHttpJsonRpcClientFactory
Expand All @@ -30,8 +32,12 @@ import org.apache.logging.log4j.Level
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import tech.pegasys.teku.infrastructure.async.SafeFuture
import kotlin.time.Clock

class CoordinatorApp(private val configs: CoordinatorConfig) {
class CoordinatorApp(
private val configs: CoordinatorConfig,
private val clock: Clock = Clock.System,
) {
private val log: Logger = LogManager.getLogger(this::class.java)
private val vertx: Vertx =
run {
Expand Down Expand Up @@ -96,6 +102,14 @@ class CoordinatorApp(private val configs: CoordinatorConfig) {
),
)

private val forcedTransactionsDao = RetryingPostgresForcedTransactionsDao(
delegate =
PostgresForcedTransactionsDao(
connection = sqlClient,
),
persistenceRetryer = persistenceRetryer,
)

private val blobsRepository =
BlobsRepositoryImpl(
blobsDao =
Expand Down Expand Up @@ -131,10 +145,12 @@ class CoordinatorApp(private val configs: CoordinatorConfig) {
httpJsonRpcClientFactory = httpJsonRpcClientFactory,
batchesRepository = batchesRepository,
blobsRepository = blobsRepository,
forcedTransactionsDao = forcedTransactionsDao,
aggregationsRepository = aggregationsRepository,
sqlClient = sqlClient,
smartContractErrors = configs.smartContractErrors,
metricsFacade = micrometerMetricsFacade,
clock = this.clock,
)

private val requestFileCleanup =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import linea.domain.BlockNumberAndHash
import linea.domain.RetryConfig
import linea.ethapi.EthApiClient
import linea.kotlin.toKWeiUInt
import linea.persistence.ftx.RetryingPostgresForcedTransactionsDao
import linea.web3j.SmartContractErrors
import linea.web3j.createWeb3jHttpClient
import linea.web3j.ethapi.createEthApiClient
Expand Down Expand Up @@ -77,10 +78,12 @@ class L1DependentApp(
private val httpJsonRpcClientFactory: VertxHttpJsonRpcClientFactory,
private val batchesRepository: BatchesRepository,
private val blobsRepository: BlobsRepository,
private val forcedTransactionsDao: RetryingPostgresForcedTransactionsDao,
private val aggregationsRepository: AggregationsRepository,
private val sqlClient: SqlClient,
private val smartContractErrors: SmartContractErrors,
private val metricsFacade: MetricsFacade,
private val clock: Clock,
) : LongRunningService {
private val log = LogManager.getLogger(this::class.java)

Expand Down Expand Up @@ -163,14 +166,21 @@ class L1DependentApp(
)
}

val lineaRollupClientForFinalizationMonitor: LineaRollupSmartContractClientReadOnly =
val lineaRollupClientForFinalizationMonitor: LineaRollupSmartContractClientReadOnly = run {
val web3j = createWeb3jHttpClient(
rpcUrl = configs.l1FinalizationMonitor.l1Endpoint.toString(),
log = LogManager.getLogger("clients.l1.eth.finalization-monitor"),
)
Web3JLineaRollupSmartContractClientReadOnly(
contractAddress = configs.protocol.l1.contractAddress,
web3j = createWeb3jHttpClient(
rpcUrl = configs.l1FinalizationMonitor.l1Endpoint.toString(),
log = LogManager.getLogger("clients.l1.eth.finalization-monitor"),
web3j = web3j,
ethLogsClient = createEthApiClient(
web3jClient = web3j,
requestRetryConfig = configs.l1FinalizationMonitor.l1RequestRetries,
vertx = vertx,
),
)
}

private val l1FinalizationMonitor = run {
FinalizationMonitorImpl(
Expand Down Expand Up @@ -496,9 +506,11 @@ class L1DependentApp(
batchesRepository = batchesRepository,
blobsRepository = blobsRepository,
aggregationsRepository = aggregationsRepository,
forcedTransactionsDao = forcedTransactionsDao,
lastFinalizedBlock = lastFinalizedBlock,
metricsFacade = metricsFacade,
httpJsonRpcClientFactory = httpJsonRpcClientFactory,
clock = clock,
)

private val l2NetworkGasPricingService: L2NetworkGasPricingService? =
Expand Down
Loading
Loading