Commit Graph

12358 Commits

Author SHA1 Message Date
tomFlowee 3546d53745 Increase patch-release version 2021.06.1 2021-11-19 14:18:20 +01:00
tomFlowee 7044bf0119 Log more detail before 'throw'. 2021-11-19 14:17:29 +01:00
tomFlowee 9a65a2f9c9 Remove empty and sometimes hanging DNS 2021-11-19 14:16:41 +01:00
tomFlowee 22454df4b7 New version 2021.06.0 2021-11-09 09:53:51 +01:00
tomFlowee 1b5ae89d31 [Refactor] rename FastTransaction.{h|cpp} -> Tx.* 2021-11-02 11:05:14 +01:00
tomFlowee 639a57d957 [Refactor] primitives/BlockHeader -> BlockHeaderFields
This avoids a naming conflict with a p2p class BlockHeader.

Notice that the block data structures are mostly still private API, they
are in the utils dir but headers are not installed, nobody has needed
them so far.
2021-11-02 11:05:14 +01:00
tomFlowee 50af3dc02c [Refactor] rename FastBlock.{h|cpp} -> Block.* 2021-11-02 10:24:58 +01:00
tomFlowee 6ff0e7c0de [Refactor] FastBlock -> Block 2021-11-02 10:18:24 +01:00
tomFlowee dce57fd8ea [Refactor] rename block.{h|cpp} -> MutableBlock.* 2021-11-02 10:13:23 +01:00
tomFlowee 406dc46671 [Refactor] move CBlockLocator to libs/server
Its not needed anywhere outside the apps.
2021-11-02 09:59:13 +01:00
tomFlowee 4689cc6a92 [Refactor] CBlock -> MutableBlock 2021-11-02 09:36:09 +01:00
tomFlowee 64d901d760 Refactor; CBlockHeader -> BlockHeader 2021-11-02 09:28:35 +01:00
tomFlowee d79ab0a301 Special case peers that are behind
A peer that is behind is marked as "on a different chain", which is
ultimately correct, but the response to punish or ban them is too much.
We could very well reconnect later when the situation is resolved.

So, detect when a peer is simply behind and respond by disconnecting
without punishment.
2021-11-01 17:19:00 +01:00
tomFlowee 3841257505 Fix possible deadlock.
The new iteration avoids having the blockchain mutex locked when it
calls up to the connection manager (which locks its own mutex).
2021-11-01 15:52:55 +01:00
tomFlowee a7c8f02c09 Face the reality of low number of testnet nodes. 2021-10-31 15:14:34 +01:00
tomFlowee 701698d6e1 Fix merkleblock download as bloom filters change.
In HD wallets we get an issue where not-yet-generated keys are needed in
the merkle-block request and we notice this as a chunk of blocks is
being downloaded.
This is solved with some extra code.

Also avoid re-uploading the bloom filter during initial sync.
2021-10-27 19:14:09 +02:00
tomFlowee c5e845b11b Be more generous with asking for headers.
On connect, we should ask for a HEADERS overview from the remote peer,
even if we aren't fully at the tip yet.

Also remove some old lookup no longer used.
2021-10-27 19:14:09 +02:00
tomFlowee bdbde16e28 Make CleanPeers not ban good nodes 2021-10-27 19:14:09 +02:00
tomFlowee 1af7fea053 Fix too-fast-banning bug
Sometimes a node would not be online for a while and we'd incorrectly
ban them for a long time when we just need to mark them as not-
reachable-right-now.
2021-10-27 19:14:09 +02:00
tomFlowee 1efcc39f42 Avoid doing work for an empty wallet. 2021-10-27 19:14:09 +02:00
tomFlowee cc2b725452 Install random.h from flowee_utils 2021-10-27 19:14:09 +02:00
tomFlowee 851d147dcd Add way to go from seed to mnemonic. 2021-10-27 19:14:09 +02:00
tomFlowee 6da5090202 Make converter method available in API.
This allows people to validate and convert a deriviation path from a
string to a vector of numbers.
2021-10-18 22:59:11 +02:00
tomFlowee b8e6ddfb19 Add a specific operator=
This avoids checkers being worries about the inconsistency of a
specific copy-constructor but a generic assignment operator.
The assignment operator can be generic because locking doesn't
care what the content is.
2021-10-13 17:06:58 +02:00
tomFlowee 4252e859e7 Remove obsolete (and untested) code. 2021-10-13 17:06:58 +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 3f422e501b Provide hashing code for bip39 2021-10-13 16:42:48 +02:00
tomFlowee 919d6ffbc5 Make test less fragile.
This avoids depending on Qt CoW not hitting on returning it.
Also fix open() in release builds.
2021.05.0
2021-08-09 21:26:07 +02:00
tomFlowee a5c4a308f4 We reached 700K, pre-allocate more :) 2021-08-09 21:22:25 +02:00
tomFlowee e30c4ceca5 Wrap new feature in ifdef
The API-wise nice addition of base58 encoding learning about
private keys has as a downside that external projects get the
surprise of pulling in a lot more code.

Those that want to avoid this, while not using private keys, can
simply add
  add_definitions(-DNPRIVKEY)  # avoid private-key using code
to their CMake file.
2021-08-09 20:04:27 +02:00
tomFlowee a0e9e4c421 new version 2021-08-09 19:45:23 +02:00
tomFlowee 6692a0a11a Follow API change in NWM.
Setting the ringbuffers to not-so-tiny values
2021-08-05 23:03:19 +02:00
tomFlowee b1f6f497dd Prevent misuse of API 2021-08-05 22:43:24 +02:00
tomFlowee 4cf26ee529 Fix a very niche bug. 2021-08-05 22:42:58 +02:00
tomFlowee d355c5f0ab Make the reconnect timeout more agressive.
The first bunch of times we want to reconnect much faster so we have less
downtime and faster response.

After a while it goes up to a slower timeout in order to not overload
logs and other such.
2021-08-05 22:42:58 +02:00
tomFlowee bd3c1c3b7a Avoid a too small ring buffer. 2021-08-05 22:03:24 +02:00
tomFlowee 56f083e3b6 Ensure sane queue size
This is based on the fact that a ringbuffer is not very happy if its only
got one element.
2021-08-05 22:02:45 +02:00
tomFlowee d73763977c Avoid calls to listeners while we have a lock.
This is a library class, lets be nice to users of our class and
avoid deadlocks.
2021-07-31 18:25:24 +02:00
tomFlowee 9b2317e5c4 Fix warning from linter 2021-07-31 18:25:08 +02:00
tomFlowee 3bac1cc9e0 Add setData for CKey style data. 2021-07-31 17:36:15 +02:00
tomFlowee 77bd1ac74f Improve the SPV sync action.
This re-thinks the way we assign new peers and massively speeds up the
finding of enough peer for our wallets.
2021-07-30 16:56:25 +02:00
tomFlowee 0e6f2bec29 Add 'Last' priority. 2021-07-30 14:03:29 +02:00
tomFlowee 4411ecb2e5 Fix API docs. 2021-07-30 14:03:03 +02:00
tomFlowee 45851de8b9 Fix and add log message on action. 2021-07-30 14:02:33 +02:00
tomFlowee e998e64c8f Register task. 2021-07-30 10:01:31 +02:00
tomFlowee 0d8845386d API docs. 2021-07-30 10:01:06 +02:00
tomFlowee 47f0d955bb Add double include protection 2021-07-29 20:26:03 +02:00
tomFlowee 2308600929 Add convenience constructor. 2021-07-26 15:01:25 +02:00
tomFlowee 5e4e5f5d53 Remove useless badge. 2021-07-15 17:21:34 +02:00
tomFlowee 773eafc892 make compile 2021-07-15 13:10:05 +02:00