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
        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
      2aa462f8
  2. 14 Aug, 2018 1 commit
    • Tom Zander's avatar
      Refactor tests a little · 7df238b2
      Tom Zander authored
      Duplicate the test_bitcoin file into the common dir,
      I hope to remove the original in future.
      Make the common dir a new static lib and create a new
      qtestlib based unit test out of the old doublespend unit test.
      7df238b2
  3. 14 Feb, 2018 1 commit
  4. 09 Nov, 2017 1 commit
  5. 16 Aug, 2017 1 commit
  6. 05 Jan, 2016 1 commit
    • MarcoFalke's avatar
      Bump copyright headers to 2015 · 333e1eae
      MarcoFalke authored
      - Bump copyright headers to 2015
      - [devtools] Rewrite fix-copyright-headers.py
      - [devtools] Use git pretty-format for year parsing
      
      Github-Pull: #7205
      Rebased-From: fa6ad855e9159b2247da4fa0054f32fa181499ab fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35 fa71669452e57039e4270fd2b33a0e0e1635b813
      333e1eae
  7. 28 Jul, 2015 1 commit
  8. 13 May, 2015 1 commit
    • Pieter Wuille's avatar
      Reduce checkpoints' effect on consensus. · dce8360e
      Pieter Wuille authored
      Instead of only checking height to decide whether to disable script checks,
      actually check whether a block is an ancestor of a checkpoint, up to which
      headers have been validated. This means that we don't have to prevent
      accepting a side branch anymore - it will be safe, just less fast to
      do.
      
      We still need to prevent being fed a multitude of low-difficulty headers
      filling up our memory. The mechanism for that is unchanged for now: once
      a checkpoint is reached with headers, no headers chain branching off before
      that point are allowed anymore.
      dce8360e
  9. 01 May, 2015 1 commit
  10. 12 Mar, 2015 1 commit
  11. 05 Jan, 2015 1 commit
    • Wladimir J. van der Laan's avatar
      String conversions uint256 -> uint256S · 34cdc411
      Wladimir J. van der Laan authored
      If uint256() constructor takes a string, uint256(0) will become
      dangerous when uint256 does not take integers anymore (it will go
      through std::string(const char*) making a NULL string, and the explicit
      keyword is no help).
      34cdc411
  12. 16 Dec, 2014 1 commit
  13. 18 Mar, 2014 1 commit
  14. 10 Nov, 2013 1 commit
    • Brandon Dahler's avatar
      Cleanup code using forward declarations. · 51ed9ec9
      Brandon Dahler authored
      Use misc methods of avoiding unnecesary header includes.
      Replace int typedefs with int##_t from stdint.h.
      Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h.
      Normalize QT_VERSION ifs where possible.
      Resolve some indirect dependencies as direct ones.
      Remove extern declarations from .cpp files.
      51ed9ec9
  15. 25 Jun, 2012 1 commit
  16. 01 Dec, 2011 1 commit