Current version: node 10.1.1
A simple dockerized Cardano node setup, for SanchoNet testing.
Accompanied by a few helpful scripts for cardano-cli to interact with the node and SanchoNet.
Install docker desktop for your operating system.
If you are using Apple silicon (M1, M2, M3 processor) make sure you have Rosetta enabled via Docker desktop settings.
Install VSCode so we can more easily navigate directories, and inspect files.
- xcode tools.
xcode-select --install
- Rosetta.
softwareupdate --install-rosetta
Windows Subsystem for Linux.
You may want to make a nice folder/directory for this first.
git clone https://github.com/Ryun1/sancho-docker-node.git
Open Visual Studio Code and then go File > Open Folder
selecting sancho-docker-node
folder.
Open a terminal inside of VSCode.
Inside the terminal console, give scripts execute file permissions.
Windows users will have to run this first, to access the wsl environment.
wsl
Run the following command.
chmod +x ./start-docker.sh ./stop-docker.sh ./scripts/*
Note: Make sure your terminal shows the correct directory sancho-docker-node
.
Note: Before any usage ensure you have docker desktop open and running.
We have a script that:
- pulls the latest SanchoNet node configs
- pulls the Cardano node docker image
- builds and runs the Cardano node image
- pushes the node logs to the terminal
In your terminal execute:
./start-docker.sh
If you want to stop the logs (but the node is still running) you can press control + c
.
This should look something like:
Note: The first time you do this the node will take a long time to synchronize to the network.
Press the plus at the top right of your terminal window.
And then click on the new terminal.
Run the node query tip script.
Windows users will have to run this first, to access the wsl environment.
wsl
In your second terminal execute:
./scripts/node-query-tip.sh
For a fully synced node the terminal should return, with syncProgress
of 100.00
.
{
"block": 1185368,
"epoch": 277,
"era": "Conway",
"hash": "13d654899faabb50522f7f608e8d627acaaa8206347c913b0e74754538754eb5",
"slot": 24011698,
"slotInEpoch": 78898,
"slotsToEpochEnd": 7502,
"syncProgress": "100.00"
}
For a un-fully synced node the terminal should return, with syncProgress
of less than 100.00
.
You will have to wait till fully synced node before being able to interact with the network.
{
"block": 14646,
"epoch": 3,
"era": "Babbage",
"hash": "d72cb1cfb7f7eb9d457d48c0d3e165170565eb371f8f5c7cb3d6d212be97c797",
"slot": 292713,
"slotInEpoch": 33513,
"slotsToEpochEnd": 52887,
"syncProgress": "1.22"
}
This script will stop your Cardano node, remember to run this when you are done using your node.
In your second terminal execute:
./stop-docker.sh
Now you have a node you can actually ✨do fun stuff✨
We have a script that:
- randomly generates a set of payment, stake and DRep keys
- from keys, creates addresses and a DRep ID
In a terminal execute:
./scripts/generate-keys.sh
This will create you a keys directory with some fun things inside, looks like this:
Get yourself some test ada, so you can pay for transaction fees.
Open your new address from ./keys/payment.addr.
Go to the SanchoNet faucet and request some tAda sent to your new address.
Check out the scripts folder and see what you'd like to do.
I will give an example of what you could do.
Make sure you have a node running for these.
##### 1. Register as a DRep.
./scripts/drep/register.sh
./scripts/stake/key-register.sh
./scripts/drep/delegate-to-self.sh
Cannot connect to the Docker daemon at unix:///Users/XXXX/.docker/run/docker.sock. Is the docker daemon running?
Fix: Open docker desktop