Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] 5.1.0 backports #2303

Merged
merged 31 commits into from
Apr 12, 2021
Merged

[Backport] 5.1.0 backports #2303

merged 31 commits into from
Apr 12, 2021

Commits on Apr 8, 2021

  1. Make box of PIVX address return to purple when it's empty

    Github-Pull: bitcoin#2249
    Rebased-From: a6a4af1
    PicklesRcool authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    0cf4064 View commit details
    Browse the repository at this point in the history
  2. Fixes double fade-in animation when clicking the question mark next t…

    …o the 'Available' label in the top bar
    
    Github-Pull: bitcoin#2247
    Rebased-From: e21a560
    PicklesRcool authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    775e532 View commit details
    Browse the repository at this point in the history
  3. Set fee to highest possible if input is too big #fixes 2234

    Set custom transaction fee to highest possible value in case input
    is too big number.
    
    Github-Pull: bitcoin#2237
    Rebased-From: ae1837e
    dnchk authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    e10c1b6 View commit details
    Browse the repository at this point in the history
  4. rpc: Expose g_is_mempool_loaded via getmempoolinfo and

    /rest/mempool/info.json
    
    And use it to fix a race condition in mempool_persist.py:
    https://travis-ci.org/Empact/bitcoin/jobs/487577243
    
    Since e.g. getrawmempool returns errors based on this status, this
    enables users to test it for readiness.
    Github-Pull: bitcoin#2254
    Rebased-From: 0169a75
    Empact authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    584bbba View commit details
    Browse the repository at this point in the history
  5. Move g_is_mempool_loaded into CTxMemPool::m_is_loaded

    So the loaded state is explicitly mempool-specific.
    
    Github-Pull: bitcoin#2254
    Rebased-From: f0de789
    Empact authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    a1d6c0c View commit details
    Browse the repository at this point in the history
  6. [Test] Fix intermittent sync_blocks failures

    >>> backports bitcoin/bitcoin@fa3f9a0
    Github-Pull: bitcoin#2254
    Rebased-From: d076c81
    random-zebra authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    d902128 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f806584 View commit details
    Browse the repository at this point in the history
  8. docs: add reduce-memory.md

    Co-Authored-By: Wladimir J. van der Laan <laanwj@gmail.com>
    
    Plus adapted it to PIVX.
    
    Github-Pull: bitcoin#2262
    Rebased-From: caa6734
    fanquake authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    a582560 View commit details
    Browse the repository at this point in the history
  9. [validation] Do not actively wait for cs_main lock in `ActivateBestCh…

    …ain()`
    
    Github-Pull: bitcoin#2284
    Rebased-From: e560afd
    furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    c865148 View commit details
    Browse the repository at this point in the history
  10. Removing blocksizenotify abomination.

    Essentially, we were re-serializing every new connected block tip just to calculate the size and broadcast a notification for external listeners if the block size is above 1mb.
    
    Which well..
    
    (1) the block arrives serialized from the network and it's parsed into a block object by the core, there is no need to re-serialize the entire block..
    
    (2) the complete serialization is just done to notify external listeners if a block exceeds the 1mb block size..  --> which can easily be done from outside of the core without having the most important node processing thread's work notifying nor calculating it, blocking cs_main for its whole time..
    
    Github-Pull: bitcoin#2284
    Rebased-From: 479d065
    furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    4903f31 View commit details
    Browse the repository at this point in the history
  11. Add Unit Test for SingleThreadedSchedulerClient

    Ensures ordering of callbacks within a SingleThreadedSchedulerClient
    with respect to each other
    
    Github-Pull: bitcoin#2290
    Rebased-From: 4ea2048
    skeees authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    9a9425f View commit details
    Browse the repository at this point in the history
  12. Update documentation for SingleThreadedSchedulerClient() to specify t…

    …he memory model
    
    Github-Pull: bitcoin#2290
    Rebased-From: cb9bb25
    skeees authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    f499e6e View commit details
    Browse the repository at this point in the history
  13. Update ValidationInterface() documentation to explicitly specify thre…

    …ading and memory model
    
    Github-Pull: bitcoin#2290
    Rebased-From: f9d2ab3
    skeees authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    c202bc1 View commit details
    Browse the repository at this point in the history
  14. Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip

    Ensures that callbacks are invoked in the order in which the chain is updated
    Resolves bitcoin#12978
    
    Github-Pull: bitcoin#2290
    Rebased-From: ef24337
    skeees authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    7ab7112 View commit details
    Browse the repository at this point in the history
  15. Fix fast-shutdown crash if genesis block was not loaded

    If the ShutdownRequested() check at the top of ActivateBestChain()
    returns false during initial genesis block load we will fail an
    assertion in UTXO DB flush as the best block hash IsNull(). To work
    around this, we move the check until after one round of
    ActivateBestChainStep(), ensuring the genesis block gets connected.
    
    Github-Pull: bitcoin#2290
    Rebased-From: 8640be1
    TheBlueMatt authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    c2ae5ff View commit details
    Browse the repository at this point in the history
  16. Optimize ActivateBestChain for long chains

    Github-Pull: bitcoin#2290
    Rebased-From: 8d15cf5
    sipa authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    fd79bb7 View commit details
    Browse the repository at this point in the history
  17. Do not unlock cs_main in ABC unless we've actually made progress.

    Technically, some internal datastructures may be in an inconsistent
    state if we do this, though there are no known bugs there. Still,
    for future safety, its much better to only unlock cs_main if we've
    made progress (not just tried a reorg which may make progress).
    
    Github-Pull: bitcoin#2290
    Rebased-From: 198f435
    TheBlueMatt authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    fb19c3a View commit details
    Browse the repository at this point in the history
  18. Fix concurrency-related bugs in ActivateBestChain

    If multiple threads are invoking ActivateBestChain, it was possible to have
    them working towards different tips, and we could arrive at a less work tip
    than we should.  Fix this by introducing a ChainState lock which must
    be held for the entire duration of ActivateBestChain to enforce
    exclusion in ABC.
    
    Github-Pull: bitcoin#2290
    Rebased-From: a51a755
    skeees authored and furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    39f6eaf View commit details
    Browse the repository at this point in the history
  19. Validation: rename one of the two instances using "bad-prevblk" to it…

    …s correct description of "prevblk-not-found"
    
    Github-Pull: bitcoin#2290
    Rebased-From: f68251d
    furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    c4dd07f View commit details
    Browse the repository at this point in the history
  20. Add unit tests for signals generated by ProcessNewBlock()

    After a recent bug discovered in callback ordering in MainSignals,
    this test checks invariants in ordering of
    BlockConnected / BlockDisconnected / UpdatedChainTip signals
    
    Adaptation of btc@dd435ad40267f5c50ff17533c696f9302829a6a6
    
    Github-Pull: bitcoin#2290
    Rebased-From: 50dbec5
    furszy committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    e51dcee View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. [RPC] getwalletinfo: Add last_processed_block return value.

    Github-Pull: bitcoin#2283
    Rebased-From: dc2d22a
    furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    b3a12b5 View commit details
    Browse the repository at this point in the history
  2. [Tests] Check last_processed_block in getwalletinfo

    Github-Pull: bitcoin#2283
    Rebased-From: a700fdf
    random-zebra authored and furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    7f244b1 View commit details
    Browse the repository at this point in the history
  3. Validation: Remove CheckBlockSignature now unneeded enableP2PKH flag.

    It was only needed for the activation period, now that it's fully enforced, can be removed.
    The activation time isn't needed, v5 enforcement checkpoint is ensuring that the chain cannot reorg to a time in which P2PKH stakes weren't enabled.
    
    Github-Pull: bitcoin#2295
    Rebased-From: 5aa3600
    furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    a78dfbe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    374f6c9 View commit details
    Browse the repository at this point in the history
  5. Refactor: remove redundant fAlreadyCheckedBlock argument from `Acce…

    …ptBlock`
    
    `CBlock` has a member `fChecked` that has the exact same purpose as the `fAlreadyCheckedBlock` flag.
    
    Github-Pull: bitcoin#2295
    Rebased-From: 362a598
    furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    f53c824 View commit details
    Browse the repository at this point in the history
  6. Removal of the fAlreadyChecked flag from the entire `ActivateBestCh…

    …ain` flow.
    
    Github-Pull: bitcoin#2295
    Rebased-From: 6355774
    furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    1f38b90 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c44b431 View commit details
    Browse the repository at this point in the history
  8. validation: Remove redundant request sync from ProcessNewBlock().

    ProcessNewBlock is called by ProcessMessage (NetMsgType::BLOCK command) which is doing the exact same check: if the node does not have the previous block, request sync up to it.
    
    Github-Pull: bitcoin#2295
    Rebased-From: 959936f
    furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    64bd400 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0d2555e View commit details
    Browse the repository at this point in the history
  10. Automatically set the lowest possible Custom Fee when user type in fe…

    …e that is too low.
    
    Github-Pull: bitcoin#2215
    Rebased-From: 60bc468
    MishaPozdnikin authored and furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    1fc145c View commit details
    Browse the repository at this point in the history
  11. GUI: if the custom fee is disabled, use the minimum required fee and …

    …not the stored value.
    furszy committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    50a5e84 View commit details
    Browse the repository at this point in the history