-
Notifications
You must be signed in to change notification settings - Fork 156
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 Slow down on BadInputsUTxO error #1943
Merged
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
JaredCorduan
approved these changes
Oct 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @TimSheard ! (looks like ormolu is complaining)
JaredCorduan
force-pushed
the
ts-fix-BadInputsUTxO
branch
from
October 27, 2020 17:11
7891756
to
932ea6c
Compare
@nc6 I just remembered that we should be using the proper commit structure. Apologies, I will do my best to remember not to merge PRs without the proper structure. |
mrBliss
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
Oct 28, 2020
The main reason is to pull in: IntersectMBO/cardano-ledger#1943
mrBliss
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
Oct 28, 2020
The main reason is to pull in: IntersectMBO/cardano-ledger#1943
mrBliss
added a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Oct 28, 2020
The main reason is to pull in: IntersectMBO/cardano-ledger#1943
iohk-bors bot
added a commit
to IntersectMBO/ouroboros-network
that referenced
this pull request
Oct 28, 2020
2712: Update dependency on cardano-ledger-specs r=deepfire a=mrBliss The main reason is to pull in: IntersectMBO/cardano-ledger#1943 Co-authored-by: Thomas Winant <[email protected]>
mrBliss
added a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Oct 28, 2020
The main reason is to pull in: IntersectMBO/cardano-ledger#1943
iohk-bors bot
added a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Oct 28, 2020
2029: Update dependency on ledger and consensus r=mrBliss a=mrBliss The main reason is to pull in: IntersectMBO/cardano-ledger#1943 Co-authored-by: Thomas Winant <[email protected]>
JaredCorduan
pushed a commit
to IntersectMBO/cardano-node
that referenced
this pull request
Nov 3, 2020
The main reason is to pull in: IntersectMBO/cardano-ledger#1943
nc6
added a commit
that referenced
this pull request
Feb 18, 2021
PR #1943 addressed a problem that caused low performance when certain types of transactions were rejected. However, this fix was only applied in the Shelley era, not the MA era. Consequently, when we bumped to Shelley MA, a regression was caused. This commit applies the same fix as used in the Shelley era into the MA eras.
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.
The BadInputsUTxO error computes an error report in a way that is very expensive.
This was first brought to my attention by this node issue.
IntersectMBO/cardano-node#2022
Further analysis showed that that it might be related to
IntersectMBO/ouroboros-consensus#732
because a high instance of BadInputsUTxO failures were correlated with the slowdown.
Some analysis showed the computing the error report for BadInputsUTxO required computing this expression: (txins txb
Set.difference
eval (dom utxo))Computing the domain of utxo is very expensive. Change this line to
(Set.filter (\ x -> not(Map.member x (unUTxO utxo))) (txins txb))
and things are fixed. This PR solves that problem.
We have added an issue IntersectMBO/ouroboros-network#1942 to add set difference to the set algebra, using this mapping (set difference to set filter) when time permits