EspressoSystems / hotshot-query-service

Generic query service for HotShot applications
https://espressosystems.github.io/hotshot-query-service/
GNU General Public License v3.0
5 stars 1 forks source link

Header-only data source #738

Open jbearer opened 5 days ago

jbearer commented 5 days ago

For lightweight nodes, it use useful to be able to store and provide headers (or leaves), but never store payloads and other large stuff, and not worry about fetching anything we don't already have (since consensus guarantees that some lightweight nodes have every leaf, and the query service guarantees that an archival node will eventually get it as long as someone has it).

Add a LeafOnlyDataSource which wraps an AvailabilityStorage + NodeStorage in the same way as FetchingDataSource, but LeafOnlyDataSource