Skip to content

mezonai/mmn

Repository files navigation

1754016094020_image

run (dev)

go mod tidy

Run bootnode

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

Run init node

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"

Run node

MSYS_NO_PATHCONV=1 go run main.go node
--privkey-path
--grpc-addr ":"
--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"
--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"
--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"
--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)

run with docker

run nodes

docker compose build docker compose up

Build

go build -o bin/mmn ./cmd

Run Bootnode

Load private key from file

./mmn bootnode --privkey-path /path/to/privkey.txt --bootstrap-p2p-port 9000

Generate random private key (default behavior)

./mmn bootnode --bootstrap-p2p-port 9000

uses cases

Mezon -> (auto gen wallet) => user has a wallet Mezon (wallet) -> create and sign transaction -> send rpc -> mmn node verify commit and broadcast to nodes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 12