Skip to main content

Config

RollerConfig

RollerConfig data structure is as follows:

PropertyTypeDescription
log_levelString
Roller logger level (error、warn、info、debug、trace).
extern_logging_levelString
Extern module logger level (error、warn、info、debug、trace).
chain_idu64
Chain identifier for rollup operations
signer_providerOption<String>
signer provider url.
memory_dbbool
Is roller database in memory or not.
mystikoConfigOptions
Mystiko config options.
schedulerRollerSchedulerConfig
Roller scheduler config.
loaderRollerLoaderConfig
Roller data loader config.
rollupRollerRollupConfig
Roller rollup config.

Mystiko ConfigOptions

ConfigOptions data structure is as follows:

PropertyTypeDescription
file_pathOption<String>
Mystiko config file in local file path.
is_testnetOption<bool>
Is mystiko testnet or not.
is_stagingOption<bool>
Is staging config or not.
remote_base_urlOption<String>
Mystiko config file in remote web url.
git_revisionOption<String>
Mystiko config file git revision.

RollerSchedulerConfig

RollerSchedulerConfig data structure is as follows:

PropertyTypeDescription
schedule_interval_msu64
Specifies the scheduler execution interval in milliseconds.
schedule_countOption<u64>
Specifies the maximum number of retries allowed per scheduler execution.
status_server_portu16
Specifies the TCP port used for querying the server status.

RollerLoaderConfig

RollerLoaderConfig data structure is as follows:

PropertyTypeDescription
configLoaderConfig
Detailed configuration for the Mystiko data loader module.

RollerRollupConfig

RollerRollupConfig data structure is as follows:

PropertyTypeDescription
max_rollup_sizeusize
Max rollup size.
max_rollup_one_roundu32
Max rollup transaction per scheduler execution.
merkle_tree_heightu32
Merkle tree height, default is 20
chainsHashMap<u64, RollerRollupChainConfig>
Roller rollup chain config.

RollerRollupChainConfig

RollerRollupChainConfig data structure is as follows:

PropertyTypeDescription
max_gas_priceu64
Max gas price of rollup transaction
force_rollup_block_countOption<u64>
Optional threshold that forces a rollup based on delayed block count.
gas_costHashMap<usize, u64>
Maps each rollup size to its corresponding gas cost.

Example of JSON config

The following is an example of json configuration (roller.json)

{
"log_level": "info",
"extern_logging_level": "error",
"chain_id": 1,
"mystiko": {
"is_testnet": false,
"is_staging": false
}
"scheduler": {
"schedule_interval_ms": 30000
},
"loader": {
"config": {
"fetchers": {
"1": "FETCHER_TYPE_PACKER",
"3": "FETCHER_TYPE_ETHERSCAN",
"4": "FETCHER_TYPE_PROVIDER"
},
"validators": {
"0": "VALIDATOR_TYPE_RULE"
},
"fetcher_config": {
"etherscan": {
"chains": {
"84531": {
"delay_num_blocks": "4"
}
}
},
"provider": {
"chains": {
"84531": {
"delay_num_blocks": "4"
}
}
}
},
"validator_config": {
"rule": {
"checkers": {
"0": "RULE_VALIDATOR_CHECKER_TYPE_INTEGRITY",
"1": "RULE_VALIDATOR_CHECKER_TYPE_SEQUENCE",
"2": "RULE_VALIDATOR_CHECKER_TYPE_COUNTER"
}
}
}
}
},
"rollup": {
"merkle_tree_height": 20,
"chains": {
"1": {
"max_gas_price": 100000000000,
"force_rollup_block_count": 60,
"gas_cost": {
"1": 331000,
"2": 336000,
"4": 340000,
"8": 360000,
"16": 410000
}
},
"56": {
"max_gas_price": 20000000000,
"force_rollup_block_count": 120,
"gas_cost": {
"1": 331000,
"2": 336000,
"4": 340000,
"8": 360000,
"16": 410000
}
},
"137": {
"max_gas_price": 1000000000000,
"force_rollup_block_count": 120,
"gas_cost": {
"1": 331000,
"2": 336000,
"4": 340000,
"8": 360000,
"16": 410000
}
}
}
}