Skip to content
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

Adding verifier docker-compose #280

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
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
102 changes: 102 additions & 0 deletions docker-compose.verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# TODO: COPY THIS OVER TO docker-compose.local.yml FOR YOUR OWN LOCAL CONFIG
version: "3"

services:

# Look at packages/rollup-core/README.md for info on configuration
microservices:
image: ethereumoptimism/rollup-services:latest

volumes:
- l1-node-data:/mnt/l1-node:rw
- l2-node-data:/mnt/l2-node:rw
environment:
# LOCAL ONLY!
- REBUILD=1 # Set this to 1 if you want to rebuild on startup. Leave unset if you don't want to!
- FETCH_DEPS= # Set this if you want to run `yarn` on startup to fetch dependencies. Leave unset otherwise!
- LOG_NEW_LINES=1 # Logs new lines instead of <\n>
# DATA CLEARING
- CLEAR_DATA_KEY=123 # Change this if you want to delete filesystem data on startup.
# Container
- STARTUP_WAIT_TIMEOUT=30 # The amount of times to attempt to connect to L2 geth before failing (set to -1 if not to wait for L2 geth).
# Logging
- DEBUG=info*,error*,warn*,debug* # The comma-separated logging patterns to match (common options are `error*`, `info*`, `warn*`, and `debug*`)
# Postgres
- POSTGRES_HOST=postgres # (Required) The host DNS entry / IP for the postgres DB
- POSTGRES_PORT=5432 # (Required) Should almost always be 5432
- POSTGRES_USER=verifier # (Required) The user to use to connect to the db
- POSTGRES_PASSWORD=verifier # (Required) The password to use to connect to the db
- POSTGRES_DATABASE=rollup # (Required) The database name to connect to (should be `rollup`)
- POSTGRES_CONNECTION_POOL_SIZE # The connection pool size for postgres (defaults to 20)
- POSTGRES_USE_SSL # Set to anything to indicate that SSL should be used in the connection
# L1 Node
- L1_NODE_INFURA_NETWORK=goerli # The Infura network for the connection to the L1 node
- L1_NODE_INFURA_PROJECT_ID=91981cfffb524ceca0c2e5b18905f9f5 # The Infura project ID for the connection to the L1 node
- L1_NODE_WEB3_URL # The URL of the L1 node
- FINALITY_DELAY_IN_BLOCKS=10 # The number of block confirmations required to consider a transaction final on L1
# L2 Node
- L2_NODE_WEB3_URL=http://optimistic_ethereum_node:8545 # The URL of the L2 node
# Shared Contracts
- CANONICAL_TRANSACTION_CHAIN_CONTRACT_ADDRESS=0x0c6E050b5BD95158F05D3170a1FF0B82bE4fa31f # (Required) The address of the CanonicalTransactionChain contract
- STATE_COMMITMENT_CHAIN_CONTRACT_ADDRESS=0xAFD51C92BB1cf26aDc98B629A64CC8692012dA70 # (Required) The address of the StateCommitmentChain contract
# L1 Chain Data Persister (needs Postgres & L1 Node vars above)
- L1_TO_L2_TRANSACTION_QUEUE_CONTRACT_ADDRESS=0xe4C83a4164FE00AE2d3eD00B7a6a1bE7a9D8680C # (Required) The address of the L1ToL2TransactionQueue contract
- SAFETY_TRANSACTION_QUEUE_CONTRACT_ADDRESS=0xAf5Cf86Bf8fC825fFE1b584c37511e8D746c1a89 # (Required) The address of the SafetyTransactionQueue contract
- L1_CHAIN_DATA_PERSISTER_DB_PATH=/mnt/l1-node # (Required) The filepath where to locate (or create) the L1 Chain Data Persister LevelDB database
- L1_EARLIEST_BLOCK=3426240 # (Required) The earliest block to sync on L1 to start persisting data
# L2 Chain Data Persister (needs Postgres & L2 Node vars above)
- L2_CHAIN_DATA_PERSISTER_DB_PATH=/mnt/l2-node # (Required) The filepath where to locate (or create) the L2 Chain Data Persister LevelDB database
# Geth Submission Queuer (needs Postgres vars above)
- IS_SEQUENCER_STACK= # (Required) Set if this is queueing Geth submissions for a sequencer (and not _just_ a verifier)
- GETH_SUBMISSION_QUEUER_PERIOD_MILLIS # The period in millis at which the GethSubmissionQueuer should attempt to queue an L2 Geth submission (defaults to 10,000)
# Queued Geth Submitter (needs Postgres & L2 Node vars above)
- SUBMIT_TO_L2_PRIVATE_KEY=0x8dcd66caf66a67f2ef66d808971efc54560eac459092aee43c07d76efae8a032 # (Required) The PK to use to sign batches to send to geth (deprecated)
- QUEUED_GETH_SUBMITTER_PERIOD_MILLIS # The period in millis at which the QueuedGethSubmitter should attempt to send L2 Geth submissions (defaults to 10,000)
# Fraud Detector
- FRAUD_DETECTOR_PERIOD_MILLIS # The period in millis at which the FraudDetector should run (defaults to 10,000)
- REALERT_ON_UNRESOLVED_FRAUD_EVERY_N_FRAUD_DETECTOR_RUNS # The number of runs after which a detected fraud, if still present, should re-alert (via error logs) (defaults to 10)
# Which Services to run (respective vars must be configured above)
- RUN_L1_CHAIN_DATA_PERSISTER=1 # Set to anything to run L1 Chain Data Persister
- RUN_L2_CHAIN_DATA_PERSISTER=1 # Set to anything to run L2 Chain Data Persister
- RUN_GETH_SUBMISSION_QUEUER=1 # Set to anything to run Geth Submission Queuer
- RUN_QUEUED_GETH_SUBMITTER=1 # Set to anything to run Queued Geth Submitter
- RUN_FRAUD_DETECTOR=1 # Set to anything to run Fraud Detector
# Sequencer-only Services
- RUN_CANONICAL_CHAIN_BATCH_CREATOR= # Set to anything to run Canonical Chain Batch Creator
- RUN_CANONICAL_CHAIN_BATCH_SUBMITTER= # Set to anything to run Canonical Chain Batch Submitter & Finalizer
- RUN_STATE_COMMITMENT_CHAIN_BATCH_CREATOR= # Set to anything to run State Commitment Chain Batch Creator
- RUN_STATE_COMMITMENT_CHAIN_BATCH_SUBMITTER= # Set to anything to run State Commitment Chain Batch Submitter & Finalizer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you leave these unset it doesn't cause any errors or anything right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope -- just left them in for more info.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!!!


postgres:
image: ethereumoptimism/postgres:latest
environment:
- POSTGRES_USER=verifier
- POSTGRES_PASSWORD=verifier
ports:
- 5432:5432

optimistic_ethereum_node:
image: ethereumoptimism/optimistic-ethereum-node:latest
volumes:
- l2-node-data:/mnt/l2-node/l2:rw
environment:
- CLEAR_DATA_KEY
- TARGET_GAS_LIMIT
- VOLUME_PATH=/mnt/l2-node/l2
- HOSTNAME=optimistic_ethereum_node
- PORT=8545
- NETWORK_ID=108
ports:
- 8545:8545

volumes:
l1-node-data:
l2-node-data: