Commit Graph

1469 Commits

Author SHA1 Message Date
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
TomZ d3cf544f6c Make compile on older boost 2018-06-24 23:58:08 +02:00
TomZ 68708e5dd3 Allow building when boost is not in /usr/include 2018-06-24 23:58:04 +02:00
TomZ f78aaf0fce fixlets 2018-06-14 21:57:22 +02:00
TomZ c42da8503b More fixes 2018-06-12 23:07:06 +02:00
TomZ 17a8b94234 Use nullptr and other fixes. 2018-06-12 20:43:50 +02:00
TomZ 36b7f7adb9 Use more c++ constructs 2018-06-12 19:46:40 +02:00
TomZ 3690014f02 Fixes in signedness and usage of new C++ constructs 2018-06-12 19:26:26 +02:00
TomZ e7414fbb81 Fixes for signed ness and variable sizes. 2018-06-12 18:35:04 +02:00
TomZ 0ac6c84ac6 Adjust hardcoded limits 2018-05-10 17:07:15 +02:00
TomZ f0f07153fa Remove unused tag 2018-05-10 01:25:50 +02:00
TomZ 1ac5d85f18 Implement TODO 2018-05-10 01:10:22 +02:00
TomZ 8e57f7dacb 'std::map.at()' can throw, be more careful there. 2018-05-10 00:13:57 +02:00