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

fix: block handling during certificate generation #471

Merged
merged 10 commits into from
Mar 13, 2024
Merged

Conversation

atanmarko
Copy link
Member

Description

Handle removal of subnet blocks from the list when generating certificates

Fixes TP-786

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

@atanmarko atanmarko requested a review from a team as a code owner March 1, 2024 16:02
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 71.86%. Comparing base (96e862f) to head (406f11e).

Files Patch % Lines
...opos-sequencer-subnet-runtime/src/certification.rs 0.00% 19 Missing ⚠️
crates/topos-sequencer-subnet-runtime/src/lib.rs 0.00% 2 Missing ⚠️
crates/topos-sequencer-subnet-runtime/src/proxy.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #471      +/-   ##
==========================================
- Coverage   71.96%   71.86%   -0.10%     
==========================================
  Files         225      225              
  Lines       12659    12675      +16     
==========================================
- Hits         9110     9109       -1     
- Misses       3549     3566      +17     

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

@dvdplm
Copy link
Contributor

dvdplm commented Mar 13, 2024

I don't fully understand why we keep the finalized blocks in linked list as opposed to a vec or a hashmap, but that's not the main point of this pr.

@atanmarko
Copy link
Member Author

atanmarko commented Mar 13, 2024

I don't fully understand why we keep the finalized blocks in linked list as opposed to a vec or a hashmap, but that's not the main point of this pr.

We remove blocks from the beginning and add them to the end of the list and they need to keep order. I believe a linked list is the most optimal structure for this. VecDeque could also do the job (but less optimal if a number of blocks grows a lot because it is a ring buffer)

@atanmarko atanmarko merged commit a5299c8 into main Mar 13, 2024
20 of 21 checks passed
@atanmarko atanmarko deleted the fix/TP-786 branch March 13, 2024 13:01
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