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

オープン
#3,742 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
cli, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Rust
スター
155
フォーク
52
平均マージ
3日 9時間
マージ済み PR(30日)
33

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IntersectMBO/mithril のほかの issue

IntersectMBO/mithril の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。