Config
RollerConfig
RollerConfig
data structure is as follows:
Property | Type | Description |
---|---|---|
log_level | String | Roller logger level (error、warn、info、debug、trace). |
extern_logging_level | String | Extern module logger level (error、warn、info、debug、trace). |
chain_id | u64 | Chain identifier for rollup operations |
signer_provider | Option<String> | signer provider url. |
memory_db | bool | Is roller database in memory or not. |
mystiko | ConfigOptions | Mystiko config options. |
scheduler | RollerSchedulerConfig | Roller scheduler config. |
loader | RollerLoaderConfig | Roller data loader config. |
rollup | RollerRollupConfig | Roller rollup config. |
Mystiko ConfigOptions
ConfigOptions
data structure is as follows:
Property | Type | Description |
---|---|---|
file_path | Option<String> | Mystiko config file in local file path. |
is_testnet | Option<bool> | Is mystiko testnet or not. |
is_staging | Option<bool> | Is staging config or not. |
remote_base_url | Option<String> | Mystiko config file in remote web url. |
git_revision | Option<String> | Mystiko config file git revision. |
RollerSchedulerConfig
RollerSchedulerConfig
data structure is as follows:
Property | Type | Description |
---|---|---|
schedule_interval_ms | u64 | Specifies the scheduler execution interval in milliseconds. |
schedule_count | Option<u64> | Specifies the maximum number of retries allowed per scheduler execution. |
status_server_port | u16 | Specifies the TCP port used for querying the server status. |
RollerLoaderConfig
RollerLoaderConfig
data structure is as follows:
Property | Type | Description |
---|---|---|
config | LoaderConfig | Detailed configuration for the Mystiko data loader module. |
RollerRollupConfig
RollerRollupConfig
data structure is as follows:
Property | Type | Description |
---|---|---|
max_rollup_size | usize | Max rollup size. |
max_rollup_one_round | u32 | Max rollup transaction per scheduler execution. |
merkle_tree_height | u32 | Merkle tree height, default is 20 |
chains | HashMap<u64, RollerRollupChainConfig> | Roller rollup chain config. |
RollerRollupChainConfig
RollerRollupChainConfig
data structure is as follows:
Property | Type | Description |
---|---|---|
max_gas_price | u64 | Max gas price of rollup transaction |
force_rollup_block_count | Option<u64> | Optional threshold that forces a rollup based on delayed block count. |
gas_cost | HashMap<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
}
}
}
}