Commit Graph

12355 Commits

Author SHA1 Message Date
TomZ a4800171b5 remove commented out code 2020-10-23 23:05:37 +02:00
TomZ b901745139 Add getters. 2020-10-23 22:33:33 +02:00
TomZ 267e5bf142 Fix typo in comment. 2020-10-23 22:33:24 +02:00
TomZ 4b0bcf7bc9 Add priority to privacySegment
We connect to the "first" priority stated segments first, in order to
allow the UX to be made much better since it may take a bit of time to
find peers.
2020-10-19 14:04:57 +02:00
TomZ bf10876914 Add new callback on DataListenerInterface
virtual void setLastSynchedBlockHeight(int height);
2020-10-17 17:25:05 +02:00
TomZ 112ee10f75 Remove stray semicolon 2020-10-17 17:24:45 +02:00
TomZ ff0cec682e Minor cleanups
Avoid copy/paste of comments.
Remove double semicolons.
Add new seeder.
2020-10-13 19:27:35 +02:00
TomZ 029885c401 Differentiate splash colors 2020-10-04 00:56:01 +02:00
TomZ 7df652e9b6 fixlets 2020-10-04 00:16:15 +02:00
Tom Zander 81095ca7fd Merge branch 'feature/Testnet4_Scalenet' into 'master'
Add TestNetv4 and ScaleNet chains

See merge request FloweeTheHub/thehub!18
2020-10-03 21:04:53 +00:00
Justaphf 1494fa8c1f fixup: typo 2020-10-03 10:39:21 -04:00
Justaphf 3c458e24a3 Fix deploy step for branches with / in name 2020-10-02 20:06:22 -04:00
Justaphf 18ca7abb7c Add scalenet 2020-10-02 18:43:52 -04:00
Justaphf 13286db582 Add testnet4 2020-10-02 18:43:52 -04:00
Justaphf 2edd43806f Activate Nov 2019 & May 2020 HFs by height instead of MTP
and update the definitions of the Mainnet, Testnet (v3), and Regtest chain params accordingly.  The heights for all 3 chains were taken by verifying the values in both BU and BCHN code bases.

NOTE: For TestNet v3, there is a 1 block discrepancy between BU (1378461) and BCHN (1378460) for the height of the May 2020 hardfork.  I arbitrarily selected the value from BCHN, I'm not sure which is correct.
2020-10-02 18:43:51 -04:00
TomZ 54329bf9e4 Add new DSP test to check for stupid usage :) 2020-09-30 10:27:51 +02:00
TomZ 14a938d54c Add speed test
To make sure that a pair of really large transactions being used
to create a DSP doesn't cause a blocking thread, this runs a
benchmark on a pair of transactions with 300 inputs each, causing
45k comparisons to be made.
On my laptop this results in 0.6 msecs for this creation of the DSP.
2020-09-29 20:35:41 +02:00
TomZ 0293890e80 Add optional async job to Hub API
The current design of the API is that all questions are answered in-
order. This implies that handling of one connection will also just use
one thread.

If we want to improve performance of things like "sendTransaction" we
want an async option, which runs the action and generates the answer
when its done in a separate thread (a new one for each async-request).

This breaks the in-order reply sequence for clients and as such it
requires them to set a new header-option to enable this.
2020-09-29 17:34:06 +02:00
TomZ 25c8f7bc5d [Minor] removal of clang-format reference. 2020-09-29 17:34:06 +02:00
TomZ fdaa6e4a81 Import some improvements from Calin.
* API docs
* Fix possible race condition in addOrphan()
* Reject proofs that violate simple constraints
* clear up possible confusing API (first/double spender getters).
2020-09-29 17:33:20 +02:00
TomZ b590d078ae Update debian config 2020-09-20 21:41:54 +02:00
TomZ 8f7bf582cf Allow binding on multiple interfaces. 2020.06.2 2020-09-20 21:12:51 +02:00
TomZ 7ec1735841 Add rest-service systemd support 2020-09-20 21:12:00 +02:00
TomZ f07ccd81e7 By default, listen on all interfaces 2020-09-20 20:21:10 +02:00
TomZ b2be9720d4 Add default logs config
This is written to be especially useful for packages since it will
create a log dir /usr/log/flowee/
and additionally it will log to stdout, which systemd / journald will
pick up.
2020-09-20 20:16:54 +02:00
TomZ cc3cd396c9 Add missing spend-db config option 2020-09-20 20:16:53 +02:00
TomZ 58deb9d359 Simplify docker scripts
Compress it down to 1 compile and one build-images script
which saves on compilation and simply makes it more managable.
2020-09-20 19:14:59 +02:00
TomZ ea6f128c42 Remove not yet implemented docs
The help message for the address series of endpoints was optimistic
and not all documented ones have been implemented yet.
This removes the unimplemented ones to avoid confusion for users
reading this online.
2020.06.1
2020-09-19 20:49:22 +02:00
TomZ 4cf108cc16 Fix possible threading issues
Make sure that aborted() moves to the proper thread in order to write to
the socket without issues.
2020-09-19 20:48:05 +02:00
TomZ fd211fda01 Add new inline docs page 2020-09-19 11:27:00 +02:00
TomZ 21eb228f8f New release 2020-09-18 21:39:57 +02:00
TomZ 59a1a78731 Follow the same dusting attack here. 2020-09-18 21:38:38 +02:00
TomZ 57b85a9784 The real damage of the dusting attack: tests fail
I needed to update this auto test which used coins last moved in 2012 as
reference, but the test broke because the dusters (sending 547sats)
ended up adding a UTXO to the output.
2020-09-18 21:13:06 +02:00
TomZ 68759fbf00 [REST] Add unconfirmed fields to the address/details 2020-09-18 20:40:49 +02:00
TomZ b033cd8ac4 [API] Add outindex field to mempool address search
When you request matching transactions from the mempool for certain
addreses, the API now returns the matched output-index as a separate
tag, which makes it easier to, for instance, use the 'amount' field in
the reply.
2020-09-18 20:40:11 +02:00
TomZ cde4d35d9c API docs 2020-09-18 20:37:43 +02:00
TomZ 3b553fd80b Make sure we handle a close() correctly.
When we close() the receiveStream is cleared and we should not be
reading from it after. So detect and handle this.
2020-09-17 21:51:37 +02:00
TomZ 7afefefa41 Improve NWM flow-control
The NetworkManager now has more mature flow-control which means that we
send our buffers more regularly and we delay parsing received data if the
sending takes too long.

The direct effect should be that creating of a large number of messages
in response to incoming messages is no longer a problem in many cases.
2020-09-17 21:04:28 +02:00
TomZ 1434383f01 Simplify
Lets not be afraid of some pointer math...
2020-09-17 20:55:14 +02:00
TomZ 84ee1bc3fe Minor: comments and whitespace. 2020-09-17 20:53:56 +02:00
TomZ f0375c09a7 Fix bad memory access on sending prio message
Don't ask the size of an unitialized buffer.
2020-09-17 20:51:06 +02:00
TomZ 5f071d9ef7 Request indexer for version and display 2020-09-14 23:02:52 +02:00
TomZ 8b2c928fae Fix comment confusion (add 'not') 2020-09-14 22:48:03 +02:00
TomZ 352644fc05 [REST] Make transaction/details also fetch from mempool
This uses the new MempoolSearch api in order to allow the REST API to
fetch and display transaction data which has not been confirmed yet.
2020-09-14 15:30:51 +02:00
TomZ fcc3b094ef [API] Improve featureset of MempoolSearch
The mempool search now shares its serialization code with the blockchain
transaction fetcher, allowing all the filtering and include flags to work
here too.
This also fixes several bugs and reverts the mempool API change.
Additionally I return the FirstSeenTime for each mempool entry.

There is a slight API breakage in the LiveTransactions service, which as
far as I know is still unused outside of Flowee.
These enum values changed:
Api::LiveTransactions::
  Transaction   20 =>  25
  UnspentState  23 => 26
  OutputScript  24 => 23

The reason for this change is to have the Blockchain namespace in
sync with the LiveTransactions namespace for similar features.
2020-09-14 15:27:15 +02:00
TomZ 3cf670497d minor; remove comment 2020-09-11 18:54:21 +02:00
TomZ b2e39b4ae6 Introduce new Job type matching the new SearchMempool API message 2020-09-11 18:54:21 +02:00
TomZ 88028c3c77 Make flags be initialized faster
This fixes a regression which caused the hub on startup to not get any
validation flags until a new block was added to the chain.
2020-09-11 18:54:21 +02:00
TomZ 6fb9310007 Avoid work
When a block header is rejected before it has been added to the header-
chain, we don't have to update the header-chain.
2020-09-11 18:54:21 +02:00
TomZ db9a80f8eb [API] Add support to query the mempool
This allows a search based on TxId or output-script-hash for
mempool transactions.
We include double spend proof info when available in the reply
2020-09-11 14:07:14 +02:00