go mod tidy
MSYS_NO_PATHCONV=1 go run main.go bootnode
--privkey-path
--bootstrap-p2p-port 9000
Example:
MSYS_NO_PATHCONV=1 go run main.go bootnode
--privkey-path "./node-data/bootnode_privkey.txt"
--bootstrap-p2p-port 9000
go run main.go init
--data-dir
--genesis "config/genesis.yml"
--database "leveldb"
--privkey-path (optional)
Example with existing private key: go run main.go init --data-dir "./node-data/node1" --genesis "config/genesis.yml" --database "leveldb" --privkey-path "config/key1.txt"
go run main.go init --data-dir "./node-data/node2" --genesis "config/genesis.yml" --database "leveldb" --privkey-path "config/key2.txt"
go run main.go init --data-dir "./node-data/node3" --genesis "config/genesis.yml" --database "leveldb" --privkey-path "config/key3.txt"
MSYS_NO_PATHCONV=1 go run main.go node
--privkey-path
--grpc-addr ":"
--public-ip <public_ip>
--p2p-port <p2p_port>
--bootstrap-addresses "/ip4/127.0.0.1/tcp//p2p/"
example:
MSYS_NO_PATHCONV=1 go run main.go node
--data-dir "./node-data/node1"
--grpc-addr ":9001"
--listen-addr ":8001"
--public-ip "xx.xxx.xxx.xx"
--p2p-port "9090"
--bootstrap-addresses "/ip4/127.0.0.1/tcp/9000/p2p/12D3KooWAhZyyZV2KBtfm8zsLaKPvcmVfaYczJ5UdpB8cJU7vKg2"
MSYS_NO_PATHCONV=1 go run main.go node
--data-dir "./node-data/node2"
--listen-addr ":8002"
--grpc-addr ":9002"
--public-ip "xx.xxx.xxx.xx"
--p2p-port "9090"
--bootstrap-addresses "/ip4/127.0.0.1/tcp/9000/p2p/12D3KooWAhZyyZV2KBtfm8zsLaKPvcmVfaYczJ5UdpB8cJU7vKg2"
MSYS_NO_PATHCONV=1 go run main.go node
--data-dir "./node-data/node3"
--listen-addr ":8003"
--grpc-addr ":9003"
--public-ip "xx.xxx.xxx.xx"
--p2p-port "9090"
--bootstrap-addresses "/ip4/127.0.0.1/tcp/9000/p2p/12D3KooWAhZyyZV2KBtfm8zsLaKPvcmVfaYczJ5UdpB8cJU7vKg2"
Note:
- Faucet amount is now configured in the genesis configuration file (config/genesis.yml)
--public-ip
flag is required for P2P advertising to external peers--p2p-port
specifies the LibP2P port (use the same port for all nodes default: 9090)
- To override configs inside
docker-compose.yaml
, create.env
file with variables declared in.env.example
docker compose build docker compose up
The project supports environment-based log level control to avoid excessive debug/trace logs in production:
LOGLEVEL
: Set log level (debug, info, warn, error). Default: info for production, debug for development
debug
: Shows all log messages (DEBUG, INFO, WARN, ERROR)info
: Shows INFO, WARN, ERROR messages (hides DEBUG)warn
: Shows WARN, ERROR messages (hides DEBUG, INFO)error
: Shows only ERROR messages (hides DEBUG, INFO, WARN)
Example .env
file:
LOGLEVEL=info
LOGFILE_MAX_SIZE_MB=500
LOGFILE_MAX_AGE_DAYS=7
-Use direct command
DB_VENDOR=leveldb docker compose up -d --build
-Use .env file
- Create
.env
file in the root directory of sourceDB_VENDOR=leveldb
- Run
docker compose up -d --build
to build and run nodes
go build -o bin/mmn ./cmd
./mmn bootnode --privkey-path /path/to/privkey.txt --bootstrap-p2p-port 9000
./mmn bootnode --bootstrap-p2p-port 9000
- Build executable mmn
go build -o mmn .
- Then execute command to perform transfer to a wallet
For example:
./mmn transfer [-u <node-url>] [-t <recipient-addr>] [-a <amount>] [-p <sender-private-key>] [-f <sender-private-key-file>] [-v]
./mmn transfer -v \ -u localhost:9001 \ -t EtgjD8gQLQhmSY1hpoVHdrEHyBEUBzkAU9PivA6NNSJx \ -a 1000 \ -p 302e020100300506032b6570042204208e92cf392cef0388e9855e3375c608b5eb0a71f074827c3d8368fac7d73c30ee ./mmn transfer -v \ -u localhost:9001 \ -t EtgjD8gQLQhmSY1hpoVHdrEHyBEUBzkAU9PivA6NNSJx \ -a 1000 \ -f ./private.txt
- For more details about command, run
./mmn transfer --help
Mezon -> (auto gen wallet) => user has a wallet Mezon (wallet) -> create and sign transaction -> send rpc -> mmn node verify commit and broadcast to nodes.
- Create prometheus targets config file named
nodes.yaml
inside./monitoring/prometheus/targets
, take a look at example file - Open grafana at http://localhost:3300 (admin / admin)
- Take a look Dashboard for node monitoring
- Navigate to Drilldown > Logs for logs
--bootstrap-addresses \"/ip4/BOOTNODE_EXTERNAL_IP/udp/9000/quic-v1/p2p/BOOTNODE_PEER_ID\"