-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[WIP] Implement a UTXO cache #1373
Closed
Closed
Commits on Jan 17, 2019
-
Configuration menu - View commit details
-
Copy full SHA for c43a440 - Browse repository at this point
Copy the full SHA c43a440View commit details -
Configuration menu - View commit details
-
Copy full SHA for 993ad95 - Browse repository at this point
Copy the full SHA 993ad95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 435335a - Browse repository at this point
Copy the full SHA 435335aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a24053 - Browse repository at this point
Copy the full SHA 4a24053View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee0b302 - Browse repository at this point
Copy the full SHA ee0b302View commit details -
Configuration menu - View commit details
-
Copy full SHA for aca65b9 - Browse repository at this point
Copy the full SHA aca65b9View commit details -
blockchain: rollback blocks anytime utxo state is inconsistent
Ideally we would only rollback the state when we had a hard shutdown in the middle of a flush but since the underlying db also has a cache that might not write our flushing state if there's a hard shutdown, we might not be able to detect that we shutdown in the middle of a flush. So to make sure we always restore properly we will always rollback the blockchain when the state is inconsistent.
Configuration menu - View commit details
-
Copy full SHA for 86fb6ef - Browse repository at this point
Copy the full SHA 86fb6efView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8f2a71 - Browse repository at this point
Copy the full SHA e8f2a71View commit details -
Configuration menu - View commit details
-
Copy full SHA for 313755a - Browse repository at this point
Copy the full SHA 313755aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59a61a2 - Browse repository at this point
Copy the full SHA 59a61a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc1ce97 - Browse repository at this point
Copy the full SHA fc1ce97View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc976ee - Browse repository at this point
Copy the full SHA fc976eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 054f12c - Browse repository at this point
Copy the full SHA 054f12cView commit details -
blockchain: fix utxo reorg bug
We hit a bug with the following setup. Block 559307(a) was mined creating a new utxo (u). An alternate block 559307(b) was mined which did not create u. Subsequently 559308 was mined on top of b which did create u again. So during the reorg u needed to go from unspent to spent(removed) when block a was disconnected, then back to unspent again when block 559308 was connected. However, the utxocache commit() function did not have the ability to override a utxo previously marked as spent back into an unspent state and thus u was left marked as spent. When 559309 was mined spending u, it failed to validate because u was erroneously marked as spent already. This commit patches the commit() function to allow overriding from spent to unspent.
Configuration menu - View commit details
-
Copy full SHA for 58a9b73 - Browse repository at this point
Copy the full SHA 58a9b73View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef8bddd - Browse repository at this point
Copy the full SHA ef8bdddView commit details -
blockchain: fix bugs in UTXO rollback
This fixes a couple bugs in the UTXO set reconstruction code. Specifically the roll forward starts one block too early resulting in a UTXO missing error. Also it was missing a break from the final rollforward loop which caused it to remain stuck forever.
Configuration menu - View commit details
-
Copy full SHA for cef1899 - Browse repository at this point
Copy the full SHA cef1899View commit details
Commits on Jan 18, 2019
-
utxocache: pre-size cache to max element size
In this commit, we pre-allocate our cache to hold the maximum number of entries possible. We do this for two reasons: 1. Go maps do not shrink when items are deleted from there, so we'll end up with a map of this size anyway. 2. By doing our large allocation, we avoid doing many smaller allocations causing more GC pressure as we ramp up to our max cache size. To estimate the max size of the cache, we use the length of a p2pkh script since they're larger than p2wkh scripts, and p2wkh isn't as widespread yet.
Configuration menu - View commit details
-
Copy full SHA for 18bd81f - Browse repository at this point
Copy the full SHA 18bd81fView commit details
Commits on Jan 21, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d33fb0f - Browse repository at this point
Copy the full SHA d33fb0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for cd51c42 - Browse repository at this point
Copy the full SHA cd51c42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1357d0e - Browse repository at this point
Copy the full SHA 1357d0eView commit details
Commits on Feb 9, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 836503d - Browse repository at this point
Copy the full SHA 836503dView commit details
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.