-
Notifications
You must be signed in to change notification settings - Fork 1.2k
First batch of per-utxo backports (up until 0.13) #1691
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
First batch of per-utxo backports (up until 0.13) #1691
Conversation
8504867 Save the last unnecessary database read (Alex Morcos)
…`gettxoutsetinfo` 509cb00 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (Wladimir J. van der Laan)
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)
…r other databases 869cf12 dbwrapper: Move `HandleError` to `dbwrapper_private` (Wladimir J. van der Laan) b69836d dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIterator (Wladimir J. van der Laan) 878bf48 dbwrapper: Remove CDBWrapper::GetObfuscateKeyHex (Wladimir J. van der Laan) 74f7b12 dbwrapper: Remove throw keywords in function signatures (Wladimir J. van der Laan)
99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
txdb.h does not include validation.h anymore, so we need these structs somewhere else
This is ~1.7x slower than the Lookup3-of-Xor-with-salt construct we were using before, but it is a primitive designed for exactly this.
Taken from Bitcoin bitcoin#8173/888483098e60f2a944f1d246bbfec4d14a2975f8 Needed to align code for upcoming per-utxo backports.
c6cb6f7 Avoid unnecessary database access for unknown transactions (Alex Morcos)
…lid length 1e44169 Add tests for CCoins deserialization (Pieter Wuille) 5d0434d Fix OOM bug: UTXO entries with invalid script length (Pieter Wuille) 4bf631e CDataStream::ignore Throw exception instead of assert on negative nSize. (Patrick Strateman) 4f87af6 Treat overly long scriptPubKeys as unspendable (Pieter Wuille) f8e6fb1 Introduce constant for maximum CScript length (Pieter Wuille)
efd1d83 doc: Mention dbcache increase in release notes (Wladimir J. van der Laan) 32cab91 Bump `-dbcache` default to 300MiB (Wladimir J. van der Laan)
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.
utACK
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.
utACK
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.
utACK
re merge method: @schinzelh ?
This is the first batch of backported PRs required to get the per-utxo changes from Bitcoin into Dash. This batch contains the PRs up until Bitcoin 0.13.
The list of required PRs was gathered by looking at commit logs on files which are related to the UTXO handling/storing. I also included other PRs (or single commits) which were required to fix compilation and to reduce later conflicts as much as possible, while trying my best to not introduce changes not related to UTXOs at all.
In some cases it may not be immediately clear why I chose a specific PR. This will only be visible in the upcoming batches as these will then touch the code changed by the PRs in this batch. This is part of the conflict avoidance strategy I chose. If you have questions, I can dig up the reason for specific PRs in my local branch (which contains all PRs).
@UdjinM6 You normally merge PRs in squashed mode, which is the preferred way in most cases. In this case however, is it possible that you merge this PR (and the followups) without squashing? With squashed merging, it will later become very hard to backtrack changes. I'm using the annotate/blame feature of Git all the time to figure out why/when a change was introduced, so I can decide what needs to be done when I get merge conflicts. With squashed merges, "blame" will show that all changes were done in one commit.
I'd suggest to do review on commit/PR basis instead of looking at all changes. To get the original Bitcoin PR, click on the #XXXX link you'll find in the commit message. Commits which were added by myself, contain a short explanation why they were needed.