Commit Graph

16 Commits

Author SHA1 Message Date
tomFlowee 45dd785f39 Follow whole-script sizelimit.
Also add unit test for the op_return limits.
2021-03-13 16:52:04 +01:00
tomFlowee a9d3c2ee92 Support change to allow multiple op_returns 2021-03-13 14:02:38 +01:00
tomFlowee 048d5b83a8 make defaults more sane 2021-02-23 17:12:59 +01:00
tomFlowee 40b6e4e02c Prefer modern C++
static const -> constexpr
2021-01-20 19:59:54 +01:00
tomFlowee defd3950f0 Remove CAmount typedef
The CAmount name is not helpful as its just an int64_t and not a
class, like the name implies. There were a handful of places where
it was passed in as const-ref, as a good example of this actually
creating sub-par code.
2021-01-20 19:59:35 +01: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
TomZ 59ac2f259c Update default timeout
Transactions are only kept in the mempool a limited time before they are
removed and have to be re-entered by the owner of the transaction.

To keep mempools from being too different from the rest of the network we
can flush them based on the fact that if a tx hasn't been included yet in
this time, miners are not seeing it.
2020-07-07 11:16:16 +02:00
TomZ 2aa462f8bb Replace SigOps with SigChecks
This is part of the protocol upgrade for 2020-05-15, and in general it
seems to go the direction of "we did this before, lets do this again".

The spec is clear enough, but there is still a lack of questioning and
testing. The problem this attempts to fix has been neutered for years[1].

The spec states:
> The essential idea of SigChecks is to perform counting solely in the
> spending transaction, and count actual executed signature check
> operations.

This, however nobel and logical, ignores that the
check-for-being-too-costly just pulled in a UTXO lookup and the loading
of the output script from the historical chain.
The goal that we protect against CPU over-use may be reached, but the
price is a total system slowdown. You can have multiple CPUs, but the
bus to permanent storage has one, max 2 parallel pipes.

To ensure theHub stays the number one scalable node, I didn't blindly
follow the spec, while making sure that the Hub is correctly going to
follow/reject consensus violations of newly mined blocks.

As a result the implementation in Flowee the Hub:

* does not check sigcheck-counts on historical blocks (more than 1000
  blocks in the past).

  This may increase the risk of chain-splits ever so slightly, but the cost
  of disk-IO would be too high.

* No longer stores the value in the mempool, nor uses it for the
  CPU-miner.

* Ties the sigcheck-limits to the user-set block-size-accept-limit.

  This is contrary to the spec which mistakenly thinks that BCH has a
  max block-size in the consensus rules. The effect is the same, though.

* The per-intput standardness suggestion is not implemented because
  standardness checks don't currently fetch the previous outputs and
  that would be too expensive to add.

* Standardness rules for the whole transaction are moved to the
  mempool-acceptance logic instead. The cost would be too great
  otherwise, similar to the previous point.
  Again, the effect is the same as likely intented.

---
1) since the intro of the CachingTransactionSignatureChecker
2020-04-13 15:57:42 +02:00
TomZ 60195ba472 Change defaults, stop enabling xthin by default. 2019-08-12 11:08:48 +02:00
TomZ a7f9b9fed5 Remove obsolete code.
Remove txIndex option, its move to Flowee Indexer

Also remove the GUI option for setting the amount
of "script validator threads". :D

Remove DBCash command line option too, equally obsolete.
2019-04-22 21:16:10 +02:00
TomZ d20dd6d70a Cleanup; block-pruning
This has been commented out code for some time and its probably best to
remove dead code so as to avoid it rotting.
2019-04-22 20:33:49 +02:00
TomZ cb004d3336 Upgrade default to 128 2019-03-25 12:50:27 +01:00
DesWurstes f61e8f698e Add CuckooCache
100% of code from https://github.com/bitcoin/bitcoin/pull/8895/commits/c9e69fb
2018-08-10 11:05:22 +03:00
TomZ e87a45b508 May hardfork; datacarrier size max is 220 2018-04-16 11:12:08 +02:00
TomZ b76ca3a97e Start libs/utils 2018-02-13 13:27:58 +01:00