Utxoscriptindex #14035

pull mgrychow wants to merge 4 commits into bitcoin:master from mgrychow:utxoscriptindex changing 25 files +1083 −55
  1. mgrychow commented at 7:34 PM on August 23, 2018: none

    Yet another attempt to introduce UTxO index by script. Based on #9806 with review remarks and new index framework introduced in #13033 taken into account.

  2. mgrychow force-pushed on Aug 23, 2018
  3. mgrychow force-pushed on Aug 23, 2018
  4. DrahtBot commented at 10:03 PM on August 23, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #14942 (wallet: Return a ScanResult from CWallet::RescanFromTime by Empact)
    • #14384 (Resolve validationinterface circular dependencies by 251Labs)
    • #14121 (Index for BIP 157 block filters by jimpo)
    • #14111 (index: Create IndexRunner class for activing indexes. by jimpo)
    • #13949 (Introduce MempoolObserver interface to break "policy/fees -> txmempool -> policy/fees" circular dependency by Empact)
    • #13743 (refactor: Replace boost::bind with std::bind by ken2812221)
    • #13088 (Log early messages with -printtoconsole by ajtowns)
    • #10973 (Refactor: separate wallet from node by ryanofsky)

    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.

  5. DrahtBot cross-referenced this on Aug 23, 2018 from issue Refactoring CRPCCommand with enum category by isghe
  6. DrahtBot cross-referenced this on Aug 23, 2018 from issue refactor: Removal of circular dependency between index/txindex, validation and index/base by mgrychow
  7. DrahtBot cross-referenced this on Aug 23, 2018 from issue validation: Document where we are intentionally ignoring bool return values from validation related functions by practicalswift
  8. DrahtBot cross-referenced this on Aug 23, 2018 from issue refactor: Replace boost::bind with std::bind by ken2812221
  9. mgrychow force-pushed on Aug 23, 2018
  10. mgrychow force-pushed on Aug 24, 2018
  11. in src/rpc/blockchain.cpp:1118 in ebe3d1fb65 outdated
    1113 | +
    1114 | +        UniValue oScriptPubKey(UniValue::VOBJ);
    1115 | +        ScriptPubKeyToUniv(coin.out.scriptPubKey, oScriptPubKey, true);
    1116 | +
    1117 | +        UniValue o(UniValue::VOBJ);
    1118 | +        o.push_back(Pair("confirmations", nConfirmations));
    


    instagibbs commented at 4:23 PM on August 24, 2018:

    note: "push_back(Pair" is deprecated in favor of pushKV


    mgrychow commented at 6:05 PM on August 24, 2018:

    Corrected

  12. instagibbs commented at 4:25 PM on August 24, 2018: member

    Might be wortwhile to update it to using output descriptors, like scantxoutset: https://github.com/bitcoin/bitcoin/blob/master/src/rpc/blockchain.cpp#L2035

  13. mgrychow commented at 6:08 PM on August 24, 2018: none

    @instagibbs Thanks for the remarks, how about adding support for descriptors in separate PR?

  14. marcinja cross-referenced this on Aug 24, 2018 from issue Add address-based index (attempt 4?) by marcinja
  15. marcinja commented at 6:57 PM on August 24, 2018: contributor

    @mgrychow, I recently started working on an address-based index (not just for UTXOs) at #14053. I can improve my PR quite a bit using your changes to the ValidationInterface. If you separated that change (adding CBlockUndo's) into it's own commit this PR would be a bit cleaner, and I could use it for the address index :)

    Anyway, will be reviewing this since it's pretty similar to the PR I just made.

  16. instagibbs commented at 6:59 PM on August 24, 2018: member

    @mgrychow Not going to bikeshed this PR to death, just noting it in case you've missed it.

  17. in src/index/utxoscriptindex.cpp:137 in 37562b7e36 outdated
     133 | +void UtxoScriptIndex::TransactionAddedToMempool(const CTransactionRef &ptxn) {
     134 | +    LOCK(cs_utxoCacheMempool);
     135 | +    const CTransaction &tx = *ptxn;
     136 | +    for (unsigned int i = 0; i < tx.vout.size(); i++)
     137 | +    {
     138 | +        if (tx.vout[i].IsNull() || tx.vout[i].scriptPubKey.IsUnspendable())
    


    marcinja commented at 7:04 PM on August 24, 2018:

    Is this check needed? In what case will a transaction be added to the mempool where this is true? I might be missing something. (OP_RETURN outputs)

  18. in src/index/utxoscriptindex.cpp:218 in 37562b7e36 outdated
     214 | +{
     215 | +    if(block.vtx.size() == 0)
     216 | +        return;
     217 | +
     218 | +    unsigned int i = block.vtx.size() - 1;
     219 | +    while(true)
    


    marcinja commented at 7:09 PM on August 24, 2018:

    This could be a do{ } while(i > 0)


    mgrychow commented at 9:25 PM on August 24, 2018:

    Loop needs to execute for i==0 too (that is block's tx with index 0); i is unsigned so after decrementation it overflows and such loop would be indefinite

  19. marcinja changes_requested
  20. laanwj added the label UTXO Db and Indexes on Aug 25, 2018
  21. DrahtBot cross-referenced this on Aug 25, 2018 from issue build: generate MSVC project files via python script by ken2812221
  22. DrahtBot added the label Needs rebase on Aug 25, 2018
  23. mgrychow force-pushed on Aug 27, 2018
  24. DrahtBot removed the label Needs rebase on Aug 27, 2018
  25. DrahtBot cross-referenced this on Aug 30, 2018 from issue index: Create IndexRunner class for activing indexes. by jimpo
  26. jimpo cross-referenced this on Aug 31, 2018 from issue Index for BIP 157 block filters by jimpo
  27. DrahtBot cross-referenced this on Sep 12, 2018 from issue build: Move interfaces/* to libbitcoin_server by laanwj
  28. DrahtBot added the label Needs rebase on Sep 12, 2018
  29. mgrychow force-pushed on Sep 14, 2018
  30. DrahtBot removed the label Needs rebase on Sep 14, 2018
  31. mgrychow force-pushed on Sep 14, 2018
  32. DrahtBot cross-referenced this on Sep 15, 2018 from issue tests: Reorder tests and move most of extended tests up to normal tests by ken2812221
  33. DrahtBot cross-referenced this on Sep 15, 2018 from issue Document intentional and unintentional unsigned integer overflows (wraparounds) using annotations by practicalswift
  34. mgrychow force-pushed on Sep 15, 2018
  35. DrahtBot cross-referenced this on Sep 20, 2018 from issue Log early messages with -printtoconsole by ajtowns
  36. DrahtBot cross-referenced this on Sep 21, 2018 from issue Refactor: separate wallet from node by ryanofsky
  37. DrahtBot cross-referenced this on Sep 21, 2018 from issue Add fee_est tool for debugging fee estimation code by ryanofsky
  38. mgrychow force-pushed on Sep 24, 2018
  39. mgrychow force-pushed on Sep 25, 2018
  40. mgrychow force-pushed on Sep 25, 2018
  41. mgrychow force-pushed on Sep 26, 2018
  42. DrahtBot cross-referenced this on Sep 27, 2018 from issue Multiprocess bitcoin by ryanofsky
  43. DrahtBot cross-referenced this on Oct 3, 2018 from issue Fire TransactionRemovedFromMempool callbacks from mempool by l2a5b1
  44. DrahtBot cross-referenced this on Oct 9, 2018 from issue Refactor: Start to separate wallet from node by ryanofsky
  45. DrahtBot cross-referenced this on Oct 20, 2018 from issue Constexpr Everything Part 1: Constants by DesWurstes
  46. DrahtBot cross-referenced this on Oct 23, 2018 from issue Move util files to directory by jimpo
  47. DrahtBot added the label Needs rebase on Nov 5, 2018
  48. utxoscriptindex: draft e3165d0bfd
  49. utxoscriptindex: utxoindex to utxoscriptindex rename, unit tests added, copyrights, minor cleanup e6aaa3aefc
  50. whitespace fix + msvc build fix 1d4eb291a7
  51. mgrychow force-pushed on Nov 13, 2018
  52. DrahtBot removed the label Needs rebase on Nov 13, 2018
  53. utxoscriptindex: rework - push(Pair) replaced with pushKV 34c8e8e7cf
  54. mgrychow force-pushed on Nov 13, 2018
  55. mgrychow commented at 10:39 AM on November 14, 2018: none

    Rebased

  56. DrahtBot commented at 4:28 PM on December 29, 2018: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  57. DrahtBot added the label Needs rebase on Dec 29, 2018
  58. marcinja referenced this in commit f4c1af665c on Jan 18, 2019
  59. marcinja referenced this in commit 1ca140d06c on Jan 20, 2019
  60. marcinja referenced this in commit 8c07159de6 on Jan 22, 2019
  61. marcinja referenced this in commit d04d72ba65 on Jan 22, 2019
  62. marcinja referenced this in commit 3fb4c5bbce on Jan 30, 2019
  63. marcinja referenced this in commit d4d30e05c4 on Jan 30, 2019
  64. marcinja referenced this in commit cce0e5cacc on Mar 6, 2019
  65. marcinja referenced this in commit 8de4da0cab on Mar 20, 2019
  66. marcinja referenced this in commit 0840d8e71a on Mar 20, 2019
  67. marcinja referenced this in commit 68f2a7e835 on Mar 20, 2019
  68. marcinja referenced this in commit 1d5e31f6eb on Mar 20, 2019
  69. MarcoFalke commented at 5:37 PM on April 19, 2019: member

    There hasn't been much activity lately and the patch still needs rebase, so I am closing this for now. Please let me know when you want to continue working on this, so the pull request can be re-opened.

  70. MarcoFalke closed this on Apr 19, 2019

  71. marcinja referenced this in commit dcae6bfddf on Aug 16, 2019
  72. marcinja referenced this in commit e26decf1b5 on Aug 16, 2019
  73. marcinja referenced this in commit 820d566658 on Aug 16, 2019
  74. fjahr referenced this in commit d852088753 on Aug 26, 2019
  75. laanwj removed the label Needs rebase on Oct 24, 2019
  76. bitcoin locked this on Feb 15, 2022

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:54 UTC