mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-06-07 10:46:45 +00:00
Compare commits
1 Commits
fix_links_
...
add-parall
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
476e536a54 |
@@ -1,19 +1,35 @@
|
||||
---
|
||||
html: test-amendments.html
|
||||
parent: use-stand-alone-mode.html # "Testing and Auditing"
|
||||
parent: use-stand-alone-mode.html
|
||||
seo:
|
||||
description: You can test proposed amendments before they're enabled on the network.
|
||||
labels:
|
||||
- Core Server
|
||||
- Blockchain
|
||||
---
|
||||
# Test Amendments
|
||||
|
||||
You can test how the `rippled` server behaves, before amendments are fully enabled on Mainnet, using one of the following approaches:
|
||||
|
||||
You can test how `rippled` behaves before proposed amendments are fully enabled on the production network. Since other members of the consensus network won't have the feature enabled, run your server in stand-alone mode.
|
||||
- **Connect to Devnet:** Devnet runs beta `rippled` releases and is the public network where new amendments are previewed before reaching Mainnet.
|
||||
- **Stand-Alone Mode:** Run a single `rippled` server in offline mode with the amendment forced on. Does not connect to the peer-to-peer network or use consensus.
|
||||
- **Private Test Network:** Initialize a self-hosted network with multiple validators where you control how amendments activate.
|
||||
|
||||
{% admonition type="warning" name="Caution" %}This is intended for development purposes only.{% /admonition %}
|
||||
## Connect to Devnet
|
||||
|
||||
To forcibly enable a feature, add a `[features]` stanza with amendment short names to your `rippled.cfg` file. Each amendment needs its own line.
|
||||
To test an amendment already enabled on Devnet, connect to it directly without setting up your own validators or local server.
|
||||
|
||||
Follow [Connect Your rippled to a Parallel Network](../configuration/connect-your-rippled-to-the-xrp-test-net.md), but be sure to skip the `[features]` stanza described in [step 3](../configuration/connect-your-rippled-to-the-xrp-test-net.md#3-enable-or-disable-features). Devnet has its own amendment state, and forcing features causes your server to diverge from the network.
|
||||
|
||||
Once connected, confirm the amendment is active by inspecting `Amendments` via the [ledger_entry method][].
|
||||
|
||||
## Stand-Alone Mode
|
||||
|
||||
To test locally without setting up validators or connecting to a network, run your server in [stand-alone mode](start-a-new-genesis-ledger-in-stand-alone-mode.md) with the amendment forced on.
|
||||
|
||||
{% admonition type="warning" name="Caution" %}This approach uses the `[features]` stanza to force amendments on. Do not use `[features]` while connected to Mainnet, Testnet, or Devnet. Forcing different features than other validators can cause your server to diverge from the network.{% /admonition %}
|
||||
|
||||
Two stanzas in `rippled.cfg` interact with amendments: `[amendments]` records which amendments a server votes to support, while `[features]` forces specific features to be treated as enabled, only on the local server. Add a `[features]` stanza with one amendment short name per line:
|
||||
|
||||
{% tabs %}
|
||||
|
||||
@@ -26,3 +42,64 @@ TrustSetAuth
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
To confirm the amendment is active, query the [server_info method][] and look for the amendment under `validated_ledger.features`.
|
||||
|
||||
## Private Test Network
|
||||
|
||||
To test an amendment under multi-validator consensus on a [private network](run-private-network-with-docker.md), you can either enable it at the genesis ledger or compress the standard two-week voting timer. Enabling skips the activation flow entirely, while compressing the timer lets you exercise it on a shorter schedule.
|
||||
|
||||
If your private network uses a Network ID of 1025 or higher, transactions submitted to it must include a matching [`NetworkID`](../../references/protocol/transactions/common-fields.md#networkid-field) field.
|
||||
|
||||
### Enable at Genesis
|
||||
|
||||
Start each validator with the `--start` flag to enable amendments at the genesis ledger. This skips the two-week voting timer entirely.
|
||||
|
||||
```
|
||||
rippled --start --net --conf /etc/opt/ripple/rippled.cfg
|
||||
```
|
||||
|
||||
Once the network is producing ledgers, subsequent restarts don't require `--start`.
|
||||
|
||||
{% admonition type="info" name="Note" %}There is an [open issue](https://github.com/XRPLF/rippled/issues/4386) to make new genesis ledgers always start with amendments enabled, removing the need for `--start`.{% /admonition %}
|
||||
|
||||
To verify that amendments are active, query the `Amendments` ledger entry with the [ledger_entry method][].
|
||||
|
||||
{% admonition type="info" name="Note" %}If a new account comes back with `Sequence: 1`, the `DeletableAccounts` amendment isn't active and enablement failed. With DeletableAccounts enabled, new accounts start at the current ledger sequence number rather than 1. {% /admonition %}
|
||||
|
||||
Changing which amendments are enabled requires resetting the network to a new genesis ledger. As a best practice, if other users rely on your test network, communicate on Discord both before and after each reset.
|
||||
|
||||
### Compress the Voting Timer
|
||||
|
||||
To exercise the amendment voting and activation flow on a quicker schedule, set `[amendment_majority_time]` in each validator's `rippled.cfg`. This shortens the delay between an amendment reaching majority support and its activation. Do not use it on Mainnet, Testnet, or Devnet.
|
||||
|
||||
```
|
||||
[amendment_majority_time]
|
||||
30 minutes
|
||||
```
|
||||
|
||||
The format is `<number> <minutes|hours|days|weeks>`. The minimum is 15 minutes due to the flag-ledger interval. Common test-network values are 30 minutes or 48 hours.
|
||||
|
||||
Once the network is running, run the following on each validator:
|
||||
|
||||
```
|
||||
rippled feature <amendment_name> accept
|
||||
```
|
||||
|
||||
You can verify the amendment's voting status with `rippled feature`.
|
||||
|
||||
## See Also
|
||||
|
||||
- **Concepts:**
|
||||
- [Amendments](../../concepts/networks-and-servers/amendments.md)
|
||||
- [Parallel Networks](../../concepts/networks-and-servers/parallel-networks.md)
|
||||
- **References:**
|
||||
- [ledger_entry method][]
|
||||
- [server_info method][]
|
||||
- [`NetworkID` field](../../references/protocol/transactions/common-fields.md#networkid-field)
|
||||
- [`rippled` Commandline Usage](../commandline-usage.md)
|
||||
- **Tutorials:**
|
||||
- [Run a Private Network with Docker](run-private-network-with-docker.md)
|
||||
- [Start a New Genesis Ledger in Stand-Alone Mode](start-a-new-genesis-ledger-in-stand-alone-mode.md)
|
||||
|
||||
{% raw-partial file="/docs/_snippets/common-links.md" /%}
|
||||
|
||||
Reference in New Issue
Block a user