rpc: Add testblocktemplatevalidity #13415

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1806-rpcTestblocktemplatevalidity changing 2 files +50 −3
  1. MarcoFalke commented at 6:55 PM on June 7, 2018: member

    A caller can check if a block template is valid and is good to spend work on

  2. MarcoFalke commented at 6:56 PM on June 7, 2018: member

    TODO: Add tests (Currently left out to avoid excessive merge conflicts with other pull requests touching the miner tests)

  3. MarcoFalke added the label RPC/REST/ZMQ on Jun 7, 2018
  4. MarcoFalke added the label Mining on Jun 7, 2018
  5. DrahtBot commented at 7:31 PM on June 7, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->Note to reviewers: This pull request conflicts with the following ones:

    • #13945 (Refactoring CRPCCommand with enum category by isghe)
    • #13864 (validation: Document where we are intentionally ignoring bool return values from validation related functions by practicalswift)
    • #13083 (Add compile time checking for cs_main runtime locking assertions by practicalswift)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. in src/rpc/mining.cpp:300 in fa040362cb outdated
     295 | +    UniValue result(UniValue::VOBJ);
     296 | +    result.pushKV("block_hash", block.GetHash().GetHex());
     297 | +    CValidationState state;
     298 | +    bool valid_template = TestBlockValidity(state, Params(), block, /* pindexPrev */ tip, /* fCheckPOW */ false, /* fCheckMerkleRoot */ true);
     299 | +    result.pushKV("valid_template", valid_template);
     300 | +    if (valid_template) {
    


    Empact commented at 9:14 PM on June 7, 2018:

    Is this inverted?

  7. luke-jr commented at 9:18 PM on June 7, 2018: member

    This is already supported via BIP 23 Block Proposals: https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki#Block_Proposal

  8. promag commented at 11:29 AM on June 10, 2018: member
  9. DrahtBot cross-referenced this on Jun 15, 2018 from issue doc: Rewrite some validation docs as lock annotations by MarcoFalke
  10. DrahtBot cross-referenced this on Jun 15, 2018 from issue Avoid copies in range-for loops and add a warning to detect them by theuni
  11. DrahtBot cross-referenced this on Jun 15, 2018 from issue contrib: Fix CVE-2018-12356 by hardening the regex by loganaden
  12. DrahtBot cross-referenced this on Jun 15, 2018 from issue [devtools translations] catch invalid specifiers by HashUnlimited
  13. DrahtBot cross-referenced this on Jun 15, 2018 from issue For AVX2 code, also check for AVX, XSAVE, and OS support by sipa
  14. DrahtBot cross-referenced this on Jun 15, 2018 from issue WIP [bench] CCoinsView(Cache): measure various scenarios by Sjors
  15. DrahtBot cross-referenced this on Jun 15, 2018 from issue [Tests] Make p2p_segwit easier to debug by jnewbery
  16. DrahtBot cross-referenced this on Jun 15, 2018 from issue Make SER_GETHASH implicit for CHashWriter and SerializeHash by Empact
  17. DrahtBot cross-referenced this on Jun 15, 2018 from issue Wallet: correctly deprecate accounts in getbalance, re-add minconf / include-watch-only by jonasschnelli
  18. DrahtBot cross-referenced this on Jun 15, 2018 from issue gui: Drop qt4 support by laanwj
  19. DrahtBot cross-referenced this on Jun 15, 2018 from issue Make sure LC_ALL=C is set in all shell scripts by practicalswift
  20. DrahtBot cross-referenced this on Jun 15, 2018 from issue rpc: have verifytxoutproof check the number of txns in proof structure by instagibbs
  21. DrahtBot cross-referenced this on Jun 15, 2018 from issue [WIP] support new multisig template in wallet for Solver, signing, and signature combining by instagibbs
  22. MarcoFalke force-pushed on Jun 15, 2018
  23. TheBlueMatt cross-referenced this on Jun 26, 2018 from issue Spot Check Weak Block Validity by TheBlueMatt
  24. MarcoFalke force-pushed on Jul 11, 2018
  25. laanwj added this to the milestone 0.18.0 on Aug 2, 2018
  26. laanwj added the label Feature on Aug 2, 2018
  27. DrahtBot cross-referenced this on Aug 3, 2018 from issue validation: Document where we are intentionally ignoring bool return values from validation related functions by practicalswift
  28. DrahtBot cross-referenced this on Aug 12, 2018 from issue Refactoring CRPCCommand with enum category by isghe
  29. rpc: Add testblocktemplatevalidity 28057de21a
  30. MarcoFalke force-pushed on Aug 15, 2018
  31. MarcoFalke closed this on Aug 15, 2018

  32. MarcoFalke deleted the branch on Aug 15, 2018
  33. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC