Skip to content

"Welcome Basket" for new nodes #350

@carver

Description

@carver

Problem

Collecting network data near your node ID as a fresh peer is slow. It's been tolerable on history, but gets painfully slow on state.

Previous Proposal: Range Queries

We've talked about ways to address this before. The main proposal I remember is running range-queries on peers. But I don't think we overcame the general concern about asking a peer to do arbitrary work. Also, trie-node data is typically not stored with enough info to prove that it's canonical, to requesting peers.

New Proposal: Welcome Baskets

We could have every node prepare its own Welcome Basket to offer to new neighbors.

Requesting a Basket

When a peer joins the network, and is looking to populate its database, it first works to fill its peer buckets. When it finds peers that are nearby itself (roughly within its own estimated radius), it asks for a welcome basket.

What's in the Basket?

The basket is a heterogeneous collection of all types of content keys, values and inclusion proofs for the network.

The basket almost certainly does not include all of a mature peer's content (though it might for a very new one). When selecting which content to include in its basket, a peer should prefer content closest to its own node ID. This way, collections of baskets from different peers should create a wider coverage.

The Welcome Basket is not filtered by the transmitting peer. That work is left up to the receiving peer.

How big should we allow the basket to grow? 🤷🏻‍♂️ TBD

Generating a Basket

Every peer would be responsible for generating a welcome basket. Brand new peers would have an empty one, of course. Baskets should not be created on-demand. They should be pre-generated in a background process, or incrementally generated as new offers come in. The data must be fully provable to other peers.

The cost of sending a Welcome Basket should be trivial.

Goal

Welcome Baskets can give new nodes a quick jolt of data, so they can instantly start contributing to the network.

It's not a goal to immediately fill up new nodes. This just accelerates the first stages of the onboard process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions