Commit 01a2e7d2 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

dtl: standardize config (#542)

* dtl: standardize config

* dtl: add changeset
parent 2973f433
---
"@eth-optimism/data-transport-layer": patch
---
Clean up config parsing to match CLI argument configuration
...@@ -23,32 +23,32 @@ interface Bcfg { ...@@ -23,32 +23,32 @@ interface Bcfg {
}) })
const service = new L1DataTransportService({ const service = new L1DataTransportService({
dbPath: config.str('dbPath', './db'), dbPath: config.str('db-path', './db'),
port: config.uint('serverPort', 7878), port: config.uint('server-port', 7878),
hostname: config.str('serverHostname', 'localhost'), hostname: config.str('server-hostname', 'localhost'),
confirmations: config.uint('confirmations', 35), confirmations: config.uint('confirmations', 35),
l1RpcProvider: config.str('l1RpcEndpoint'), l1RpcProvider: config.str('l1-rpc-endpoint'),
addressManager: config.str('addressManager'), addressManager: config.str('address-manager'),
pollingInterval: config.uint('pollingInterval', 5000), pollingInterval: config.uint('polling-interval', 5000),
logsPerPollingInterval: config.uint('logsPerPollingInterval', 2000), logsPerPollingInterval: config.uint('logs-per-polling-interval', 2000),
dangerouslyCatchAllErrors: config.bool( dangerouslyCatchAllErrors: config.bool(
'dangerouslyCatchAllErrors', 'dangerously-catch-all-errors',
false false
), ),
l2RpcProvider: config.str('l2RpcEndpoint'), l2RpcProvider: config.str('l2-rpc-endpoint'),
l2ChainId: config.uint('l2ChainId'), l2ChainId: config.uint('l2-chain-id'),
syncFromL1: config.bool('syncFromL1', true), syncFromL1: config.bool('sync-from-l1', true),
syncFromL2: config.bool('syncFromL2', false), syncFromL2: config.bool('sync-from-l2', false),
transactionsPerPollingInterval: config.uint( transactionsPerPollingInterval: config.uint(
'transactionsPerPollingInterval', 'transactions-per-polling-interval',
1000 1000
), ),
legacySequencerCompatibility: config.bool( legacySequencerCompatibility: config.bool(
'legacySequencerCompatibility', 'legacy-sequencer-compatibility',
false false
), ),
sentryDsn: config.str('sentryDsn'), defaultBackend: config.str('default-backend', 'l1'),
defaultBackend: config.str('defaultBackend', 'l1'), sentryDsn: config.str('sentry-dsn'),
}) })
await service.start() await service.start()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment