IntersectMBO / IntersectMBO/mithril

Add an IndexedDB backend for the certificate chain cache in the WASM client

Open
#3,524 0 comments 0 reactions 0 assignees View on GitHub
feature :rocket:
Dominant language
Rust
Stars
154
Forks
51
Avg merge
1d 23h
Merged PRs (30d)
38

Description

## Why

We need to provide some WASM support for the certificate chain cache that survives restarts. We can't use the file implementation in WASM and given the storage size of the certificates, we need to use `IndexedDB` for implementation.

## What

Add a `IndexedDbCertificateVerifierCache` implementation of `CertificateVerifierCache` in `mithril-client` for non-WASM targets.

## How

- [ ] Store each certificate in a the indexed DB
- [ ] Use a space for the committed cache
- [ ] Use a space by certificate chain validation id for staging
- [ ] Upon committing, the staged certificates are moved the to the committed cache (atomic moves with transactions)
- [ ] Adapt the nightly tests to use the cache (`ci-test`)

Contributor guide

Open the contributing guide

Research direction

Start in the mithril-client area by locating CertificateVerifierCache and the existing certificate cache implementations. Read how the cache is staged and committed, then inspect the ci-test nightly tests. Done means certificates persist in IndexedDB, staging is isolated by validation ID, commits move staged data atomically, and the adapted tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.