Skip to content

Commit 88197d6

Browse files
feat: Add slow sync strike out logic (#2196)
Co-authored-by: Mirko von Leipzig <48352201+Mirko-von-Leipzig@users.noreply.github.com>
1 parent a89635e commit 88197d6

4 files changed

Lines changed: 217 additions & 94 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ operated.
5757
- [BREAKING] `GetAccount` can now return all storage map entries with a single request ([#2121](https://github.com/0xMiden/node/issues/2121)).
5858
- Persisted attachments of private output notes when applying a block, so they are now returned by `GetNotesById` ([#2172](https://github.com/0xMiden/node/pull/2172)).
5959
- [BREAKING] Replaced `StoreStatus` with `chain_tip` field in `RpcStatus` ([#2187](https://github.com/0xMiden/node/pull/2187)).
60+
- Added logic to disconnect slow block and proof stream clients ([#2196](https://github.com/0xMiden/node/pull/2196)).
6061
- Added gRPC health check endpoint to node's RPC service ([#2188](https://github.com/0xMiden/node/pull/2188)).
6162

6263
### Docker

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ RUN cargo chef prepare --recipe-path recipe.json
3232

3333
FROM chef AS builder
3434
ARG BIN
35+
# Disable incremental compilation: Docker normalises COPY timestamps, which
36+
# breaks Rust's mtime-based fingerprinting and causes stale .rlib reuse.
37+
# The /app/target cache still accelerates builds via pre-compiled dep .rlibs.
38+
ENV CARGO_INCREMENTAL=0
3539
COPY --from=planner /app/recipe.json recipe.json
3640
# Build dependencies while preserving Cargo artifacts across layer invalidations.
3741
#

crates/rpc/src/server/api.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ fn state_subscription_error_to_status(err: StateSubscriptionError) -> Status {
314314
"failed to load proof for block {block_num}: {}",
315315
source.as_report()
316316
)),
317+
StateSubscriptionError::TooSlow => {
318+
Status::resource_exhausted("subscriber is too slow to keep up with the chain")
319+
},
317320
}
318321
}
319322

0 commit comments

Comments
 (0)