Run an Ethereum compatible parachain (blockchain for now, until parachains are available) based on Substrate.
See moonbeam.network for the moonbeam blockchain description.
See www.substrate.io for substrate information.
git clone -b moonbeam-tutorials https://github.com/PureStake/moonbeam
cd moonbeam
Install Substrate and its pre-requisites (including Rust):
curl https://getsubstrate.io -sSf | bash -s -- --fast
Build Wasm and native code:
cargo build --release
(Building for the first time will take a long time, to install and compile all the libraries)
If a cargo not found error appears in the terminal, manually add Rust to your system path (or restart your system):
source $HOME/.cargo/env
./target/release/moonbase-standalone --dev
You can run the moonbeam node within Docker directly.
The Dockerfile is optimized for development speed.
(Running the docker run...
command will recompile the binaries but not the dependencies)
Building (takes 5-10 min):
docker build -t moonbeam-node-dev .
Running (takes 1 min to rebuild binaries):
docker run -t moonbeam-node-dev
-
aura: Time-based Authority Consensus (for simplicity until more development is done)
-
balances: Account & Balance management
-
grandpa: GRANDPA Authority consensus (This will be removed once it becomes a parachain)
-
sudo: Allow specific account to call any dispatchable ("Alice":
0x57d213d0927ccc7596044c6ba013dd05522aacba
, will get removed at some point) -
timestamp: On-Chain time management
-
transaction-payment: Transaction payement (fee) management
-
evm: EVM Execution. (Temporary until we work on pallet-ethereum)
-
mb-core: Currently serves as a way to experiments with pallets and substrate (will get removed)
-
mb-session: Logic for selecting validators based on a endorsement system
Tests are run with the following command:
cargo test --verbose
This github repository is also linked to Gitlab CI
Moonbeam is following the Substrate code style
We provide a .editorconfig (compatible with VSCode using RLS)