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 boba bnb testnet support #210

Merged
merged 9 commits into from
Jul 1, 2024
Merged
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
13 changes: 13 additions & 0 deletions .gitbook/contents/developer/node-operators/snapshot-downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ Always verify snapshots by comparing the sha256sum of the downloaded file to the
| ------ | ------------- | ----- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Geth | 2024-01-18 | 1.5MB | [Link](https://boba-db.s3.us-east-2.amazonaws.com/sepolia/boba-sepolia-geth-db-legacy.tgz) | `e8aa790f15e46bdd63cc6532c4b1df77d78cda83fcd6e55568317d23eeabc4c3` |

### BOBA Bnb Testnet (Archive Node)

| Client | Snapshot Date | Size | Download Link | Sha256sum |
| ------ | ------------- | ----- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Erigon | 2024-06-20 | 1016M | [Link](https://boba-db.s3.us-east-2.amazonaws.com/bnb-testnet/boba-bnb-testnet-erigon-snapshot-675077.tgz) | `f6c6fbc01296f24f3b3ae79b62c26bb9c3a4e6b577006618ac9deb367d6d0afa` |
| Geth | 2024-06-20 | 9.3GB | [Link](https://boba-db.s3.us-east-2.amazonaws.com/bnb-testnet/boba-bnb-testnet-geth-db.tgz) | `013f5aa881dcbdc424cfd5d80afef82a218bfc4cbcaf17160df9ff2b7fdd5c89` |

### BOBA Bnb Testnet (Legacy)

| Client | Snapshot Date | Size | Download Link | Sha256sum |
| ------ | ------------- | ----- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Geth | 2024-06-20 | 9.3GB | [Link](https://boba-db.s3.us-east-2.amazonaws.com/bnb-testnet/boba-bnb-testnet-geth-db-legacy.tgz) | `988e6f98bb06d15b3e379756e3c0a88fdc32037f33111d586d73cad749c57530` |

### Optimism Sepolia Testnet (Archive Node)

| Client | Snapshot Date | Size | Download Link | Sha256sum |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Our latest releases, notes and changelogs can be found on Github. `op-node` rele

These are the minimal required versions for the `op-node`, `op-erigon` and `op-geth` by network.

| Network | op-node | op-erigon | op-geth |
| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Network | op-node | op-erigon | op-geth |
| ---------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Boba Mainnet | [v1.6.3](https://github.com/bobanetwork/boba/releases/tag/v1.6.3) | [v1.1.5](https://github.com/bobanetwork/op-erigon/releases/tag/v1.1.5) | [v1.101308.1](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101308.1) |
| Boba Sepolia | [v1.6.5](https://github.com/bobanetwork/boba/releases/tag/v1.6.5) | [v1.1.7](https://github.com/bobanetwork/op-erigon/releases/tag/v1.1.7) | [v1.101308.1](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101308.1) |
| Op Mainnet | [v1.6.5](https://github.com/bobanetwork/boba/releases/tag/v1.6.5) | [v1.1.7](https://github.com/bobanetwork/op-erigon/releases/tag/v1.1.7) | [v1.101315.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) |
| Op Sepolia | [v1.6.5](https://github.com/bobanetwork/boba/releases/tag/v1.6.5) | [v1.1.7](https://github.com/bobanetwork/op-erigon/releases/tag/v1.1.7) | [v1.101315.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) |
| Boba Bnb Testnet | [v1.6.6](https://github.com/bobanetwork/boba/releases/tag/v1.6.6) | [v1.1.8](https://github.com/bobanetwork/op-erigon/releases/tag/v1.1.8) | [v1.101308.1](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101308.1) |

## [op-node v1.6.5](https://github.com/bobanetwork/boba/releases/tag/v1.6.5)

Expand Down
68 changes: 68 additions & 0 deletions boba-community/docker-compose-boba-bnb-testnet-geth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
version: '3.4'

# The geth db can be downloaded from
# https://boba-db.s3.us-east-2.amazonaws.com/bnb-testnet/boba-bnb-testnet-geth-db.tgz
# and extracted to the DATA_DIR

# The jwt-secret.txt file should be a random string of32 characters and should be kept secret.

# The p2p-node-key.txt is the private key used for the node to identify itself.

# The discovery and peerstore directories are used to store the peerstore and discovery data.

services:
l2:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:${GETH_VERSION:-v1.101308.1}
command: >
--datadir=/db
--networkid=9728
--http
--http.addr=0.0.0.0
--http.port=9545
--http.corsdomain=*
--http.vhosts=*
--authrpc.addr=0.0.0.0
--authrpc.port=8551
--authrpc.vhosts=*
--authrpc.jwtsecret=/config/jwt-secret.txt
--rollup.disabletxpoolgossip=true
--http.api=eth,debug,net,web3
--nodiscover
--syncmode=full
--maxpeers=0
--rollup.sequencerhttp=https://testnet.bnb.boba.network
ports:
- "9545:9545"
- "8551:8551"
volumes:
- ./jwt-secret.txt:/config/jwt-secret.txt
- DATA_DIR:/db
op-node:
depends_on:
- l2
image: us-docker.pkg.dev/boba-392114/bobanetwork-tools-artifacts/images/op-node:${OP_NODE_VERSION:-latest}
command: >
op-node
--l1=${ETH1_HTTP:-https://bsc-testnet.public.blastapi.io.co}
--l1.beacon.ignore=true
--l2=http://l2:8551
--l2.jwt-secret=/config/jwt-secret.txt
--network=boba-bnb-testnet
--rpc.addr=0.0.0.0
--rpc.port=8545
--plasma.enabled=false
# Optional flags
# These flags are optional and can be used to identify the node and store the peerstore and discovery data.
# We recommend adding these flags to your configuration to help identify your node and store the peerstore and discovery data.
# --p2p.ban.peers=false
# --p2p.priv.path=/config/p2p-node-key.txt
# --p2p.discovery.path=/p2p_discovery_db
# --p2p.peerstore.path=/p2p_peerstore_db
ports:
- "8545:8545"
volumes:
- ./jwt-secret.txt:/config/jwt-secret.txt
# - ./p2p-node-key.txt:/config/p2p-node-key.txt
# - ./discovery:/p2p_discovery_db
# - ./peerstore:/p2p_peerstore_db
restart: always
46 changes: 46 additions & 0 deletions boba-community/docker-compose-boba-bnb-testnet-legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3.4'

# The legacy geth can be downloaded from
# https://boba-db.s3.us-east-2.amazonaws.com/bnb-testnet/boba-bnb-testnet-geth-db-legacy.tgz
# and extracted to the DATA_DIR

# This service serves as the legacy chain before the migration
services:
legacy-l2:
image: bobanetwork/l2geth:v0.9.5
environment:
CHAIN_ID: '9728'
NETWORK_ID: '9728'
NO_USB: 'true'
NO_DISCOVER: 'true'
DATADIR: '/root/.ethereum'
GCMODE: 'archive'
IPC_DISABLE: 'true'
TARGET_GAS_LIMIT: '11000000'
USING_OVM: 'true'
RPC_ENABLE: 'true'
RPC_ADDR: '0.0.0.0'
RPC_PORT: '8545'
RPC_API: eth,net,rollup,web3,debug
RPC_CORS_DOMAIN: '*'
RPC_VHOSTS: '*'
WS: 'true'
WS_ADDR: '0.0.0.0'
WS_PORT: '8546'
WS_API: 'eth,net,rollup,web3'
WS_ORIGINS: '*'
ROLLUP_BACKEND: 'l2'
ROLLUP_VERIFIER_ENABLE: 'true'
ROLLUP_READONLY: 'true'
BLOCK_SIGNER_KEY: "6587ae678cf4fc9a33000cdbf9f35226b71dcc6a4684a31203241f9bcfd55d27"
BLOCK_SIGNER_ADDRESS: "0x00000398232E2064F896018496b4b44b3D62751F"
ROLLUP_ENFORCE_FEES: 'true'
TURING_CREDIT_ADDRESS: "0x4200000000000000000000000000000000000020"
L2_BOBA_TOKEN_ADDRESS: "0x4200000000000000000000000000000000000023"
BOBA_GAS_PRICE_ORACLE_ADDRESS: "0x4200000000000000000000000000000000000024"
ports:
- ${LEGACY_L2_HTTP_PORT:-8545}:8545
- ${LEGACY_L2_WS_PORT:-8546}:8546
volumes:
- DATA_DIR:/root/.ethereum
restart: always
65 changes: 65 additions & 0 deletions boba-community/docker-compose-boba-bnb-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: '3.4'

# The erigon db can be downloaded from
# https://boba-db.s3.us-east-2.amazonaws.com/bnb-testnet/boba-bnb-testnet-erigon-snapshot-675077.tgz
# and extracted to the DATA_DIR

# The jwt-secret.txt file should be a random string of32 characters and should be kept secret.

# The p2p-node-key.txt is the private key used for the node to identify itself.

# The discovery and peerstore directories are used to store the peerstore and discovery data.

services:
l2:
image: us-docker.pkg.dev/boba-392114/bobanetwork-tools-artifacts/images/op-erigon:${ERIGON_VERSION:-latest}
command: |
--datadir=/db
--chain=boba-bnb-testnet
--http.addr=0.0.0.0
--http.port=9545
--http.corsdomain=*
--http.vhosts=*
--authrpc.addr=0.0.0.0
--authrpc.port=8551
--authrpc.vhosts=*
--authrpc.jwtsecret=/config/jwt-secret.txt
--http.api=eth,debug,net,engine,web3
--txpool.gossip.disable=true
--rollup.sequencerhttp=https://testnet.bnb.boba.network
--db.size.limit=8TB
ports:
- "9545:9545"
- "8551:8551"
volumes:
- ./jwt-secret.txt:/config/jwt-secret.txt
- DATA_DIR:/db
op-node:
depends_on:
- l2
image: us-docker.pkg.dev/boba-392114/bobanetwork-tools-artifacts/images/op-node:${OP_NODE_VERSION:-latest}
command: >
op-node
--l1=${ETH1_HTTP:-https://bsc-testnet.public.blastapi.io.co}
--l1.beacon.ignore=true
--l2=http://l2:8551
--l2.jwt-secret=/config/jwt-secret.txt
--network=boba-bnb-testnet
--rpc.addr=0.0.0.0
--rpc.port=8545
--plasma.enabled=false
# Optional flags
# These flags are optional and can be used to identify the node and store the peerstore and discovery data.
# We recommend adding these flags to your configuration to help identify your node and store the peerstore and discovery data.
# --p2p.ban.peers=false
# --p2p.priv.path=/config/p2p-node-key.txt
# --p2p.discovery.path=/p2p_discovery_db
# --p2p.peerstore.path=/p2p_peerstore_db
ports:
- "8545:8545"
volumes:
- ./jwt-secret.txt:/config/jwt-secret.txt
# - ./p2p-node-key.txt:/config/p2p-node-key.txt
# - ./discovery:/p2p_discovery_db
# - ./peerstore:/p2p_peerstore_db
restart: always
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,6 @@ require (

replace github.com/ethereum/go-ethereum => github.com/ethereum-optimism/op-geth v1.101315.1-rc.4

replace github.com/ethereum-optimism/superchain-registry/superchain => github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240605155641-2cc1ec002da8
replace github.com/ethereum-optimism/superchain-registry/superchain => github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240621015329-5215351945d3

//replace github.com/ethereum/go-ethereum v1.13.5 => ../go-ethereum
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edY
github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88=
github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240605155641-2cc1ec002da8 h1:IKmpARKUiDMCChGeoJOXs8zD/h3fILANfhodpGaR0rk=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240605155641-2cc1ec002da8/go.mod h1:7xh2awFQqsiZxFrHKTgEd+InVfDRrkKVUIuK8SAFHp0=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240621015329-5215351945d3 h1:5p8H5G4WcaoTRacLqcB1S8mVUoESAmF5zpQhNK3xeo8=
github.com/bobanetwork/superchain-registry/superchain v0.0.0-20240621015329-5215351945d3/go.mod h1:7xh2awFQqsiZxFrHKTgEd+InVfDRrkKVUIuK8SAFHp0=
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
Expand Down
36 changes: 36 additions & 0 deletions op-node/chaincfg/chains_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func TestGetRollupConfig(t *testing.T) {
"oplabs-devnet-0-sepolia-dev-0": sepoliaDev0Cfg,
"boba-sepolia": bobaSepoliaCfg,
"boba-mainnet": bobaMainnetCfg,
"boba-bnb-testnet": bobaBnbTestnetCfg,
}

for name, expectedCfg := range configsByName {
Expand Down Expand Up @@ -211,6 +212,41 @@ var bobaMainnetCfg = rollup.Config{
ProtocolVersionsAddress: common.HexToAddress("0x0000000000000000000000000000000000000000"),
}

var bobaBnbTestnetCfg = rollup.Config{
Genesis: rollup.Genesis{
L1: eth.BlockID{
Hash: common.HexToHash("0x87063262e607919b1879aeca6a6652d2d601326518a58a0f85245c05b14f8666"),
Number: 41400663,
},
L2: eth.BlockID{
Hash: common.HexToHash("0x293763444b022de43fba94e90b95936ea0c360c02443379427c2f7b7fb21fe7e"),
Number: 675077,
},
L2Time: 1718920167,
SystemConfig: eth.SystemConfig{
BatcherAddr: common.HexToAddress("0xfcdd863d1d21f609f0c0737d07634b0b146ef266"),
Overhead: eth.Bytes32(common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000834")),
Scalar: eth.Bytes32(common.HexToHash("0x00000000000000000000000000000000000000000000000000000000000f4240")),
GasLimit: 30000000,
},
},
BlockTime: 2,
MaxSequencerDrift: 900,
SeqWindowSize: 3600,
ChannelTimeout: 300,
L1ChainID: big.NewInt(97),
L2ChainID: big.NewInt(9728),
BatchInboxAddress: common.HexToAddress("0xfff0000000000000000000000000000000009728"),
DepositContractAddress: common.HexToAddress("0xf48d08721d99e16d22cc704991c2ad064320ad5e"),
L1SystemConfigAddress: common.HexToAddress("0x5e0aa53122c29128fd1399998f7928f9bc603b27"),
RegolithTime: u64Ptr(1718920167),
CanyonTime: u64Ptr(1718920167),
DeltaTime: u64Ptr(1718920167),
EcotoneTime: u64Ptr(1718920168),
FjordTime: nil,
ProtocolVersionsAddress: common.HexToAddress("0x0000000000000000000000000000000000000000"),
}

func u64Ptr(v uint64) *uint64 {
return &v
}
11 changes: 9 additions & 2 deletions op-node/rollup/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ var OPStackSupport = params.ProtocolVersionV0{Build: [8]byte{}, Major: 6, Minor:
const (
pgnSepolia = 58008

bobaMainnet = 288
bobaSepolia = 28882
bobaMainnet = 288
bobaSepolia = 28882
bobaBnbTestnet = 9728
)

// LoadOPStackRollupConfig loads the rollup configuration of the requested chain ID from the superchain-registry.
Expand Down Expand Up @@ -68,6 +69,8 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
regolithTime = 1713302879
case bobaSepolia:
regolithTime = 1705600788
case bobaBnbTestnet:
regolithTime = 1718920167
}

cfg := &Config{
Expand Down Expand Up @@ -117,5 +120,9 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
if chainID == bobaMainnet {
cfg.ProtocolVersionsAddress = common.Address{}
}
if chainID == bobaBnbTestnet {
cfg.MaxSequencerDrift = 900
cfg.ProtocolVersionsAddress = common.Address{}
}
return cfg, nil
}
66 changes: 66 additions & 0 deletions packages/contracts-bedrock/deploy-config/boba-bnb-testnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"finalSystemOwner": "0xd3EdFbD01829c5A97B94B20F82DC17088Cc00031",
"portalGuardian": "0xd3EdFbD01829c5A97B94B20F82DC17088Cc00031",
"superchainConfigGuardian": "0xd3EdFbD01829c5A97B94B20F82DC17088Cc00031",
"controller": "0xd3EdFbD01829c5A97B94B20F82DC17088Cc00031",

"l1StartingBlockTag": "0x87063262e607919b1879aeca6a6652d2d601326518a58a0f85245c05b14f8666",

"l1ChainID": 97,
"l1BlockTime": 3,
"l2ChainID": 9728,
"l2BlockTime": 2,

"maxSequencerDrift": 900,
"sequencerWindowSize": 3600,
"channelTimeout": 300,

"p2pSequencerAddress": "0x747a375E6bea0735FC184a3A8FA0520435404347",
"batchInboxAddress": "0xfFf0000000000000000000000000000000009728",
"batchSenderAddress": "0xfcdd863d1d21f609f0c0737d07634b0b146ef266",

"l2OutputOracleSubmissionInterval": 900,
"l2OutputOracleStartingBlockNumber": 675077,
"l2OutputOracleStartingTimestamp": 1718920167,

"l2OutputOracleProposer": "0xd0d2cb0d7d1ab3d049b7bc1a928c66d83e68ab21",
"l2OutputOracleChallenger": "0xd3EdFbD01829c5A97B94B20F82DC17088Cc00031",

"finalizationPeriodSeconds": 12,

"proxyAdminOwner": "0xd3EdFbD01829c5A97B94B20F82DC17088Cc00031",
"baseFeeVaultRecipient": "0x0A4429E69FbddF6F2A0ACE9896f7D50b3ee93523",
"l1FeeVaultRecipient": "0x0A4429E69FbddF6F2A0ACE9896f7D50b3ee93523",
"sequencerFeeVaultRecipient": "0x0A4429E69FbddF6F2A0ACE9896f7D50b3ee93523",

"baseFeeVaultMinimumWithdrawalAmount": "0x0",
"l1FeeVaultMinimumWithdrawalAmount": "0x0",
"sequencerFeeVaultMinimumWithdrawalAmount": "0x0",
"baseFeeVaultWithdrawalNetwork": 1,
"l1FeeVaultWithdrawalNetwork": 1,
"sequencerFeeVaultWithdrawalNetwork": 1,

"gasPriceOracleOverhead": 2100,
"gasPriceOracleScalar": 1000000,

"governanceTokenSymbol": "OP",
"governanceTokenName": "Optimism",
"governanceTokenOwner": "0x0000000000000000000000000000000000000000",

"l2GenesisBlockGasLimit": "0x1C9C380",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",

"eip1559Denominator": 50,
"eip1559Elasticity": 6,
"eip1559DenominatorCanyon": 250,

"l1BobaTokenAddress": "0x0000000000000000000000000000000000000000",

"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",

"l2GenesisRegolithTimeOffset": "0x0",
"l2GenesisCanyonTimeOffset": "0x0",
"l2GenesisDeltaTimeOffset": "0x0",
"l2GenesisEcotoneTimeOffset": "0x1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
97
Loading
Loading