Commit Graph

1147 Commits

Author SHA1 Message Date
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
TomZ 95ea594bf2 fix typo 2018-04-11 12:19:08 +02:00
TomZ 8cdd0b78e4 Fix cornercases in integers handing of CMF
The compact-message-format has numberic limits that were not
being managed well.

This unit test makes sure we keep the limits at;

Negative number is 0x7FFFFFFF (aka INT_MIN)
Positive number max is 0xFFFFFFFFFFFFFFFF (aka ULONG_LONG_MAX)

The inconsistent limits is because the API. We use ints for negative
numbers and unsigned-longs for larger numbers.
This keeps the API simpler for the common cases.
2018-04-04 17:27:16 +02:00
TomZ 7dcac141bf Fix possible crash 2018-04-04 01:01:22 +02:00
TomZ 7a026acee2 Finish up first phase.
Handle incoming payments, show if under/overpaid and
make sure everything is properly inserted into the database.

This makes the process actually work and useful for a small business
2018-03-27 22:24:23 +02:00
TomZ fab80a99ff Make network manager connect faster 2018-03-26 17:26:06 +02:00
TomZ 3b4dc2f3aa Don't try to handle messages that are not for us 2018-03-26 17:26:06 +02:00
TomZ 3cdc7acf17 Detect and notify listeners on douple spend 2018-03-25 18:38:51 +02:00
TomZ 4af111c53d Add cmake support for qrencode 2018-03-23 18:31:00 +01:00
TomZ 3199bd3886 Make 'default' logger group based on compile unit. 2018-03-21 17:57:53 +01:00
TomZ 771cfcb5d3 Fix upnp cmake detection 2018-03-21 17:57:03 +01:00