Commit Graph

12890 Commits

Author SHA1 Message Date
tomFlowee f8ca73ec48 Fixlets for SSL detection on non-Linux
This removes obviously no longer correct macos code
This adds a workaround for Android not detecting the libs sometimes.
  Works because we use our docker where we know the locations.
2024-08-24 17:56:47 +02:00
tomFlowee b060064d45 Cleanups 2024-08-21 19:45:32 +02:00
tomFlowee 3a25af6f0e Complete the new SSL connections in networkmanager
This completes the API and makes the unit test pass.
2024-08-21 17:58:45 +02:00
tomFlowee 7fcecedd76 Make handshake of ssl connection work. 2024-08-21 16:55:01 +02:00
tomFlowee 69b3d78e19 Making the ssl unit test work. 2024-08-20 22:46:48 +02:00
tomFlowee 151c080642 Start unit test. 2024-08-19 21:53:21 +02:00
tomFlowee af5a76f9aa Add server functionality to ssl connections. 2024-08-13 22:56:24 +02:00
tomFlowee 87d771ba8f Merge branch 'master' into sslNetworkManager 2024-08-13 22:55:47 +02:00
tomFlowee 2879587a64 OnDisconnected now shows it is disconnected
The onDisconnected callback is moved to later in the process after the
internal state has been updated so calling 'isConnected()' is what you'd
expect.
2024-08-11 20:32:32 +02:00
tomFlowee 69e275ae4c Add connection-id in debug output
In the networkmanager it may get confusing to see lines without knowing
which connection actually created it. So we add the connection id.
2024-08-11 20:32:32 +02:00
tomFlowee 8c31f8d004 Revert "Make simpler"
This reverts commit e28b5e1823.

The port number is again passed through the dns lookup, which is
weird as fuck but needed to get the actual resulting iterator still
have the port numebr we wanted to connect to.
2024-08-11 19:37:21 +02:00
tomFlowee b84a934977 comments 2024-08-11 18:49:35 +02:00
tomFlowee 93c413a004 Make simple (plain) stuff work again. 2024-08-11 18:49:35 +02:00
tomFlowee c324f675d2 rename the unit test to be about the flowee libs 2024-08-11 18:49:35 +02:00
tomFlowee f0d426dc90 make compile 2024-08-11 18:49:35 +02:00
tomFlowee d2ce7e61d2 Refactor socket to live in a wrapping class. 2024-08-11 18:49:35 +02:00
tomFlowee 0eefbd28fb Also add the ssl to the exported cmake 2024-08-11 18:49:35 +02:00
tomFlowee 712dcdb3a6 Start to implement the ssl server. 2024-08-11 18:49:35 +02:00
tomFlowee 6966dd8643 Minor messaging cleanups in cmake. 2024-08-11 18:49:35 +02:00
tomFlowee b4e90cf945 Add ssl lib to networkmanager 2024-08-11 18:49:35 +02:00
tomFlowee 210fef16cc Start making space for an ssl backend. 2024-08-11 18:49:35 +02:00
tomFlowee e9f89556eb Backport uPNP compile fix
This comes from Bitcoin Core commit: 8acdf6654

upnp: add compatibility for miniupnpc 2.2.8
original patch by: Cory Fields
2024-07-26 11:50:13 +02:00
tomFlowee 4c2adc1728 Silence cmake
The cmake boost integration has changed, which means we need to
test how to do this over a large number of setups to do
it "correctly" and that's going to be a task for later.

For now, lets avoid the message and make clear we want to keep
the old behavior.
2024-07-06 22:13:44 +02:00
tomFlowee 85a6e20e1a Have better spread checkpoints and adjust the unit test
This updates the unit test to move the tiny chain it tests to match the
new checkpoint location.
2024-07-06 22:00:34 +02:00
tomFlowee 9008b4a312 Update checkpoints
The checkpoints were formerly copied from the full node, so based
on possible fork-events.
That seems less useful nowadays and since we want to be able to
allow starting a blockchain instance from any checkpoint it makes
sense to spread them out more evenly.
Based on the concept that the BCH chain generates around 50K blocks
a year, we simply use that interval.

This removes various very old ones meaning that the total count is
roughly equal.
2024.07.0
2024-06-29 20:26:35 +02:00
tomFlowee 0838a4cc93 Add more support for checkpoint based chains.
This improves the docs, adds a getter and last it makes the
blockHeightAtTime() more secure by not returning a value below the
checkpoint. As this would throw if used directly in the block() method.
2024-06-29 11:52:29 +02:00
tomFlowee f3f14f8074 New version 2024-06-26 21:57:37 +02:00
tomFlowee 4acc8ee883 Fix check for chain integrity. 2024-06-26 21:57:07 +02:00
tomFlowee c2ae326620 More sanity checks for creating partial chain. 2024-06-25 23:01:59 +02:00
tomFlowee 3b91e503ff Fix binary search on smaller chain
When a chain starts from a checkpoint instead of '1', we should limit
our search to that in order to avoid codepaths that throw.
2024-06-25 23:00:51 +02:00
tomFlowee 073e133ec7 Improve readability of warning 2024-06-25 22:59:36 +02:00
tomFlowee 68cf4ae48f Fix ConstBuffer::indexOf constness
This method is now const, as it should be.
2024-06-11 21:34:41 +02:00
tomFlowee 6a84a262cc Add more ConstBuffer helper methods
This adds endsWith() and an extra startsWith() overload.

We also added tests for the case when either the argument or the object
are empty and specify the behavior. I copied the behavior of QString.

See unit tests that specify the behavior with empties.
2024-06-11 17:57:17 +02:00
tomFlowee dc3545857d [p2pnet] Add Blockchain::replaceStatichain()
This public method allows an application to replace the static-
header files in a life-situation. Without needing to restart the app.

The idea is that a static chain starts at a checkpoint, and we extend
it into the past to start at an earlier checkpoint. This suddenly
makes available a larger amount of history without changing anything
of the data that was already there.
2024-06-02 21:22:37 +02:00
tomFlowee 5ada583bd1 Fixlets in code and comments. 2024-06-02 11:58:05 +02:00
tomFlowee dcaddcca7c Remove unused include 2024-06-01 19:22:27 +02:00
tomFlowee 7ecd46ba1c Make checkpoints available via method call.
This also adds docs.
And this moves away from the map which isn't worth the code complexity
with the low number of entries.
2024-05-31 13:05:38 +02:00
tomFlowee 422822530b Add Blockchain::dataSources() getter
The blockchain object holds all block-headers, the backing store for
this class is now being exposed more to allow understanding what we have
or not have available. And also what the source of that info is.
2024-05-28 10:51:52 +02:00
tomFlowee 6229055dd2 new release version 2024.05.0 2024-05-05 21:30:27 +02:00
tomFlowee 4845de2470 Add PrivateKey::fromBase58() 2024-05-01 21:55:25 +02:00
tomFlowee e28b5e1823 Make simpler 2024-05-01 21:54:22 +02:00
tomFlowee 4f3fd8b5bd Add support for xpriv import on HDMasterKey
This essentially adds support for a derived HDMasterKey to exist.
2024-05-01 21:54:19 +02:00
tomFlowee 2cd73ba4fb Add xpriv creation with derivation path. 2024-04-29 21:13:03 +02:00
tomFlowee 65517840ac Add level() getter 2024-04-26 16:56:44 +02:00
tomFlowee 8da1892995 Add ConstBuffer toHex() methods to get a string out. 2024-04-21 00:11:47 +02:00
tomFlowee 3e9cf0173f Add assert to avoid misuse and mem issues. 2024-04-21 00:11:07 +02:00
tomFlowee 2bb858b62d Tweak UTXO numbers
As the "normal" machine that runs this kind of software gets more
memory, it is Ok to increase the numbers in order to aim to keep more
data cached in memory between check-points, and have less check-points.

This mostly helps speeding up initial block download, it also helps keeping
the utxo datadir small and non-fragmented. All good for speed.
2024-04-07 20:19:46 +02:00
tomFlowee b749d4fbe5 Minor changes 2024-04-07 20:19:46 +02:00
tomFlowee d4b1d240f0 Add unspentdb export --no-export argument
This basically just walks the of records without actually exporting
them.
It will nicely print related info files, number of actual records found
etc.
2024-04-07 20:19:46 +02:00
tomFlowee 665d61eeb4 Add various helpful warnings and info messages. 2024-04-07 20:19:46 +02:00