You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,30 @@
3
3
## Local Development/Quick start
4
4
5
5
### With existing OP chain
6
-
The following steps have been tested on Sepolia, with a previously deployed L2 chain
6
+
7
+
The following steps have been tested on Sepolia, with a previously deployed L2 chain
8
+
7
9
1. locate your `rollup.json`, `genesis.json` and `state.json` files
8
10
2. run `make config-main-node OP_NODE_DATA_DIR=<path/to/op-node/data> OP_GETH_DATA_DIR=<path/to/op-geth/data> ROLLUP_JSON=<path/to/rollup.json> GENESIS_JSON=<path/to/genesis.json> STATE_JSON=<path/to/state.json>`
9
11
3. there should be some files set up in `.local_main_node`
10
12
4. start sequencing the main chain with `make start-main-node OP_BATCHER_KEY=<op-batcher-private-key> OP_PROPOSER_KEY=<op-proposer-private-key> MAIN_KEY=<vault-key/main-sequencing key>`
11
13
5. Normally you should see some logs starting
12
-
6.`blockscout` should be up and running at `http://0.0.0.0:4000`
13
-
7a. `make stop-main-node` to stop all the sequencing services
14
-
7b. `make stop-monitoring` to stop all monitoring services (Grafana, Prometheus, etc)
15
-
7c. `make logs-main-node` to output logs of all the main services
14
+
6.`blockscout` should be up and running at `http://0.0.0.0:4000`
15
+
7a. `make stop-main-node` to stop all the sequencing services
16
+
7b. `make stop-monitoring` to stop all monitoring services (Grafana, Prometheus, etc)
17
+
7c. `make logs-main-node` to output logs of all the main services
16
18
17
19
### Deploy a new l2 chain on Sepolia
20
+
18
21
1. To deploy a new chain on l2, make sure to have an address on Sepolia with some funds. This will be used as the `MAIN`/`vault` address.
19
22
2. create 2 more accounts, deposit ~0.2 eth in them. One will be used for the `op-batcher` one for the `op-proposer.
4. start sequencing the main chain with `make start-main-node OP_BATCHER_KEY=<op-batcher-private-key> OP_PROPOSER_KEY=<op-proposer-private-key> MAIN_KEY=<vault-key/main-sequencing key> L1_RPC_URL=<sepolia rpc url> L1_BEACON_RPC_URL=<sepolia beacon rpc url>`
22
25
5. Normally you should see some logs starting
23
-
6.`blockscout` should be up and running at `http://0.0.0.0:4000`
24
-
7a. `make stop-main-node` to stop all the sequencing services
25
-
7b. `make stop-monitoring` to stop all monitoring services (Grafana, Prometheus, etc)
26
-
7c. `make logs-main-node` to output logs of all the main services
26
+
6.`blockscout` should be up and running at `http://0.0.0.0:4000`
27
+
7a. `make stop-main-node` to stop all the sequencing services
28
+
7b. `make stop-monitoring` to stop all monitoring services (Grafana, Prometheus, etc)
29
+
7c. `make logs-main-node` to output logs of all the main services
27
30
28
31
### Run a Based Gateway
29
32
@@ -46,36 +49,36 @@ The configuration that was generated can be found in `based-op/.local_gateway_an
46
49
When you [spam some transactions with `based-bmf`](https://based-bmf.gattaca.com), you should see them appear in the `Transaction Pool` of your `Gateway`.
47
50
48
51
A couple of commands tend to come in handy (from the top `based-op` directory):
52
+
49
53
-`make stop-gateway`
50
54
-`make start-gateway`
51
55
-`make start-overseer`
52
56
-`make logs-gateway`
53
57
-`make logs-based-op-node`
54
58
-`make logs-based-op-geth`
55
59
56
-
57
60
### Add/Update based-gateways to Registry
61
+
58
62
When a based-gateway is started with `make start-gateway`, it will register itself to the Registry behind the `PORTAL`. For now, the Registry is kept in a simple json file in `.local_main_node/config/registry.json`. You can add/update/remove gateways there, the Registry and Portal will pick up on the changes every minute.
59
63
60
64
If you have started both the main sequencing node and the gateway on the same machine, you might need to change the ip to `0.0.0.0`, by default `curl ifconfig.me` is used to populate
61
65
your url.
62
66
63
67
### Send your first tx
68
+
64
69
You can now test sending a transaction with `make test-tx`.
65
70
The transaction will be sent to the Portal, and forwarded to the gateway, which will sequence the transaction in a new Frag, and broacast it via p2p to follower nodes.
66
71
67
-
68
72
> [!IMPORTANT]
69
73
>
70
74
> **The following is experimental**
71
-
>
72
75
73
76
## Wallets
74
77
75
78
Wallets commonly use a high polling interval for the transaction receipt. To be able to see the preconfirmation speed, we modify Rabby to speed up that interval. You can test it compiling it:
76
79
77
80
```sh
78
-
make build-rabby
81
+
make build-rabby-chrom
79
82
```
80
83
81
84
And importing it to your browser locally (see [Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/) or [Chrome](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world?hl=es-419#load-unpacked) references). The compiled extension directory is `rabby/dist` for Google Chrome, and `rabby/dist-mv2` for Mozilla Firefox.
| Block Explorer |https://based-explorer.gattaca.com/|
14
+
| Break My Frags |https://based-bmf.gattaca.com/|
15
15
16
16
## Break My Frags
17
17
@@ -22,12 +22,13 @@ generated with a small amount of Eth deposited to it. Transactions can then be g
22
22
23
23
Our current testnet setup is mainly focused on robustness and thorough testing of different scenarios.
24
24
As such it is structrured as follows:
25
+
25
26
- A vanilla `op-node` and `op-geth`, with a `Portal` in between, are driving the chain forward on a box in Europe.
26
27
- Multiple sequencing `Gateways` are setup to take turns sequencing a number of future blocks
27
-
- On the same box
28
-
- In the same region
29
-
- In the US east region
30
-
- A varying number in the UK on WiFi
28
+
- On the same box
29
+
- In the same region
30
+
- In the US east region
31
+
- A varying number in the UK on WiFi
31
32
-`Gateways` gossip `Frags`, i.e. ~`200ms` partial blocks that have been committed to
32
33
- The `Gateway` on the same box as the main `op-node` and `op-geth` serves as the main RPC
33
34
- Txs are gossiped around, `Frags` arrive back, and the `Gateway` serves `Receipts` based on those
@@ -37,17 +38,20 @@ This setup means that the total latency to receive `Receipts` will vary dependin
37
38
- 80-150 ms on the same box
38
39
- 200-350 ms for same region
39
40
- 500-700 ms when in different regions
40
-
- 200-700 ms for the last category of `Gateways`, depending on the WiFi
41
+
- 200-700 ms for the last category of `Gateways`, depending on the WiFi
41
42
42
43
## Run a local Gateway
43
44
44
45
### Prerequisites
46
+
45
47
You will need a box with globally open ports:
46
-
- 9997 (tcp)
47
-
- 9103 (tcp/udp)
48
+
49
+
- 9997 (tcp)
50
+
- 9103 (tcp/udp)
48
51
- 31303 (tcp/udp)
49
52
50
53
### Gateway Setup
54
+
51
55
In the following, all defaults are set up to target the [`Based OP` testnet](https://based-explorer.gattaca.com), deployed on top of mainnet Sepolia.
52
56
With that default config, a new `private-key` and `wallet` combo will be generated which your `Gateway` will use to sign `Frags`.
53
57
The `wallet` is communicated back to the `Portal` to be gossiped around to the rest of the network for signature verification.
@@ -65,6 +69,7 @@ The configuration that was generated can be found in `based-op/.local_gateway_an
65
69
When you [spam some transactions with `based-bmf`](https://based-bmf.gattaca.com), you should see them appear in the `Transaction Pool` of your `Gateway`.
66
70
67
71
A couple of commands tend to come in handy (from the top `based-op` directory):
72
+
68
73
-`make stop-gateway`
69
74
-`make start-gateway`
70
75
-`make start-overseer`
@@ -84,7 +89,7 @@ Wallets commonly use a high polling interval for the transaction receipt. To be
84
89
You can test it by compiling it:
85
90
86
91
```sh
87
-
make build-rabby
92
+
make build-rabby-chrom
88
93
```
89
94
90
95
And importing it to your browser locally (see [Firefox](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/) or [Chrome](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked) references). The compiled extension directory is `rabby/dist` for Google Chrome, and `rabby/dist-mv2` for Mozilla Firefox.
@@ -108,11 +113,11 @@ To manually add the network, follow these steps:
108
113

109
114
110
115
4. Fill in the form with the following values:
111
-
- Chain ID: `29866`
112
-
- Network Name: `Based-OP`
113
-
- RPC URL: `https://based-rpc.gattaca.com`
114
-
- Currency Symbol: `opETH`
115
-
- Block Explorer URL: `https://based-explorer.gattaca.com/`
116
+
- Chain ID: `29866`
117
+
- Network Name: `Based-OP`
118
+
- RPC URL: `https://based-rpc.gattaca.com`
119
+
- Currency Symbol: `opETH`
120
+
- Block Explorer URL: `https://based-explorer.gattaca.com/`
116
121
117
122

118
123
@@ -125,4 +130,3 @@ To manually add the network, follow these steps:
125
130

126
131
127
132
You can now use the wallet to interact with the Based-OP devnet.
0 commit comments