forest icon indicating copy to clipboard operation
forest copied to clipboard

Stateless bootstrap node

Open lemmih opened this issue 2 years ago • 2 comments

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 Hello requests, 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 N most 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 with PartialResponse. 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 avatar Oct 09 '23 09:10 lemmih

@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?

LesnyRumcajs avatar Jan 11 '24 08:01 LesnyRumcajs

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 avatar Jan 15 '24 09:01 lemmih

@lemmih Are we good closing this? The stateless nodes are operated by the infrastructure team.

LesnyRumcajs avatar Apr 11 '24 14:04 LesnyRumcajs

Done.

lemmih avatar Apr 17 '24 13:04 lemmih