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: docs/content/docs/devnet/configuration.mdx
+62-50Lines changed: 62 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,45 +146,94 @@ The calculation produces deterministic UTxOs based on the genesis configuration.
146
146
147
147
## Protocol Parameters
148
148
149
-
Protocol parameters control transaction fees, size limits, script execution costs, and staking mechanics. Customize these to test edge cases or simulate different network conditions.
149
+
The devnet runs on Conway era and uses three genesis files with distinct parameter sets.
150
150
151
-
Modify protocol parameters within the genesis configuration:
151
+
### Genesis Type Definitions
152
+
153
+
The devnet package exports these types from `DevnetDefault`:
lovelacePerUTxOWord: 34482// Conway converts to coinsPerUtxoByte (÷8 = 4310.25)
209
+
};
210
+
171
211
const cluster =awaitDevnet.Cluster.make({
172
212
clusterName: "custom-protocol-devnet",
173
213
ports: { node: 3001, submit: 3002 },
174
-
shelleyGenesis: genesisConfig
214
+
shelleyGenesis: shelleyConfig,
215
+
alonzoGenesis: alonzoConfig
175
216
});
176
217
177
218
awaitDevnet.Cluster.start(cluster);
178
219
```
179
220
180
221
Common protocol parameter customizations:
181
222
182
-
-**minFeeA / minFeeB**: Control transaction fees. Lower values reduce costs for testing. Higher values test fee edge cases.
183
-
-**maxTxSize**: Increase for large transaction testing (multiple inputs/outputs, large datums). Decrease to test size limit errors.
184
-
-**maxBlockBodySize**: Control how many transactions fit in a block. Affects throughput testing.
185
-
-**coinsPerUTxOByte**: Minimum ADA required per UTxO. Affects multi-output transaction viability.
223
+
**ShelleyGenesis.protocolParams:**
224
+
-**minFeeA / minFeeB**: Transaction fee coefficient and constant
225
+
-**maxTxSize**: Maximum transaction size in bytes
226
+
-**maxBlockBodySize**: Maximum block size in bytes
227
+
-**keyDeposit / poolDeposit**: Stake credential and pool deposits
228
+
229
+
**AlonzoGenesis:**
230
+
-**lovelacePerUTxOWord**: UTxO cost. Conway runtime converts this to `coinsPerUtxoByte` (÷8). Default 34482 ≈ 4310 lovelace/byte
231
+
-**collateralPercentage**: Collateral % for script transactions (default: 150)
232
+
-**maxCollateralInputs**: Max collateral inputs (default: 3)
233
+
234
+
**Important**: The devnet runs Conway era. At runtime, the node uses `coinsPerUtxoByte` (from Alonzo's `lovelacePerUTxOWord`), not Shelley's legacy `minUTxOValue`.
186
235
187
-
The complete list of parameters is available in the `ShelleyGenesis` type definition. Refer to `DevnetDefault.ts` for all available fields and their defaults.
236
+
See the exported types `DevnetDefault.ShelleyGenesis`, `DevnetDefault.AlonzoGenesis`, and `DevnetDefault.ConwayGenesis` for complete definitions.
188
237
189
238
## Block Timing and Network Behavior
190
239
@@ -248,43 +297,6 @@ const genesisConfig = {
248
297
249
298
Most applications can ignore these parameters and use defaults. Adjust only when testing specific consensus or staking behaviors.
250
299
251
-
## Network Magic
252
-
253
-
Network magic identifies the network and prevents cross-network transaction replay. Devnet uses magic `42` by default to distinguish from testnet (1, 2) and mainnet (764824073).
254
-
255
-
Override network magic if testing network isolation or multi-network scenarios:
network: 12345, // Must match genesis networkMagic
277
-
provider: {
278
-
type: "kupmios",
279
-
kupoUrl: "http://localhost:1442",
280
-
ogmiosUrl: "http://localhost:1337"
281
-
},
282
-
wallet: { type: "seed", mnemonic: "..." }
283
-
});
284
-
```
285
-
286
-
Mismatched network magic causes address format incompatibilities and transaction validation failures.
287
-
288
300
## Complete Configuration Example
289
301
290
302
Combining all customization options for a comprehensive devnet:
@@ -446,8 +458,8 @@ With custom genesis configuration, you can now:
446
458
447
459
**Genesis UTxO not found**: Wait 3-5 seconds after cluster start for full initialization. Query timing matters for fast block configurations.
448
460
449
-
**Protocol parameter validation**: Some parameter combinations are invalid (e.g., `coinsPerUTxOByte` too low). Check cardano-node logs if startup fails.
461
+
**Protocol parameter validation**: Some parameter combinations are invalid (e.g., `lovelacePerUTxOWord` too low in Alonzo genesis). Check cardano-node logs if startup fails.
450
462
451
-
**Network magic mismatch**: Client network parameter must exactly match genesis `networkMagic`. Addresses won't validate with incorrect magic.
463
+
**Client network parameter**: Always use `network: 0` for devnet clients to create testnet-format addresses (addr_test...).
452
464
453
465
**Excessive funds**: While genesis supports arbitrary amounts, extremely large values may cause numeric overflow in some calculations. Stay under 45B ADA (total supply) per address.
0 commit comments