Skip to main content

Reference

The following tables break down each configuration section and field available for customizing your devnet. Use these references to understand the structure, defaults, and purpose of every option.

tip

For the latest defaults and advanced options, always refer to the source code in src/config/input_parser.star.

Dev Configuration

The dev section controls high-level deployment options for the devnet.

params.yml
dev:
l1_backend: ethereum-package
should_deploy_l1: true
should_deploy_matic_contracts: true
FieldTypeDefaultDescription
l1_backendstringethereum-packageL1 backend to use: ethereum-package for full devnet or anvil for lightweight
should_deploy_l1booltrueWhether to deploy the L1 chain
should_deploy_matic_contractsbooltrueWhether to deploy Polygon PoS contracts to L1

L1 Configuration

The package supports two L1 backends, configured via the dev.l1_backend parameter:

  • ethereum-package (default): Full-featured L1 devnet with multi-client support
  • anvil: Lightweight local Ethereum node for rapid testing

Ethereum Package Backend

When using l1_backend: ethereum-package (default), customize the L1 devnet with an ethereum_package property in your args file. The available options mirror those from the ethereum-package. For the complete YAML schema and default values, refer to the ethereum-package configuration documentation.

params.yml
dev:
l1_backend: ethereum-package # default

ethereum_package:
participants:
- cl_type: lighthouse
el_type: geth
network_params:
preset: minimal
seconds_per_slot: 1

participants

FieldTypeDefaultDescription
cl_typestringlighthouseConsensus Layer (CL) client type
cl_imagestringsigp/lighthouse:v8.1.0Image for the CL client
el_typestringgethExecution Layer (EL) client type
el_imagestringethereum/client-go:v1.17.0Image for the EL client

network_params

FieldTypeDefaultDescription
presetstringminimalNetwork preset, useful for rapid testing and development
seconds_per_slotint1Number of seconds per slot on the Beacon chain

Anvil Backend

When using l1_backend: anvil, customize the Anvil L1 with an anvil property in your args file. Anvil is a lightweight local Ethereum node from the Foundry toolkit, ideal for rapid testing scenarios.

params.yml
dev:
l1_backend: anvil

anvil:
network_id: "3151908"
block_time: 1
slots_in_epoch: 2
FieldTypeDefaultDescription
imagestringghcr.io/foundry-rs/foundry:v1.6.0-rc1Anvil container image
network_idstring3151908L1 network/chain ID
block_timeint1Block time in seconds
slots_in_epochint2Number of slots per epoch (block_time × slots_in_epoch = seconds to transition from latest to safest)

L2 Configuration

To customize the L2 devnet, include a polygon_pos_package property in your args file.

params.yml
polygon_pos_package:
log_level: info
log_format: text
participants:
- kind: validator
cl_type: heimdall-v2
el_type: bor
count: 2
network_params:
el_block_interval_seconds: 2
el_gas_limit: 60_000_000
additional_services:
- observability

Top-Level Parameters

FieldTypeDefaultDescription
log_levelstringinfoGlobal log level for all participants: error, warn, info, debug, or trace
log_formatstringtextGlobal log format for all participants: text or json
tip

These global settings apply to all participants unless overridden at the participant level with cl_log_level, cl_log_format, el_log_level, or el_log_format.

participants

Default: a single validator.

FieldTypeDefaultDescription
kindstringvalidatorRole of the node in the network: validator, rpc or archive
cl_typestringheimdall-v2Consensus Layer (CL) client type
cl_imagestring0xpolygon/heimdall-v2:0.6.0Image for the CL client
cl_queue_imagestringrabbitmq:4.2.4Image for the CL queue
cl_log_levelstringinfoLog level for the CL client
cl_log_formatstringtextLog format for the CL client
cl_min_retain_blocksint0Minimal distance from current height to retain height
cl_compact_enabledboolfalseCompaction enabling.
cl_compaction_intervalint1000Minimal blocks necessary to run a new compaction routine
cl_storage_pruning_intervalstring10m0sInterval between prune routines.
cl_indexer_pruning_enabledboolfalsePruning enabling.
el_typestringborExecution Layer (EL) client type: bor or erigon
el_imagestring0xpolygon/bor:2.5.9Image for the EL client (bor: 0xpolygon/bor:2.5.9, erigon: 0xpolygon/erigon:v3.3.7)
el_log_levelstringinfoLog level for the EL client
el_log_formatstringtextLog format for the EL client
el_bor_produce_witnessboolfalseAllow bor to start producing witnesses
el_bor_sync_with_witnessboolfalseEnable bor to sync new blocks using witnesses
el_bor_stateless_parallel_importboolfalseEnable bor to use parallel import in stateless mode (requires el_bor_sync_with_witness)
countint1Number of nodes to spin up for this participant

setup_images

FieldTypeDefaultDescription
contract_deployerstringghcr.io/0xpolygon/pos-contract-deployer:d96d592Image used to deploy MATIC contracts to L1
el_genesis_builderstringghcr.io/0xpolygon/pos-el-genesis-builder:96a19ddImage used to create the L2 EL genesis file
validator_config_generatorstringghcr.io/0xpolygon/pos-validator-config-generator:0.6.0Image used to generate validator configs

network_params

tip

You can check the admin private key and mnemonic default values at src/config/input_parser.star.

FieldTypeDefaultDescription
admin_private_keystring0xd403...60eaPrivate key used to deploy Polygon PoS contracts on both L1 and L2
preregistered_validator_keys_mnemonicstringsibling lend braveMnemonic for validator keystores
validator_stake_amount_ethint10000Amount of ether to stake for each validator
validator_top_up_fee_amount_ethint2000Top up fee amount in ether for each validator
cl_chain_idstringheimdall-4927CL network ID
cl_environmentstring-CL environment: mainnet, mumbai, or local (optional)
cl_span_poll_intervalstring5sSpan poll interval on the CL chain
cl_checkpoint_poll_intervalstring5sCheckpoint poll interval on the CL chain
cl_max_age_num_blocksint100000Genesis evidence setting, useful to set smaller pruning intervals
el_chain_idstring"4927"EL network ID
el_block_interval_secondsint1Seconds per block on the EL chain
el_sprint_durationint16Duration of an EL sprint (blocks)
el_span_durationint128Duration of an EL span (blocks).
el_gas_limitint65_000_000EL gas limit
jaipur_fork_blockint0Block number for Jaipur hard fork activation
delhi_fork_blockint0Block number for Delhi hard fork activation
indore_fork_blockint0Block number for Indore hard fork activation
agra_fork_blockint0Block number for Agra hard fork activation
napoli_fork_blockint0Block number for Napoli hard fork activation
ahmedabad_fork_blockint0Block number for Ahmedabad hard fork activation
bhilai_fork_blockint0Block number for Bhilai hard fork activation
rio_fork_blockint256Block number for Rio hard fork activation
madhugiri_fork_blockint256Block number for Madhugiri hard fork activation
madhugiri_pro_fork_blockint256Block number for Madhugiri Pro hard fork activation
dandeli_fork_blockint256Block number for Dandeli hard fork activation
lisovo_fork_blockint256Block number for Lisovo hard fork activation
lisovo_pro_fork_blockint256Block number for Lisovo Pro hard fork activation

additional_services

The additional_services array lets you enable optional tools and utilities alongside your devnet. These are not configuration options themselves, but rather extra services you can include by listing their names in the array.

ServiceDescription
blockscoutBlockchain explorer for viewing blocks, transactions, and accounts - Coming soon
bridge_spammerBridge funds from L1 to L2 to simulate network load
ethstats_serverVisual interface for tracking network status
observabilityMonitoring stack: deploys Prometheus, Grafana, and Panoptichain
status_checkerPerform regular status checks to track and monitor the health of the network
tx_spammerSend transactions to the network to simulate load

ethstats_server_params

FieldTypeDefaultDescription
imagestringeurope-west2-docker.pkg.dev/prj-polygonlabs-devtools-dev/public/ethstats-server:9da2124Image used to deploy the ethstats server

status_checker_params

FieldTypeDefaultDescription
imagestringghcr.io/0xpolygon/status-checker:v0.2.9Image used to deploy the status checker