Skip to content
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

Don't stall syncing if gap is too large #2801

Merged
merged 5 commits into from
Oct 4, 2022
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
1 change: 1 addition & 0 deletions bin/wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixed

- Syncing no longer stalls if the gap between the finalized and latest block is more than 100 blocks. ([#2801](https://github.com/paritytech/smoldot/pull/2801))
- CPU-heavy operations such as verifying finality proofs or compiling the runtime will now better respect the CPU rate limit. ([#2803](https://github.com/paritytech/smoldot/pull/2803))

## 0.7.0 - 2022-09-28
Expand Down
20 changes: 11 additions & 9 deletions src/sync/all_forks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1402,11 +1402,12 @@ impl<TBl, TRq, TSrc> AddBlockVacant<TBl, TRq, TSrc> {
None => break,
};

self.inner
.inner
.inner
.blocks
.remove_sources_known_block(height, &hash);
// TODO: restore this block of code; it is extremely complicated because it is unclear which source-block combinations we can add and keep without making memory usage explode
/*self.inner
.inner
.inner
.blocks
.remove_sources_known_block(height, &hash);*/
self.inner
.inner
.inner
Expand Down Expand Up @@ -1631,10 +1632,11 @@ impl<'a, TBl, TRq, TSrc> AnnouncedBlockUnknown<'a, TBl, TRq, TSrc> {
None => break,
};

self.inner
.inner
.blocks
.remove_sources_known_block(height, &hash);
// TODO: restore this block of code; it is extremely complicated because it is unclear which source-block combinations we can add and keep without making memory usage explode
/*self.inner
.inner
.blocks
.remove_sources_known_block(height, &hash);*/
self.inner
.inner
.blocks
Expand Down