forest
forest copied to clipboard
Stateless bootstrap node
Issue summary
Bootstrap nodes serve as the entry point to the Filecoin p2p swarm. Currently, bootstrap nodes are running Lotus and must sync to the network. This makes them slightly expensive (>$100/month). However, bootstrap nodes should be able to run without any state, making them much cheaper.
- [ ] Add a stateless mode to Forest. Forest still connects to the p2p swarm in this mode but does not sync to HEAD.
- [ ] For
Hellorequests, respond with the genesis tipset as the heaviest seen tipset. We don't want to claim to have validated any other tipsets than this. - [ ] Cache the
Nmost recent blocks. - [ ] If a block is requested that we do not have, forward the request to other peers and cache the result.
- [ ] Respond to
ChainRequests withPartialResponse. We never want to respond with more than 1 block.
If we do not respond to ChainRequests, other peers will eventually disconnect from us. Not a show-stopper, but we'd like for them to stay connected to us for as long as possible.
The stateless bootstrap node will run on droplets with roughly 1GiB of memory and 20GiB of disk. There should be wiggle room for caching a fair number of blocks.
Other information and links
@lemmih what are we missing right now to have a bootstrap node (in terms of Forest implementation)? Or are we feature-complete and it's just a matter of deploying it and handling the logistics (deployment, peer persistence, monitoring & alerting, SLAs etc.) behind it?
Looks like we're ready to set up the infrastructure. I'm sure there are memory and disk space leaks, but running the nodes is the best way to find them.
@lemmih Are we good closing this? The stateless nodes are operated by the infrastructure team.
Done.