Commit Graph

931 Commits

Author SHA1 Message Date
TomZ 88e5e829a5 Re-do the UTXO rollback functionality
this is a much less memory-intensive version as it doesn't copy
entire buckets anymore.
2018-09-20 21:55:07 +02:00
TomZ 59916e1d01 Fixes in new utxo DB.
Fix loading old checkpoints, add fflush etc.
2018-09-20 21:55:07 +02:00
TomZ bf370f121d Make pruning work 2018-09-20 21:55:07 +02:00
TomZ 6c0f39317f Copy some data in the prune command 2018-09-20 21:55:07 +02:00
TomZ 4072951b00 Log more 2018-09-20 21:55:07 +02:00
TomZ 5aebd68835 Make faster. 2018-09-05 11:16:29 +02:00
TomZ 6c68f9df12 Updates to UnspentOutputDatabase classes
* remove unused code
* reorg code to make the access to disk be outside the mutex
* add detection of slow disk-writes and slow down data coming in
* Update and fix the rmHint
2018-09-05 11:16:29 +02:00
TomZ c17be105cf Rename variables for clarity of what they do 2018-08-30 18:44:12 +02:00
TomZ d062dbca39 remove dead code 2018-08-17 23:22:13 +02:00
TomZ f9f128b1cf Use signatures lookup cache 2018-08-17 23:13:02 +02:00
TomZ 82a670787e Merge branch 'master' into UnspentOutputDB
Conflicts:
	testing/prevector/test_prevector.cpp
	testing/test/test_bitcoin.cpp
	testing/utxo/test_utxo.cpp
2018-08-15 20:30:45 +02:00
TomZ 62bab30e36 Fix compiler warning 2018-08-15 20:23:36 +02:00
Tom Zander 69e7cd89f8 Merge branch 'master' into 'master'
Add CuckooCache

See merge request FloweeTheHub/thehub!6
2018-08-15 18:22:22 +00:00
TomZ c182d809fb Make logging now be tuned for qtestlib
as the boost testlib is too erretic and gives us bugs, make the common
framework support qtestlib instead
2018-08-14 15:53:00 +02:00
Tom Zander 4245b721b0 Merge branch 'testsuite' into 'master'
Add optimized double SHA256

See merge request FloweeTheHub/thehub!8
2018-08-13 09:42:41 +00:00
DesWurstes c9e9e19698 Add Sha256D64 to Merkle root calculation 2018-08-12 10:27:40 +03:00
DesWurstes 5dff3ac72d Add SHA256D64 2018-08-12 10:27:40 +03:00
DesWurstes 20ea0c1156 Add tests
https://github.com/bitcoin/bitcoin/pull/9480 and https://github.com/bitcoin/bitcoin/pull/10128 but doesn't have the newest tests
2018-08-11 12:57:33 +03:00
DesWurstes fffc707c74 Remove unneeded void
https://github.com/bitcoin/bitcoin/pull/13774/files
2018-08-10 19:16:35 +03:00
DesWurstes effe0227d3 Update CuckooCache to its newest version 2018-08-10 11:05:22 +03:00
DesWurstes f61e8f698e Add CuckooCache
100% of code from https://github.com/bitcoin/bitcoin/pull/8895/commits/c9e69fb
2018-08-10 11:05:22 +03:00
DesWurstes da075d73be Add SHA-NI and SSE4.1 SHA256 2018-08-09 16:01:13 +03:00
DesWurstes 87991845ee Superfluous space 2018-08-08 17:07:27 +03:00
DesWurstes b1ef38f886 TX search bug and improvements 2018-08-08 13:58:40 +03:00
DesWurstes dae8b90054 Define MSG_NOSIGNAL on Apple
Solves another build error
2018-08-07 12:56:15 +00:00
DesWurstes 2a5d464e73 Replace -r with -R 2018-08-07 12:10:14 +00:00
TomZ 854544f33a Make scanned but not validated files also save to blockindex 2018-08-06 13:57:09 +02:00
TomZ fd02e45f7f Fix off-by-one 2018-08-06 12:01:12 +02:00
TomZ eee7140368 Fix the loading and saving of the info files in case of corruption
If there is corruption in one file, we need to rollback all of them
to a stable point where the entire DB agrees
2018-08-06 12:00:14 +02:00
TomZ ebde1fd457 When restarting a reindex, avoid doing double work. 2018-08-06 12:00:14 +02:00
TomZ 8cca04ff1d Fix oops 2018-08-06 12:00:14 +02:00
TomZ 2fde96e54b Merge branch 'master' into UnspentOutputDB 2018-08-05 10:59:35 +02:00
TomZ c2cfea6b50 Notice exit faster.
This also makes the exit more stable and avoids hangs.
2018-08-05 10:58:19 +02:00
TomZ 6ab9e96071 log UTXO by text 2018-08-04 18:44:14 +02:00
TomZ f1705e33ad Be more agressive in writing
the savings are questionable and the memory usage is a bit steep.
2018-08-04 18:30:57 +02:00
TomZ 7e954a7f8c Let people know they need to reindex 2018-08-04 18:30:24 +02:00
TomZ d58352080e Add another UODB rollback unit test and fix 2018-08-04 17:28:08 +02:00
TomZ d5d21d214d Make the saving more fool-proof 2018-07-30 22:12:50 +02:00
TomZ f217a2aa54 Minor fixes 2018-07-30 07:15:34 +02:00
TomZ ca3e2f3715 Merge branch 'master' into UnspentOutputDB 2018-07-29 18:04:22 +02:00
TomZ be66f23e99 Use new rollback method on utxo 2018-07-29 18:03:49 +02:00
TomZ 0bfa3cbb85 Introduce rollback() on UnspentOutputDB
together with blockFinished() as 'commit' this introduces the ability
to modify the in-memory utxo which can be rolled-back with ease.

This allows us to "modify" the utxo while validating a block in an
optimistic manner and only spend extra resources doing a rollback
should the block end up not being Ok.
2018-07-29 18:03:49 +02:00
Anna Sikorska 9d9b71722a Optimized. 2018-07-26 20:49:43 +00:00
imaginary_username 0fc83b7c2a Speed up ThreadMessageHandler to improve message propagation; might increase CPU load 2018-07-26 20:00:58 +00:00
TomZ 1600086ede Updates to and start using the UnspentOutputDB
The new UnspentOutputDatabase classes are only very loosly a database, we
purely register and store unspent outputs there. But unline a DB we don't
allow modification (just insert and delete).

This replaces the coin-db (which was based on leveldb) and as first goal
this gives us a higher level of stability. The level-database was known
to give corruption issues.

Notice that users will need to do a manual reindex on first update.
2018-07-23 19:49:32 +02:00
TomZ e7659c2bc4 Rename shutdown-process name to be the hub 2018-07-22 22:20:40 +02:00
TomZ 220dfe8753 Add missing member initializers 2018-07-19 17:20:08 +02:00
TomZ 8e0b6b8b2a Remove obsolete comment 2018-07-18 11:30:31 +02:00
TomZ e0788129a5 Cleanup sigop counting unit and make it follow the spec
This cleans up the code for sigops.
It now uses uint32_t everywhere.
It uses an atomic while counting in different threads.
I make sure that both legacy as well as p2sh sigops are counted.
2018-07-05 01:44:07 +02:00
TomZ e32d0855fd add assert 2018-06-29 22:24:02 +02:00