The Ziggurat implementation for XRPLF's rippled
nodes.
- Clone this repository.
- Build rippled from source.
- Create the
~/.ziggurat/ripple/setup
directories, copy the validators configuration there, and name itvalidators.txt
:curl --create-dirs --output ~/.ziggurat/ripple/setup/validators.txt https://raw.githubusercontent.com/XRPLF/rippled/develop/cfg/validators-example.txt
- In the same directory create a
config.toml
with the following contents:path = "<path to the directory where you built rippled>" start_command = "./rippled"
- Run tests with
cargo +stable t -- --test-threads=1
.
Specific tests require an initial node state to be set up. Follow the steps below to save an initial state that can be loaded later in certain tests.
- Make sure you have python3 installed. You should be able to run
python3 --version
. - Install
xrpl
python lib:pip3 install xrpl-py
.
Make sure these two 127.0.0.x
(where x != 1
) addresses are enabled:
sudo ifconfig lo0 alias 127.0.0.2 up;
sudo ifconfig lo0 alias 127.0.0.3 up;
-
In one terminal run test
cargo +stable t setup::testnet::test::run_testnet -- --ignored
. The test will start a local testnet and will keep it alive for 10 minutes. Ensure that you complete the following steps while above test is running. -
Run
python3 tools/account_info.py
to monitor state of the accounts. Wait untilResponseStatus.SUCCESS
is reported for the genesis account. The response should include:"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "Balance": "100000000000000000",
This should happen within about a minute. Ignore error for the account
rNGknFCRBZguXcPqC63k6xTZnonSe6ZuWt
for the time being. -
Run
python3 tools/transfer.py
to transfer xrp from genesis account to a new account. -
Run
python3 tools/account_info.py
again to monitor accounts. The response for genesis account should include:"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "Balance": "99999994999999990",
and the response for the new account should include:
"Account": "rNGknFCRBZguXcPqC63k6xTZnonSe6ZuWt", "Balance": "5000000000",
-
Copy the node's files to directory referenced by constant
pub const STATEFUL_NODES_DIR
, currently:cp -a ~/.ziggurat/ripple/testnet/ ~/.ziggurat/ripple/stateful;
-
Now you can stop the test started in step 1.
-
Perform cleanup:
rm ~/.ziggurat/ripple/stateful/*/rippled.cfg; # config files will be created when nodes are started rm -rf ~/.ziggurat/ripple/testnet; # not needed anymore