A rust-based Custom VM for Avalanche Subnets
Curious about how to run Rust-based smart contracts, or just custom VMs for Avalanche blockchain? You're in the right place.
Usage
Build
cargo build
Build and run
In the landslide git root directory:
./scripts/build.sh
The script will provide instructions on how to run landslide in avalanche.
Update protobuf definitions from upstream
./scripts/update-proto.sh
ava-sim
Test with- Export path to landslide genesis data file, in the environment variable LANDSLIDE_GENESIS_PATH
- Export path to landslide executable in the environment variable LANDSLIDE_BIN_PATH
- Clone https://github.com/ava-labs/ava-sim and go in the directory.
- In ava-sim root, run:
./scripts/run.sh $LANDSLIDE_BIN_PATH "$LANDSLIDE_GENESIS_PATH"
Interact with it
Once the VM is launched, all Avalanche's TimestampVM instructions work completely drop-in: https://docs.avax.network/build/tutorials/platform/subnets/create-a-virtual-machine-vm
You might also want to read how to create a custom blockchain: https://docs.avax.network/build/tutorials/platform/subnets/create-custom-blockchain