Commit Graph

1357 Commits

Author SHA1 Message Date
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
TomZ 886e921b89 Fix typo in methodname 2018-05-09 12:46:54 +02:00
TomZ c368c6ef77 Create new UTXO database library
The old was based on levelDB which has scalability issues and stability
issues. (most often cited problem is corrupted database..)

This unspent output database I wrote is based on the idea that we need
never actually update any rows, which makes most old fashioned databases
a bad fit.
All we do is create rows and we forget rows. So lets design a DB to fit
that pattern.
2018-05-09 10:48:16 +02:00
TomZ 23d46d85f2 Add methods to request the serialized size of ints 2018-05-09 10:48:16 +02:00
TomZ f3a6f5e3b4 Add more raw streaming features to BufferPool 2018-05-09 10:48:16 +02:00
TomZ f0e597d315 Add offsetInBlock method to TX iterator 2018-05-09 10:48:16 +02:00
TomZ 438f9d4f1b Add generic testing decorator
This integrates unit tests into the logging system
so I can see the unit test we are currently in reflected in the log-
line.
2018-05-09 10:48:16 +02:00
TomZ 1c47177aa6 Remove flextrans-testnet info 2018-05-09 10:30:15 +02:00
TomZ 062ef05a77 May Hardfork; import opcodes changes. 2018-04-16 14:42:35 +02:00
TomZ e87a45b508 May hardfork; datacarrier size max is 220 2018-04-16 11:12:08 +02:00
TomZ c8428d5402 Update bootstrap seeds 2018-04-15 22:42:07 +02:00
TomZ 096d5af5b8 Remove old options
Remove no longer useful options;
* chain (sorry, supporting the btc chain just doesn't seem worth it)
* initiatecashconnections, we only allow Cash connections now.
* flexiblehandshake, same for incoming. Reject non-cash ones.
2018-04-15 22:35:34 +02:00
TomZ a40dd928d6 Make logger create required dirs to open logfile 2018-04-11 12:19:18 +02:00