Commit Graph

155 Commits

Author SHA1 Message Date
tomFlowee 2d0aec2cd7 Rename file to match class it is in
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.

key.{h|cpp} -> PrivateKey.{h|cpp}
2023-11-24 22:20:40 +01:00
tomFlowee fce11e8d4f Rename file to match class it is in.
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.

pubkey.{h|cpp} -> PublicKey.{h|cpp}
pubkey_utils.{h|cpp} -> PublicKeyUtils.{h|cpp}
2023-11-24 22:20:40 +01:00
tomFlowee ebaccb6fee Move include to cpp file 2023-07-15 11:36:19 +02:00
tomFlowee 5d62ed34b2 Fix global property usage in CMake
This makes txVulcano be built again.
2023-05-02 22:26:41 +02:00
tomFlowee 3becd7aa45 Remove unused log sections and code
Decentralized all things!

But, really, don't put the logging sections for external apps in the
library code.
2023-04-04 15:47:25 +02:00
tomFlowee 038e7bc0a5 Add new CMake option 'build_apps'.
To enable this means the buildsystem will build all the applications
as well as the libraries.
Applications are 'hub' / 'txVulcano' / 'indexer' etc.
Default this one is turned off.
2023-03-20 19:50:32 +01:00
tomFlowee 9e097c84b3 Upgrade deprecated 2023-02-21 14:16:43 +01:00
tomFlowee b702227cc4 stop using deprecated API 2023-02-13 10:38:17 +01:00
tomFlowee f7b25282a0 Add missing include statements 2023-02-06 18:10:03 +01:00
tomFlowee c63519fa47 Move 3rdparty libraries around.
The leveldb and univalue 3rd party libraries are not installed and
not needed by anyone outside of the Hub.
So move them there, making it easier for 3rd party usage.
2022-12-13 11:34:54 +01:00
tomFlowee 2f70766091 remove useless 'throw' statements 2022-09-07 12:53:35 +02:00
tomFlowee adc1d8d3fe Support cash-addresses in cpu-mining coinbase.
Tested by mining a testnet4 block (109202)
2022-08-18 23:29:40 +02:00
tomFlowee 10f94a0e74 Fixlet in logging. 2022-08-18 23:13:35 +02:00
tomFlowee 1ab4d88993 Split version.h
Version.h held mostly stuff for protocol.h, which is a hub-specific file.
The only thing that we actually use is the PROTOCOL_VERSION in our code
and as such that one moved to the interfaces dir.
2022-07-06 22:50:53 +02:00
tomFlowee 05bbba3cb3 Rename class CKey -> PrivateKey 2022-07-06 22:12:33 +02:00
tomFlowee c9af7cca4a Rename class CPubKey -> PublicKey 2022-07-06 21:56:34 +02:00
tomFlowee c33d54ed7d Rename class CKeyID -> KeyId 2022-07-06 21:52:47 +02:00
tomFlowee c2c5fd7973 Make compile 2022-06-20 16:27:00 +02:00
tomFlowee 9fa877f425 Rename hashing methods to start with lowercase 2022-05-17 00:46:54 +02:00
tomFlowee cca8a885bc Fix coding style issues
Follow the coding styleguide and make the methods lowercase on CKey
2022-05-11 13:46:15 +02:00
tomFlowee 7b57024413 Make set() be internally consistent
setting an incorrect value should not keep the old data after we already
update the fValid boolean.
That would give the user the impression that the data was removed while
it really isn't.
2022-05-11 13:20:15 +02:00
tomFlowee b4a3da2642 The 'Server' and 'Api' dirs are not libs
These are technically static libs, but not in any way shared libs.
They are used solely only by this repo and really only by the hub.

Most important, no header files are installed and basically none of
the normal rules for reusable libraries are applied to these files.
2022-02-22 18:39:13 +01:00
tomFlowee 4118d83f12 Move 'hub-cli' into the 'hub' dir. 2022-02-22 18:11:00 +01:00
tomFlowee ae78dd0bb8 Update email address 2021-06-20 22:44:44 +02:00
tomFlowee 0100c2f9e2 Wrap the services in one class
This allows us to avoid duplicating complexity in starting the API
subsystem.
2021-03-16 15:14:13 +01:00
tomFlowee 4d5e7bfb09 Protect node with user-limits for the API.
This introduces several options for public node operators to limit their
nodes usage by 3rd parties, this is aimed at usage of resource-hungry
areas.

We allow limiting the amount of connections any single IP can keep open
with us.
We limit the amount of reconnects we allow in a short number of seconds.
We allow limiting the number of addresses (or scriptHashes) a peer can
register for the node to scan.
The last one is for both the addressMonitorService as well as for the
getBlock filters.

For node operators these items become available using command line
options or config-file options. By default these limits are unlimited as
we assume default usage to be private.
2021-02-26 15:14:14 +01: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 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 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 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 a1dfd1cde9 Work on installable headers 2019-06-03 10:59:33 +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 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 6202d74d62 More branding 2019-04-03 14:58:19 +02:00
TomZ 3e46c3e7b4 Rename some old code to use the product name 'Hub' 2019-04-02 17:51:07 +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 adf50af7df Fix linking order
server depends on networkmanager, not
the other way around.
2019-03-10 13:22:07 +01:00
TomZ 4cd84c0d34 update comments about flowee.conf 2018-11-21 12:26:17 +01:00
TomZ d63b2fd955 Make versioning more modern 2018-10-30 11:21:43 +01:00
TomZ 1b8c1a586f Allow API server to be disabled via option 2018-10-11 16:26:36 +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 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 c42da8503b More fixes 2018-06-12 23:07:06 +02:00
TomZ 4bf1558f7a Smooth over config file issues.
So, now we install the example config file

Then we follow XDG for retrieving it.
We first check XDG_CONFIG (~/.config/flowee) and if we can't find a confg
file there fall back to the data dir (~/.local/share/flowee).
2018-03-07 23:20:04 +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