# Unix
chmod 700 build.sh && ./build.sh
# Windows
build.batmkdir /path/to/chaindata
cd /path/to/chaindataIn this directory you should add configs.json and genesis.json. The chaindata (databases) also will be located here. The chaindata structure will be
├── configs.json
├── genesis.json
├── DATABASES/
│ ├── BLOCKS/
│ ├── EPOCH_DATA/
│ ├── APPROVEMENT_THREAD_METADATA/
│ └── FINALIZATION_VOTING_STATS/
└── ...
Examples available in templates directory. For tests - just copy it to chaindata dir
You have a script time_update.py
import time
millis = int(time.time() * 1000)
print(millis)This script prints the current Unix timestamp in milliseconds
1751019876494Visit the /path/to/chaindata/genesis.json and modify line:
"FIRST_EPOCH_START_TIMESTAMP":1751019876494,Now set the env variable - path to chaindata
export CHAINDATA_PATH = full/path/to/chaindata
⚠️ Important - theCHAINDATA_PATHmust be a FULL path
In the same shell where you stored the env variable - run
./modulrThis should run the local testnet with a single validator which generates blocks
This version may contains the bugs, so to restart the network you should:
- Stop the node
- Delete the
DATABASESdirectory in$CHAINDATA_PATH - Update the
FIRST_EPOCH_START_TIMESTAMPwith a new value (just run thetime_update.pyagain) - Run binary again
See https://github.com/ModulrCloud/NetSpawner
go test ./tests -v
