1. 13 Apr, 2020 1 commit
    • Tom Zander's avatar
      Replace SigOps with SigChecks · 2aa462f8
      Tom Zander authored
      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
      * 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
  2. 05 Mar, 2020 1 commit
  3. 27 Feb, 2020 2 commits
    • Tom Zander's avatar
      Make loading find a functional UTXO state · 60d371af
      Tom Zander authored
      When, on loading, the blockindex and the UTXO don't agree then try to find an older UTXO
      state where they do agree.
      The most typical state issue is where a block stored in the blocksdb is not available in
      the index due to corruption or similar.
    • Tom Zander's avatar
      Move nStatus of blockindex into the UTXO · 489a9a48
      Tom Zander authored
      To allow the UTXO to actually use the power of checkpoints we need to
      make sure that the block-validation state is not stored separately from
      The goal is that when we have some curruption we can just go back to an
      earlier state of the UTXO and re-validate the blocks to get to the
      current tip. The often seen problem is that corruption will instead
      leave the block-index (leveldb) with an incorrect state so the replay
      This change solves that by no longer reading the block-validation-state
      and no longer writing it on a state change.
  4. 20 Oct, 2019 1 commit
  5. 10 Oct, 2019 1 commit
    • Tom Zander's avatar
      Replace boost::bind with std::bind · 0cac9426
      Tom Zander authored
      This is done almost everywhere, I skipped the boost signals since thats
      only really used in the GUI part which is just there to do testing.
  6. 02 Sep, 2019 1 commit
  7. 24 Aug, 2019 1 commit
    • Tom Zander's avatar
      Clean up the hairy ball of util.cpp · df7de2ec
      Tom Zander authored
      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.
  8. 12 Aug, 2019 1 commit
  9. 05 Aug, 2019 1 commit
  10. 28 Jun, 2019 1 commit
    • Tom Zander's avatar
      Vastly simplify mempool-acceptance · 1aacb3ae
      Tom Zander authored
      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
  11. 24 Jun, 2019 1 commit
    • Tom Zander's avatar
      Cleanup the logging at shutdown. · 39428f12
      Tom Zander authored
      The RPC / HTTP servers were logging about being shutdown even if
      they never were started in the first place. This confused people.
      Also removed some empty methods.
  12. 16 Jun, 2019 1 commit
  13. 22 Apr, 2019 2 commits
    • Tom Zander's avatar
      Remove obsolete code. · a7f9b9fe
      Tom Zander authored
      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.
    • Tom Zander's avatar
      Cleanup; block-pruning · d20dd6d7
      Tom Zander authored
      This has been commented out code for some time and its probably best to
      remove dead code so as to avoid it rotting.
  14. 24 Mar, 2019 1 commit
  15. 21 Mar, 2019 2 commits
  16. 13 Mar, 2019 1 commit
  17. 25 Feb, 2019 2 commits
  18. 03 Feb, 2019 1 commit
  19. 30 Dec, 2018 2 commits
    • Tom Zander's avatar
      Cleanup BOOST_FOREACH -> for(:) · 135bbb9a
      Tom Zander authored
    • Tom Zander's avatar
      Remove some usages of the multi-chain feature · 4623a079
      Tom Zander authored
      During the BCH fork-off time we allowed the client to be started
      as either BCH or BTC and as such there are several code-paths
      that behave different based on this user setting.
      We remove those as we no longer allow starting as BTC client.
      This also removes the check for the min-block-size (rollback protection)
      as this is accomplished by the checkpoints on the BCH chain.
  20. 21 Nov, 2018 1 commit
  21. 11 Nov, 2018 1 commit
    • Tom Zander's avatar
      Make UTXO write timebased as well · d55c7bfe
      Tom Zander authored
      The current system writes based on the amount of changes, which is a bit
      risky as long as we have small blocks as the amount of changes may for
      hours be below the "lets write" limit.
      So also write every 5 minutes, just to make sure we won't keep data in
      memory longer than needed. Also this allows pruning to happen for people
      that don't run their node all the time.
  22. 21 Oct, 2018 1 commit
    • Tom Zander's avatar
      Make the UTXO have some limits "configurable" · fdd69354
      Tom Zander authored
      This change makes the limits be static variables, which means they are
      only settable once for a process. The only usecase so far is to use much
      smaller limits in testing situations.
  23. 11 Oct, 2018 1 commit
  24. 25 Sep, 2018 1 commit
    • Tom Zander's avatar
      Make having open mapped files more smart. · a22cae12
      Tom Zander authored
      Instead of having a magic 10 open files, we now have a scheduled
      run that closes all mapped files 30 seconds after last usage.
      This allows many files to be opened with extremely low overhead and
      cost (they are not actually loaded until needed, and even then only
      per 4K page).
  25. 24 Sep, 2018 2 commits
  26. 17 Aug, 2018 1 commit
  27. 10 Aug, 2018 2 commits
  28. 06 Aug, 2018 1 commit
  29. 04 Aug, 2018 1 commit
  30. 23 Jul, 2018 1 commit
    • Tom Zander's avatar
      Updates to and start using the UnspentOutputDB · 1600086e
      Tom Zander authored
      The new UnspentOutputDatabase classes are only very loosly a database, we
      purely register and store unspent outputs there. But unline a DB we don't
      allow modification (just insert and delete).
      This replaces the coin-db (which was based on leveldb) and as first goal
      this gives us a higher level of stability. The level-database was known
      to give corruption issues.
      Notice that users will need to do a manual reindex on first update.
  31. 22 Jul, 2018 1 commit
  32. 11 Apr, 2018 1 commit
  33. 21 Mar, 2018 1 commit