Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

chore: adding storage context on startup #404

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

Freyskeyd
Copy link
Member

Description

This PR aims to add some extra context when node starts, mostly displaying the number of certificates synced, the pending/precedence pool certificates number.

INFO topos_tce: Storage initialized with 0 certificates delivered, 0 pending certificates and 0 certificates in the precedence pool

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@Freyskeyd Freyskeyd requested a review from a team as a code owner December 13, 2023 23:28
@Freyskeyd Freyskeyd requested review from dvdplm and gruberb December 13, 2023 23:28
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (b096482) 62.88% compared to head (7b42f9a) 62.73%.
Report is 1 commits behind head on main.

Files Patch % Lines
crates/topos-tce/src/lib.rs 0.00% 19 Missing ⚠️
crates/topos-tce-storage/src/validator/mod.rs 0.00% 6 Missing ⚠️
crates/topos-tce-storage/src/fullnode/mod.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
- Coverage   62.88%   62.73%   -0.16%     
==========================================
  Files         221      221              
  Lines       11818    11847      +29     
==========================================
  Hits         7432     7432              
- Misses       4386     4415      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

A word of warning though: counting rows this way is not cheap for big rocksdb tables and this will need to be rewritten at some point. For now it's fine and a good addition.

@Freyskeyd
Copy link
Member Author

@dvdplm Yes, it is mainly added to debug the devnet. If we want to add this for long term, we may rely on some properties or another storage.

Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
@Freyskeyd Freyskeyd force-pushed the chore/adding-context-on-start branch from 1a9e24a to 7b42f9a Compare December 15, 2023 14:18
@Freyskeyd Freyskeyd merged commit ffae4c6 into main Dec 15, 2023
21 of 22 checks passed
@Freyskeyd Freyskeyd deleted the chore/adding-context-on-start branch December 15, 2023 14:50
@Freyskeyd Freyskeyd added this to the Soft-fork investigation milestone Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants