435 Commits

Author SHA1 Message Date
TomZ 78219d5bba Make the indexer-cli and indexer interact well
This adds lots of little things;
* Add GetTransaction API call
* I refactored the GetBlock API a little to reuse code.
* a new 'Version' API call for the hub
* API for the logging manager, so we can set a default
  setup with just C++-APIs
* various (usability) fixes in the FloweeServiceApplication
* Binding to localhost attempts to bind to both IPv4 and v6
* Print the actual transaction hex from indexer-cli (which really
  is just a testing app)
2019-04-10 20:52:04 +02:00
TomZ aea9c25c15 Make indexer-cli have more suitable output 2019-04-10 15:38:37 +02:00
TomZ 20694d4f33 Make indexer be a server too 2019-04-09 19:34:55 +02:00
TomZ 2f9d9520d4 Add support for logging std::list 2019-04-06 15:15:36 +02:00
TomZ ef5dafe6e0 Add private header warnings 2019-04-06 12:28:34 +02:00
TomZ 9846b467e3 Move code and avoid work.
Move the creation of the ping message to the constructor (from the
connection-established method) so we are certain it gets done exactly
once.

Also avoid putting default (invalid) values in the hashmap.
2019-04-04 22:46:39 +02:00
TomZ dc1f721ce5 Rename some old code to use the product name 'Hub' 2019-04-02 17:45:19 +02:00
TomZ d722bf4290 Move hash helper to more logical place 2019-04-01 15:34:13 +02:00
TomZ b8757c1da2 Merge branch '2019.02' 2019-04-01 10:57:32 +02:00
TomZ a1a14d644e Cleanup after oneself 2019-04-01 10:57:04 +02:00
TomZ d56b09fd5f Minor bugfixes
Better debug printing. Print hex array instead of 'text'
Fix possible deleted memory being accessed.
2019-03-31 19:51:26 +02:00
TomZ b8d329ef9f Further moves; NetworkEnums and netbase.{cpp|h}
NetworkEnums.h moves from utils to interfaces.
netbase moves from server to utils/
2019-03-29 21:39:08 +01:00
TomZ 2f5c02538c remove unfinished parts of TransactionBuilder 2019-03-28 20:23:51 +01:00
TomZ 6647cd0fc9 Move default log level to ignore Info but print Warning 2019-03-27 21:24:19 +01:00
TomZ c8108f387c Drop API login requirement and api-cookie argument 2019-03-27 18:55:13 +01:00
TomZ cb004d3336 Upgrade default to 128 2019-03-25 12:50:27 +01:00
TomZ 3fa2ac225f Make easier for user.
In applications we typically set a debug section
that is the default for that application so devs
can just call logInfo() without any arguments and
get the debug section for his app.
This now works with MessageParser::debugMessage() as well.
2019-03-17 22:49:46 +01:00
TomZ ec0673187c Add new BlockNotificationService 2019-03-17 22:49:46 +01:00
TomZ 70d0c55a04 Add standard accessor; dataLength 2019-03-17 22:23:52 +01:00
TomZ 8deb6dbcd9 Fix comments. 2019-03-15 19:15:48 +01:00
TomZ 6aa8b4a184 Update API for TransactionBuilder to do signing
Allow users to add a private key and other details while
building a transaction and then as we export the final transaction
we sign the input.
2019-03-13 23:07:00 +01:00
TomZ 7e7fe61081 Little bit of review for TransactionBuilder 2019-03-13 23:06:54 +01:00
TomZ c90ae87187 add TransactionBuilder 2019-03-13 23:06:47 +01:00
TomZ 557c2000f2 Move CKey to live in utils as well 2019-03-13 22:43:25 +01:00
TomZ a0f39317ea Add an accessor method: Tx::data() 2019-03-13 22:36:00 +01:00
TomZ cfe690320d Move various standalone simple classes into utils
The 'server' library has always been a catch-all and
ideally only the hub links it in (far future goal).
In line with this I move a list of files out of server
into the utils lib.
I choose 'utils' because all these are plain old data
objects that many crypto apps will find useful.

now in utils/primitives/
* CScript
* CPubKey
* CTransaction
* CBlock
* FastTransaction
* FastBlock
* CScript

streams.h is now in utils/streaming/
hash.h is now in utils/
2019-03-11 15:40:42 +01:00
TomZ 04c7929b49 Use new style logger in debugMessage 2019-03-09 22:47:54 +01:00
TomZ 0dfae60d3c Add streaming log operator to ConstBuffer 2019-03-09 22:47:54 +01:00
TomZ bc53fe2d4b Make this a little less confusing; use BCH not BTC 2019-03-04 12:46:26 +01:00
TomZ d3bb3b1f1d Add support for std::set in the logger 2018-11-21 14:02:20 +01:00
TomZ b256676044 Rename debug.log -> hub.log 2018-11-21 12:18:32 +01:00
TomZ 9d5f9d2142 Fix UTXO throttling feature
On low core-count machines the request to save could end up being
delayed since all threads are busy doing things like validating
transactions.
So when a really big block came in I ended up throttling while there
was no save method running in parallel at all.
This fixes this and also makes throtteling be a per-thread thing
instead of doing it inside the mutex.
2018-11-18 14:42:14 +01:00
TomZ cdec1fa593 Implement CTOR validation 2018-11-15 23:35:43 +01:00
TomZ d63b2fd955 Make versioning more modern 2018-10-30 11:21:43 +01:00
TomZ 669338402c Don't let exceptions change behaviour 2018-10-13 20:50:45 +02:00
TomZ 1b8c1a586f Allow API server to be disabled via option 2018-10-11 16:26:36 +02:00
TomZ be1c403586 port unit test and add benchmark 2018-10-08 22:30:21 +02:00
TomZ 0fe7749733 Make finding config file more sane
We inherited the design from Core that you can put in your config
file which chain you will follow (testnet, regtest).
This has the effect that you can't have different config files for
different chains and that we always read the fallback location for
all chains. Especially the last one is just harmful.

So, regtest/testnet can only be selected from commandline.
If you choose one of those, it will look for a flowee.conf in the
related subdir (flowee/regtest/flowee.conf for instance) and NOT
for the global one. The global one is only ever read for mainnet.
2018-09-25 18:22:57 +02:00
TomZ 9aec9e5eeb Merge branch 'master' into UnspentOutputDB 2018-09-24 21:25:34 +02:00
TomZ 39154aa625 Make startup/shutdown a bit more logical
Actually delete the asio io_service when we are done with it since that
will delete any left over tasks in the queue.
This makes deletion order more predictable.
2018-09-24 21:23:27 +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
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
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 dae8b90054 Define MSG_NOSIGNAL on Apple
Solves another build error
2018-08-07 12:56:15 +00:00
TomZ 6ab9e96071 log UTXO by text 2018-08-04 18:44:14 +02:00
TomZ ca3e2f3715 Merge branch 'master' into UnspentOutputDB 2018-07-29 18:04:22 +02:00
Anna Sikorska 9d9b71722a Optimized. 2018-07-26 20:49:43 +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