Hi all,
Sorry for the dumb question. I got stuck on this for quite some time… how can I start a local sui network, with multiple nodes/validators, all on the same machine? I know you can start a local sui network by using sui-test-validator
but that only has one node and one validator…
What I have done so far is generally follow this guide sui/blob/main/crates/sui/genesis.md
- Run
sui genesis-ceremony init
on my machine, - Inside each docker container install the sui binary and generate validator, account, worker and network keys using
sui keytool generate
Then runsui genesis-ceremony add-validator
to add validator info. - Back on the physical machine, sign using the previously generated validator keys in the common workspace (the
sui genesis-ceremony sign-and-verify
command doesn’t work inside containers for some reason) and finalize the ceremony. In the end, I got agenesis.blob, and I copied this along with
fullnode.yamland
validator.yaml`(using the previously generated keys as protocol, network and worker keys).
In the end, I was able to start sui-node inside the containers, and was able to send json-rpc to port 9000 of the fullnode, but here’s where I got stuck:
- How can I start a local faucet to get some test coins? I tried to do run
cargo run --release --bin sui-faucet -- --write-ahead-log /tmp/sui_faucet.wal
inside a docker container but it’s missingclient.yaml
file, if I run it on the physical machine I get this error:called
Result::unwrap()on an
Errvalue: Wallet("Networking or low-level protocol error: HTTP error: channel closed") panic.file="crates/sui-faucet/src/main.rs" panic.line=81 panic.column=10
- Port forwarding confusions: since both the fullnode and the validator need port 8080+8084, and nodes/validators/faucet need port 9184 for metrics, there’s gotta be some port forwarding from the docker containers to the physical machine. But if I just forward port 8080 to a random host port, wouldn’t the client on the physical machine not be working properly as it sends traffic to port 8080 instead of the forwarded port?
Has anyone tried this before, or perhaps there’s a better way of doing this? Thanks a lot for any insights!