Commit Graph

11739 Commits

Author SHA1 Message Date
TomZ d68b5e9416 Read and print hub log for CI usage.
When a blackbox test fails add the logs from the nodes
into the output of the log itself so they are all in one
place.

Especially handy for CI or docker usage where getting files
is a lot harder than getting standard-out.
2019-05-27 09:23:05 +02:00
TomZ a20118c5fb Add LiveService unit test
The bugreport claimed that sending an existing coinbase would give
inconsistent results. This test can't find any unexpected behaviour.
2019-05-27 09:23:05 +02:00
TomZ 18035c2e66 Start new testing setup for API testing
This is a blackbox type testing for specific API calls.
2019-05-25 17:06:23 +02:00
TomZ 30eed0d330 Merge branch '2019.05' 2019-05-25 14:32:05 +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 e31a96183d Make chain select with -conf more stable
Require the config file path to be absolute before we assume we can read
it without knowing the chain beforehand.
2019-05-24 22:46:14 +02:00
TomZ 26fda112a0 Fix bug in API for where the answer is a plain bytearray.
This allows RPC wrapper classes to reuse the default implementation also
when the answer is not a uint256
2019-05-23 12:12:25 +02:00
TomZ 59c41123c1 Fix regression, throw when not found. 2019-05-22 23:12:44 +02:00
TomZ 5a2e08ce82 remove some unused code 2019-05-18 16:03:29 +02:00
TomZ a5e8ea401a Sync the new AddressMonitor service API with others
the OffsetInBlock token now has the same value as with other services.
2019-05-18 16:03:26 +02:00
TomZ a54107c168 Make NetworkService thread-safe
This makes the access to the per-peer datastructure lock-free and
thread-safe.
2019-05-18 16:03:22 +02:00
TomZ 7fd29f5084 remove some unused code 2019-05-18 16:00:50 +02:00
TomZ 134f6952d0 Sync the new AddressMonitor service API with others
the OffsetInBlock token now has the same value as with other services.
2019-05-18 15:57:40 +02:00
TomZ be28c9e650 Make NetworkService thread-safe
This makes the access to the per-peer datastructure lock-free and
thread-safe.
2019-05-18 15:56:34 +02:00
TomZ 44c9b9835c Merge branch '2019.05' 2019-05-17 21:01:31 +02:00
TomZ 0282e4b2a3 Set first version allowed for AddressMonitor to be 2019-5.1 2019-05-17 20:48:21 +02:00
TomZ a1c9e80db0 Make APIs internally consistent.
Where we wrap the old RPC code we need to revert the byte-order from the
strings created there for the uint256.

This simplyfies the code by introducing a helper method.
2019-05-17 20:48:16 +02:00
TomZ e6ce7546f2 Master is not "release" 2019-05-17 12:43:26 +02:00
TomZ 6caba39496 Start version 2019.5 2019-05-17 12:40:42 +02:00
TomZ 715a3371fd Merge branch '2019.04' 2019-05-17 12:39:15 +02:00
TomZ 1f52ae7a7f FloweeServiceApplication: support net wildcard
For service applications that bind to networks (currently
only indexer) this allows users to pass the address:
    0.0.0.0
to bind to. The effect will be that we find all the network
interfaces in the system and bind to all of them.
Notice that we already had "localhost" as an alias to bind to both
v4 and v6 loopback interfaces.

This new feature depends on optional dependency QtNetwork.
2019-05-17 12:32:11 +02:00
TomZ eab28b6d53 Version 2019.04.2 2019-05-15 21:08:55 +02:00
TomZ 6a8313252d Merge branch '2019.04' 2019-05-15 20:45:18 +02:00
TomZ 5996205a07 add checkpoint and set PU blockheight 2019-05-15 20:44:47 +02:00
TomZ 4addb23158 Fix off-by-one
This is rather embarrasing, but I have to ask why fully synching the
testnet created precisely for this fork (to the same height as the
explorers) didn't fail. Did it not have any schnorr signatures? Otherwise
this bug would have shown.  What good is a testnet then?
2019-05-15 20:17:55 +02:00
TomZ 34bcbd775e comment out debug log 2019-05-15 19:55:18 +02:00
TomZ ba2216d582 Add to CLI clients verbose/quiet options
All client apps (=connecting to a server only) now gained the  verbose
and quiet command line arguments to select a different level of
verbosity.

Servers don't need this as they use a config file.

This also makes the --debug option only for debug builds as the logging
system already doesn't compile in debug statements otherwise, it makes
little sense to try to print them.
2019-05-13 18:27:09 +02:00
TomZ f90602c073 Make debian package work 2019-05-13 17:53:55 +02:00
TomZ 7fbb6772de NWM: Promote some debug level to warn/info 2019-05-13 12:20:57 +02:00
TomZ 550583305a Be consistent between apps, add help option to pos 2019-05-13 12:20:57 +02:00
TomZ 2fc4a8aa62 Make generated zip file use subdir 2019-05-13 12:20:57 +02:00
TomZ ffb4196434 Add conf and systemd files to install 2019-05-13 12:20:57 +02:00
TomZ 22fd85bd20 Allow -testnet to be set in a config file.
Should a user point to a config file with the option `-conf` then
we will read the testnet/regtest options from that file.

This does not change the old behavior. To be clear;
Should a user pass -regtest on the commandline (and not -conf) then
we will only read the config file from the regtest subdir
(~/.config/flowee/regtest).
2019-05-12 11:04:04 +02:00
TomZ 5b155600d9 Make app arguments more consitent
Now everyone auto-connects to localhost unless passed the
option --connect=

Also make indexer find the logs.conf from the same dir as the
commandline passed config file.

This makes running it as a service more useful.
2019-05-09 12:16:11 +02:00
TomZ 8694c4467c Add indexer service file (systemd) 2019-05-09 12:16:11 +02:00
TomZ 8d716cba28 Allow log path to be a dir
Allow logs.conf to supply the file-path as an (existing) directory which
will lead to the result of opening the standard filename in that dir.
2019-05-08 17:04:09 +02:00
TomZ 714c418ff5 Port txVulcano to use the FloweeServiceApplication 2019-05-08 13:18:09 +02:00
TomZ 4995215f2d Fix API inconsistencies
The rule is that all sha256s are serialized like they are printed (so
zeros first for a blockID), this updates various places in the API did
reversed this order.
2019-05-08 12:49:33 +02:00
TomZ d450b73358 revert adding reproducable_build cmake option 2019-05-08 11:15:54 +02:00
TomZ 26747573f7 Import protocol version numbers 2019-05-08 10:53:18 +02:00
TomZ e1388b8ce7 Disconnect nodes that follow a different chain
Nodes that follow a different chain (and thus send us headers that we
already invalidated) now get an immediate disconnect whereas before
we could keep them around for an hour.
2019-05-08 10:51:46 +02:00
TomZ 32c45610cd Further fixes for cashier / PoS
Also upgrade the cashier app with logging, ctrl-c catching
and debug + version command line arguments.

Last, this checks the server version and exits if the Hub
version is too old.
2019-05-08 09:07:17 +02:00
TomZ e4e2ef4193 Make the pos commandline use the FloweeServiceApplication
this has the direct effect that logging works better there.
2019-05-07 20:54:26 +02:00
TomZ 8d81cc5471 Create new lib apputils
This lib depends on QtCore, as such it is separated from other libs. As
many apps depend on QtCore we can share classes here to avoid
duplication.
2019-05-07 20:53:22 +02:00
TomZ 82a8e137bb API reviews
Rename 'RawTransaction' to 'LiveTransactions'
Review the AddressMonitorService.
Cleanup and remove some unused items (but keep binary compatible).
2019-05-06 20:13:10 +02:00
TomZ e137a7b59f Add simple memcpy constructor to KeyId / uint160 2019-05-06 14:45:12 +02:00
TomZ 5fae218cb6 Fix test being unstable on CI
The test assumed at least 2 cores, if you go below that (as the CI
dockers did) then we need to be aware of race-conditions when checking
on the status of the validation.
2019-04-29 10:25:29 +02:00
TomZ 8e191f6fd5 Implement some TODOs in blockvalidation 2019-04-28 23:02:58 +02:00
TomZ 31c0b25fb6 Fix synchronisation issues in test 2019-04-23 13:11:51 +02:00
TomZ a7f9b9fed5 Remove obsolete code.
Remove txIndex option, its move to Flowee Indexer

Also remove the GUI option for setting the amount
of "script validator threads". :D

Remove DBCash command line option too, equally obsolete.
2019-04-22 21:16:10 +02:00