From 6d8cd1ef6d2cb43ac6559e5d0594de5be26a1ae1 Mon Sep 17 00:00:00 2001 From: Joan Esteban <129153821+joanestebanr@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:48:07 +0300 Subject: [PATCH] set synchronizer sequential mode as default (#2807) * set sequential mode as default --- config/config_test.go | 2 +- config/default.go | 2 +- docs/config-file/node-config-doc.html | 2 +- docs/config-file/node-config-doc.md | 6 +++--- docs/config-file/node-config-schema.json | 2 +- test/config/test.node.config.toml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index 34a393a37b..55a155b099 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -42,7 +42,7 @@ func Test_Defaults(t *testing.T) { }, { path: "Synchronizer.L1SynchronizationMode", - expectedValue: "parallel", + expectedValue: "sequential", }, { path: "Synchronizer.L1ParallelSynchronization.MaxClients", diff --git a/config/default.go b/config/default.go index a12998c7c9..a276963f0a 100644 --- a/config/default.go +++ b/config/default.go @@ -99,7 +99,7 @@ EnableHttpLog = true SyncInterval = "1s" SyncChunkSize = 100 TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc -L1SynchronizationMode = "parallel" +L1SynchronizationMode = "sequential" # "sequential" or "parallel" [Synchronizer.L1ParallelSynchronization] MaxClients = 10 MaxPendingNoProcessedBlocks = 25 diff --git a/docs/config-file/node-config-doc.html b/docs/config-file/node-config-doc.html index adc336e432..6951d99b49 100644 --- a/docs/config-file/node-config-doc.html +++ b/docs/config-file/node-config-doc.html @@ -16,7 +16,7 @@
"300ms"
MaxRequestsPerIPAndSecond defines how much requests a single IP can
send within a single second
SequencerNodeURI is used allow Non-Sequencer nodes
to relay transactions to the Sequencer node
MaxCumulativeGasUsed is the max gas allowed per batch
Enabled defines if the WebSocket requests are enabled or disabled
Host defines the network adapter that will be used to serve the WS requests
Port defines the port to serve the endpoints via WS
ReadLimit defines the maximum size of a message read from the client (in bytes)
EnableL2SuggestedGasPricePolling enables polling of the L2 gas price to block tx in the RPC with lower gas price.
BatchRequestsEnabled defines if the Batch requests are enabled or disabled
BatchRequestsLimit defines the limit of requests that can be incorporated into each batch request
L2Coinbase defines which address is going to receive the fees
Must contain a minimum of 20
items
Must contain a maximum of 20
items
MaxLogsCount is a configuration to set the max number of logs that can be returned
in a single call to the state, if zero it means no limit
MaxLogsBlockRange is a configuration to set the max range for block number when querying TXs
logs in a single call to the state, if zero it means no limit
MaxNativeBlockHashBlockRange is a configuration to set the max range for block number when querying
native block hashes in a single call to the state, if zero it means no limit
EnableHttpLog allows the user to enable or disable the logs related to the HTTP
requests to be captured by the server.
SyncInterval is the delay interval between reading new rollup information
"1m"
"300ms"
-
SyncChunkSize is the number of blocks to sync on each chunk
TrustedSequencerURL is the rpc url to connect and sync the trusted state
L1SynchronizationMode define how to synchronize with L1:
- parallel: Request data to L1 in parallel, and process sequentially. The advantage is that executor is not blocked waiting for L1 data
- sequential: Request data to L1 and execute
MaxClients Number of clients used to synchronize with L1
MaxPendingNoProcessedBlocks Size of the buffer used to store rollup information from L1, must be >= to NumberOfEthereumClientsToSync
sugested twice of NumberOfParallelOfEthereumClients
RequestLastBlockPeriod is the time to wait to request the
last block to L1 to known if we need to retrieve more data.
This value only apply when the system is synchronized
"1m"
+
SyncChunkSize is the number of blocks to sync on each chunk
TrustedSequencerURL is the rpc url to connect and sync the trusted state
L1SynchronizationMode define how to synchronize with L1:
- parallel: Request data to L1 in parallel, and process sequentially. The advantage is that executor is not blocked waiting for L1 data
- sequential: Request data to L1 and execute
MaxClients Number of clients used to synchronize with L1
MaxPendingNoProcessedBlocks Size of the buffer used to store rollup information from L1, must be >= to NumberOfEthereumClientsToSync
sugested twice of NumberOfParallelOfEthereumClients
RequestLastBlockPeriod is the time to wait to request the
last block to L1 to known if we need to retrieve more data.
This value only apply when the system is synchronized
"1m"
"300ms"
AceptableInacctivityTime is the expected maximum time that the consumer
could wait until new data is produced. If the time is greater it emmit a log to warn about
that. The idea is keep working the consumer as much as possible, so if the producer is not
fast enought then you could increse the number of parallel clients to sync with L1
"1m"
"300ms"
diff --git a/docs/config-file/node-config-doc.md b/docs/config-file/node-config-doc.md
index 19ccb6b870..ae3f4badcb 100644
--- a/docs/config-file/node-config-doc.md
+++ b/docs/config-file/node-config-doc.md
@@ -1240,16 +1240,16 @@ TrustedSequencerURL=""
**Type:** : `enum (of string)`
-**Default:** `"parallel"`
+**Default:** `"sequential"`
**Description:** L1SynchronizationMode define how to synchronize with L1:
- parallel: Request data to L1 in parallel, and process sequentially. The advantage is that executor is not blocked waiting for L1 data
- sequential: Request data to L1 and execute
-**Example setting the default value** ("parallel"):
+**Example setting the default value** ("sequential"):
```
[Synchronizer]
-L1SynchronizationMode="parallel"
+L1SynchronizationMode="sequential"
```
Must be one of:
diff --git a/docs/config-file/node-config-schema.json b/docs/config-file/node-config-schema.json
index be56c67a33..5003277e21 100644
--- a/docs/config-file/node-config-schema.json
+++ b/docs/config-file/node-config-schema.json
@@ -470,7 +470,7 @@
"parallel"
],
"description": "L1SynchronizationMode define how to synchronize with L1:\n- parallel: Request data to L1 in parallel, and process sequentially. The advantage is that executor is not blocked waiting for L1 data\n- sequential: Request data to L1 and execute",
- "default": "parallel"
+ "default": "sequential"
},
"L1ParallelSynchronization": {
"properties": {
diff --git a/test/config/test.node.config.toml b/test/config/test.node.config.toml
index 481b9abe62..4b80a75e2b 100644
--- a/test/config/test.node.config.toml
+++ b/test/config/test.node.config.toml
@@ -79,7 +79,7 @@ EnableL2SuggestedGasPricePolling = true
SyncInterval = "1s"
SyncChunkSize = 100
TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc.
-L1SynchronizationMode = "parallel"
+L1SynchronizationMode = "sequential" # "sequential" or "parallel"
[Synchronizer.L1ParallelSynchronization]
MaxClients = 10
MaxPendingNoProcessedBlocks = 25