- Make sure you have Go 1.17+ installed locally. Get Go.
go version
- Make sure Docker is running on your machine. Get Docker.
docker version
- Install vegacapsule
- Clone Capsule repository
git clone git@github.com:vegaprotocol/vegacapsule.git
git config --global url."git@github.com:vegaprotocol".insteadOf "https://github.com/vegaprotocol"
cd vegacapsule
- Turn off GONOSUMDB for private vega repositories
export GONOSUMDB="code.vegaprotocol.io/*"
- Build Capsule from source
go install
- Validate Capsule installation
vegacapsule --help
- Install vega, data-node and vegawallet binaries on your machine and. Install Vega binaries.
- Start nomad
vegacapsule nomad
- In another Terminal window run bootstrap command to generate and start new network
vegacapsule network bootstrap --config-path=net_confs/config.hcl
- Check Nomad console by opening http://localhost:4646/
- First generate the network
vegacapsule network generate --config-path=net_confs/config.hcl
- Run restore command to change networks genesis files
vegacapsule nodes restore-checkpoint --checkpoint-file PATH_TO_YOUR_CHECKPOINT_FILE
- Lastly the network can be started. It will load it's state from the checkpoint
vegacapsule network start
- Stop the currently running network first (if the network is running)
vegacapsule network stop
- Reset current network nodes state
vegacapsule nodes unsafe-reset-all
- Run restore command to change networks genesis files
vegacapsule nodes restore-checkpoint --checkpoint-file PATH_TO_YOUR_CHECKPOINT_FILE
- Lastly the network can be started. It will load it's state from the checkpoint
vegacapsule network start
You can see all available commands calling the vegacapsule --help
command.
# Generate the network config files
vegacapsule network generate --home-path=/var/tmp/veganetwork/testnetwork --config-path=net_confs/config.hcl
# Starts the network
vegacapsule network start --home-path=/var/tmp/veganetwork/testnetwork
# Stop the network
vegacapsule network stop --home-path=/var/tmp/veganetwork/testnetwork
# Resume the network with previous configurationh
vegacapsule network start --home-path=/var/tmp/veganetwork/testnetwork
# Destroy the network
vegacapsule network destroy --home-path=/var/tmp/veganetwork/testnetwork
You can set up the multisig smart contract with the following command:
vegacapsule ethereum multisig init
Procedure executed by the above command:
- Set threshold to 1
- Add validators as signers
- Remove the contract owner from the signers list
- Set threshold to 667
Capsule can bootstraps network based on configuration. Please see config.hcl
for examples.
[TODO expand on this]
Capsule is using Go's text/template templating engine extended by useful functions from Sprig library.
[TODO expand on this]