Skip to content

fix: sync non-deterministically while historical chain patch is pending#685

Merged
ozgb merged 3 commits into
release/node-0.20.2-rc.3from
ozgb-sync-with-non-determinism
Feb 17, 2026
Merged

fix: sync non-deterministically while historical chain patch is pending#685
ozgb merged 3 commits into
release/node-0.20.2-rc.3from
ozgb-sync-with-non-determinism

Conversation

@ozgb

@ozgb ozgb commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Overview

Until we patch the chain, we need to allow nodes to sync to tip. This change preserves the non-deterministic behaviour of syncing, while ensuring new blocks are produced deterministically.

This fix is backwards compatible with 0.20.2-rc.2, and ensures we won't get more chain corruption going forward.

Will tag as a new release version 0.20.2-rc.3.1

related ticket: https://shielded.atlassian.net/browse/PM-21823

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

@ozgb ozgb requested a review from a team as a code owner February 16, 2026 17:37
@ozgb ozgb requested a review from gilescope February 16, 2026 17:39
use rand::seq::SliceRandom;
let mut segments: Vec<_> = self.inputs.values().collect();
segments.shuffle(&mut rand::thread_rng());
segments.into_iter().flat_map(|utxos| utxos.iter()).cloned().collect()

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.

I would have put them into a hashmap but this works.

@ozgb ozgb enabled auto-merge (squash) February 17, 2026 15:59
@ozgb ozgb merged commit 7b8379d into release/node-0.20.2-rc.3 Feb 17, 2026
41 checks passed
@ozgb ozgb deleted the ozgb-sync-with-non-determinism branch February 17, 2026 15:59
ozgb added a commit that referenced this pull request Feb 18, 2026
…ng (#685)

* fix: sync non-deterministically while historical chain patch is pending

* docs: add pr link to change file

* docs: add ticket link to change file
ozgb added a commit that referenced this pull request Feb 18, 2026
…ng (#685)

* fix: sync non-deterministically while historical chain patch is pending

* docs: add pr link to change file

* docs: add ticket link to change file
ozgb added a commit that referenced this pull request Feb 18, 2026
…ng (#685)

* fix: sync non-deterministically while historical chain patch is pending

* docs: add pr link to change file

* docs: add ticket link to change file
ozgb added a commit that referenced this pull request Feb 18, 2026
* chore: update indexer commit to fix sbom checks

* feat: add network_peerReputations and network_peerReputation RPC endpoints (#649)

* feat: add network_peerReputations and network_peerReputation RPC endpoints

Expose peer reputation and ban status via JSON-RPC to enable debugging
peer connectivity issues without custom tooling.

* docs: update change file

* chore: cargo fmt

---------

Co-authored-by: Squirrel <giles.cope@shielded.io>

* feat: add unsafe RPC to unban peers (#666)

* feat: add unsafe RPC to unban peers

Useful for node operators to use when a peer is banned but has since corrected it’s behaviour.

Without this RPC, the only way to reset peer reputation is to restart the node (reputation exists in memory only).

* docs: add pr link to change file

* fix: remove non-determinism (#679)

* fix: keep existing preview ordering

Signed-off-by: Giles Cope <gilescope@gmail.com>

* preview has other tx with different orderings.

Just this change would not be enough to get to head.

* fix npm audit finding

---------

Signed-off-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: Justin Frevert <justinfrevert@gmail.com>

* fix: sync non-deterministically while historical chain patch is pending (#685)

* fix: sync non-deterministically while historical chain patch is pending

* docs: add pr link to change file

* docs: add ticket link to change file

* chore: cargo fmt

---------

Signed-off-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: Squirrel <giles.cope@shielded.io>
Co-authored-by: Justin Frevert <justinfrevert@gmail.com>
github-merge-queue Bot pushed a commit that referenced this pull request Feb 18, 2026
…ng (#685) (#700)

* fix: sync non-deterministically while historical chain patch is pending (#685)

* fix: sync non-deterministically while historical chain patch is pending

* docs: add pr link to change file

* docs: add ticket link to change file

* docs: update change file with PR link
ozgb added a commit that referenced this pull request Feb 18, 2026
* fix: remove non-determinism (#679)

* fix: keep existing preview ordering

Signed-off-by: Giles Cope <gilescope@gmail.com>

* preview has other tx with different orderings.

Just this change would not be enough to get to head.

* fix npm audit finding

---------

Signed-off-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: Justin Frevert <justinfrevert@gmail.com>

* fix: sync non-deterministically while historical chain patch is pending (#685)

* fix: sync non-deterministically while historical chain patch is pending

* docs: add pr link to change file

* docs: add ticket link to change file

* feat: add unsafe RPC to unban peers (#666)

* feat: add unsafe RPC to unban peers

Useful for node operators to use when a peer is banned but has since corrected it’s behaviour.

Without this RPC, the only way to reset peer reputation is to restart the node (reputation exists in memory only).

* docs: add pr link to change file

---------

Signed-off-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: Squirrel <giles.cope@shielded.io>
Co-authored-by: Justin Frevert <justinfrevert@gmail.com>
gilescope pushed a commit that referenced this pull request Apr 8, 2026
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants