Skip to content

Commit

Permalink
Merge pull request #60 from OffchainLabs/use_v3.0
Browse files Browse the repository at this point in the history
use nitro 3.0 and arbos v30
  • Loading branch information
tsahee committed Jun 10, 2024
2 parents ed3cda6 + 22ecaea commit 94fe5a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 39 deletions.
36 changes: 2 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nitro Testnode

Nitro-testnode brings up a full environment for local nitro testing (with or without Stylus support) including a dev-mode geth L1, and multiple instances with different roles.
Nitro-testnode brings up a full environment for local nitro testing (with Stylus support) including a dev-mode geth L1, and multiple instances with different roles.

### Requirements

Expand All @@ -11,8 +11,6 @@ All must be installed in PATH.

## Using latest nitro release (recommended)

### Without Stylus support

Check out the release branch of the repository.

> Notice: release branch may be force-pushed at any time.
Expand All @@ -29,30 +27,12 @@ Initialize the node
```
To see more options, use `--help`.

### With Stylus support

Check out the stylus branch of the repository.
> Notice: stylus branch may be force-pushed at any time.
```bash
git clone -b stylus --recurse-submodules https://github.com/OffchainLabs/nitro-testnode.git
cd nitro-testnode
```

Initialize the node

```bash
./test-node.bash --init
```
To see more options, use `--help`.

## Using current nitro code (local compilation)

Check out the nitro or stylus repository. Use the test-node submodule of nitro repository.
Check out the nitro repository. Use the test-node submodule of nitro repository.

> Notice: testnode may not always be up-to-date with config options of current nitro node, and is not considered stable when operated in that way.
### Without Stylus support
```bash
git clone --recurse-submodules https://github.com/OffchainLabs/nitro.git
cd nitro/nitro-testnode
Expand All @@ -64,18 +44,6 @@ Initialize the node in dev-mode (this will build the docker images from source)
```
To see more options, use `--help`.

### With Stylus support
```bash
git clone --recurse-submodules https://github.com/OffchainLabs/stylus.git
cd stylus/nitro-testnode
```

Initialize the node in dev-mode (this will build the docker images from source)
```bash
./test-node.bash --init --dev
```
To see more options, use `--help`.

## Further information

### Working with docker containers
Expand Down
14 changes: 12 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ services:
sequencer:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8547:8547"
- "127.0.0.1:8548:8548"
Expand All @@ -168,6 +169,7 @@ services:
sequencer_b:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8647:8547"
- "127.0.0.1:8648:8548"
Expand All @@ -182,6 +184,7 @@ services:
sequencer_c:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8747:8547"
- "127.0.0.1:8748:8548"
Expand All @@ -196,6 +199,7 @@ services:
sequencer_d:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8847:8547"
- "127.0.0.1:8848:8548"
Expand All @@ -210,6 +214,7 @@ services:
staker-unsafe:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8047:8547"
- "127.0.0.1:8048:8548"
Expand All @@ -226,6 +231,7 @@ services:
poster:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8147:8547"
- "127.0.0.1:8148:8548"
Expand All @@ -241,6 +247,7 @@ services:
poster_b:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:9147:8547"
- "127.0.0.1:9148:8548"
Expand All @@ -256,6 +263,7 @@ services:
poster_c:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:9247:8547"
- "127.0.0.1:9248:8548"
Expand All @@ -271,6 +279,7 @@ services:
validator:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8247:8547"
- "127.0.0.1:8248:8548"
Expand All @@ -286,6 +295,7 @@ services:
l3node:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:3347:3347"
- "127.0.0.1:3348:3348"
Expand All @@ -301,12 +311,12 @@ services:
validation_node:
pid: host # allow debugging
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:8949:8549"
volumes:
- "config:/config"
command: --conf.file /config/validation_node_config.json
entrypoint: /usr/local/bin/nitro-val

scripts:
build: scripts/
Expand All @@ -318,9 +328,9 @@ services:
relay:
pid: host
image: nitro-node-dev-testnode
entrypoint: /usr/local/bin/nitro
ports:
- "127.0.0.1:9652:9652"
entrypoint: /usr/local/bin/relay
command: --chain.id 412346 --node.feed.input.url ws://sequencer:9642 --node.feed.output.port 9652

tokenbridge:
Expand Down
4 changes: 2 additions & 2 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function writeL2ChainConfig(argv: any) {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": false,
"InitialArbOSVersion": 11,
"InitialArbOSVersion": 30,
"InitialChainOwner": argv.l2owner,
"GenesisBlockNum": 0
}
Expand Down Expand Up @@ -377,7 +377,7 @@ function writeL3ChainConfig(argv: any) {
"EnableArbOS": true,
"AllowDebugPrecompiles": true,
"DataAvailabilityCommittee": false,
"InitialArbOSVersion": 11,
"InitialArbOSVersion": 30,
"InitialChainOwner": "0x0000000000000000000000000000000000000000",
"GenesisBlockNum": 0
}
Expand Down
2 changes: 1 addition & 1 deletion test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

NITRO_NODE_VERSION=offchainlabs/nitro-node:v2.3.3-6a1c1a7-dev
NITRO_NODE_VERSION=offchainlabs/nitro-node:v3.0.0-e6f81cb-dev
BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.0.0-c8db5b1

# This commit matches the v1.2.1 contracts, with additional fixes for rollup deployment script.
Expand Down

0 comments on commit 94fe5a7

Please sign in to comment.