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

Fix synchronization issue #11846

Merged
merged 3 commits into from
Oct 31, 2023
Merged

Conversation

lontivero
Copy link
Collaborator

Access to the banning times cache was not correctly synchronized and that resulted in exceptions like the following:

2023-10-30 02:37:10.382 [264] ERROR     PeriodicRunner.ExecuteAsync (107)       System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at WalletWasabi.WabiSabi.Backend.DoSPrevention.Prison.GetBanTimePeriod(OutPoint outpoint, DoSConfiguration configuration)
   at WalletWasabi.WabiSabi.WabiSabiCoordinator.<>c__DisplayClass35_0.<BanDescendant>g__IsInputBanned|0(TxIn input)
   at System.Linq.Enumerable.WhereSelectListIterator`2.ToArray()
   at WalletWasabi.WabiSabi.WabiSabiCoordinator.<>c__DisplayClass35_0.<BanDescendant>b__3(Transaction tx)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at WalletWasabi.WabiSabi.WabiSabiCoordinator.BanDescendant(Object sender, Block block)
   at WalletWasabi.Blockchain.Blocks.BlockNotifier.ActionAsync(CancellationToken cancel)

Additionally here we don't ban spent inputs because they cannot participate anyway.

Copy link
Collaborator

@turbolay turbolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@lontivero lontivero merged commit 5463580 into WalletWasabi:master Oct 31, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants