diff --git a/arbitrum-docs/run-arbitrum-node/partials/run-full-node/_optional-orbit-sequencer-compatible-cli-partial.mdx b/arbitrum-docs/run-arbitrum-node/partials/run-full-node/_optional-orbit-sequencer-compatible-cli-partial.mdx new file mode 100644 index 0000000000..719f943563 --- /dev/null +++ b/arbitrum-docs/run-arbitrum-node/partials/run-full-node/_optional-orbit-sequencer-compatible-cli-partial.mdx @@ -0,0 +1,46 @@ +
+ +| Flag | Description | +| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | +| `--execution.rpc.classic-redirect=` | Redirects archive requests for pre-nitro blocks to this RPC of an Arbitrum Classic node with an archive database. Only for Arbitrum One. | ```suggestion | +| `--execution.rpc.classic-redirect=` | Redirects the archive requests for pre-nitro blocks to this RPC from an Arbitrum Classic node with an archive database. Only for Arbitrum One. | +| `--http.api` | Which APIs need to be opened over the HTTP-RPC interface. Default: `net,web3,eth,arb`. Add `debug` for tracing. | +| `--http.corsdomain` | Accepts cross origin requests from these comma-separated domains (browser enforced). | +| `--http.vhosts` | Accepts requests from these comma-separated virtual hostnames (server enforced). Default: `localhost`. Accepts `*`. | +| `--http.addr` | Address to bind RPC to. May require `0.0.0.0` for Docker networking. | +| `--execution.caching.archive` | Retains past block state. For archive nodes. | +| `--node.feed.input.url=` | Default: `wss://.arbitrum.io/feed`. ⚠️ One feed relay per datacenter is advised. See [feed relay guide](/run-arbitrum-node/sequencer/01-run-feed-relay.mdx). | +| `--execution.rpc.evm-timeout` | Default: `5s`. Timeout for `eth_call`. (`0` == no timeout). | +| `--execution.rpc.gas-cap` | Default: `50000000`. Gas cap for `eth_call`/`estimateGas`. (`0` = no cap). | +| `--execution.rpc.tx-fee-cap` | Default: `1`. Transaction fee cap (in ether) for RPC APIs. (`0` = no cap). | +| `--ipc.path` | Filename for IPC socket/pipe within datadir. Not supported on macOS. Note: the path is within the Docker container. | +| `--init.prune` | Prunes database before starting the node. It can be used for "full" or "validator" nodes. | +| `--init.url=""` | (Non-Orbit Nitro nodes only) URL to download the genesis database from. Required only for the first startup of an Arbitrum One node. Reference to [snapshots](https://snapshot.arbitrum.foundation/index.html) and [archive node guide](/run-arbitrum-node/more-types/01-run-archive-node.mdx). | +| `--init.download-path="/path/to/dir"` | (Non-Orbit Nitro nodes only) Temporarily saves the downloaded database snapshot. Defaults to `/tmp/`. Used with `--init.url`. | +| `--node.batch-poster.post-4844-blobs` | Boolean. Default: `false`. Used to enable or disable the posting of transaction data using Blobs to Ethereum mainnet. If using calldata is more expensive and the parent chain supports `EIP4844` blobs, the batch poster will use blobs when this flag is set to `true`. Can be set to `true` or `false`. | +| `--node.batch-poster.ignore-blob-price` | Boolean. Default: `false`. If the parent chain supports `EIP4844` blobs and `ignore-blob-price` is set to `true`, the batch poster will use `EIP4844` blobs even if using calldata is cheaper. Can be set to `true` or `false`. | +| `--execution.sequencer.enable` | Act as sequencer and post to L1. | +| `--execution.sequencer.enable-profiling` | Enable CPU profiling and tracing. | +| `--execution.sequencer.expected-surplus-hard-threshold` | If the expected surplus is lower than this value, new incoming transactions will be denied (default "default"). | +| `--execution.sequencer.expected-surplus-soft-threshold` | If the expected surplus is lower than this value, warnings are posted (default "default"). | +| `--execution.sequencer.forwarder.connection-timeout` | Total time to wait before cancelling connection (default 30s). | +| `--execution.sequencer.forwarder.idle-connection-timeout` | Time until idle connections are closed (default 1m0s). | +| `--execution.sequencer.forwarder.max-idle-connections` | Maximum number of idle connections to keep open (default `100`). | +| `--execution.sequencer.forwarder.redis-url` | The recommended Redis URL to use as target. | +| `--execution.sequencer.forwarder.retry-interval` | Minimal time between update retries (default 100ms). | +| `--execution.sequencer.forwarder.update-interval` | Forwarding target update interval (default 1s). | +| `--execution.sequencer.max-acceptable-timestamp-delta` | Maximum acceptable time difference between the local time and the latest L1 block's timestamp (default 1h0m0s). | +| `--execution.sequencer.max-block-speed` | Minimum delay between blocks (sets a maximum speed of block production) (default 250ms). | +| `--execution.sequencer.max-revert-gas-reject` | Maximum gas executed in a revert for the sequencer to reject the transaction instead of posting it (anti-DOS). | +| `--execution.sequencer.max-tx-data-size` | Maximum transaction size the sequencer will accept (default `95000`). | +| `--execution.sequencer.nonce-cache-size` | Size of the transaction sender nonce cache (default `1024`). | +| `--execution.sequencer.nonce-failure-cache-expiry` | Maximum time to wait for a predecessor before rejecting a transaction whose nonce is too high (default 1s). | +| `--execution.sequencer.nonce-failure-cache-size` | Number of transactions whose nonce is too high to keep in memory while waiting for their predecessor (default `1024`). | +| `--execution.sequencer.queue-size` | Size of the pending transaction queue (default `1024`). | +| `--execution.sequencer.queue-timeout` | Maximum time a transaction can wait in a queue (default 12s). | +| `--execution.sequencer.sender-whitelist` | Comma-separated allowlist of authorized senders (if empty, every sender is allowed). | +| `--node.delayed-sequencer.finalize-distance` | Number of blocks in the past L1 block for the transaction to be considered final. This value is ignored when using merge finality. Default: `20`. | +| `--node.delayed-sequencer.require-full-finality` | Whether to wait for full finality before sequencing delayed messages. | +| `--node.delayed-sequencer.use-merge-finality` | Whether to use The Merge's notion of finality before sequencing delayed messages (default to `true`). | + +
diff --git a/arbitrum-docs/run-arbitrum-node/sequencer/04-run-sequencer-node.mdx b/arbitrum-docs/run-arbitrum-node/sequencer/04-run-sequencer-node.mdx new file mode 100644 index 0000000000..b6828eaf28 --- /dev/null +++ b/arbitrum-docs/run-arbitrum-node/sequencer/04-run-sequencer-node.mdx @@ -0,0 +1,197 @@ +--- +title: 'How to run a normal sequencer node for an Orbit chain' +description: Learn how to run an normal Arbitrum orbit sequencer node on your local machine +author: Jason Wan +sme: Jason Wan +content_type: how-to +--- + +:::caution + +The following instructions are meant for Arbitrum Orbit chains only. This article only applies to test environments. If you need support to spin up a production Orbit chain, we recommend contacting a [provider](/launch-orbit-chain/third-party-integrations/third-party-providers#rollup-as-a-service-raas-providers). + +::: + +This how-to provides step-by-step instructions for running a sequencer node on your local machine. + +## Minimum hardware configuration + +The following is the minimum hardware configuration required to set up a Nitro full node (not archival): + +| Resource | Recommended | +| :----------- | :-------------------------------------------- | +| RAM | 16 GB | +| CPU | 4 core CPU (for AWS, a `t3 xLarge` instance) | +| Storage type | NVMe SSD drives are recommended | +| Storage size | Depends on the chain and its traffic overtime | + +Please note that: + +- These minimum requirements for RAM and CPU are recommended for nodes that process a small amount of RPC requests. For nodes that require processing multiple simultaneous requests, both RAM and number of CPU cores will need to be scaled with the amount of traffic being served. +- Single core performance is important. If the node is falling behind and a single core is 100% busy, it is recommended to update to a faster processor +- The minimum storage requirements will change over time as the chain grows. Using more than the minimum requirements to run a robust full node is recommended. + +## Recommended Nitro version + +:::caution + +Even though there are alpha and beta versions of the Arbitrum Nitro software, only release versions should be used when running your node. Running alpha or beta versions is not supported and might lead to unexpected behaviors. + +::: + +Latest Docker image: @@latestNitroNodeImage=offchainlabs/nitro-node:v3.5.5-90ee45c@@ + +## Required parameters + +### 1. Sequencer node parameters + +The following parameters are required to run a sequencer node: + +#### 1. Enable sequencer + +Enable the sequencer mode: + +```shell +--node.sequencer=true +``` + +#### 2. Make the node act as a sequencer and post to L1 + +Enable the sequencer execution: + +```shell +--execution.sequencer.enable=true +--execution.sequencer.max-tx-data-size=85000 +``` + +#### 3. Enable delayed sequencer + +Enable your node to read and include transactions from the parent chain delayed inbox. + +```shell +--node.delayed-sequencer.enable=true +--node.delayed-sequencer.use-merge-finality=false +--node.delayed-sequencer.finalize-distance=1 +``` + +#### 4. Enable batch poster + +Enable your node to send batches to the parent chain: + +```shell +--node.batch-poster.enable=true +--node.batch-poster.max-size=90000 +--node.batch-poster.parent-chain-wallet.private-key= +``` + +#### 4. Disable transaction forwarding + +Disable your sequencer's forwarding transactions, as the node will queue the transaction directly: + +```shell +--execution.forwarding-target="" +``` + +#### 5. Enable feed-out queued transactions + +Enable your node to feed out transactions so full node can receive queued transactions: + +```shell +--node.feed.output.enable=true +--node.feed.output.addr=0.0.0.0 +--node.feed.output.port= +``` + +#### 5. Connect the node to data availability servers + +Note: This step is only required in Anytrust mode. +Enable your node to send batches to DAS and get DACerts from them. + +```shell +--node.data-availability.enable=true +--node.data-availability.sequencer-inbox-address= +--node.data-availability.parent-chain-node-url= +--node.data-availability.rest-aggregator.enable=true +--node.data-availability.rest-aggregator.urls= +--node.data-availability.rpc-aggregator.enable=true +--node.data-availability.rpc-aggregator.assumed-honest=1 +--node.data-availability.rpc-aggregator.backends= +``` + +### 2. Putting it all together + +- When running a Docker image, an external volume should be mounted to persist the database across restarts. The mount point inside the Docker image should be `/home/user/.arbitrum` + +- Example: + + ```shell wordWrap=true + docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 @@latestNitroNodeImage=offchainlabs/nitro-node:v3.5.1-8f247fd@@ --node.sequencer=true --node.delayed-sequencer.enable=true --node.delayed-sequencer.use-merge-finality=false --node.delayed-sequencer.finalize-distance=1 --node.batch-poster.enable=true --node.batch-poster.max-size=90000 --node.batch-poster.parent-chain-wallet.private-key= --node.staker.enable=true --node.staker.strategy=MakeNodes --node.staker.parent-chain-wallet.private-key= --node.data-availability.enable=true --node.data-availability.sequencer-inbox-address= --node.data-availability.parent-chain-node-url= --node.data-availability.rest-aggregator.enable=true --node.data-availability.rest-aggregator.urls= --node.data-availability.rpc-aggregator.enable=true --node.data-availability.rpc-aggregator.assumed-honest=1 --node.data-availability.rpc-aggregator.backends= --execution.sequencer.enable=true --execution.sequencer.max-tx-data-size=85000 + ``` + + - Ensure that `/some/local/dir/arbitrum` already exists; otherwise, the directory might be created with `root` as owner, and the Docker container won't be able to write to it. + +- Json Example: + ```json + { + "node": { + "sequencer": true, + "delayed-sequencer": { + "enable": true, + "use-merge-finality": false, + "finalize-distance": 1 + }, + "batch-poster": { + "max-size": 90000, + "enable": true, + "parent-chain-wallet": { + "private-key": "" + } + }, + "feed": { + "output": { + "enable": true, + "addr": "0.0.0.0", + "port": "" + } + }, + "data-availability": { + "enable": true, + "sequencer-inbox-address": "0x55616A4D88Be0290D43a8AF7228c6700E709FBa6", + "parent-chain-node-url": "https://sepolia-rollup.arbitrum.io/rpc", + "rest-aggregator": { + "enable": true, + "urls": ["http://das-server:9877"] + }, + "rpc-aggregator": { + "enable": true, + "assumed-honest": 1, + "backends": "[{\"url\":\"http://das-server:9876\",\"pubkey\":\"YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\",\"signermask\":1}]" + } + } + }, + "execution": { + "forwarding-target": "", + "sequencer": { + "enable": true, + "max-tx-data-size": 85000 + } + } + } + ``` + +### Note on permissions + +- The Docker image is configured to run as non-root `UID 1000`. If you are running Linux or macOS and you are getting permission errors when trying to run the Docker image, run this command to allow all users to update the persistent folders: + +```shell +mkdir /data/arbitrum +chmod -fR 777 /data/arbitrum + +## Optional parameters + +Here's a list of the parameters that are most commonly used when running your Orbit sequencer node. You can also use the flag `--help` for a comprehensive list of available parameters. + +import OptionalOrbitSequencerCompatibleCLIFlagsPartial from '../partials/run-full-node/_optional-orbit-sequencer-compatible-cli-partial.mdx'; + + +``` diff --git a/website/sidebars.js b/website/sidebars.js index f8af24f794..8c1d3505cd 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -824,6 +824,11 @@ const sidebars = { label: 'Sequencer', collapsed: true, items: [ + { + type: 'doc', + id: 'run-arbitrum-node/sequencer/run-sequencer-node', + label: 'Run a sequencer node', + }, { type: 'doc', id: 'run-arbitrum-node/sequencer/run-feed-relay',