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: member

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

    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. mgrychow force-pushed on Aug 23, 2018
  6. mgrychow force-pushed on Aug 24, 2018
  7. 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
  8. 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
  9. 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?
  10. 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.

  11. 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.
  12. 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)
  13. 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
  14. marcinja changes_requested
  15. laanwj added the label UTXO Db and Indexes on Aug 25, 2018
  16. DrahtBot added the label Needs rebase on Aug 25, 2018
  17. mgrychow force-pushed on Aug 27, 2018
  18. DrahtBot removed the label Needs rebase on Aug 27, 2018
  19. DrahtBot added the label Needs rebase on Sep 12, 2018
  20. mgrychow force-pushed on Sep 14, 2018
  21. DrahtBot removed the label Needs rebase on Sep 14, 2018
  22. mgrychow force-pushed on Sep 14, 2018
  23. mgrychow force-pushed on Sep 15, 2018
  24. mgrychow force-pushed on Sep 24, 2018
  25. mgrychow force-pushed on Sep 25, 2018
  26. mgrychow force-pushed on Sep 25, 2018
  27. mgrychow force-pushed on Sep 26, 2018
  28. DrahtBot added the label Needs rebase on Nov 5, 2018
  29. utxoscriptindex: draft e3165d0bfd
  30. utxoscriptindex: utxoindex to utxoscriptindex rename, unit tests added, copyrights, minor cleanup e6aaa3aefc
  31. whitespace fix + msvc build fix 1d4eb291a7
  32. mgrychow force-pushed on Nov 13, 2018
  33. DrahtBot removed the label Needs rebase on Nov 13, 2018
  34. utxoscriptindex: rework - push(Pair) replaced with pushKV 34c8e8e7cf
  35. mgrychow force-pushed on Nov 13, 2018
  36. mgrychow commented at 10:39 am on November 14, 2018: none
    Rebased
  37. DrahtBot commented at 4:28 pm on December 29, 2018: member
  38. DrahtBot added the label Needs rebase on Dec 29, 2018
  39. marcinja referenced this in commit f4c1af665c on Jan 18, 2019
  40. marcinja referenced this in commit 1ca140d06c on Jan 20, 2019
  41. marcinja referenced this in commit 8c07159de6 on Jan 22, 2019
  42. marcinja referenced this in commit d04d72ba65 on Jan 22, 2019
  43. marcinja referenced this in commit 3fb4c5bbce on Jan 30, 2019
  44. marcinja referenced this in commit d4d30e05c4 on Jan 30, 2019
  45. marcinja referenced this in commit cce0e5cacc on Mar 6, 2019
  46. marcinja referenced this in commit 8de4da0cab on Mar 20, 2019
  47. marcinja referenced this in commit 0840d8e71a on Mar 20, 2019
  48. marcinja referenced this in commit 68f2a7e835 on Mar 20, 2019
  49. marcinja referenced this in commit 1d5e31f6eb on Mar 20, 2019
  50. 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.
  51. MarcoFalke closed this on Apr 19, 2019

  52. marcinja referenced this in commit dcae6bfddf on Aug 16, 2019
  53. marcinja referenced this in commit e26decf1b5 on Aug 16, 2019
  54. marcinja referenced this in commit 820d566658 on Aug 16, 2019
  55. fjahr referenced this in commit d852088753 on Aug 26, 2019
  56. laanwj removed the label Needs rebase on Oct 24, 2019
  57. DrahtBot 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: 2024-07-03 13:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me