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.
The API call for GetBlock has a filter-on-address functionality which is
now ported to no longer use ripe160 addresses but instead uses output-
script hashes.
This avoids problems for transactions not using p2pkh and generally is a
cleaner solution.
This also adds a unit test to test this feature.
Remove addresses of type ripe160 to be used in the API of AddresMonitor
API service. Instead use a sha256 hash of the entire output script.
This is mostly internal changes not affecting the operations much.
The usage of a ripe160 for bitcoin addresses in the API and in the
Indexer loses some info, specifically what kind of script it is.
Additionally not all types of scripts fit this mold. At best that means
its not future-proof.
This adds a method to the API in order to select from a Tx the hashed
outscript (thats singlehashed sha256) and refactor the address indexer
to use that instead of the ripe160 address.
The API enums broke a little, so I used the opportunity to break it a
lot and clean up the enums in order to make them more future-proof.
But, yeah, software from before this commit is protocol incompatible
with software after this commit.
We used various ways to enable new features over the last 10 years.
We can remove that legacy code and just set the blockheight.
This cleans up the code quite a bit.
This means that for apps like 'pos' no longer link against libSSL
The streams no longer zero-after-free, there are no secrets transported
in datastreams so this is useless and avoids linking in one OpenSSL
call.
The insecure_rand() method depended on the openssl code to seed it with
randomness. Now replaced with a proven current-time-milliseconds.
This is enough in those cases because it was always meant to be an
insecure random.
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.
The block-box tests have long ago lost their usefullness
and have all been replaced by c++ ones.
The big-box testing was always frowned upon, but it kinda worked
for the original Core codebase which was practically speaking 100%
single-threaded.
Flowee the Hub breaks lots of questionable assumptions.
For instance the assumption that sending a transaction to a node
via the p2p layer and then immediately sending a request over RPC for
the mempool will find that tx there.
Flowee uses an async p2p layer, and therefore that old assumption no
longer holds.
Also, its python. Which is painful to read.
In the address monitor service this detects specifically if a double
spend detected by the Hub is applicable for our subscriber, and if it is
then a Message will be sent to the subscriber.
This introduces a new message type DoubleSpendFound
and changes the API for the TransactionFound message while dropping the
TransactionRejected message.
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.
This also includes a little blockchain of 114 blocks (the first 100 just
coinbase to reach coin-maturity) with transactions generated by the
txVulcano. So lots of outputs.
I adjusted the BlackBoxTest to load this data into any hub with ease.
This C++ library is a small framework which creates a full
http(s) server.
This is imported code from the qhttpengine open source project.
I modified some core components in order to make this framework
multi-threading and changed some APIs for cleanlyness. As such
it is not source compatible and getting it accepted upstream is
not realistic.
This adds all the header ints to chunked messages, solving the problem
of losing RequestId on roundtrips if the answer was too big.
Added a unit test for this "new" features.
This makes callbacks all use shared_from_this() in order to avoid
callbacks being done on deleted instances (thanks boost!).
Last, special case when the user doesn't connect but just sends messages
which caused a send of data, only to realize the connection wasn't open,
and then a connect.
This makes sure we immediately start a connect on queue of a message.
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.