AeMdw Hyperhain Setup Documentation
Last updated
Was this helpful?
Last updated
Was this helpful?
AeMdw is a middleware that acts as a caching and reporting layer for the . It responds to queries more efficiently than the node and supports additional queries.
The middleware runs an Aeternity Node alongside it in the same Docker container and BEAM VM instance, so you don't need to run a standalone one. This node can be configured using the aeternity.yaml
file or by passing environment variables, just like configuring the node directly.
To properly configure your middleware for Aeternity Hyperchains, start by generating the necessary configuration files from init.hyperchains.ae
.
Access the Hyperchains Initialization Tool:
Visit in your web browser.
Input Node Information and Generate the Configuration Files:
Click on the 'Get Started' button.
Follow the on-screen instructions to enter details about your Hyperchain node and select a pinning chain.
Download the init.yaml
file.
Follow the 'Next Steps' to generate additional configuration files:
aeternity.yaml
${NAME}_accounts.json
${NAME}_contracts.json
Once you have the necessary configuration files, you can run the middleware using Docker:
Make sure you have enough account balance on the pinning chain for all of the accounts
The command assumes the configuration files are in the ${NAME}/nodeConfig
directory in your current working directory, where ${NAME}
is the name of your Hyperchain.
You can pass the -d
flag to run the container in detached mode.
To ensure data persistence across container restarts:
Create the Data Directory (if it doesn’t already exist):
In your working directory, create a data
folder to store the node and middleware databases:
Run the Docker Container with Volumes:
-v ${PWD}/data/mnesia:/home/aeternity/node/data/mnesia
: Persists the node database.
-v ${PWD}/data/mdw.db:/home/aeternity/node/data/mdw.db
: Persists the middleware database.
With this setup, the middleware will retain its state even after the container is stopped or restarted.
You can also pass the -d
flag to run the container in detached mode.
Once the container is running, you can access the middleware at http://localhost:4000
and the node at http://localhost:3013
.
To check the logs, run the following command:
To check the status of the container, run the following command:
To stop the container, run the following command:
To restart the container, run the following command:
This command uses the , which differs from the .
You can use the same configuration options available for the Aeternity node to further customize your setup. For more information on available options and how to modify the aeternity.yaml
file, refer to the .