Skip to content

Commit b5bf0bd

Browse files
authored
Merge branch 'master' into stylus-docs-fundamentals
2 parents cc6d8db + a420eb7 commit b5bf0bd

37 files changed

Lines changed: 8446 additions & 2066 deletions

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ updates:
2121
update-types:
2222
- 'minor'
2323
- 'patch'
24+
ignore:
25+
# Keep @types/node aligned with the Node runtime declared in engines (22.x).
26+
# Major bumps ship type definitions for newer Node lines than we run, which
27+
# lets tsc approve APIs absent at runtime. Minor/patch updates still flow.
28+
- dependency-name: '@types/node'
29+
update-types: ['version-update:semver-major']
2430
commit-message:
2531
prefix: 'chore(deps)'
2632
include: 'scope'

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,23 @@ This part will update the glossary.
128128

129129
4. Commit your changes and open a PR.
130130

131+
### Update Nitro CLI flag reference
132+
133+
`docs/run-arbitrum-node/nitro/cli-flags-reference.mdx` is auto-generated from `scripts/data/nitro-cli-flags.json` by `scripts/generate-cli-reference.ts`. Do not edit the `.mdx` file by hand — your changes will be overwritten on the next regeneration.
134+
135+
To regenerate the reference after updating the JSON data file:
136+
137+
```shell
138+
yarn generate-cli-reference
139+
```
140+
141+
To verify the committed `.mdx` is in sync with the JSON data (used in CI):
142+
143+
```shell
144+
yarn generate-cli-reference --check
145+
```
146+
147+
The script also accepts `--output <path>` to write to a different location and `--nitro-path <path>` (or the `NITRO_REPO_PATH` env var) to point at a local Nitro checkout — useful when refreshing the JSON data against a specific Nitro version.
131148
### Restructuring docs (moving or renaming pages)
132149

133150
The tooling handles internal links, the moved file's own relative links, sidebar entries,
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: 'chainConfig reference'
3+
description: 'Reference list of chainConfig JSON parameters available when deploying or managing your Arbitrum chain.'
4+
content_type: reference
5+
sidebar_label: chainConfig reference
6+
---
7+
8+
The full `chainConfig` contains the standard Ethereum genesis/fork fields, but the [Chain SDK](https://github.com/OffchainLabs/arbitrum-chain-sdk)'s [`prepareChainConfig()`](https://github.com/OffchainLabs/arbitrum-chain-sdk/blob/main/src/prepareChainConfig.ts) only exposes a small subset for customization. Everything else is filled from hardcoded `defaults` and should not be changed.
9+
10+
When you call `prepareChainConfig`, you pass a `chainId` (top-level) and an `arbitrum` object where `InitialChainOwner` is required and the fields below are optional overrides.
11+
12+
**Example**:
13+
14+
```javascript
15+
import { prepareChainConfig } from '@arbitrum/chain-sdk';
16+
17+
const chainConfig = prepareChainConfig({
18+
chainId: 123_456,
19+
arbitrum: {
20+
InitialChainOwner: '0xYourChainOwnerAddress', // required
21+
// Optional overrides (defaults shown):
22+
InitialArbOSVersion: 51,
23+
DataAvailabilityCommittee: false,
24+
MaxCodeSize: 24576,
25+
MaxInitCodeSize: 49152,
26+
},
27+
});
28+
```
29+
30+
## Customizable fields (via `prepareChainConfig`)
31+
32+
| Field | Type | Description |
33+
| --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
34+
| `chainId` | `number` | **Required**. The unique chain ID for your chain. |
35+
| `InitialChainOwner` | `string` | **Required**. Address that owns the chain and holds upgrade/admin privileges. |
36+
| `InitialArbOSVersion` | `51` | The ArbOS version the chain launches with. |
37+
| `DataAvailabilityCommittee` | `false` | `false` = Rollup (L1 data posting); `true` = AnyTrust ([DAC](/launch-arbitrum-chain/chain-config/data-availability/dac-get-started.mdx)) |
38+
| `MaxCodeSize` | `24576` | Max deployed contract bytecode size in bytes (default matches Ethereum's EIP-170 limit). |
39+
| `MaxInitCodeSize` | `49152` | Max init/constructor code size in bytes (default matches EIP-3860). |
40+
41+
## Intentionally not customizable
42+
43+
`prepareChainConfig` deliberately excludes Arbitrum-specific fields so they keep their defaults:
44+
45+
| Field | Type | Description |
46+
| ----------------------- | ------- | -------------------------------------- |
47+
| `EnableArbOS` | `true` | Must stay enabled. |
48+
| `GenesisBlockNum` | `0` | Genesis block number. |
49+
| `AllowDebugPrecompiles` | `false` | Debug precompiles; must stay disabled. |
50+
51+
## Standard fields
52+
53+
:::warning For informational purposes only
54+
55+
The following fields are populated automatically from the SDK's hardcoded `defaults`. They are standard Ethereum genesis/fork-activation parameters and are **not** exposed for customization by `prepareChainConfig`.
56+
57+
**Changing these fields can produce an invalid or non-functional chain configuration**.
58+
59+
Leave them at their default values.
60+
61+
:::
62+
63+
| Field | Default | Description |
64+
| --------------------- | ------------- | ------------------------------------------------------ |
65+
| `homesteadBlock` | `0` | Block at which the Homestead fork activates. |
66+
| `daoForkBlock` | `null` | DAO fork block (disabled). |
67+
| `daoForkSupport` | `true` | Whether the chain supports the DAO fork rules. |
68+
| `eip150Block` | `0` | Activation block for EIP-150 (gas cost changes). |
69+
| `eip150Hash` | `0x0000…0000` | Hash associated with the EIP-150 fork. |
70+
| `eip155Block` | `0` | Activation block for EIP-155 (replay protection). |
71+
| `eip158Block` | `0` | Activation block for EIP-158 (state-clearing changes). |
72+
| `byzantiumBlock` | `0` | Activation block for the Byzantium fork. |
73+
| `constantinopleBlock` | `0` | Activation block for the Constantinople fork. |
74+
| `petersburgBlock` | `0` | Activation block for the Petersburg fork. |
75+
| `istanbulBlock` | `0` | Activation block for the Istanbul fork. |
76+
| `muirGlacierBlock` | `0` | Activation block for the Muir Glacier fork. |
77+
| `berlinBlock` | `0` | Activation block for the Berlin fork. |
78+
| `londonBlock` | `0` | Activation block for the London fork. |
79+
| `clique.period` | `0` | Clique PoA block period (seconds). |
80+
| `clique.epoch` | `0` | Clique PoA epoch length. |

docs/launch-arbitrum-chain/operate/batch-poster-troubleshooting.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ The [Monitoring tools and considerations](/launch-arbitrum-chain/operate/monitor
2727
- **Query the balance directly**: Use the parent chain RPC to check the batch poster EOA balance at regular intervals.
2828
- **Set up alerting**: Configure external monitoring (e.g., a balance-checking script, onchain monitoring service, or infrastructure alerting tool) to notify you when the balance drops below a threshold.
2929

30-
:::info Balance threshold guidance
30+
<VanillaAdmonition type="info" title="Balance threshold guidance">
3131

3232
There is no universally recommended balance threshold—the appropriate level depends on your parent chain's gas prices, your chain's batch posting frequency, and batch sizes. As a general approach, estimate your daily batch posting cost (number of batches per day multiplied by average gas cost per batch) and maintain a buffer of several days' worth of posting costs. Monitor actual spending over time and adjust accordingly.
3333

34-
:::
34+
</VanillaAdmonition>
3535

3636
### Funding strategy
3737

@@ -57,11 +57,11 @@ This error indicates that the parent chain node's mempool has rejected a transac
5757
2. **Review your queued transaction storage configuration**: If you're using DB or Redis storage, pending transactions accumulate and rely on RBF for inclusion. Consider whether your RBF schedule (`--node.batch-poster.data-poster.replacement-times` for non-blob batch poster, `--node.batch-poster.data-poster.blob-tx-replacement-times` for blob batch poster) is escalating fees quickly enough. See Queued transaction database selection for storage option details.
5858
3. **Consider Noop storage for parent chains without mempools**: If your parent chain is an Arbitrum chain or another chain without a traditional mempool, Noop storage avoids this issue entirely by waiting for each transaction receipt before submitting the next one.
5959

60-
:::info Mempool size limits
60+
<VanillaAdmonition type="info" title="Mempool size limits">
6161

6262
The exact mempool weight limits depend on the parent chain node’s configuration, not the batch poster itself. The batch poster does not control the parent chain node’s mempool size. If you are running your own parent chain node, consult its documentation for mempool configuration. If using a third-party RPC provider, the mempool limits are determined by the provider’s infrastructure.
6363

64-
:::
64+
</VanillaAdmonition>
6565

6666
## Batch posting backlog diagnosis
6767

@@ -83,11 +83,11 @@ A batch posting backlog occurs when the sequencer continues ordering transaction
8383
- **Check the sequencer's transaction backlog size**: As noted in the [Monitoring tools and considerations](/launch-arbitrum-chain/operate/monitoring.mdx) guide, a large and growing backlog can be a sign of network health issues.
8484
- **Review batch poster logs**: Look for error messages related to transaction submission failures, fee estimation errors, or the data poster pausing.
8585

86-
:::info Backlog metrics
86+
<VanillaAdmonition type="info" title="Backlog metrics">
8787

8888
The specific log messages and metrics that indicate a backlog depend on the Nitro node version and configuration. Operators should familiarize themselves with their node’s log output during normal operation so that deviations are easier to spot. Key log prefixes to watch for include `BatchPoster:` and `DataPoster:` entries.
8989

90-
:::
90+
</VanillaAdmonition>
9191

9292
### Resolution approaches
9393

@@ -109,19 +109,18 @@ This error appears when the data poster attempts to resubmit a batch posting tra
109109
- **Storage inconsistencies**: When using DB or Redis for queued transaction tracking, mismatches between the stored transaction state and the onchain state can cause resubmission failures. This can happen after a node restart if the storage wasn't cleanly synced.
110110
- **Parent chain rejection**: The parent chain node may reject the replacement transaction for various reasons—the replacement fee isn't high enough (must be at least 10% higher for standard RBF), the transaction format is invalid, or the parent chain node is experiencing issues.
111111

112-
:::info Error context
112+
<VanillaAdmonition type="info" title="Error context">
113113

114114
The exact phrasing and context of retry errors can vary across Nitro versions. The "failed to re-send transaction" message generally indicates an RBF attempt that didn't succeed. Check the surrounding log lines for more specific error details (for example, "nonce too low", "replacement transaction underpriced", or connection errors).
115115

116-
:::
116+
</VanillaAdmonition>
117117

118118
### Resolution
119119

120120
1. **Check if the original transaction was included**: Query the parent chain for the batch poster’s latest nonce and compare it to what the data poster expects. If the original transaction was already included, the retry error is benign—the data poster should recover automatically on the next cycle.
121121
2. **Review the queued transaction storage**: If using DB or Redis, the stored transaction state may be stale. A node restart typically resolves transient storage inconsistencies.
122122
3. **Check parent chain connectivity**: Ensure the batch poster can reliably reach the parent chain RPC. Intermittent connectivity causes retry failures.
123123
4. **Inspect RBF fee escalation**: If the error mentions “replacement transaction underpriced”, the fee increase between attempts may be insufficient. The parent chain typically requires at least a 10% fee increase for RBF. Review the `blob-tx-replacement-times` schedule—shorter intervals may not allow enough price movement between attempts.
124-
5. **Consider clearing storage as a last resort**: The `--node.batch-poster.data-poster.dangerous.clear-dbstorage` flag clears the queued transaction database on startup. Use this only when necessary, as it discards any tracked pending transactions. See the [Node key rotation guide](/launch-arbitrum-chain/operate/key-rotation.mdx) for context on when this flag is used.
125124

126125
## Quick reference
127126

docs/launch-arbitrum-chain/operate/key-rotation.mdx

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ content_type: how-to
1111

1212
This guide covers how to rotate keys for different roles in your Arbitrum Orbit chain: batch poster, validator/bonder, and Data Availability Servers (DAS).
1313

14-
:::warning Important Prerequisites
14+
<VanillaAdmonition type="warning" title="Important Prerequisites">
1515

1616
- **Backup**: Always back up your current configuration and private keys before starting
1717
- **Testing**: Test key rotation on a testnet environment first, if possible
1818
- **Downtime**: Plan for potential brief service interruptions during the rotation process
1919
- **Permissions**: Ensure you have the necessary permissions to call the required smart contract functions
2020

21-
:::
21+
</VanillaAdmonition>
2222

2323
## 1. Batch poster key rotation
2424

25-
:::danger Critical warning
25+
<VanillaAdmonition type="danger" title="Critical warning">
2626

2727
For sequencer nodes running both the sequencer and batch poster on the same server, you **must** first split them and then configure Redis for message synchronization. Failure to do so may cause chain reorganizations. Refer to the [High Availability Sequencer documentation](/launch-arbitrum-chain/run-a-node/high-availability-sequencer.mdx) for setup instructions.
2828

29-
:::
29+
</VanillaAdmonition>
3030

3131
### Prerequisites
3232

@@ -55,22 +55,12 @@ setBatchPosterManager(<new_address>)
5555
- Update your node configuration to use the new private key
5656
- Restart the batch poster service with the new configuration
5757

58-
#### 3. Handle potential mempool issues
59-
60-
If you encounter the error: `"posting this transaction will exceed max mempool size: transaction nonce: xxx, unconfirmed nonce: xx, max mempool size: xx"`
61-
62-
**Temporary fix**:
63-
64-
- Add the `--node.batch-poster.data-poster.dangerous.clear-dbstorage` flag
65-
- Restart the batch poster
66-
- **Remove this flag** before the next start
67-
68-
#### 4. Verify operation
58+
#### 3. Verify operation
6959

7060
- Monitor logs to confirm the new batch poster is successfully submitting batches
7161
- Check that transactions are processing normally
7262

73-
#### 5. Disable the old batch poster
63+
#### 4. Disable the old batch poster
7464

7565
```solidity
7666
setIsBatchPoster(<old_address>, false)
@@ -101,20 +91,12 @@ setValidator([<new_validator_address>], [true])
10191
- Update your validator node configuration to use the new private key
10292
- Restart the validator service
10393

104-
#### 3. Handle potential mempool issues
105-
106-
If you encounter the error: `"posting this transaction will exceed max mempool size: transaction nonce: xxx, unconfirmed nonce: xx, max mempool size: xx"`
107-
108-
- Add `--node.staker.data-poster.dangerous.clear-dbstorage` flag temporarily
109-
- Restart the validator
110-
- **Remove this flag** before the next start
111-
112-
#### 4. Verify the new validator operation
94+
#### 3. Verify the new validator operation
11395

11496
- Monitor that the new validator successfully posts bond transactions
11597
- Confirm that assertion and confirmation transactions are submitted successfully
11698

117-
#### 5. Disable the old validator
99+
#### 4. Disable the old validator
118100

119101
```solidity
120102
setValidator([<old_validator_address>], [false])
@@ -148,11 +130,11 @@ Call the following function on the `SequencerInbox` contract. The caller must be
148130
setValidKeyset(<new_keyset_bytes>)
149131
```
150132

151-
:::note
133+
<VanillaAdmonition type="note">
152134

153135
The `setValidKeyset` function takes the raw keyset bytes as its only parameter. The assumed-honest count is encoded within the keyset bytes themselves during keyset generation — it is not a separate contract parameter.
154136

155-
:::
137+
</VanillaAdmonition>
156138

157139
#### 3. Deploy new DAS servers
158140

@@ -173,16 +155,16 @@ Once the new DAS servers and keyset are fully verified, you can optionally inval
173155
invalidateKeysetHash(<old_keyset_hash>)
174156
```
175157

176-
:::note
158+
<VanillaAdmonition type="note">
177159

178160
After invalidating the old keyset, you **must** stop and restart the batch poster so it picks up the new keyset. If you skip this step, the batch poster will continue attempting to use the old (now invalid) keyset and fail to submit batches.
179161

180-
:::
162+
</VanillaAdmonition>
181163

182-
:::caution
164+
<VanillaAdmonition type="caution">
183165

184166
- You can obtain the old keyset hash from the `SetValidKeyset` event that was emitted when the old keyset was originally registered
185167
- Do **not** invalidate the old keyset until the new keyset is fully verified and the batch poster is successfully posting with the new DAS servers — invalidating prematurely can disrupt data availability for your chain
186168
- After invalidation, the old keyset can no longer be used to certify data availability certificates
187169

188-
:::
170+
</VanillaAdmonition>

0 commit comments

Comments
 (0)