112 Commits

Author SHA1 Message Date
tomFlowee 9e165d07ef Allow basedir to be given in the config file.
A general cleanup of how we start indexer.
2026-05-21 23:51:09 +02:00
tomFlowee 1662f51193 Add more features to the http client
We parse a date/time for headers now with a specific
method that returns a QDateTime
We added a partial (incremental) download feature to avoid the need to
wait until completed. This also allows us to lower mem usage by spooling
to disk as data comes in.
2025-11-17 11:56:14 +01:00
tomFlowee ab34541a7c Skip link local networks.
As this is basically used to bind to, link local doesn't make much sense
to return.
2025-11-08 19:59:11 +01:00
tomFlowee 36b609189e Add API docs. 2025-11-05 19:24:24 +01:00
tomFlowee 23fd430264 Make SimpleHttpClient also support HEAD 2025-11-05 19:19:43 +01:00
tomFlowee 0a3ff8dfe0 Add SimpleHttpClient class
To be able to move away from the monstrosity called QtNetwork
this introduces a tiny class based on boost (headers only lib) beast.
2025-11-05 14:19:58 +01:00
tomFlowee 60e5e15542 Add more features to Mnemonic class
Also include unit tests
2025-10-28 14:52:54 +01:00
tomFlowee 12dea93144 API docs language improvement. 2025-10-26 16:16:07 +01:00
tomFlowee e1d8f700b0 Remove commented out code 2025-05-01 08:15:16 +02:00
tomFlowee e62b0013c3 Add new method Mnemonic::completeWords(partial) 2025-04-07 21:14:32 +02:00
tomFlowee 063816137e Implement binary search 2025-04-07 21:14:25 +02:00
tomFlowee a10490b7f9 Make the argument do what the docs says 2025-02-23 22:34:39 +01:00
tomFlowee 55328ce0d7 Help binding to future interfaces
The idea of binding to interfaces now will take into account the
interfaces maybe becoming available only after the server started.

If your server starts at machine boot, it is a 50/50 chance that the
network interfaces are already fully configured and have received
addresses. In case of dhcp, more often than not this means that your
server will not be listening at the main interface because it wasn't up
yet.

This new api allows the server to give a function to register a new
interface and we have some linux specific code that will notice changes
in the interfaces and we'll allow the app to bind to it a moment or two
after that.
2025-02-20 20:37:33 +01:00
tomFlowee 5cae07500c Port away from deprecated ASIO methods
This makes thehub compile with BOOST_ASIO_NO_DEPRECATED defined.
2025-02-11 16:46:21 +01:00
tomFlowee bb7275466b Stop using deprecated asio io_service
This ports the io-service to the source compatible io-context
class, with the most work going to the WorkerThreads which owns
that one.
2025-02-08 19:05:26 +01:00
tomFlowee 4560355458 Introduce a different general log category. 2025-01-13 23:37:51 +01:00
tomFlowee a674a3fb7c Change returning of 'target' to be a bytearray.
This affects both the BlockChain/GetBlockHeaderReply and the
BlockChain/GetBlockVerboseReply calls.
The field with id 75 was confusingly called 'bits', but this is really
the blocktarget from the blockheaders. We renamed this.

This field is a int-encoded-floating point value and as such it makes no
sense to send it as a simple int. It is now a byte-array.
Notice that the documentation always listed it as a byte-array so we
actually fixed the implementation to follow the spec.
2024-09-16 23:18:34 +02:00
tomFlowee a3fc0aecdc Add full starting date/time loglines
Turns out, when reading through log files it is quite useful to list the
time AND date on when an app started.
Additionally, make clear that the logging is in UTC.
2024-08-26 22:04:01 +02:00
tomFlowee 073e133ec7 Improve readability of warning 2024-06-25 22:59:36 +02:00
tomFlowee dcdeb6dec0 Don't assume company name in this library class. 2024-01-24 21:03:58 +01:00
tomFlowee 9ad2ec7c02 Be consistent, use a subdir for header files. 2024-01-24 21:03:58 +01:00
tomFlowee 4fe9d69e7b Use more specific define-guards 2024-01-24 21:03:58 +01:00
tomFlowee bc47a700a4 Refactor; wrap BufferPool in shared_ptr
As we moved most of the creation of a BufferPool to be via the
Streaming::pool() method, which uses a thread-local, it makes sense
to start cleaning up the design and make it more modern C++.
The above mentioned method would return a reference and you'd see
loads of places use `auto &pool =` which is less than ideal.

As the number of places where we actually instantiate a BufferPool
goes down, the usage of some sort of smart pointer makes more sense.

This now makes all APIs use BufferPool be wrapped in a shared_ptr.
2023-12-21 15:23:23 +01:00
tomFlowee afa075ca40 Stop using deprecated call 2023-11-24 22:20:40 +01:00
Calin Culianu 26c39f58ac Add support for Electrum mnemonic phrases.
These are almost identical to BIP39. They use the same word list except:

- The checksum is calculated differently
- Deriving the master key from them uses a different pbkdf512 salt
  ("electrum" vs "mnemonic")
2023-10-18 20:56:20 +03:00
Calin Culianu 3945e3069a Fix some build issues on macOS + clang 2023-10-17 22:01:20 +03:00
tomFlowee aecaa14d64 Fix constness. 2023-07-15 22:18:14 +02:00
tomFlowee 7c7fc70d7d Split app and lib versioning 2023-07-15 22:01:07 +02:00
tomFlowee 4ecfaab242 Merge branch 'master' into platformUpdate 2022-09-07 13:06:07 +02:00
tomFlowee f7bf33828f Stop using deprecated Qt APIs
This makes the code compile on Qt6 as well.
2022-09-07 12:53:35 +02:00
tomFlowee 66f3ec2fe4 Port to Qt6 2022-09-07 12:01:14 +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 6bfde84afb Add default binding configur 'ygg'.
This makes the server bind only to yggdrasil (a mesh networking
solution) addresses which have as specific advantage that it does
protocol-level encryption.
2022-01-29 12:04:08 +01:00
tomFlowee ff1881c15a Avoid hardcoding name 2022-01-19 17:31:25 +01:00
tomFlowee 7044bf0119 Log more detail before 'throw'. 2021-11-19 14:17:29 +01:00
tomFlowee 1b5ae89d31 [Refactor] rename FastTransaction.{h|cpp} -> Tx.* 2021-11-02 11:05:14 +01:00
tomFlowee 851d147dcd Add way to go from seed to mnemonic. 2021-10-27 19:14:09 +02:00
tomFlowee c264641cbe Provide hierarchically deterministic wallet parts
This introduces a Mnemonic class for BIP39 (seed words)
validation as well as a HDMasterKey class with provides the
BIP32 & BIP43 support.

All tests went into the apputils unit test.
2021-10-13 17:03:02 +02:00
tomFlowee bd3c1c3b7a Avoid a too small ring buffer. 2021-08-05 22:03:24 +02:00
tomFlowee d2637075c2 Add more API docs 2021-07-15 12:47:01 +02:00
tomFlowee 935a96746f Add API docs. 2021-07-14 11:20:06 +02:00
tomFlowee ae78dd0bb8 Update email address 2021-06-20 22:44:44 +02:00
tomFlowee 9dbf93f7a7 Add assert to fail fast. 2021-04-03 20:35:19 +02:00
tomFlowee 8124a65795 Peer reviewed: Blockchain::IncludeTxFees
Make plural.
2021-03-18 11:34:59 +01:00
tomFlowee bd5baa7133 Add ability to retrieve fees for a transaction.
This adds an option to the GetTransaction Flowee API to return the fees
for a whole transaction.
Support for this is added in the Blockchain (searcher) and the
RestService components.

Notice that no fees will be returned if the BlockMetaData was not
created properly.
2021-03-12 09:06:06 +01:00
tomFlowee 020c16c27a Put binding info in logfile. 2021-02-26 15:08:23 +01:00
TomZ b1f8372b10 Improve error messaging for services
We now no longer show the full help page after we've seen a service at
least once. Because we know its not a lack of config that caused the
issue.
2021-02-22 16:31:09 +01:00
TomZ 74be8f9304 Register losing services better
This implements two TODOs, we now unset the services in our registry
when they disconnect.
This allows us to run with multiple backends as failover more stable.
2021-02-22 16:31:09 +01:00
TomZ 1de1496350 UX fix for servers
We only have the option for `--debug` when it is regarding a client (as
oppossed to a server) and when we build a debug build.
Only add the option for users to set when we actually process it.
2021-02-22 14:09:19 +01:00