Closed ixje closed 1 year ago
ps: I don't want to use docker. I want the node to be debuggable if needed
Set MinPeers to 1 as per
0, please. You have no peers in this scenario (unless you connect some other node to it).
You may take a look at config/protocol.privnet.docker.single.yml
as well, it's a single-node CN that is used for env_single
. It can be used without Docker also.
As to why this is important, see https://pkg.go.dev/github.com/nspcc-dev/neo-go/pkg/network#Server.IsInSync
Consensus (and many other services) are started only after node is synchronized (they can work incorrectly otherwise), so your node with MinPeers=1
just doesn't feel confident enough to run dBFT.
Aha that works, thanks. That was totally not obvious to me given that it's in the P2P section I assumed this was only related to something P2P synchronization or connecting to nodes and didn't gave it more thought.
Can I somehow specify a config file? I know I can set the config path, but after that it seems like I can only choose -p
, -t
or -m
$ ./bin/neo-go help node
NAME:
neo-go node - start a NeoGo node
USAGE:
neo-go node [--config-path path] [-d] [-p/-m/-t]
OPTIONS:
--config-path value path to directory with configuration files
--privnet, -p use private network configuration
--mainnet, -m use mainnet network configuration
--testnet, -t use testnet network configuration
--debug, -d enable debug logging (LOTS of output, overrides configuration)
That's a long-standing bug/feature we have. This mode system expects some particular config file naming pattern relative to config-path
and doesn't allow to have xyz.yml
. So you have to use protocol.privnet.yml
(or mainnet/testnet) for now. At the same time maybe we can finally add --config-file
as well, overriding all of this (feel free to add an issue if that will improve your use case).
I think --config-file
as suggested is a bit easier to work with. However, it's not like the current way is blocking me. The presence of multiple protocol.privnet.*.yml
under /config/
in the repo made me think there might be a way to tell which one to use.
I've read the consensus document and I think I did all that's needed, but no blocks are produced. What I did is
Consensus
Enabled
in config totrue
StandbyCommittee
ValidatorsCount
to 1MinPeers
to 1 as per https://github.com/nspcc-dev/neo-go/blob/efbef4254a62a8d6630dd2302cba7ffb424e067e/docs/consensus.md?plain=1#L192-L195The best I get is this
with this config in
protocol.privnet.yml
I tried adding
localhost:20333
to the SeedList if there is some weird thing going on that requires it but all that adds to the above run log isand then it still "hangs" doing nothing.
What am I missing?