Commit Graph

13688 Commits

Author SHA1 Message Date
Alexander Block
9ad56fe18a Dash related fixes for per-utxo DB 2017-10-31 21:19:11 +01:00
Alexander Block
92bb65894b Fix address index to use new per-utxo DB 2017-10-31 21:19:11 +01:00
Alexander Block
d4562b5e51 Fix CCoinsViewCache::GetPriority to use new per-utxo 2017-10-31 21:19:11 +01:00
Pieter Wuille
c81394b975 Merge #10195: Switch chainstate db and cache to per-txout model
589827975 scripted-diff: various renames for per-utxo consistency (Pieter Wuille)
a5e02bc7f Increase travis unit test timeout (Pieter Wuille)
73de2c1ff Rename CCoinsCacheEntry::coins to coin (Pieter Wuille)
119e552f7 Merge CCoinsViewCache's GetOutputFor and AccessCoin (Pieter Wuille)
580b02309 [MOVEONLY] Move old CCoins class to txdb.cpp (Pieter Wuille)
8b25d2c0c Upgrade from per-tx database to per-txout (Pieter Wuille)
b2af357f3 Reduce reserved memory space for flushing (Pieter Wuille)
41aa5b79a Pack Coin more tightly (Pieter Wuille)
97072d668 Remove unused CCoins methods (Pieter Wuille)
ce23efaa5 Extend coins_tests (Pieter Wuille)
508307968 Switch CCoinsView and chainstate db from per-txid to per-txout (Pieter Wuille)
4ec0d9e79 Refactor GetUTXOStats in preparation for per-COutPoint iteration (Pieter Wuille)
13870b56f Replace CCoins-based CTxMemPool::pruneSpent with isSpent (Pieter Wuille)
05293f3cb Remove ModifyCoins/ModifyNewCoins (Pieter Wuille)
961e48397 Switch tests from ModifyCoins to AddCoin/SpendCoin (Pieter Wuille)
8b3868c1b Switch CScriptCheck to use Coin instead of CCoins (Pieter Wuille)
c87b957a3 Only pass things committed to by tx's witness hash to CScriptCheck (Matt Corallo)
f68cdfe92 Switch from per-tx to per-txout CCoinsViewCache methods in some places (Pieter Wuille)
000391132 Introduce new per-txout CCoinsViewCache functions (Pieter Wuille)
bd83111a0 Optimization: Coin&& to ApplyTxInUndo (Pieter Wuille)
cb2c7fdac Replace CTxInUndo with Coin (Pieter Wuille)
422634e2f Introduce Coin, a single unspent output (Pieter Wuille)
7d991b55d Store/allow tx metadata in all undo records (Pieter Wuille)
c3aa0c119 Report on-disk size in gettxoutsetinfo (Pieter Wuille)
d34242430 Remove/ignore tx version in utxo and undo (Pieter Wuille)
7e0032290 Add specialization of SipHash for 256 + 32 bit data (Pieter Wuille)
e484652fc Introduce CHashVerifier to hash read data (Pieter Wuille)
f54580e7e error() in disconnect for disk corruption, not inconsistency (Pieter Wuille)
e66dbde6d Add SizeEstimate to CDBBatch (Pieter Wuille)

Tree-SHA512: ce1fb1e40c77d38915cd02189fab7a8b125c7f44d425c85579d872c3bede3a437760997907c99d7b3017ced1c2de54b2ac7223d99d83a6658fe5ef61edef1de3
2017-10-31 21:19:11 +01:00
Pieter Wuille
afa96b7c12 Merge #10249: Switch CCoinsMap from boost to std unordered_map
e6756ad Switch CCoinsMap from boost to std unordered_map (Pieter Wuille)
344a2c4 Add support for std::unordered_{map,set} to memusage.h (Pieter Wuille)

Tree-SHA512: 51288301e7c0f29ffac8c59f4cc73ddc36b7abeb764009da6543f2eaeeb9f89bd47dde48131a7e0aefad8f7cb0b74b2f33b8be052c8e8a718339c3e6bb963447
2017-10-31 21:19:11 +01:00
Wladimir J. van der Laan
8ed6722196 Merge #10250: Fix some empty vector references
f478d98 Fix some empty vector references (Pieter Wuille)

Tree-SHA512: a22022b9060cd39f8d349e8dd24490614c0028eae2fbc7186d0d26b1d47529049b2daee41f093c0722130274a0b6f7f8671c2295c8cb4a97028771eaff080734
2017-10-31 21:19:11 +01:00
Alexander Block
d23adcc0f1 Merge #10231: [Qt] Reduce a significant cs_main lock freeze (#1704)
4082fb0 Add missing <atomic> header in clientmodel.h (Jonas Schnelli)
928d4a9 Set both time/height header caches at the same time (Jonas Schnelli)
610a917 Declare headers height/time cache mutable, re-set the methods const (Jonas Schnelli)
cf92bce Update the remaining blocks left in modaloverlay at init. (Jonas Schnelli)
7148f5e Reduce cs_main locks during modal overlay by adding an atomic cache (Jonas Schnelli)

Tree-SHA512: a92ca22f90b8b2a5e8eb94fdce531ef44542e21a8dbbb0693f7723d7018592cb68de687a2a0aac91d31cbf019793f8e922550656d2b130ed3d854d60630341db
2017-10-31 23:14:19 +03:00
UdjinM6
14d11e4a8a
Translations 201710 part2 (#1676)
* fix ru

* updating bg, fr, sk, zh_TW

* update fi, pl, zh_TW

* update pl
2017-10-31 17:50:28 +03:00
UdjinM6
470e5435c0
remove InstantSend votes for failed lock attemts after some timeout (#1705) 2017-10-31 17:50:03 +03:00
UdjinM6
dfb8dbbf61
Fix mnp relay bug (#1700)
* relay ping for nodes in ENABLED/EXPIRED/WATCHDOG_EXPIRED state only, skip everyone else

* typo
2017-10-31 17:46:42 +03:00
UdjinM6
673e161d5d
fix trafficgraphdatatests for qt4 (#1699) 2017-10-31 17:46:24 +03:00
UdjinM6
ffbe92bae5 Merge pull request #1697 from codablock/backport_bitcoin_perutxo_0.15_1
Third batch of per-utxo backports (up until 0.15, excluding actual per-utxo)
2017-10-26 23:30:47 +03:00
Alexander Block
b06a6a2e74 Fix use of missing self.log in blockchain.py
self.log will only be available in later backports. Use print until these
are backported.
2017-10-26 16:30:56 +02:00
Kamuela Franco
304b886d08 Update build-osx.md formatting (#1690)
* Update build-osx.md

* Updated based on comments in #1546

* Update grammar
2017-10-25 17:58:28 +03:00
UdjinM6
788ae63ac2 Fix edge case for IS (skip inputs that are too large) (#1695)
* fix edge case for IS (skip inputs that are too large)

* fix
2017-10-25 17:57:56 +03:00
UdjinM6
6f57519c60 allow up to 40 chars in proposal name (#1693)
align with 299035e36d
2017-10-25 17:57:39 +03:00
Matt Corallo
6f1997182a Add COMPACTSIZE wrapper similar to VARINT for serialization 2017-10-24 13:54:10 +02:00
Pieter Wuille
fc5ced317f Merge #10445: Add test for empty chain and reorg consistency for gettxoutsetinfo.
513da90cd Add test for empty chain and reorg consistency for gettxoutsetinfo. (Gregory Maxwell)
822755a42 Fix: make CCoinsViewDbCursor::Seek work for missing keys (Pieter Wuille)

Tree-SHA512: e549921e8b8f599bf61ebe0ee7ef1d2f474043723d633e24665fe434b996a98e039612de8a1c2cd16b63f154943ff5ea1c1935e9561cfb813a00d47d926d0b22
2017-10-24 13:54:07 +02:00
Pieter Wuille
9a266e68d0 Merge #10297: Simplify DisconnectBlock arguments/return value
db994b2 Simplify DisconnectBlock arguments/return value (Pieter Wuille)

Tree-SHA512: 62ce1a85bde2a5baffb9173ed28f2d8008200ecf8b09332122f1516fe68b33b9d7223cc1c2fffe804e38f767874c6353b76bd483e8ad7d48c4a5e80d6b683039
2017-10-24 13:54:04 +02:00
Matt Corallo
567043d360 Make DisconnectBlock and ConnectBlock static in validation.cpp 2017-10-24 13:54:00 +02:00
Wladimir J. van der Laan
ff9b2967af Merge #10133: Clean up calculations of pcoinsTip memory usage
1b55e07 Make threshold for flushing more conservative. (Alex Morcos)
f33afd3 Lower default memory footprint slightly (Alex Morcos)
5b95a19 Make pcoinsTip memory calculations consistent (Alex Morcos)

Tree-SHA512: d0061138596cf89008397b8729d9b25293938b1ad454cc99a6fe2f6210e94f76dfa78a8f0fce4c1ba3efec4e742a9c1a3ab26676a4a8346d3e7c3055d032669b
2017-10-24 13:53:59 +02:00
Wladimir J. van der Laan
cfefd34f45 Merge #10126: Compensate for memory peak at flush time
7228ce8 Compensate for memory peak at flush time (Pieter Wuille)

Tree-SHA512: 97e9848410fab061402c85d8440c54a50dd8a0203b2ea194013ea116700a6dc1b4b26b8c5f9c9c68c1f5c6b935c5d6c737437c1911b003d9ff5445c570cd449d
2017-10-24 13:53:55 +02:00
Wladimir J. van der Laan
249db27761 Merge #9999: [LevelDB] Plug leveldb logs to bitcoin logs
cfce581 [LevelDB] Plug leveldb logs to bitcoin logs (NicolasDorier)

Tree-SHA512: e40a2c2644c269bb2da7be04aec39ff64ad350d508391750a757955ed3f9d96998775d01e04b282a75b36d776c3960a345cc7b6f1466e6ae167d27518bf4baee
2017-10-24 13:53:52 +02:00
UdjinM6
53f9fd9b27 Merge pull request #1696 from codablock/backport_bitcoin_perutxo_0.14
Second batch of per-utxo backports (up until 0.14)
2017-10-24 12:05:40 +03:00
Pieter Wuille
817ecc03d3 Merge #9353: Add data() method to CDataStream (and use it)
5113474 wallet: Use CDataStream.data() (Wladimir J. van der Laan)
e2300ff bench: Use CDataStream.data() (Wladimir J. van der Laan)
adff950 dbwrapper: Use new .data() method of CDataStream (Wladimir J. van der Laan)
a2141e4 streams: Remove special cases for ancient MSVC (Wladimir J. van der Laan)
af4c44c streams: Add data() method to CDataStream (Wladimir J. van der Laan)
2017-10-23 19:07:45 +02:00
Pieter Wuille
ceb64fcd47 Merge #8610: Share unused mempool memory with coincache
ba3cecf Share unused mempool memory with coincache (Pieter Wuille)
2017-10-23 19:07:45 +02:00
Pieter Wuille
09b3e042f4 Merge #9310: Assert FRESH validity in CCoinsViewCache::BatchWrite
dd44ea3 Check FRESH validity in CCoinsViewCache::BatchWrite (Russell Yanofsky)
2017-10-23 19:07:45 +02:00
Pieter Wuille
a589c94a9a Merge #9107: Safer modify new coins
b50cd7a Fix dangerous condition in ModifyNewCoins. (Alex Morcos)
2017-10-23 19:07:45 +02:00
Wladimir J. van der Laan
4b4d222933 Merge #9308: [test] Add CCoinsViewCache Access/Modify/Write tests
07df40b [test] Add CCoinsViewCache Access/Modify/Write tests (Russell Yanofsky)
2017-10-23 19:07:45 +02:00
Pieter Wuille
6974f1723d Merge #9346: Batch construct batches
ed58969 Batch construct batches (Pieter Wuille)
2017-10-23 19:07:45 +02:00
Pieter Wuille
6fbe93aa71 Merge #9307: Remove undefined FetchCoins method declaration
fe41f58 Remove undefined FetchCoins method declaration (Russell Yanofsky)
2017-10-23 19:07:45 +02:00
Pieter Wuille
105fd18157 Use fixed preallocation instead of costly GetSerializeSize
Dbwrapper used GetSerializeSize() to compute the size of the buffer
to preallocate. For some cases (specifically: CCoins) this requires
a costly compression call. Avoid this by just using fixed size
preallocations instead.
2017-10-23 19:07:45 +02:00
Pieter Wuille
94e01eb660 Merge #8467: [Trivial] Do not shadow members in dbwrapper
4a35e0f Do not shadow members in dbwrapper (Pavel Janík)
2017-10-23 19:02:49 +02:00
UdjinM6
0fdd11ced5 Merge pull request #1691 from codablock/backport_bitcoin_perutxo_0.13
First batch of per-utxo backports (up until 0.13)
2017-10-23 19:57:06 +03:00
Wladimir J. van der Laan
e3b7ed449f Merge #8273: Bump -dbcache default to 300MiB
efd1d83 doc: Mention dbcache increase in release notes (Wladimir J. van der Laan)
32cab91 Bump `-dbcache` default to 300MiB (Wladimir J. van der Laan)
2017-10-19 10:51:59 +02:00
Wladimir J. van der Laan
952383e16c Merge #7933: Fix OOM when deserializing UTXO entries with invalid 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)
2017-10-19 10:51:50 +02:00
Wladimir J. van der Laan
753cb1563b Merge #7874: Improve AlreadyHave
c6cb6f7 Avoid unnecessary database access for unknown transactions (Alex Morcos)
2017-10-19 10:51:45 +02:00
Alexander Block
60e6a602e6 Use C++11 thread-safe static initializers in coins.h/coins.cpp
Taken from Bitcoin #8173/888483098e60f2a944f1d246bbfec4d14a2975f8

Needed to align code for upcoming per-utxo backports.
2017-10-19 10:51:40 +02:00
Pieter Wuille
44526af95a Use SipHash-2-4 for CCoinsCache index
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.
2017-10-19 10:51:28 +02:00
Pieter Wuille
d92b454a25 Add SipHash-2-4 primitives to hash 2017-10-19 10:51:26 +02:00
Alexander Block
02a6cef94d Move index structures into spentindex.h
txdb.h does not include validation.h anymore, so we need these structs somewhere else
2017-10-19 10:51:23 +02:00
Wladimir J. van der Laan
abaf524f0c Merge #7815: Break circular dependency main ↔ txdb
99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
2017-10-19 10:51:12 +02:00
Wladimir J. van der Laan
2e54bd2e8c Merge #7927: Minor changes to dbwrapper to simplify support for 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)
2017-10-19 10:51:06 +02:00
Wladimir J. van der Laan
17f2ea5d73 Merge #7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)
2017-10-19 10:50:59 +02:00
Wladimir J. van der Laan
23fe35a18a Merge #7756: Add cursor to iterate over utxo set, use this in gettxoutsetinfo
509cb00 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (Wladimir J. van der Laan)
2017-10-19 10:50:25 +02:00
Wladimir J. van der Laan
996f5103a0 Merge #7056: Save last db read
8504867 Save the last unnecessary database read (Alex Morcos)
2017-10-19 10:50:11 +02:00
UdjinM6
4ecbedbe74 fix setnetworkactive (typo) (#1682) 2017-10-17 19:43:03 +03:00
Alexander Block
1df889e231 Add more logging for MN votes and MNs missing votes (#1683)
* Add logging for MNs which did not vote

* Implement review suggestions
2017-10-17 19:42:44 +03:00
Alexander Block
4cac044d95 Merge #8944: Remove bogus assert on number of oubound connections. (#1685)
1ab21cf Remove bogus assert on number of oubound connections. (Matt Corallo)
2017-10-17 19:41:57 +03:00
UdjinM6
46342b2e8a update nCollateralMinConfBlockHash for local (hot) masternode on mn start (#1689) 2017-10-17 19:41:43 +03:00