Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d275f0f
Refactor mempool storage - split in 2 + explicit backend.
wraitii Mar 13, 2026
e113e4a
♻️ Reuse shared DP storage for signed blocks
wraitii Mar 17, 2026
961f6ea
GCS storage for DPs
wraitii Mar 17, 2026
e28949f
Merge branch 'main' into gcs-for-dp_votes
hhalex Mar 30, 2026
e34d0b8
fix clippy fmt
hhalex Mar 30, 2026
6432137
fix clippy 2
hhalex Mar 30, 2026
b7c2981
add missing rusttls crypto provider
hhalex Mar 30, 2026
78e9c09
Enable timers in long task runtime
hhalex Mar 30, 2026
1921cd4
add timestamp prefix to store data proposals
hhalex Mar 30, 2026
776b4d4
Scope DP GCS uploads by genesis timestamp
hhalex Mar 30, 2026
e90c237
fix gcs timestamp
hhalex Mar 30, 2026
730f98c
Use chain timestamp metadata for DP GCS paths
hhalex Mar 31, 2026
c4ce042
Simplify DP chain timestamp persistence
hhalex Mar 31, 2026
00e8d08
Store StoredSignedBlocks on GCS
hhalex Mar 31, 2026
3512302
Stream stored signed blocks over DA
hhalex Mar 31, 2026
c7b5b55
Make GCS block storage initialization async
hhalex Apr 1, 2026
db57f13
Use stored DA blocks in standalone indexer
hhalex Apr 1, 2026
8cded79
Persist genesis data proposals before DA streaming
hhalex Apr 1, 2026
a2ed59c
Buffer DPs until chain timestamp is known
hhalex Apr 1, 2026
2707fb2
Persist synced DPs before hole fill
hhalex Apr 2, 2026
94ddfb0
Gate mempool storage on DP durability
hhalex Apr 2, 2026
27c9abb
Merge branch 'main' into gcs-for-dp_votes
maxgttph Apr 2, 2026
85777bc
Merge branch 'main' into gcs-for-dp_votes
maxgttph Apr 2, 2026
fa993c5
Add GCS event indexer client
hhalex Apr 2, 2026
05c9ddd
Avoid DA empty-range panic
hhalex Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ hyli-bus = { workspace = true }


anyhow = { workspace = true }
base64 = { workspace = true }
borsh = { workspace = true, features = ["rc"] }
chrono = { workspace = true, features = ["std", "serde"] }
hex = { workspace = true, features = ["std"] }
Expand All @@ -262,12 +263,16 @@ tracing = { workspace = true }
assertables = { workspace = true }
axum = { workspace = true, features = ["macros", "multipart"] }
bytes = { workspace = true }
rustls = { workspace = true, features = ["aws-lc-rs"] }
clap = { workspace = true, features = ["derive"] }
config = { workspace = true, default-features = false, features = ["toml"] }
futures = { workspace = true }
google-cloud-storage = { workspace = true }
google-cloud-auth = { version = "1.5", default-features = false }
indexmap = { workspace = true, features = ["serde"] }
paste = { workspace = true }
rand = { workspace = true }
reqwest = { version = "0.13.2", default-features = false, features = ["json", "rustls"] }
sqlx = { workspace = true, features = [
"runtime-tokio",
"postgres",
Expand Down Expand Up @@ -348,6 +353,7 @@ risc0-zkvm = { workspace = true, default-features = false, features = [
"client",
] }
signal-child = "1.0.6"
google-cloud-auth = { version = "1.5", default-features = false }

[features]
default = ["instrumentation"]
Expand Down
41 changes: 41 additions & 0 deletions crates/hyli-model/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ pub struct SignedBlock {
pub certificate: AggregateSignature,
}

#[derive(
Debug, Serialize, Deserialize, Clone, PartialEq, Eq, BorshSerialize, BorshDeserialize, Display,
)]
#[display("")]
pub struct StoredSignedBlock {
pub data_proposals: Vec<(LaneId, Vec<DataProposalHash>)>,
pub consensus_proposal: ConsensusProposal,
pub certificate: AggregateSignature,
}

impl SignedBlock {
pub fn parent_hash(&self) -> &ConsensusProposalHash {
&self.consensus_proposal.parent_hash
Expand Down Expand Up @@ -63,6 +73,37 @@ impl Hashed<ConsensusProposalHash> for SignedBlock {
}
}

impl Hashed<ConsensusProposalHash> for StoredSignedBlock {
fn hashed(&self) -> ConsensusProposalHash {
self.consensus_proposal.hashed()
}
}

impl StoredSignedBlock {
pub fn height(&self) -> BlockHeight {
BlockHeight(self.consensus_proposal.slot)
}
}

impl From<&SignedBlock> for StoredSignedBlock {
fn from(block: &SignedBlock) -> Self {
Self {
data_proposals: block
.data_proposals
.iter()
.map(|(lane_id, data_proposals)| {
(
lane_id.clone(),
data_proposals.iter().map(|dp| dp.hashed()).collect(),
)
})
.collect(),
consensus_proposal: block.consensus_proposal.clone(),
certificate: block.certificate.clone(),
}
}
}

impl Ord for SignedBlock {
fn cmp(&self, other: &Self) -> Ordering {
self.height().0.cmp(&other.height().0)
Expand Down
5 changes: 5 additions & 0 deletions crates/hyli-model/src/node/data_availability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,18 @@ pub enum NodeStateEvent {
pub enum DataAvailabilityRequest {
/// Start streaming blocks from a given height
StreamFromHeight(BlockHeight),
/// Start streaming stored signed blocks from a given height
StreamStoredFromHeight(BlockHeight),
/// Request a specific block by height (prioritized)
BlockRequest(BlockHeight),
/// Request a specific stored signed block by height (prioritized)
StoredBlockRequest(BlockHeight),
}

#[derive(Clone, Debug, PartialEq, Eq, BorshSerialize, BorshDeserialize, TcpMessageLabel)]
pub enum DataAvailabilityEvent {
SignedBlock(SignedBlock),
StoredSignedBlock(StoredSignedBlock),
MempoolStatusEvent(MempoolStatusEvent),
/// Block not found at the requested height
BlockNotFound(BlockHeight),
Expand Down
4 changes: 2 additions & 2 deletions crates/hyli-modules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sqlx = { workspace = true, optional = true, features = ["chrono"] }

# GCS
google-cloud-storage = { workspace = true, optional = true }
chrono = { workspace = true, optional = true }
chrono = { workspace = true }

tokio = { workspace = true, features = ["full", "tracing"] }
tokio-util = { workspace = true }
Expand Down Expand Up @@ -82,4 +82,4 @@ instrumentation = [
]
indexer = ["client-sdk/csi", "db"]
db = ["dep:sqlx", "hyli-model/sqlx", "sqlx/runtime-tokio", "sqlx/postgres"]
gcs = ["dep:google-cloud-storage", "dep:chrono"]
gcs = ["dep:google-cloud-storage"]
1 change: 1 addition & 0 deletions crates/hyli-modules/src/modules/da_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ impl<P: BlockProcessor + 'static> SignedDAListener<P> {
DataAvailabilityEvent::SignedBlock(block) => {
self.handle_signed_block(block).await?;
}
DataAvailabilityEvent::StoredSignedBlock(_) => {}
DataAvailabilityEvent::MempoolStatusEvent(status) => {
self.processor.process_mempool_status(status).await?;
}
Expand Down
Loading
Loading