The Ziggurat implementation for XRPLF's rippled nodes.
- Clone this repository.
- Build rippled from source.
- Create the
~/.ziggurat/ripple/setupdirectories, 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.tomlwith 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
xrplpython 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.pyto monitor state of the accounts. Wait untilResponseStatus.SUCCESSis 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
rNGknFCRBZguXcPqC63k6xTZnonSe6ZuWtfor the time being. -
Run
python3 tools/transfer.pyto transfer xrp from genesis account to a new account. -
Run
python3 tools/account_info.pyagain 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