forked from ethereum/hive
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simulators (op): refactor - add bss client (#6)
* simulators (op): refactor - add bss client * clients (ops-l1): add batchsubmitter faucet * clients (op): rename for new build * simulators (op): update go mod
- Loading branch information
Showing
18 changed files
with
245 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM golang:1.18.0-alpine3.15 as builder | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
RUN git clone https://github.com/ethereum-optimism/optimistic-specs /app | ||
|
||
WORKDIR /app | ||
RUN make op-batcher | ||
|
||
FROM alpine:3.15 | ||
|
||
RUN apk add jq curl | ||
|
||
COPY --from=builder /app/op-batcher/bin/op-batcher /usr/local/bin | ||
COPY ./bss-entrypoint.sh /bss-entrypoint.sh | ||
COPY ./rollup.json /rollup.json | ||
|
||
RUN op-batcher --version 2>/dev/null | head -1 > /version.txt | ||
|
||
ENTRYPOINT ["/bin/sh", "/bss-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
set -exu | ||
|
||
# Generate the bss config. | ||
|
||
L2_URL="http://172.17.0.4:9545" | ||
|
||
# Grab the L2 genesis. We can use cURL here to retry. | ||
L2_GENESIS=$(curl \ | ||
--silent \ | ||
--fail \ | ||
--retry 10 \ | ||
--retry-delay 2 \ | ||
--retry-connrefused \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
--data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x0", false],"id":1}' \ | ||
$L2_URL) | ||
|
||
SEQUENCER_GENESIS_HASH="$(echo $L2_GENESIS | jq -r '.result.hash')" | ||
SEQUENCER_BATCH_INBOX_ADDRESS="$(cat /rollup.json | jq -r '.batch_inbox_address')" | ||
|
||
exec op-batcher \ | ||
--l1-eth-rpc=http://172.17.0.3:8545 \ | ||
--l2-eth-rpc=http://172.17.0.4:9545 \ | ||
--rollup-rpc=http://172.17.0.5:7545 \ | ||
--min-l1-tx-size-bytes=1 \ | ||
--max-l1-tx-size-bytes=120000 \ | ||
--poll-interval=1s \ | ||
--num-confirmations=1 \ | ||
--safe-abort-nonce-too-low-count=3 \ | ||
--resubmission-timeout=30s \ | ||
--mnemonic="test test test test test test test test test test test junk" \ | ||
--sequencer-hd-path="m/44'/60'/0'/0/2" \ | ||
--sequencer-history-db-filename="history_db.json" \ | ||
--sequencer-genesis-hash=$SEQUENCER_GENESIS_HASH \ | ||
--sequencer-batch-inbox-address=$SEQUENCER_BATCH_INBOX_ADDRESS \ | ||
--log-terminal=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bf7604d9d3a1c7748642b1b7b05c2bd219c9faa91458b370f85e5a40f3b03af7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
roles: | ||
- "ops-bss" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"genesis": { | ||
"l1": { | ||
"hash": "0x21837b23495539c19e4b85d3d115c740c677d2609480eb67c3b2bb218a3ffd8f", | ||
"number": 0 | ||
}, | ||
"l2": { | ||
"hash": "0x00574ae7ed85cf485dd148011ab78c138becdd65b3078bd46c94c55766c8fc7a", | ||
"number": 0 | ||
}, | ||
"l2_time": 1647573629 | ||
}, | ||
|
||
"block_time": 2, | ||
|
||
"max_sequencer_drift": 10, | ||
|
||
"seq_window_size": 2, | ||
|
||
"l1_chain_id": 900, | ||
|
||
"l2_chain_id": 901, | ||
|
||
"p2p_sequencer_address": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", | ||
|
||
"fee_recipient_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
|
||
"batch_inbox_address": "0xff00000000000000000000000000000000000002", | ||
|
||
"batch_sender_address": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", | ||
|
||
"deposit_contract_address": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dae4671006c60a3619556ace98eca6f6e092948d05b13070a27ac492a4fba419 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.