Skip to content

Commit 64f7da3

Browse files
committed
Make dev node runnable without environment settings
1 parent 1f7215e commit 64f7da3

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

doc/espresso-dev-node.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,27 @@ a complete Espresso network, such as `builder`, `sequencer`, `state_prover` etc.
55
light client contracts on alternative chains and running a separate prover for each which can be useful for testing
66
involving L3s. Developers can use dev node for development and testing.
77

8-
## Download
8+
## Running the Dev Node
99

1010
We highly recommend you to use our Docker image. You can run it from the command line:
1111

1212
```cmd
13-
docker run ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:main
13+
docker run -p 8770:8770 ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:main
1414
```
1515

16+
This command will run the minimal setup of the dev node with the default options. It will run an API server on port
17+
8770, which you can use to interact with the dev node in exactly the same way you would connect to a node in the real
18+
Espresso network. For example, hit http://localhost:8770/v0/status/metrics to check the status of the node and use
19+
http://localhost:8770/v0/availability to query blockchain data.
20+
1621
## Parameters
1722

23+
While the command above is sufficient to run the dev node with the default settings, there are many options for
24+
customizing the node, depending on what type of testing you are trying to do.
25+
1826
| Name | Type | Environment Variable | Default Value | Description |
1927
| ------------------------------- | --------------- | -------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20-
| `rpc_url` | `Option<Url>` | `ESPRESSO_SEQUENCER_L1_PROVIDER` | Automatically launched Anvil node if not provided. | The JSON-RPC endpoint of the L1. If not provided, an Anvil node will be launched automatically. |
28+
| `rpc_url` | `Option<Url>` | `ESPRESSO_SEQUENCER_L1_PROVIDER` | Automatically launched Anvil node if not provided. | The JSON-RPC endpoint of the L1. If not provided, an Anvil node will be launched automatically. |
2129
| `mnemonic` | `String` | `ESPRESSO_SEQUENCER_ETH_MNEMONIC` | `test test test test test test test test test test test junk` | Mnemonic for an L1 wallet. This wallet is used to deploy the contracts, so the account indicated by`ACCOUNT_INDEX` must be funded with ETH. |
2230
| `account_index` | `u32` | `ESPRESSO_DEPLOYER_ACCOUNT_INDEX` | `0` | Account index of the L1 wallet generated from`MNEMONIC`. Used when deploying contracts. |
2331
| `sequencer_api_port` | `u16` | `ESPRESSO_SEQUENCER_API_PORT` | Required | Port that the HTTP API will use. |

docker/espresso-dev-node.Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ RUN chmod +x /bin/launch-dev-node-with-postgres
2525
ENV ESPRESSO_SEQUENCER_API_PORT=8770
2626
HEALTHCHECK --interval=1s --timeout=1s --retries=100 CMD curl --fail http://localhost:${ESPRESSO_SEQUENCER_API_PORT}/status/block-height || exit 1
2727

28+
# A storage directory is required to run the node. Set one inside the container by default. For
29+
# persistence between runs, the user can optionally set up a volume mounted at this path.
30+
ENV ESPRESSO_SEQUENCER_STORAGE_PATH=/data/espresso
31+
2832
EXPOSE 8770
2933
EXPOSE 8771
3034
EXPOSE 8772

0 commit comments

Comments
 (0)