1 stable release
new 2.0.1 | Jan 24, 2025 |
---|
#266 in Magic Beans
91 downloads per month
520KB
7K
SLoC
Amareleo-Chain - disposable, developer-friendly, Aleo chain instances
1. Overview
A lite Aleo development node. Starting from the SnarkOS codebase, amareleo-chain
delivers a minimal validator node for testing the deployment and execution of aleo programs.
Key benefits:
-
Ease of Use – Starting a development testnet simply involves running
amareleo-chain start
. No extra scripts, no multiple processes, all default parameters set for quick-fire aleo program testing. -
Lite – Just one process, with minimal memory consumption and processing resources.
-
Fast Startup/Shutdown – Drastically reduced node startup and shutdown times.
-
Fresh Chain-State – Start testing programs with a fresh chain state (default) or retain the chain-state across tests.
-
Compatibility – Compatible with other Aleo tools including
snarkos
andleo
.
2. Build Guide
2.1 Requirements
amareleo-chain
was developed and tested with minimal requriements:
- Ubuntu 22.04 (LTS)
- 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
- 16GB RAM
- 512 GB SSD
2.2 Installation
If you already installed snarkos
on this machine, all dependencies should be satisfied and you can clone and install amareleo-chain
as follows:
git clone https://github.com/kaxxa123/amareleo-chain.git
cd amareleo-chain
cargo install --locked --path .
Otherwise, ensure your machine has Rust v1.81+
installed. Instructions to install Rust can be found here.. Next clone and install amareleo-chain
as follows:
git clone https://github.com/kaxxa123/amareleo-chain.git
cd amareleo-chain
./build_ubuntu.sh
3. Run
To start a fresh chain from genesis run:
amareleo-chain start
This will expose a REST server on localhost:3030, supporting the same endpoints as snarkos
.
3.1 Amareleo-Chain CLI
amareleo-chain
supports the commands:
start
- Starts the amareleo-chain nodeclean
- Cleans the amareleo-chain node storageupdate
- Update amareleo-chain
For snarkos
users, running amareleo-chain start
will look very much like running snarkos start
with the --dev 0 --validator
parameters. Some differences include:
-
amareleo-chain
drops a lot of the functionality not relevant to aleo program testing. It only supports running a validator, and only runs as a standalone node without peers. -
The
amareleo-chain
default network istestnet
(--network 1
) rather thanmainnet
(--network 0
). -
amareleo-chain
supports two modes of operations controlled by the--keep-state
argument. Runningamareleo-chain start
, the node will start from genesis and will not preserve the chain state accross runs. Runningamareleo-chain start --keep-state
causes it to preserve the chain-state. -
amareleo-chain
uses different disk storage locations depending on its mode of operation:--keep-state
Disk storage set .amareleo-ledger-*
not set .amareleo-tmp-ledger-*
The two modes do not conflict. One can perform multiple runs some setting
--keep-state
, others not. All the runs specifying--keep-state
will share the same ledger. This state will keep being preserved untilamareleo-chain clean
is run.
Dependencies
~97MB
~1.5M SLoC