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

add proxyd, upgrade optimism to v1.7.7, change op-geth registry #39

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ await Deno.writeTextFile("out/predeploy.json", await fetchTemplate("templates/pr
await Deno.writeTextFile("out/docker-compose.yml", dockerComposeYml);
console.log("out/docker-compose.yml copied.");

await Deno.writeTextFile("out/proxyd.toml", await fetchTemplate("templates/proxyd.toml"));
console.log("out/proxyd.toml copied.");

const dotenv = Object.entries(env)
.filter(([k]) => envKeys.includes(k as typeof envKeys[number]))
.map(([k, v]) => `${k}=${v}`)
Expand Down
2 changes: 1 addition & 1 deletion genesis-init-predeploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/planetarium/op-geth:latest as op-geth
FROM ghcr.io/planetarium/op-geth:v1.101315.2 as op-geth

FROM buildpack-deps:scm as foundry
ARG TARGETARCH
Expand Down
5 changes: 3 additions & 2 deletions templates/docker-compose-blockscout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- blockscout-smart-contract-verifier
- blockscout-visualizer
- op-geth
- proxyd
volumes:
- ./data/blockscout/logs/:/app/logs/
- ./data/genesis:/genesis:ro
Expand All @@ -19,8 +20,8 @@
SUBNETWORK: L2 CHAIN ${L2_CHAIN_ID}
# LOGO: /images/blockscout_logo.svg
ETHEREUM_JSONRPC_VARIANT: geth
ETHEREUM_JSONRPC_HTTP_URL: http://op-geth:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://op-geth:8545/
ETHEREUM_JSONRPC_HTTP_URL: http://proxyd:8080/
ETHEREUM_JSONRPC_TRACE_URL: http://proxyd:8080/
DATABASE_URL: postgresql://postgres:@blockscout-postgres:5432/blockscout?ssl=false
# ETHEREUM_JSONRPC_TRANSPORT: http
# ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES: false
Expand Down
6 changes: 4 additions & 2 deletions templates/docker-compose-bundler.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
stackup-bundler:
container_name: stackup-bundler
image: stackupwallet/stackup-bundler:latest
image: stackupwallet/stackup-bundler:v0.6.47
ports:
- 4337:4337/tcp
depends_on:
op-geth:
condition: service_healthy
proxyd:
condition: service_started
environment:
ERC4337_BUNDLER_ETH_CLIENT_URL: http://op-geth:8545
ERC4337_BUNDLER_ETH_CLIENT_URL: http://proxyd:8080
ERC4337_BUNDLER_SUPPORTED_ENTRY_POINTS: ${ERC4337_ENTRYPOINT:-0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789}
ERC4337_BUNDLER_PRIVATE_KEY: ${ERC4337_BUNDLER_KEY}
ERC4337_BUNDLER_NATIVE_BUNDLER_COLLECTOR_TRACER: bundlerCollectorTracer
19 changes: 15 additions & 4 deletions templates/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:

op-geth:
container_name: op-geth
image: ghcr.io/planetarium/op-geth:latest
image: ghcr.io/planetarium/op-geth:v1.101315.2
volumes:
- ./data/op-geth:/data
- ./data/genesis:/genesis
Expand Down Expand Up @@ -65,7 +65,7 @@ services:

op-node:
container_name: op-node
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.7.5
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.7.7
volumes:
- ./data/op-node:/data
- ./data/genesis:/genesis
Expand Down Expand Up @@ -98,7 +98,7 @@ services:

op-batcher:
container_name: op-batcher
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher:v1.7.4
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher:v1.7.7
depends_on:
op-node:
condition: service_healthy
Expand All @@ -124,7 +124,7 @@ services:

op-proposer:
container_name: op-proposer
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer:v1.7.4
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer:v1.7.7
volumes:
- ./data/genesis:/genesis
depends_on:
Expand All @@ -140,3 +140,14 @@ services:
--l2oo-address=$$(cat /genesis/L2OutputOracleProxyAddress) \
--private-key=${PROPOSER_KEY} \
--l1-eth-rpc=${L1_RPC}

proxyd:
container_name: proxyd
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/proxyd:v4.6.0
depends_on:
op-geth:
condition: service_healthy
volumes:
- ./proxyd.toml:/etc/proxyd/proxyd.toml
ports:
- 8080:8080
90 changes: 90 additions & 0 deletions templates/proxyd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
ws_method_whitelist = [
"eth_subscribe",
"eth_call",
"eth_chainId"
]
ws_backend_group = "main"

[server]
rpc_host = "0.0.0.0"
rpc_port = 8080
ws_host = "0.0.0.0"
ws_port = 8085
max_body_size_bytes = 10485760
max_concurrent_rpcs = 1000
log_level = "info"

[backend]
response_timeout_seconds = 5
max_response_size_bytes = 5242880
max_retries = 3
out_of_service_seconds = 600
max_latency_threshold = "30s"
max_degraded_latency_threshold = "10s"
max_error_rate_threshold = 0.3

[backends]
[backends.node-1]
rpc_url = "http://op-geth:8545"
max_rps = 0
consensus_receipts_target = "eth_getBlockReceipts"

[backends.node-2]
rpc_url = "http://op-geth:8545"
max_rps = 0
consensus_receipts_target = "eth_getBlockReceipts"

[backend_groups]
[backend_groups.main]
backends = ["node-2", "node-1"]
consensus_aware = false

[backend_groups.sequencer]
backends = ["node-1"]

[rpc_method_mappings]
web3_clientVersion = "main"
web3_sha3 = "main"
net_version = "main"
net_peerCount = "main"
net_listening = "main"
eth_blockNumber = "main"
eth_call = "main"
eth_getBalance = "main"
eth_getStorageAt = "main"
eth_getTransactionCount = "main"
eth_getBlockTransactionCountByHash = "main"
eth_getBlockTransactionCountByNumber = "main"
eth_getUncleCountByBlockHash = "main"
eth_getUncleCountByBlockNumber = "main"
eth_getCode = "main"
eth_getBlockByHash = "main"
eth_getBlockByNumber = "main"
eth_getTransactionByBlockHashAndIndex = "main"
eth_getTransactionByBlockNumberAndIndex = "main"
eth_getUncleByBlockHashAndIndex = "main"
eth_getUncleByBlockNumberAndIndex = "main"
eth_newFilter = "main"
eth_newBlockFilter = "main"
eth_newPendingTransactionFilter = "main"
eth_uninstallFilter = "main"
eth_getFilterChanges = "main"
eth_getFilterLogs = "main"
eth_getLogs = "main"
eth_estimateGas = "main"
eth_gasPrice = "main"
eth_maxPriorityFeePerGas = "main"
eth_protocolVersion = "main"
eth_syncing = "main"
eth_coinbase = "main"
eth_mining = "main"
eth_hashrate = "main"
eth_chainId = "main"
eth_getBlockReceipts = "main"
debug_traceCall = "main"
debug_traceTransaction = "main"
txpool_content = "sequencer"
eth_sendTransaction = "sequencer"
eth_sendRawTransaction = "sequencer"
eth_getTransactionReceipt = "sequencer"
eth_getTransactionByHash = "sequencer"