-
Notifications
You must be signed in to change notification settings - Fork 28
DRAFT: feat(chain): check remaining blocks in IBD to enable blob validation #1721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chain-enable-blob-validation-during-ibd-base
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
use std::{collections::HashSet, hash::Hash, time::Duration}; | ||
|
||
use cryptarchia_engine::Length; | ||
use nomos_utils::bounded_duration::{MinimalBoundedDuration, SECOND}; | ||
use serde::{Deserialize, Serialize}; | ||
use serde_with::serde_as; | ||
|
@@ -43,6 +44,9 @@ where | |
/// when no download is needed at the moment from a peer. | ||
#[serde(default = "default_delay_before_new_download")] | ||
pub delay_before_new_download: Duration, | ||
/// Threshold in number of remaining blocks to the target height | ||
/// at which blob validation becomes enabled during IBD. | ||
pub last_blocks_with_blob_validation: Length, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be first block with validation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I intended this parameter to represent the number of "remaining" blocks. So, I think that "last" makes more sense. If there are N blocks in total that we have to catch up during IBD, and if there are Please let me know if this naming doesn't sound good. I will try to think about other names (or updating comments). |
||
} | ||
|
||
const fn default_offline_grace_period() -> Duration { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how should we interpret this value and how would one select it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value must be defined in the DA spec, because this means the period how long DA nodes will keep blobs. But, it is not determined yet. I added this parameter here because we anyway need to for IBD.