Commit Graph

23 Commits

Author SHA1 Message Date
TomZ 83b7243b70 Prepare for the 2020.01 release
From now on, make sure that the minor always has at least 2 digits
which allows us to use string compare of versions even if we have
more than 9 releases in a year.
2019-12-31 18:05:24 +01:00
TomZ 6e8c0b29f7 Also here, report minor ver as hex.
Also fix some compiler warnings
2019-12-12 17:48:48 +01:00
TomZ dce04d2323 Add support for listen=0.0.0.0
This is not portable, so Linux only for now.
2019-08-12 23:48:46 +02:00
TomZ 3383d1e1dc Add method MessageBuilder::reply()
This is an overload of message() specifically meant to build
replies to incoming messages.
The behaviour changed here is that incoming messages with
headers other than "RequestId" now get copied to the outgoing
message by default.
2019-06-24 19:53:24 +02:00
TomZ 4a4a61aeed Add unit test for GetTransaction
This also includes a little blockchain of 114 blocks (the first 100 just
coinbase to reach coin-maturity) with transactions generated by the
txVulcano. So lots of outputs.

I adjusted the BlackBoxTest to load this data into any hub with ease.
2019-06-16 23:04:14 +02:00
TomZ 0bde548548 Improve allocation behavior in BufferPool
The old algorithm could end up doubling the size every time it
ran out, which eventually consumes all memory.
This way we reset to the user-default size when useful and increase
only based on need.

This means that the programmer needs to make a better estimation on
maximum size of messages, but it avoids behavior similar to memory
leaks.
2019-06-13 13:14:26 +02:00
TomZ 2eba51c5c6 Check message size in debug builds.
Double check our message-calculation is proper by checking the result.
Notice that asserts and logDebug both are turned off in release builds,
so this is just added to debug builds.
2019-06-13 12:30:20 +02:00
TomZ 2822b4ed4a Make API handling more robust. 2019-06-10 21:02:15 +02:00
TomZ 7203a058a3 Change API call SplitHostPort slightly
Instead of taking an int for the port, take a short.
This matches better with the networkmanager EndPoint struct.
2019-06-02 20:16:49 +02:00
TomZ 38b4e8b189 Allow hubs -apibind to use 'localhost' string
The command really only accepts IP addresses, but we use 'localhost' as
an exception to bind to loopback for ipv4 and ipv6 at the same time.

Also improve logging of errors and avoid failing to start the API
service if a bind address wasn't an IP.
2019-05-24 23:14:15 +02:00
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 0447d3c9f6 Correctly detect and print finishing of indexer 2019-04-03 16:16:44 +02:00
TomZ a628db675a Cleanup and work on the API tags.
Make things more foolproof by having similar items in different namespaces
use the same number.
Remove APIs for the wallet as that is not a shipped component of the Hub
2019-03-27 20:24:31 +01:00
TomZ c8108f387c Drop API login requirement and api-cookie argument 2019-03-27 18:55:13 +01:00
TomZ 5bd599a1ed Expand GetBlock API call
Add a filter option to allow clients to send addresses
and match outputs against those bitcoin addresses so
only transactions that spend those outputs match will
be incuded in the result.

Add a session state so clients can send a filter
and just reuse that filter in subsequent calls.
2019-03-17 22:49:46 +01:00
TomZ 7d6760c49d Introduce new GetBlock API call
Demote the old RPC one to Legacy.
The old is still useful as it allows the 'verbose' version, but it uses
lots of deprecated tech and thus doesn't scale.
2019-03-17 22:49:46 +01:00
TomZ d8ecf9cc41 Better warning if you forget to login. 2019-03-10 13:22:14 +01:00
TomZ 27c96cadff Log a bit in the API server when a call is processed. 2019-03-09 22:47:36 +01:00
TomZ 3e24215858 Small refactor
Now the Parsers can be direct parsers, move them to the
general API namespace.
2019-03-08 10:55:26 +01:00
TomZ 3b4dc2f3aa Don't try to handle messages that are not for us 2018-03-26 17:26:06 +02:00
TomZ c263a8d494 Improve logging of remote doing it wrong. 2018-03-21 17:56:43 +01:00
TomZ e610771119 Introduce AddressMonitorService
This service allows one to connect it and register any number of
bitcoin-addresses which will then cause any transaction or block
coming in the future lead the subscriber to get notified about
such events.
2018-02-17 14:47:51 +01:00
TomZ 4635c7a7c4 Rename "AdminServer" to "APIServer"
The change signifies that the server is not just for admin purposes it
will become the preferred way for all subnet-local interactions.

Notice that we still have the JSON based RPC protocol as fallback.
2018-02-17 14:47:51 +01:00