As Hypermap grows, it will become increasingly untenable for new users to boot nodes, since the initial eth_getLogs will become too large for any ETH RPC provider to serve.
Further, apps indexing the Hypermap will have the same problem: bootstrapping the node is just indexing the Hypermap for HNS, after all.
Therefore we need to provide some way for Hypermap-consumers to easily get up-to-date (or near up-to-date) on Hypermap state.
The most general solution is something like The Graph: allow arbitrary subgraph creation and querying.
A more specific solution is: just provide Hypermap checkpointing.
Rather than trying to reinvent the wheel, let's focus on Hypermap checkpointing. What are the requirements?
- Allow applications to get "most of" the Hypermap state. It is allowable to be slightly out-of-date, as long as an average, free ETH RPC can easily get up-to-date from the checkpoint.
- Have a pathway to trust-minimized, decentralized creation and distribution of checkpoints.
A proposal
hypermap-cacher:hypermap-cacher:nick.hypr
- Every period of time,
eth_getLogsforlast_cached_blocktolast_cached_block + 500, - Dump logs to file, alongside metadata,
- Serve file, compressed file, hash of both, over hypernet & http,
- Update manifest file & hash, also served over hypernet & http,
File naming conventions
Log cache
- ISO-8601 compact format time
- chainId
- fromBlock
- toBlock
- protocol version #
e.g.
20250515T143045Z-chain8453-from1234-to1734-protocol0.json
Manifest
- manifest
- chainId
- protocol version #
manifest-chain8453-protocol0.json
process_lib::hypermap::Hypermap::get_bootstrap(from_block: Option<u64>, filters: Vec<alloy::Filter>, nodes: HashSet<String>) -> Vec<eth::Log>
- Query each node (as well as default nodes),
- Ask for blocks
from_block, - Receive
Vec<LogCache>, - Process and confirm signatures, etc,
- Return Veceth::Log,
process_lib::hypermap::Hypermap::get_bootstrap_log_cache(from_block: Option<u64>, nodes: HashSet<String>, chain: Option<String>) -> Vec<LogCache>
process_lib::hypermap::Hypermap::validate_log_cache(logs: LogCache) -> bool,
process_lib::hypermap::Hypermap::get_bootstrap(from_block: Option<u64>, nodes: HashSet<String>, chain: Option<String>) -> Vec<eth::Log>
process_lib::eth::apply_filter(logs: Vec<eth::Log>, filter: alloy::Filter) -> Vec<eth::Log>
process_lib::hypermap::Hypermap::bootstrap(from_block: Option<u64>, filters: Vec<alloy::Filter>, nodes: HashSet<String>, chain: Option<String>) -> Vec<Vec<eth::Log>>