Add a sub-command to prune the certificates of an aggregator database

Aperta
#3,742 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli, databases

Direzione di ricerca

Start by reading the certificate pruning task and the retention rules in issue #3727, then trace how the aggregator CLI defines its tools subcommands and how database foreign keys connect certificates to signed entities. The issue also calls for dry-run and certificate-chain verification, measurements on copies of four network databases, and aggregator-guide documentation. Done means the command prunes according to the rules and reports the requested counts, sizes, query latency, and chain validity.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature :rocket:

Why

The gain of the certificate pruning on the storage and on the query latency is unknown on real databases, and operators need a way to prune an existing database without waiting for the upkeep of a running aggregator.

What

A new sub-command of the tools command of the aggregator CLI prunes the certificates of an aggregator database with the retention rules, and its gain is assessed on copies of the databases of testing-preview and of the other Mithril networks.

How

  • Implement the pruner that removes the eligible certificates older than the retention, keeping the genesis certificates, the master certificates of each epoch and the protected signed entity types (depending on rules established in #3727)
  • Add a sub-command to the tools command of the aggregator CLI that
    • Prunes the certificates of a database with a given retention, reusing the certificate pruning task
    • Remove the signed entities linked to the pruned certificates (deal with foreign keys)
    • Warn that aggregator must not be running in the mean time?
    • Implement a dry run for the sub-command
    • The database files are given as input to the command
    • Verify the certificate chain after pruning
    • Report the number of pruned certificates and signed entities, and the size of the database before and after the pruning and the vacuum
  • Assess the gain on copies of the databases of the Mithril networks (testing-preview, pre-release-preview, release-preprod and release-mainnet):
    • Size of the database
    • Latency of the certificate queries
    • Validity of the certificate chain after the pruning
  • Document the sub-command in the aggregator guide
Lingua principale
Rust
Stelle
155
Fork
52
Merge medio
3g 9h
PR unite (30g)
33

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/mithril

Tutte le issue di IntersectMBO/mithril

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.