Package: claudia
ClaudiaClaudia is a tool which helps make a few XRPL specific tasks look very easy. Tasks like running a local instance of
rippled, managing a local network, managing a sidechain network, running tests and even learning a few neat tricks with
XRPL in a quick fashion can be done effortlessly with this tool.Claudia was developed by the XRPL Automation Team as an internal tool to help with XRPL local development, debugging and
testing. As the tool matured, the team quickly realized its potential and decided to expose it outside of Ripple, so
that everyone can benefit from its capabilities.Following are some of the important tasks that can be performed using Claudia:Build rippled from local code.Install rippled from pre-built binaries released by Ripple.Manage a local-mainnet network using local rippled instance.Locally build a local witness server to start a sidechain network.Manage a local-sidechain network.Run unit tests on the built/installed rippled instance.Run system tests on local-mainnet, local-sidechain, devnet and testnet networks.Manage rippled features on the local-mainnet and local-sidechain networks.Learn more about XRPL capabilities and perform real-time learning activities on local-mainnet, local-sidechain, devnet
and testnet networks.General PrerequisitesClaudia can be installed on both macOS and Ubuntu. Currently, there is no support for Windows. Following prerequisites
must be installed before installing Claudia:Python3Runpython3 --versionto check if Python3 is already installed.If Python3 is not installed, please install it using the
officialPython installer.Verify installation by running:python3 --versionpip3Runpip3 --versionto check if Python3 is already installed.If pip3 is not installed, follow the next steps:macOS:python3 -m ensurepip --upgradeLinux:sudo apt updatesudo apt install python3-pipVerify installation by running:pip3 --versiondockerRundocker --versionto check if docker is already installed.If docker is not installed, follow the next steps:macOS:Download and then run
theDocker Desktop installer for macOS.Linux:Download and then run
theDocker Desktop installer for Linux.Claudia allows its users to run System tests using Javascript client library. The following isONLYrequired if you
intend to run the Javascript system tests:nodeRunnode --versionto check if node is already installed.If node is not installed, follow the next steps:macOS:brew install nodeLinux:curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt-get install -y nodejsnpmRunnpm -vto check if npm ia already installed.If npm in not installed, follow the next steps:macOS:brew install npmLinux:sudo apt install npmInstallationOnce the general prerequisites have been installed, Claudia can be installed
fromPyPi. From your terminal please run:pip3 install claudiaIf you want to build Claudia from the local code, you can run:rm -fr build/ dist/ claudia.egg-info
  pip uninstall -y claudia
  python3 setup.py sdist bdist_wheel
  pip install dist/*.tar.gz
  rm -fr build/ dist/ claudia.egg-infoUsageClaudia has a bunch of self-explanatory features which are offered via a seamless UI and CLI experience. Please note that
XRPL Learning Center is only available with Claudia UI.Claudia CLI offers two modes:Demo mode. This is an interactive mode that can help reduce typing efforts significantly. You would mostly navigate a
pre-built menu using ↑ ↓ and ↵ keys. Minimal typing will be required.(Standard) CLI mode.How to run Claudia CLI commands?After installing claudia, go to your terminal and run claudia. Each command supports --help flag that displays the usage
and arguments. e.g. claudia --help, claudia run --helpHow to run Claudia in demo mode?From your terminal and run claudia demoHow to start Claudia UI?From your terminal, run claudia ui. Alternatively, you can launch the UI via the Claudia demo mode by selecting Launch
Claudia UIFeaturesClaudia offers a bunch of features which allows you to manage local rippled instance, manage networks, run tests and
even learn a few XRPL tricks. This section walks you through some major features.How to build rippled?Claudia offers a way to build rippled from local code. You will need to
clonerippledrepository first before starting with this step. If you intend to use
sidechain functionality, please usethisrippled fork instead.Once the repository has been cloned, you can build rippled as follows. Each option would require you to provide the ***
absolute path*** to the cloned repository.UINavigate toCustom XRPL Networksand selectBuild rippledCLI ModeRunclaudia rippled build --repo <repo_path>Demo ModeSelectCustom XRPL Networks->Build rippled from local codeHow to install rippled?Claudia offers a way to install rippled using the pre-built binaries distributed by Ripple.
By default, Claudia will choose binaries generated from the master branch.
You also have an option to specify different branches.
Possible options are: master, develop and release (case-sensitive).
You can install rippled as follows:UINavigate toCustom XRPL Networksand selectInstall rippledCLI ModeRunclaudia rippled installto install rippled binaries built from master branch.Runclaudia rippled install --rippled_branch <branch_name>and choose the rippled branch.Demo ModeSelectCustom XRPL Networks->Install rippledHow to switch between build and install rippled modes?Once you build or install rippled, Claudia will remember that context forever. If you have already built and installed
rippled in both modes, and would like to switch between the two modes, run the following:UINavigate toSettingsand selectSet Install ModeCLI ModeRunclaudia set-install-mode buildto set build mode.Runclaudia set-install-mode installto set install mode.Demo ModeSelectSettings->Set install mode as buildto set build mode.SelectSettings->Set install mode as installto set install mode.Please note that all previously running networks will have to be stopped and started again after switching rippled
modes.How to enable a feature in rippled?Please note that there is no validation for feature name. Please make sure the feature name is correct (case-sensitive).
You can follow these instructions to enable a rippled feature:UINavigate toSettingsand selectEnable a rippled featureCLI ModeRunclaudia enable-feature --feature <feature_name>Demo ModeSelectSettings->Enable a rippled featureHow to disable a feature in rippled?Please note that there is no validation for feature name. Please make sure the feature name is correct (case-sensitive).
You can follow these instructions to disable a rippled feature:UINavigate toSettingsand selectDisable a rippled featureCLI ModeRunclaudia disable-feature --feature <feature_name>Demo ModeSelectSettings->Disable a rippled featureHow to build witness server?Before you can start a sidechain network, you will need to build a witness server locally. You will need to
cloneXBridge Witnessrepository first before starting on this step. Once
the repository has been cloned, you can build the witness server as follows. Each option would require you to provide
the absolute path to the cloned repository.UINavigate toCustom XRPL Networksand selectBuild Witness ServerCLI ModeRunclaudia witness build --repo <repo_path>Demo ModeSelectCustom XRPL Networks->Build witness serverHow to deploy custom network to AWS?You can use Claudia to spin up a custom network on your AWS cloud infrastructure. This option is only supported via UI.Navigate toCustom XRPL Networksand selectDeploy Network to Cloud. You will be asked to provide the following information:AWS IAM user access keyAWS IAM user secret access keyRegionClaudia runs each a validator node on a separate EC2 instance. At least two validator nodes are required to spin up a network.
You can choose to run up to 10 validator nodes running the rippled variant built using the latest master branch code.
Similarly, you can choose to run up to 10 validator nodes running the rippled variant built using the latest release and
develop branches code each. This way you can run up to 30 validator nodes running three different rippled variants.The deployment process takes a while. Once finished, the details will be provided along with the connection URLs.How to start a local-mainnet network?Before you can start a local mainnet network, rippled has to be built or installed locally. Afterwards, you can follow
these instructions to start a local mainnet network:UINavigate toCustom XRPL Networksand selectStart NetworkCLI ModeRunclaudia local-mainnet startDemo ModeSelectCustom XRPL Networks->Start local-mainnetHow to stop a local-mainnet network?You can follow these instructions to stop a local mainnet network:UINavigate toCustom XRPL Networksand selectStop NetworkCLI ModeRunclaudia local-mainnet stopDemo ModeSelectCustom XRPL Networks->Stop local-mainnetHow to start a local-sidechain network?Before you can start a local sidechain network:rippled has to be built/installed locally.Witness server has to be built locally.XChainBridgerippled feature has to be enabled.The local-mainnet network has to be running.Once all the requirements have been met, you can start the local sidechain network as follows:UINavigate toCustom XRPL Networksand selectStart Sidechain NetworkCLI ModeRunclaudia local-sidechain startDemo ModeSelectCustom XRPL Networks->Start local-sidechainHow to stop a local-sidechain network?You can follow these instructions to stop a local sidechain network:UINavigate toCustom XRPL Networksand selectStop Sidechain NetworkCLI ModeRunclaudia local-sidechain stopDemo ModeSelectCustom XRPL Networks->Stop local-sidechainPlease note that once the sidechain has been stopped, local-mainnet has to be restarted before attempting to start the
local-sidechain again.How to run unit tests?Before you can run unit tests, rippled has to be built or installed locally. Afterwards, you can run the unit tests as
follows:UINavigate toXRPL testsand selectRun Unit TestsCLI ModeRunclaudia run unittests. Runclaudia run unittests --helpto see options.Demo ModeSelectXRPL Tests->Run unit testsBy default, all tests will run. Optionally, you can also set a filter to run a selected few tests in each mode.How to run system tests?Claudia offers a way to run system tests on different networks. If you wish to run tests on locally running mainnet or
sidechain networks, the networks should be running first. Alternatively, you can run the tests on devnet and testnet as
well.The system tests can run using either JavaScript or Python client libraries. For Python client, bothJSON-RPCandWebSocketconnections are supported. JavaScript client only supportsWebSocketconnection.These tests are broken down into different features and are tagged as well. You can choose to run a few or all tests.
Please note that if you chose regression tag, all test in the chosen feature will be executed.The system tests can be configured to be run in any way you need them to. By default, the following configuration is
selected:Client Library:PythonConnection:JSON-RPCNetwork:local-mainnetTest Tag:smokeFeature:paymentsThe system test run can be started as follows:UINavigate toXRPL testsand selectRun System Tests. Choose your options and start the run.CLI ModeRunclaudia run systemtests. Runclaudia run systemtests --helpto see options.Demo ModeSelectXRPL Tests->Run system testsHow to cleanup your computer and free resources after running Claudia?While using claudia, there are a few files created permanently. Also, there are a few system resources which are
reserved for future use. Running this command will delete these files and free up resources. As a result, any progress
made by using Claudia will be lost. This action cannot be undone. Resources can be freed and your machine can be freed
as follows:UINavigate toSettingsand selectCleanupCLI ModeRunclaudia cleanDemo ModeSelectSettings->Clean up the host and free resourcesHow to run XRPL Learning Center?Claudia offers a neat interactive learning environment in which you can learn a few things about XRPL. These learning
activities can be performed on local-mainnet, local-sidechain, devnet and testnet networks. You can launch the XRPL
Learning Center only via UI.Navigate toXRPL Learning Center, select a learning activity and follow the instructions.How to uninstall Claudia?We recommend that you cleanup your machine before uninstalling Claudia.Afterwards, please run:pip3 uninstall claudiaContributionsClaudia is developed by Ripple Automation Team. The following people contributed to this release:Manoj Doshimdoshi@ripple.comRamkumar SGrsg@ripple.comKaustubh Saxenaksaxena@ripple.comMichael Legleuxmlegleux@ripple.comAnagha Agasheaagashe@ripple.comMani Mounika Kunasanimkunasani@ripple.com