Speed up deriveaddresses for large ranges #15751

pull sipa wants to merge 1 commits into bitcoin:master from sipa:201904_fasterderiveaddresses changing 1 files +4 −3
  1. sipa commented at 8:15 PM on April 4, 2019: member

    deriveaddresses dumps all generated addresses into a single FlatSigningProvider, which is also used for looking up information for future derivations. @achow101 points out that the growing data structures may unnecessary increase lookup time for later derivations.

    Fix this by separating the provider used for lookups (key_provider) and the one we dump things into.

    This gives a 10x speedup for a range of 7000 elements, and probably a larger speedup for larger ranges.

  2. Speed up deriveaddresses for large ranges 41a46cbb31
  3. DrahtBot added the label RPC/REST/ZMQ on Apr 4, 2019
  4. achow101 commented at 10:16 PM on April 4, 2019: member

    I've tried using deriveaddresses on a range of 10000 elements but I don't see any speedup with this compared to master. What command did you use to test?

    Regardless, I do think this is a good change, so utACK 41a46cbb31f1622f7d1ff54c7a1c1ca701c1e754

  5. fanquake commented at 5:26 AM on April 13, 2019: member

    tACK 41a46cb

    I'm seeing a substantial speedup using 41a46cb over master (66ce95a).

    addresses

    Using a command like time src/bitcoin-cli deriveaddresses "wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))#t2zpj2eu" "[0,1000]"

  6. laanwj commented at 11:52 AM on April 15, 2019: member

    makes sense utACK 41a46cbb31f1622f7d1ff54c7a1c1ca701c1e754

  7. laanwj merged this on Apr 15, 2019
  8. laanwj closed this on Apr 15, 2019

  9. laanwj referenced this in commit 0c6487c74f on Apr 15, 2019
  10. deadalnix referenced this in commit adf568cc59 on Jun 23, 2020
  11. kittywhiskers referenced this in commit 69442553c0 on Nov 3, 2021
  12. kittywhiskers referenced this in commit c13d26d766 on Nov 4, 2021
  13. kittywhiskers referenced this in commit 9b52fb36da on Nov 11, 2021
  14. pravblockc referenced this in commit 488254da79 on Nov 18, 2021
  15. DrahtBot locked this on Dec 16, 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-04-13 15:14 UTC

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