Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0723f57
Drive circuit-breaker probes for validator notification streams with …
ndr-ds Aug 12, 2026
43b45be
Box the listener update-streams future to keep trait-solver Send chec…
ndr-ds Aug 12, 2026
a264550
Merge remote-tracking branch 'upstream/main' into ndr-ds/notification…
ndr-ds Sep 7, 2026
245e3e5
Require an elapsed probe deadline before declaring a validator recove…
ndr-ds Sep 7, 2026
6a6291e
Key circuit-breaker recovery on subscribe having resolved, and arm th…
ndr-ds Sep 11, 2026
0bddf6b
Keep the probe timer armed when an update fails, and pace the retry o…
ndr-ds Sep 14, 2026
042d829
Narrow retry_update_deadline back to private now that no test calls it
ndr-ds Sep 14, 2026
bb2ee4c
Count a healthy validator's subscribes, and correct three mutation cl…
ndr-ds Sep 14, 2026
cefd48d
Cover the in-loop retry arming, and drop three dead constructs
ndr-ds Sep 14, 2026
e390115
Say what the subscribed flag actually separates
ndr-ds Sep 14, 2026
1f5be8c
Key stream health on serving rather than subscribing, and arm every l…
ndr-ds Sep 14, 2026
97e1eee
Report a recovery only for a breaker that actually tripped
ndr-ds Sep 15, 2026
d190457
Charge a stream's first failure at the configured interval, not double
ndr-ds Sep 15, 2026
a8ec5ec
Pin the backoff factor exactly instead of bounding it on one side
ndr-ds Sep 15, 2026
25661e5
Bound probe deadlines on both sides, and cover the per-validator spread
ndr-ds Sep 15, 2026
b236b0d
Cover the retry-deadline clear and the escalation cap
ndr-ds Sep 15, 2026
30f9a7e
Assert the recovery barrier instead of discarding it
ndr-ds Sep 15, 2026
bcb3a88
Sample the clock after the committee read, and make recovery symmetri…
ndr-ds Sep 16, 2026
7c82cdb
Re-arm an elapsed deadline for a stream that is serving but not yet h…
ndr-ds Sep 16, 2026
72994cd
Pin the re-arm instant, and assert the empty-map precondition
ndr-ds Sep 16, 2026
6e71c22
Elapse the briefly-serving fixture by a real margin
ndr-ds Sep 17, 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
317 changes: 255 additions & 62 deletions linera-core/src/client/chain_client/mod.rs

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions linera-core/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,14 +761,8 @@ impl<Env: Environment> Client<Env> {
// Download remaining certificates from the remote node using a pipelined
// sliding window. A background task downloads up to `max_concurrent_batch_downloads`
// batches concurrently and sends them through a channel for sequential processing.
#[cfg(not(web))]
type CertificateBatchFuture = std::pin::Pin<
Box<dyn Future<Output = Result<Vec<ConfirmedBlockCertificate>, NodeError>> + Send>,
>;
#[cfg(web)]
type CertificateBatchFuture = std::pin::Pin<
Box<dyn Future<Output = Result<Vec<ConfirmedBlockCertificate>, NodeError>>>,
>;
type CertificateBatchFuture =
crate::MaybeSendBoxFuture<'static, Result<Vec<ConfirmedBlockCertificate>, NodeError>>;

let max_concurrent = self.options.max_concurrent_batch_downloads;
let batch_size = self.options.certificate_download_batch_size;
Expand Down
12 changes: 12 additions & 0 deletions linera-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ mod local_node;
pub mod node;
/// Utilities for notifying subscribers about chain events.
pub mod notifier;

/// A boxed future that is `Send` on native targets and not on web, where there is a
/// single thread. Keeps the `Send` policy for boxed futures in one place.
#[cfg(not(web))]
pub(crate) type MaybeSendBoxFuture<'a, T> =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MaybeSendBoxFuture<'a, T> is futures::future::BoxFuture<'a, T> / LocalBoxFuture<'a, T> spelled out, and chain_worker/export.rs:1846 already uses those directly with the same cfg split — so the crate still holds two spellings of one policy. A cfg'd re-export keeps the single-source-of-truth win without a second definition:

#[cfg(not(web))]
pub(crate) use futures::future::BoxFuture as MaybeSendBoxFuture;
#[cfg(web)]
pub(crate) use futures::future::LocalBoxFuture as MaybeSendBoxFuture;

Also, ReceiveSenderCertificateFuture (client/mod.rs:394-397) is still the same cfg pair written out by hand, in a file this PR already touches for exactly this conversion.

std::pin::Pin<Box<dyn std::future::Future<Output = T> + Send + 'a>>;
/// A boxed future that is `Send` on native targets and not on web, where there is a
/// single thread. Keeps the `Send` policy for boxed futures in one place.
#[cfg(web)]
pub(crate) type MaybeSendBoxFuture<'a, T> =
std::pin::Pin<Box<dyn std::future::Future<Output = T> + 'a>>;

pub mod proof;
/// A validator node paired with the validator's public key.
pub mod remote_node;
Expand Down
Loading
Loading