IntersectMBO / IntersectMBO/mithril
Certificate chain caching
- Dominant language
- Rust
- Stars
- 154
- Forks
- 51
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 38
Description
## Why
Every time a Mithril client verifies a certified artifact (snapshot, transaction proof, stake distribution), it must walk the **entire certificate chain** from that artifact's certificate back to the genesis certificate. The chain grows unboundedly as every epoch produces multiple certificates (one per signed entity type). On the mainnet, with hundreds of epochs and multiple certificates per epoch, the chain is already hundreds of certificates long and grows permanently.
This means that **every verification pays the full cost of the entire chain history**, regardless of how recently the client last verified. A light wallet that verified 5 minutes ago must re-walk and re-verify the same thousands of certificates, minus only the handful of new ones. Bridge nodes that verify continuously waste the vast majority of their work re-verifying certificates they already validated.
The goal of this MVP is to deliver a persistent certificate cache on the client (file-system or embedded database) that survives across restarts and reduces the verification cost. Once a certificate has been verified and the chain segment from it to genesis is trusted, subsequent verifications only need to walk from the new certificate back to the nearest cached trust anchor, not all the way to genesis.
Contributor guide
Assessment
This issue has not been assessed yet.