Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions lean_client/Cargo.lock

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

1 change: 1 addition & 0 deletions lean_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ xmss = { path = "./xmss" }
anyhow = "1.0.100"
async-trait = "0.1"
axum = "0.8.8"
bitvec = "1.0.1"
bls = { git = "https://github.com/grandinetech/grandine", package = "bls", features = ["blst"], rev = "64afdee3c6be79fceffb66933dcb69a943f3f1ae" }
clap = { version = "4", features = ["derive"] }
derive_more = "2.1.1"
Expand Down
2 changes: 2 additions & 0 deletions lean_client/containers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ edition = { workspace = true }

[dependencies]
anyhow = { workspace = true }
bitvec = { workspace = true }
bls = { workspace = true }
env-config = { workspace = true }
hex = { workspace = true }
metrics = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions lean_client/containers/src/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl AggregatedSignatureProof {
/// Bitlist representing validator participation in an attestation.
/// Limit is VALIDATOR_REGISTRY_LIMIT (4096).
#[derive(Clone, Debug, Ssz, Serialize, Deserialize)]
#[ssz(transparent)]
pub struct AggregationBits(
#[serde(with = "crate::serde_helpers::bitlist")] pub BitList<ValidatorRegistryLimit>,
);
Expand Down
4 changes: 2 additions & 2 deletions lean_client/containers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ mod validator;

pub use attestation::{
AggregatedAttestation, AggregatedSignatureProof, AggregatedSignatures, AggregationBits,
Attestation, AttestationData, Attestations, SignatureKey, SignedAggregatedAttestation,
SignedAttestation,
Attestation, AttestationData, AttestationSignatures, Attestations, SignatureKey,
SignedAggregatedAttestation, SignedAttestation,
};
pub use block::{
Block, BlockBody, BlockHeader, BlockSignatures, BlockWithAttestation, SignedBlock,
Expand Down
4 changes: 4 additions & 0 deletions lean_client/containers/src/slot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ impl Ord for Slot {
}

impl Slot {
pub fn justified_index_after(self, finalized_slot: Slot) -> Option<u64> {
self.0.checked_sub(finalized_slot.0 + 1)
}

/// Checks if this slot is a valid candidate for justification after a given finalized slot.
///
/// According to the 3SF-mini specification, a slot is justifiable if its
Expand Down
Loading
Loading