Commit Graph

55 Commits

Author SHA1 Message Date
TomZ 917304b198 Don't return bool from main() 2020-08-26 09:36:11 +02:00
TomZ 648eb56c9d Drop cmake add_dependencies() calls
When we made the 3rdparty libs be build by cmake the need to manually
add dependencies became irrelevant.
2020-07-05 12:50:09 +02:00
TomZ 0782399891 Fix deprecated warning in protobuf 2020-06-09 23:55:12 +02:00
TomZ 6b992586f0 Make compile with latest Qt 2020-06-09 23:54:44 +02:00
TomZ 82dfd082cd Initial support for a Transaction Monitor API 2020-05-19 08:29:31 +02:00
TomZ fcdb52d5aa Make leveldb build with cmake
As this now means we completely use cmake, remove some legacy
stuff as well.
2020-04-08 22:48:29 +02:00
TomZ 1144f013a4 Build secp256k1 with cmake 2020-04-08 22:48:29 +02:00
TomZ c312ed0946 When not building hub-qt, don't install it either
Avoid error during install
2020-01-22 13:29:13 +01:00
TomZ ba7fa7e88a [QtGui] fix download GB.MB display. 2019-12-01 15:12:31 +01:00
TomZ 175096b2bd Refactor: move files
Move some files back to the server "library".
Merge the 'console' lib with server, as it doesn't really make sense with
just one file and nobody exclusively linking to it.

The server "libary" is not really a library, its the place we put all
the files shared by hub-qt hub-cli and hub.
We no longer depend on these files from other places (mostly due to
moving to the new logging framework) and as such we can move the files
back.
2019-11-13 19:09:24 +01:00
TomZ d573e307c3 Refactor; move SplitHostPort to utilstrencodings 2019-11-12 15:35:54 +01:00
TomZ af21b46574 Also support p2sh bitcoincash address entry in the GUI.
Notice that the GUI as well as the wallets are not shipped, this is
purely for operator convenience.
2019-08-29 22:33:57 +02:00
TomZ df7de2ecd2 Clean up the hairy ball of util.cpp
Move some globals and all stuff pulling in crypto to the
server/serverutil.cpp file

Remove dead code.

Move several items that were used in only one place to the respective
files using them.

Move the class WaitUntilFinishedHelper into its own file.

Made sure no header includes utils.h
remove a handfull of files including utils.h for nothing.
2019-08-24 22:25:09 +02:00
TomZ 2bb06afa9e Cleanup the link-lines 2019-08-24 22:25:09 +02:00
TomZ c15a058b3b Implement long standing TODO in wallet
support inputting cash-addresses.

Just to be clear, the wallet is purely for testing purposes. We never
actually ship the wallet as a product.
2019-08-09 20:50:38 +02:00
TomZ 1aacb3ae52 Vastly simplify mempool-acceptance
This removes the attempt at magic (predicting future) component
called the fee-estimator.
The direct effect is that all transactions have as a mempool acceptance
the same minimum fee. Regardless of how full the mempool or blocks were.

This mempool-acceptance minimum fee is 0 sat/byte. (aka free)

Notice the node-wide free-tx accept-limiter is going to avoid us getting
overloaded.
2019-06-28 14:02:11 +02:00
TomZ a1dfd1cde9 Work on installable headers 2019-06-03 10:59:33 +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 f868a8274e Make all protocol upgrades equal.
The "UAHF" one used to be "more equal", mostly just because it happened
to be the first.
This makes them all equally equal.

Specifically this removes the special casing and the enum for the 201708
HF (aka BCH fork-point).
We select the right branch now purely based on the historical check-
points.
2019-06-02 13:57:47 +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 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 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
TomZ d20dd6d70a Cleanup; block-pruning
This has been commented out code for some time and its probably best to
remove dead code so as to avoid it rotting.
2019-04-22 20:33:49 +02:00
TomZ 707d2212de Move encoding (base58) out of server lib
Also write some new accessor methods on the baseclass.

The longer term idea is to make the server itself only use the uint160
raw version for bitcoin addresses.
For now move the encodings (between that uint160 and human-readable) to
the utils library.
2019-04-11 16:20:04 +02:00
TomZ 69ab1133f6 Remove obsolete addressingtype 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 3d33bdad99 [cmake] Cleanup include paths
as the number of applications grows it makes more sense to separate
the 'server' library from the actually reusable libraries.
To recap, the 'server' library is what we started with when importing
all the code from the hub. Slowly we are moving good code out that
is stand-alone and reusable.
2019-03-29 21:52:07 +01:00
TomZ ec0673187c Add new BlockNotificationService 2019-03-17 22:49:46 +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 adf50af7df Fix linking order
server depends on networkmanager, not
the other way around.
2019-03-10 13:22:07 +01:00
TomZ 135bbb9a5f Cleanup BOOST_FOREACH -> for(:) 2018-12-30 15:33:11 +01:00
TomZ 4623a07968 Remove some usages of the multi-chain feature
During the BCH fork-off time we allowed the client to be started
as either BCH or BTC and as such there are several code-paths
that behave different based on this user setting.
We remove those as we no longer allow starting as BTC client.

This also removes the check for the min-block-size (rollback protection)
as this is accomplished by the checkpoints on the BCH chain.
2018-12-30 13:33:25 +01:00
TomZ 4cd84c0d34 update comments about flowee.conf 2018-11-21 12:26:17 +01:00
TomZ b256676044 Rename debug.log -> hub.log 2018-11-21 12:18:32 +01:00
TomZ d63b2fd955 Make versioning more modern 2018-10-30 11:21:43 +01:00
TomZ 33b699a0b2 Make the numbers match the GUI labels 2018-10-11 21:45:40 +02:00
TomZ 1b8c1a586f Allow API server to be disabled via option 2018-10-11 16:26:36 +02:00
TomZ db42928884 [GUI] Print download numbers more detailed 2018-10-08 22:26:50 +02:00
TomZ e8b6b8879f Remove obsolete code as we assume modern versions of Qt. 2018-10-05 20:28:27 +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
DesWurstes fffc707c74 Remove unneeded void
https://github.com/bitcoin/bitcoin/pull/13774/files
2018-08-10 19:16:35 +03: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 7e99e9d599 Update Qt names. 2018-03-23 18:31:00 +01:00
TomZ 4af111c53d Add cmake support for qrencode 2018-03-23 18:31:00 +01:00
TomZ 066f9586d8 on registering an address at AddressMonitorService, search mempool.
So the service only noticed new stuff happening, like a transaction
coming in or block being mined.
With this change we get a little smarter and look in the current mempool
as well to try and match a transaction.

This should be very useful for clients that lose network connection
briefly.
2018-02-19 00:02:24 +01:00
TomZ 72593ea6a5 Merge branch 'master' into pos 2018-02-17 19:02:18 +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