-
Notifications
You must be signed in to change notification settings - Fork 232
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
fix: fix pending compact block memory bloat on abnormal flow #3110
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quake
reviewed
Oct 19, 2021
driftluo
force-pushed
the
fix-pending-compact
branch
2 times, most recently
from
October 19, 2021 05:52
21a09cd
to
26ab1e7
Compare
quake
approved these changes
Oct 19, 2021
yangby-cryptape
approved these changes
Oct 19, 2021
driftluo
force-pushed
the
fix-pending-compact
branch
from
October 19, 2021 07:56
26ab1e7
to
c5a9403
Compare
bors r=quake,yangby-cryptape |
bors bot
added a commit
that referenced
this pull request
Oct 20, 2021
3116: fix: fix pending compact retain r=doitian,yangby-cryptape a=driftluo ### What problem does this PR solve? Issue introduced in #3110 Block number cannot be used as the judgment condition here, but epoch number should be used because any block of the current epoch can be accepted as uncle, and the practice of using block number as the judgment condition will not be able to broadcast and accept some uncle records, resulting in an abnormal uncle rate ### Check List Tests - Unit test ### Release note ```release-note None: Exclude this PR from the release note. ``` 3117: chore(deps): bump reqwest from 0.11.4 to 0.11.6 r=quake,driftluo a=dependabot[bot] Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.4 to 0.11.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/releases">reqwest's releases</a>.</em></p> <blockquote> <h2>v0.11.5</h2> <ul> <li>Add <code>ClientBuilder::http1_only()</code> method.</li> <li>Add <code>tls::Version</code> type, and <code>ClientBuilder::min_tls_version()</code> and <code>ClientBuilder::max_tls_version()</code> methods.</li> <li>Implement <code>TryFrom<Request></code> for <code>http::Request</code>.</li> <li>Implement <code>Clone</code> for <code>Identity</code>.</li> <li>Fix <code>NO_PROXY</code>environment variable parsing to more closely match curl's. Comma-separated entries are now trimmed for whitespace, and <code>*</code> is allowed to match everything.</li> <li>Fix redirection to respect <code>https_only</code> option.</li> <li>(wasm) Add <code>Body::as_bytes()</code> method.</li> <li>(wasm) Fix sometimes wrong conversation of bytes into a <code>JsValue</code>.</li> <li>(wasm) Avoid dependency on serde-serialize feature.</li> </ul> <h2>New Contributors 😍</h2> <ul> <li><a href="https://github.com/blyxxyz"><code>`@blyxxyz</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1294">seanmonstar/reqwest#1294</a></li> <li><a href="https://github.com/Saruniks"><code>`@Saruniks</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1296">seanmonstar/reqwest#1296</a></li> <li><a href="https://github.com/dlesl"><code>`@dlesl</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1313">seanmonstar/reqwest#1313</a></li> <li><a href="https://github.com/Dr-Emann"><code>`@Dr-Emann</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1322">seanmonstar/reqwest#1322</a></li> <li><a href="https://github.com/jmgilman"><code>`@jmgilman</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1335">seanmonstar/reqwest#1335</a></li> <li><a href="https://github.com/silvioprog"><code>`@silvioprog</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1334">seanmonstar/reqwest#1334</a></li> <li><a href="https://github.com/skystar-p"><code>`@skystar-p</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1341">seanmonstar/reqwest#1341</a></li> <li><a href="https://github.com/abatkin"><code>`@abatkin</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1332">seanmonstar/reqwest#1332</a></li> <li><a href="https://github.com/VictorBulba"><code>`@VictorBulba</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1270">seanmonstar/reqwest#1270</a></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md">reqwest's changelog</a>.</em></p> <blockquote> <h2>v0.11.6</h2> <ul> <li>(wasm) Fix request bodies more.</li> </ul> <h2>v0.11.5</h2> <ul> <li>Add <code>ClientBuilder::http1_only()</code> method.</li> <li>Add <code>tls::Version</code> type, and <code>ClientBuilder::min_tls_version()</code> and <code>ClientBuilder::max_tls_version()</code> methods.</li> <li>Implement <code>TryFrom<Request></code> for <code>http::Request</code>.</li> <li>Implement <code>Clone</code> for <code>Identity</code>.</li> <li>Fix <code>NO_PROXY</code>environment variable parsing to more closely match curl's. Comma-separated entries are now trimmed for whitespace, and <code>*</code> is allowed to match everything.</li> <li>Fix redirection to respect <code>https_only</code> option.</li> <li>(wasm) Add <code>Body::as_bytes()</code> method.</li> <li>(wasm) Fix sometimes wrong conversation of bytes into a <code>JsValue</code>.</li> <li>(wasm) Avoid dependency on serde-serialize feature.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/seanmonstar/reqwest/commit/59bc9a932380708319ea53b59b0369b38aab0d92"><code>59bc9a9</code></a> v0.11.6</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/136569802efc00bda55b21aea61f917f309219e8"><code>1365698</code></a> Update <code>cookie_store</code> dependency (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1268">#1268</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/bd4e0c663c243b584dca114c1d376f67b1967f64"><code>bd4e0c6</code></a> fmt: wasm body (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1359">#1359</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/d35c311e6d7451baf017a45cc32770385cb51c9c"><code>d35c311</code></a> Update async body doc (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1357">#1357</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/bb3d102108493da9adf9081b4d0badbff4a2bd91"><code>bb3d102</code></a> wasm: don't send request body as plain uint8 array (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1358">#1358</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/fead177093ca94c59312296e176f612a9b2150db"><code>fead177</code></a> Fix body to <code>JsValue</code> conversion (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1354">#1354</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/c9217d8d1bc6c65605ad4909cb45a1cb72b778a0"><code>c9217d8</code></a> fix: wasm client: pass response header to builder by reference (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1350">#1350</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/597833d906f2453a6976e6ed6ed71af91c534382"><code>597833d</code></a> docs/comments: fix some typos (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1346">#1346</a>)</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/5cc1eff23beccb68c15f75f4133abaa51074bc04"><code>5cc1eff</code></a> v0.11.5</li> <li><a href="https://github.com/seanmonstar/reqwest/commit/d40276c0f081c2cc1ebc8b63ad6075daf0f6dff0"><code>d40276c</code></a> wasm: add missing <code>as_bytes</code> method to <code>Body</code> implementation (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1270">#1270</a>)</li> <li>Additional commits viewable in <a href="https://github.com/seanmonstar/reqwest/compare/v0.11.4...v0.11.6">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=reqwest&package-manager=cargo&previous-version=0.11.4&new-version=0.11.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> 3118: chore(deps): bump libc from 0.2.103 to 0.2.104 r=driftluo,yangby-cryptape a=dependabot[bot] Bumps [libc](https://github.com/rust-lang/libc) from 0.2.103 to 0.2.104. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rust-lang/libc/releases">libc's releases</a>.</em></p> <blockquote> <h2>0.2.104</h2> <p>Bump patch version to 0.2.104.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rust-lang/libc/commit/20e529595b2dd991072c6fa1cca606b508f5ed1b"><code>20e5295</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/rust-lang/libc/issues/2443">#2443</a> - ghedo:release-0.2.104, r=JohnTitor</li> <li><a href="https://github.com/rust-lang/libc/commit/b5522085530e57b8b092e7a8e7ae2563af469f51"><code>b552208</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/rust-lang/libc/issues/2456">#2456</a> - JohnTitor:big-sur, r=JohnTitor</li> <li><a href="https://github.com/rust-lang/libc/commit/c500cbf58a3855bbaa051eaa3ba0a101ef789b8c"><code>c500cbf</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/rust-lang/libc/issues/2457">#2457</a> - devnexen:win32_deprecate_context, r=JohnTitor</li> <li><a href="https://github.com/rust-lang/libc/commit/6924fee5617c96b88e3671cb251061fed82d4751"><code>6924fee</code></a> windows deprecate CONTEXT and related types.</li> <li><a href="https://github.com/rust-lang/libc/commit/98e72b04d8a720b57699682c6b758bfe5cc8027a"><code>98e72b0</code></a> Remove some workarounds for older macOSes</li> <li><a href="https://github.com/rust-lang/libc/commit/cdf887c8a8c72f87bbca5ef47a9a99d50aae39fa"><code>cdf887c</code></a> Upgrade macOS on CI to 11 (Big Sur)</li> <li><a href="https://github.com/rust-lang/libc/commit/47f6fec46424cc3aabaeac28ec38fce552f80944"><code>47f6fec</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/rust-lang/libc/issues/2454">#2454</a> - tklauser:android-missing-netlink-consts, r=JohnTitor</li> <li><a href="https://github.com/rust-lang/libc/commit/bc4d6d62bdf7098acea493b6a7691ce80a5ab596"><code>bc4d6d6</code></a> Auto merge of <a href="https://github-redirect.dependabot.com/rust-lang/libc/issues/2452">#2452</a> - devnexen:apple_thread_introspection_hook, r=Amanieu</li> <li><a href="https://github.com/rust-lang/libc/commit/7c2847927f6e65c131d61debcc83a74e7b9b36dc"><code>7c28479</code></a> apple introduces pthread introspection api</li> <li><a href="https://github.com/rust-lang/libc/commit/d8e549c120db65d75de6890c90d1ae6dd1bbc68d"><code>d8e549c</code></a> Add missing NETLINK_* socket option constants on Android</li> <li>Additional commits viewable in <a href="https://github.com/rust-lang/libc/compare/0.2.103...0.2.104">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=libc&package-manager=cargo&previous-version=0.2.103&new-version=0.2.104)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: driftluo <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
The cleanup of
pending_compact_blocks
is only in the process of the successful process(here or here). When the block is synchronized by the sync protocol first or the remote node does not respond, the cleanup process will not be executed, causing unexpected memory bloat.The modification of this PR will depend on each successful compact block process. As long as there is one success, it will clean up all unexpected unsuccessful legacy issues.
Check List
Tests
Release note