Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When starting a network LOTUS_SYNC_BOOTSTRAP_PEERS must be set if BootstrapPeerThreshold is greater than 1 #5474

Open
travisperson opened this issue Jan 28, 2021 · 3 comments
Labels
area/ux Area: UX

Comments

@travisperson
Copy link
Contributor

travisperson commented Jan 28, 2021

Writing an issue for this, but I don't believe there is any immediate action required. This is more of a documentation for starting new networks. This issue is for anyone who might run into issues starting a lotus network.

Lotus requires a threshold of peers to be connected and provide it with tipsets before starting a sync worker. If lotus does not have enough tipsets from peers, no sync workers will be started, and a user might observe that lotus sync status does not list any workers.

$ lotus sync status
sync status:

With the chain logger set to debug, a log message will be produced not tracking enough peers to start sync worker.

The minimum peer (BootstrapPeerThreshold) for sync workers makes it so any value other than 1, results in it not being possible to start a network as only a single peer produces blocks at the beginning.

To resolve this issue, the environment var LOTUS_SYNC_BOOTSTRAP_PEERS=1 needs to be set on at least a number of peers equal to the value of BootstrapPeerThreshold.

@travisperson
Copy link
Contributor Author

I'm going to close this immediately as there is no action to take.

@schomatis
Copy link
Contributor

This is very much a valid issue and a side effect of the way the sync manager is structured (decoupled from the rest of the actual sync logic in Syncer). The one who rules over the other (syncManager) should be able to respond with a valid sync status. (As a temporary workaround we should at least have a default sync status of "waiting for more peers".)

@ribasushi
Copy link
Collaborator

logger set to debug, a log message will be produced not tracking enough peers to start sync worker

This is arguably pretty bad ux... Won't it make more sense to have a timeout ( say 1 minute ) where if one did not specify --bootstrap=false and there is no sync activity possible the daemon exits with an informative message instead of just hanging silently?

cc @Kubuxu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Area: UX
Projects
None yet
Development

No branches or pull requests

3 participants