Skip to content

coordinator: adds config v2 #853

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

Merged
merged 39 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
720b5a3
coordinator: adds config v2 sample
fluentcrafter Apr 8, 2025
71a5dc5
coordinator: update config V2
fluentcrafter Apr 15, 2025
a309e91
coordinator: update config v2
fluentcrafter May 14, 2025
117a210
coordinator: update config v2
fluentcrafter May 15, 2025
d45634b
coordinator: config v2 wip
fluentcrafter May 19, 2025
aafc4bb
spotless fix
fluentcrafter May 22, 2025
19b1f3c
coordinator: adds config v2 parsers
fluentcrafter May 26, 2025
41a6da8
coordinator: adds config v2 classes and parsing tests
fluentcrafter Jun 4, 2025
813d222
coordinator: adds config v2 classes and parsing tests
fluentcrafter Jun 4, 2025
cde1386
remove end2end changes from staterecovery test trigger
fluentcrafter Jun 4, 2025
9a5b13e
coordinator: config v2 - fix prover directory config
fluentcrafter Jun 4, 2025
aa003b5
coordinator: add getChaindId to EthApiClient.kt
fluentcrafter Jun 4, 2025
b13cbe0
coordinator: improve EIP1559GasProvider validation
fluentcrafter Jun 4, 2025
19efe11
coordinator: add createReadOnly to Web3JL2MessageServiceSmartContract…
fluentcrafter Jun 4, 2025
b8ff0e3
coordinator: add validation to FeeHistoryFetcherImpl
fluentcrafter Jun 4, 2025
d3ba383
coordinator: add more configs to v2
fluentcrafter Jun 4, 2025
0aa7bea
coordinator: extend Web3JFactory
fluentcrafter Jun 4, 2025
e12b179
coordinator: addapt CoordinatorApp to new V2 configs
fluentcrafter Jun 4, 2025
b070a85
coordinator: adapt local stack coordinator configs
fluentcrafter Jun 4, 2025
f494d0f
coordinator: log4j clients.l1 debug
fluentcrafter Jun 4, 2025
652d1d9
coordinator: revert attempt to use web3signer on CI ONly :(
fluentcrafter Jun 4, 2025
b6cfada
coordinator: fix test and configs
fluentcrafter Jun 5, 2025
c3ce46e
coordinator: fix test and configs
fluentcrafter Jun 5, 2025
7e86368
coordinator: fix traces node address
fluentcrafter Jun 5, 2025
56821c6
coordinator: remove unnecessary file
fluentcrafter Jun 5, 2025
2f470a8
coordinator: hardcode tracesVersion to v2.1.0 to match prover regex
fluentcrafter Jun 5, 2025
b42021a
Update config/coordinator/coordinator-config-v2.toml
fluentcrafter Jun 5, 2025
bdef84e
Apply suggestions from code review
fluentcrafter Jun 5, 2025
2b776c6
coordinator: default targetBlobsPerTransaction=7u
fluentcrafter Jun 5, 2025
816edb7
coordinator: hardcode tracesVersion to 2.1.0 to match prover regex
fluentcrafter Jun 5, 2025
5ecb07f
coordinator: fix agg configs
fluentcrafter Jun 5, 2025
5c20ac6
coordinator: strict configs log warning when config is not used
fluentcrafter Jun 5, 2025
b718670
coordinator: add carved out config files
fluentcrafter Jun 5, 2025
dc6a9ec
coordinator: add opt-in to avoid annoying warning log
fluentcrafter Jun 5, 2025
ed2bd97
Merge branch 'main' into coordinator-config-v2
jonesho Jun 6, 2025
254b245
feat: update Makefile for new coordinator config file and variable name
jonesho Jun 6, 2025
1d2e42a
localstack: remove coordinator forced platform
fluentcrafter Jun 6, 2025
f7940f8
coordinator: add missing config on gas-price-cap-calculation
fluentcrafter Jun 6, 2025
62c8b30
coordinator: remove old configs
fluentcrafter Jun 6, 2025
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
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
- '.github/workflows/staterecovery-*.yml'
- '.github/workflows/main.yml'
- '.github/workflows/reuse-*.yml'
- 'e2e/**'
postman:
- 'postman/**'
- 'sdk/**'
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/reuse-linea-besu-package-run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ jobs:
- name: Replace expected traces api version in coordinator config file
shell: bash
run: |
sed -i 's/^\(expected-traces-api-version-v2=\).*/\1"${{ env.EXPECTED_TRACES_API_VERSION }}"/' config/coordinator/coordinator-docker.config.toml
sed -i 's/^\(expected-traces-api-version-v2=\).*/\1"${{ env.EXPECTED_TRACES_API_VERSION }}"/' config/coordinator/coordinator-docker-traces-v2-override.config.toml
sed -i 's/^\(expected-traces-api-version[ ]*=[ ]*\).*/\1"${{ env.EXPECTED_TRACES_API_VERSION }}"/' config/coordinator/coordinator-config-v2.toml
echo "EXPECTED_TRACES_API_VERSION=${{ env.EXPECTED_TRACES_API_VERSION }}"
echo "BESU_PACKAGE_TAG=${{ env.BESU_PACKAGE_TAG }}"
echo "$(grep expected-traces-api-version-v2 config/coordinator/coordinator-docker.config.toml)"
echo "$(grep expected-traces-api-version-v2 config/coordinator/coordinator-docker-traces-v2-override.config.toml)"
echo "$(grep expected-traces-api-version config/coordinator/coordinator-config-v2.toml)"
- name: Spin up fresh environment with besu tracing with retry
uses: nick-fields/retry@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .run/Coordinator.run.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="net.consensys.zkevm.coordinator.app.CoordinatorAppMain" />
<module name="zkevm.coordinator.app.main" />
<option name="PROGRAM_PARAMETERS" value="--traces-limits-v2=config/common/traces-limits-v2.toml --smart-contract-errors=config/common/smart-contract-errors.toml --gas-price-cap-time-of-day-multipliers=config/common/gas-price-cap-time-of-day-multipliers.toml config/coordinator/coordinator-docker.config.toml config/coordinator/coordinator-docker-traces-v2-override.config.toml config/coordinator/coordinator-local-dev.config.overrides.toml config/coordinator/coordinator-local-dev.config-traces-v2.overrides.toml" />
<option name="PROGRAM_PARAMETERS" value="--traces-limits-v2=config/common/traces-limits-v2.toml --smart-contract-errors=config/common/smart-contract-errors.toml --gas-price-cap-time-of-day-multipliers=config/common/gas-price-cap-time-of-day-multipliers.toml config/coordinator/coordinator-config-v2.toml config/coordinator/coordinator-config-v2-override-local-dev.toml" />
<option name="VM_PARAMETERS" value="-Dvertx.configurationFile=config/coordinator/vertx-options.json -Dlog4j2.configurationFile=config/coordinator/log4j2-dev.xml" />
<extension name="net.ashald.envfile">
<option name="IS_ENABLED" value="false" />
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ start-env-with-tracing-v2:

## Enable L2 geth node
start-env-with-tracing-v2-extra:
make start-env COMPOSE_PROFILES:=l1,l2 COMPOSE_FILE:=docker/compose-tracing-v2-extra-extension.yml LINEA_PROTOCOL_CONTRACTS_ONLY=true DISABLE_JSON_RPC_PRICING_PROPAGATION=false DISABLE_TYPE2_STATE_PROOF_PROVIDER=false
make start-env COMPOSE_PROFILES:=l1,l2 COMPOSE_FILE:=docker/compose-tracing-v2-extra-extension.yml LINEA_PROTOCOL_CONTRACTS_ONLY=true DISABLE_TYPE2_STATE_PROOF_PROVIDER=false

start-env-with-tracing-v2-ci:
make start-env COMPOSE_FILE=docker/compose-tracing-v2-ci-extension.yml DISABLE_TYPE2_STATE_PROOF_PROVIDER=false
Expand Down
58 changes: 58 additions & 0 deletions config/coordinator/coordinator-config-v2-override-local-dev.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[defaults]
l1-endpoint = "http://127.0.0.1:8445"
l2-endpoint = "http://127.0.0.1:8545"

[prover]
[prover.execution]
fs-requests-directory = "tmp/local/prover/v3/execution/requests"
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.proof-aggregation]
fs-requests-directory = "tmp/local/prover/v3/aggregation/requests"
fs-responses-directory = "tmp/local/prover/v3/aggregation/responses"

[traces]
[traces.counters]
endpoints = ["http://127.0.0.1:8745/"]
[traces.conflation]
endpoints = ["http://127.0.0.1:8745/"]

[state-manager]
endpoints = ["http://127.0.0.1:8998/"]

[type2-state-proof-provider]
disabled = true

[l1-finalization-monitor]
l1-query-block-tag="LATEST"

[l1-submission.blob.signer]
type = "Web3j"

[l1-submission.aggregation.signer]
type = "Web3j"

[message-anchoring]
disabled = false
l1-highest-block-tag="LATEST"
l2-highest-block-tag="LATEST"
anchoring-tick-interval = "PT1S"

[message-anchoring.l1-event-scraping]
polling-interval = "PT1S"

[message-anchoring.signer]
type = "Web3j"

[l2-network-gas-pricing]
disabled = false
extra-data-update-endpoint = "http://127.0.0.1:8545/"

[database]
hostname = "127.0.0.1"
port = "5432"

[api]
observability_port = 9545
287 changes: 287 additions & 0 deletions config/coordinator/coordinator-config-v2.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
[defaults]
l1-endpoint = "http://l1-el-node:8545"
l2-endpoint = "http://sequencer:8545"

[protocol]
[protocol.genesis]
genesis-state-root-hash = "0x072ead6777750dc20232d1cee8dc9a395c2d350df4bbaa5096c6f59b214dcecd"
# shnarf for contract V5
# Keccak256(parentShnarf="0x00...00", snarkHash="0x00...00",
# parentStateRootHash="0x072ead6777750dc20232d1cee8dc9a395c2d350df4bbaa5096c6f59b214dcecd",
# evaludationClaim="0x00...00", evaludationPoint="0x00...00")
genesis-shnarf = "0x47452a1b9ebadfe02bdd02f580fa1eba17680d57eec968a591644d05d78ee84f"
[protocol.l1]
contract-address = "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
block-time = "PT1S"
[protocol.l2]
contract-address = "0xe537D669CA013d86EBeF1D64e40fC74CADC91987"
contract-deployment-block-number = 3

[conflation]
disabled = false
blocks-limit = 2
new-blocks-polling-interval="PT1S"
conflation-deadline = "PT6S" # =3*l2_block_time
conflation-deadline-check-interval = "PT3S"
conflation-deadline-last-block-confirmation-delay = "PT2S" # recommended: at least 2 * blockInterval
l2-fetch-blocks-limit = 4000
force-stop-conflation-at-block-inclusive=100_000_000

# This is to prevent inflight trasactions that may change Smart contract state while coordinator is restarted.
# Queries SMC for last finalised block, and keeps polling until this number of blocks observe the same state.
# If state is updated meanwhile, it resets counter and restarts the polling.
consistent-number-of-blocks-on-l1-to-wait = 1
l2-endpoint = "http://sequencer:8545"
l2-logs-endpoint = "http://sequencer:8545"

[conflation.l2-request-retries]
backoff-delay = "PT1S"
failures-warning-threshold = 3


[conflation.blob-compression]
blob-compressor-version="V1_2"
blob-size-limit = 102400 # 100KB
handler-polling-interval = "PT1S"
# default batches limit is aggregation-proofs-limit -1
# batches-limit must be less than or equal to aggregation-proofs-limit-1
batches-limit = 1

[conflation.proof-aggregation]
proofs-limit = 3
deadline = "PT1M"
coordinator-polling-interval = "PT2S"
deadline-check-interval = "PT8S"
target-end-blocks = []

[prover]
version = "v3.0.0"
[prover.execution]
fs-requests-directory = "/data/prover/v3/execution/requests"
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.proof-aggregation]
fs-requests-directory = "/data/prover/v3/aggregation/requests"
fs-responses-directory = "/data/prover/v3/aggregation/responses"

#[prover.new]
#switch-block-number-inclusive=1000
#[prover.new.execution]
#fs-requests-directory = "/data/prover/v3/execution/requests"
#fs-responses-directory = "/data/prover/v3/execution/responses"
#[prover.new.blob-compression]
#fs-requests-directory = "/data/prover/v3/compression/requests"
#fs-responses-directory = "/data/prover/v3/compression/responses"
#[prover.new.proof-aggregation]
#fs-requests-directory = "/data/prover/v3/aggregation/requests"
#fs-responses-directory = "/data/prover/v3/aggregation/responses"

[traces]
expected-traces-api-version = "beta-v2.1-rc16.2"
[traces.counters]
endpoints = ["http://traces-node:8545/"]
request-limit-per-endpoint = 1
[traces.counters.request-retries]
backoff-delay = "PT1S"
failures-warning-threshold = 10

[traces.conflation]
endpoints = ["http://traces-node:8545/"]
request-limit-per-endpoint = 1
[traces.conflation.request-retries]
backoff-delay = "PT1S"
failures-warning-threshold = 10

[state-manager]
version = "2.3.0"
endpoints = ["http://shomei:8888/"]
request-limit-per-endpoint = 3
[state-manager.request-retries]
max-retries = 5
backoff-delay = "PT2S"
failures-warning-threshold = 2

[type2-state-proof-provider]
disabled = false
endpoints = ["http://shomei-frontend:8888/"]
l1-query-block-tag="LATEST"
l1-polling-interval="PT1S"

[type2-state-proof-provider.request-retries]
backoff-delay = "PT1S"
failures-warning-threshold = 2

[l1-finalization-monitor]
l1-polling-interval = "PT1S"
l1-query-block-tag="LATEST"

[l1-submission]
disabled = true
[l1-submission.dynamic-gas-price-cap]
disabled = false
[l1-submission.dynamic-gas-price-cap.gas-price-cap-calculation]
adjustment-constant = 25
blob-adjustment-constant = 25
finalization-target-max-delay = "PT32H"
base-fee-per-gas-percentile-window = "P7D"
base-fee-per-gas-percentile-window-leeway = "PT10M"
base-fee-per-gas-percentile = 10
gas-price-caps-check-coefficient = 0.9
# The lower bound of the "historic base fee per blob gas" used in
# the L1 dynamic gas price cap equation
historic-base-fee-per-blob-gas-lower-bound=100000000 # 0.1 GWEI
# An optional config to replace the "historic average reward" used in
# the L1 dynamic gas price cap equation
historic-avg-reward-constant=100000000 # 0.1 GWEI
[l1-submission.dynamic-gas-price-cap.fee-history-fetcher]
fetch-interval = "PT1S"
max-block-count = 1000
reward-percentiles = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
num-of-blocks-before-latest = 2
storage-period = "P10D"

[l1-submission.fallback-gas-price]
fee-history-block-count = 10
fee-history-reward-percentile = 15

[l1-submission.blob]
disabled = false
submission-delay = "PT1S"
submission-tick-interval = "PT1S"
max-submission-transactions-per-tick = 10
target-blobs-per-transaction=9
db-max-blobs-to-return = 100
[l1-submission.blob.gas]
gas-limit = 10000000
max-fee-per-gas-cap = 100000000000
max-fee-per-blob-gas-cap = 100000000000
max-priority-fee-per-gas-cap=20000000000
# Note: prefixed with "fallback-", used when dynamic gas price is disabled or DB is not populated yet
[l1-submission.blob.gas.fallback]
priority-fee-per-gas-upper-bound = 20000000000 # 20 GWEI
priority-fee-per-gas-lower-bound = 2000000000 # 2 GWEI


[l1-submission.blob.signer]
# Web3j/Web3signer
type = "Web3signer"

# The account with this private key is in genesis file
[l1-submission.blob.signer.web3j]
private-key = "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a"

[l1-submission.blob.signer.web3signer]
endpoint = "http://web3signer:9000"
max-pool-size = 10
keep-alive = true
public-key = "9d9031e97dd78ff8c15aa86939de9b1e791066a0224e331bc962a2099a7b1f0464b8bbafe1535f2301c72c2cb3535b172da30b02686ab0393d348614f157fbdb"

[l1-submission.aggregation]
disabled = false
l1-endpoint = "http://l1-el-node:8545"
submission-delay = "PT1S"
submission-tick-interval = "PT1S"
max-submissions-per-tick = 10
[l1-submission.aggregation.gas]
gas-limit = 10_000_000
max-fee-per-gas-cap = 200_000_000_000
max-priority-fee-per-gas-cap = 40_000_000_000

[l1-submission.aggregation.gas.fallback]
# Note: prefixed with "fallback-", used when dynamic gas price is disabled or DB is not populated yet
priority-fee-per-gas-upper-bound = 20000000000 # 20 GWEI
priority-fee-per-gas-lower-bound = 2000000000 # 2 GWEI

[l1-submission.aggregation.signer]
# Web3j/Web3signer
type = "Web3signer"

[l1-submission.aggregation.signer.web3j]
private-key = "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"

[l1-submission.aggregation.signer.web3signer]
endpoint = "http://web3signer:9000"
max-pool-size = 10
keep-alive = true
public-key = "ba5734d8f7091719471e7f7ed6b9df170dc70cc661ca05e688601ad984f068b0d67351e5f06073092499336ab0839ef8a521afd334e53807205fa2f08eec74f4"

[message-anchoring]
disabled = false
l1-highest-block-tag="LATEST"
l2-highest-block-tag="LATEST" # optional, default to LATEST it shall not be necessary as Linea has instant finality
anchoring-tick-interval = "PT2S"

[message-anchoring.l1-event-scraping]
polling-interval = "PT1S"
polling-timeout = "PT5S"

[message-anchoring.gas]
max-fee-per-gas-cap = 100000000000
gas-limit = 10000000
fee-history-block-count = 4
fee-history-reward-percentile = 15

[message-anchoring.signer]
# Web3j/Web3signer
type = "Web3signer"

[message-anchoring.signer.web3j]
private-key = "0x4d01ae6487860981699236a58b68f807ee5f17b12df5740b85cf4c4653be0f55"

[message-anchoring.signer.web3signer]
endpoint = "http://web3signer:9000"
max-pool-size = 10
keep-alive = true
public-key = "4a788ad6fa008beed58de6418369717d7492f37d173d70e2c26d9737e2c6eeae929452ef8602a19410844db3e200a0e73f5208fd76259a8766b73953fc3e7023"


[l2-network-gas-pricing] # old [dynamic-gas-price-service]
disabled = false
price-update-interval = "PT12S"
fee-history-block-count = 50
fee-history-reward-percentile = 15
gas-price-fixed-cost = 3000000
extra-data-update-endpoint = "http://sequencer:8545/"
[l2-network-gas-pricing.extra-data-update-request-retries]
max-retries = 4
timeout = "PT7S"
backoff-delay = "PT2S"
failures-warning-threshold = 3

[l2-network-gas-pricing.flat-rate-gas-pricing]
# Relate to legacy gas pricing, goes into extradata
# and is exposed on Bessu eth_gasPrice
gas-price-upper-bound = 10000000000 # 10 GWEI
gas-price-lower-bound = 90000000 # 0.09 GWEI
compressed-tx-size = 125
expected-gas = 21000

[l2-network-gas-pricing.dynamic-gas-pricing]
# Propagated to Sequencer and Besude through extraDataPricerService and besu
# uses it dynaically culcuale the profitability of each transaction on:
# eth_sendRawTransaction, linea_estimateGas, and block building
l1-blob-gas = 131072 # 2^17 # expected-l1-blob-gas previous name: expected-blob-gas
blob-submission-expected-execution-gas = 213000
variable-cost-upper-bound = 10000000001 # ~10 GWEI
variable-cost-lower-bound = 90000001 # ~0.09 GWEI
margin = 4.0

[database]
hostname = "postgres"
port=5432
username = "postgres"
password = "postgres"
schema = "linea_coordinator"
read-pool-size = 10
read-pipelining-limit = 10
transactional-pool-size = 10
[database.persistence-retries]
max-retries = 3
backoff-delay = "PT1S"
timeout = "PT10S"
failures-warning-threshold = 2

[api]
observability-port = 9545
Loading
Loading