Hi!!
Almost finished the deployment of a ae pinned hyperchain following the instructions at Introduction - Aeternity node documentation , thanks for putting all together @Ploetzly !!
I struggled a bit because the fact that when installed my ae node I used docker, so I was not finding the folders to copy the hyperchain config files in my ae node directory. I called aengel to the rescue and it not only helped me deploy but made a nice summary of our convo until i succeded, so any one that has installed the aeternity node using docker can play around with Hyperchains.
Here is the guide to follow when it comes to copying the hyperchain config files to the node directory.
Instructions for Setting Up a Hyperchain Node Using Docker
Overview
This section provides specific instructions for setting up a Hyperchain node when the æternity node is installed via Docker. It covers how to copy required configuration files (aeternity.yaml
, hc_test_accounts.json
, hc_test_contracts.json
) into the Docker container, address common issues, and successfully start the node.
Prerequisites
- A fully operational Docker container running the æternity node.
- Ports
3013
(API) and3113
(Hyperchain) should be exposed. - Verify your container with:
docker ps
- Ports
- Hyperchain configuration files generated using the
hyperchain-starter-kit
:aeternity.yaml
hc_test_accounts.json
hc_test_contracts.json
- These files should be located in the
./hc_test/nodeConfig
directory of thehyperchain-starter-kit
.
Steps
Step 1: Verify the Docker Container
Confirm your container is running and healthy:
docker ps
Expected output:
bash
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
355682ca7080 aeternity/aeternity "bin/aeternity conso…" 7 days ago Up X minutes (healthy) 0.0.0.0:3013->3013/tcp, 0.0.0.0:3113->3113/tcp aeternity-node
Take note of the container name (e.g., aeternity-node
).
Step 2: Create Required Directories in the Container
Access the Docker container and create the necessary directories for the configuration files:
bash
docker exec -it aeternity-node /bin/bash
Inside the container:
bash
mkdir -p /home/aeternity/config
mkdir -p /home/aeternity/data/aecore
Verify the directories:
bash
ls -l /home/aeternity/config
ls -l /home/aeternity/data/aecore
Exit the container:
bash
exit
Step 3: Copy Configuration Files into the Container
From your host machine, copy the configuration files into the container:
- Copy
aeternity.yaml
:
bash
docker cp ./hc_test/nodeConfig/aeternity.yaml aeternity-node:/home/aeternity/config/aeternity.yaml
- Copy
hc_test_accounts.json
:
bash
docker cp ./hc_test/nodeConfig/hc_test_accounts.json aeternity-node:/home/aeternity/data/aecore/hc_test_accounts.json
- Copy
hc_test_contracts.json
:
bash
docker cp ./hc_test/nodeConfig/hc_test_contracts.json aeternity-node:/home/aeternity/data/aecore/hc_test_contracts.json
Step 4: Fix File Permissions
The copied files may have root
ownership, which prevents the æternity node from accessing them. To fix this:
- Access the container as the root user:
bash
docker exec -it --user root aeternity-node /bin/bash
- Change ownership of the files to the
aeternity
user:
- For
aeternity.yaml
:
bash
chown aeternity:aeternity /home/aeternity/config/aeternity.yaml
- For
hc_test_accounts.json
andhc_test_contracts.json
:
bash
chown aeternity:aeternity /home/aeternity/data/aecore/hc_test_accounts.json
chown aeternity:aeternity /home/aeternity/data/aecore/hc_test_contracts.json
- Exit the container:
bash
exit
Step 5: Restart the Container
Restart the Docker container to apply the changes:
bash
docker restart aeternity-node
Step 6: Verify the Node
Once the container restarts, verify the node and Hyperchain APIs:
- Check the node status:
bash
curl http://localhost:3013/v2/status
- Look for
"synced": true
in the response.
- Check the Hyperchain status:
bash
curl http://localhost:3113/v2/hyperchain/status
Troubleshooting
- Sync Progress Stuck or APIs Unresponsive:
- Monitor the logs for syncing or errors:
bash
docker logs aeternity-node
- Wait for the node to fully sync before using Hyperchain APIs.
- File Copy Issues:
- Ensure the source files (
aeternity.yaml
,hc_test_accounts.json
,hc_test_contracts.json
) exist in./hc_test/nodeConfig/
.
- Ensure the source files (
- Port Inaccessibility:
- Check if the necessary ports are open:
bash
sudo ufw allow 3013/tcp
sudo ufw allow 3113/tcp