Skip to content

Conversation

@codablock
Copy link

@codablock codablock commented Oct 19, 2017

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.

laanwj and others added 12 commits October 19, 2017 10:50
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)
Copy link

@schinzelh schinzelh left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@gladcow gladcow left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@UdjinM6 UdjinM6 left a 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 ?

@UdjinM6 UdjinM6 added this to the 12.2.1 milestone Oct 23, 2017
@UdjinM6 UdjinM6 merged commit 0fdd11c into dashpay:develop Oct 23, 2017
@codablock codablock deleted the backport_bitcoin_perutxo_0.13 branch September 14, 2018 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants