fix: sync non-deterministically while historical chain patch is pending#685
Merged
Merged
Conversation
gilescope
reviewed
Feb 17, 2026
| 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() |
Contributor
There was a problem hiding this comment.
I would have put them into a hashmap but this works.
gilescope
approved these changes
Feb 17, 2026
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
14 tasks
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
14 tasks
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
14 tasks
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>
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>
This file contains hidden or 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
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.
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
📌 Submission Checklist
🧪 Testing Evidence
Please describe any additional testing aside from CI:
🔱 Fork Strategy
Links