Save last db read #7056

pull morcos wants to merge 2 commits into bitcoin:master from morcos:saveLastDBRead changing 4 files +39 −20
  1. morcos commented at 5:22 PM on November 18, 2015: member

    It's possible coins with the same hash exist when you create a duplicate coinbase, so previously we were reading from the database to make sure we had the old coins cached so if we were to spend the new ones, the old ones would also be spent. This pull instead just marks the new coins as not fresh if they are from a coinbase, so if they are spent they will be written all the way down to the database anyway overwriting any duplicates.

    This requires #5967 in order to work.

  2. Alter assumptions in CCoinsViewCache::BatchWrite
    Previously it would break if you flushed a parent cache while there was a child cache referring to it.  This change will allow the flushing of parent caches.
    072e2f8644
  3. Save the last unnecessary database read
    It's possible coins with the same hash exist when you create a duplicate coinbase, so previously we were reading from the database to make sure we had the old coins cached so if we were to spend the new ones, the old ones would also be spent.  This pull instead just marks the new coins as not fresh if they are from a coinbase, so if they are spent they will be written all the way down to the database anyway overwriting any duplicates.
    8504867b14
  4. laanwj added the label UTXO Db and Indexes on Nov 19, 2015
  5. sipa commented at 7:16 PM on November 28, 2015: member

    utACK

  6. btcdrak commented at 7:40 PM on January 20, 2016: contributor

    #5967 was merged

    utACK

  7. sipa commented at 4:12 PM on January 21, 2016: member

    Heh, I was convinced we merged this... I guess it'll have to wait for 0.13 now.

  8. dcousens commented at 11:14 PM on January 21, 2016: contributor

    @sipa does it? @morcos what is the motivation for this PR? Is it a bug fix? A performance improvement? If the intentions are clear, it may be able to make it for 0.13.

    We're only feature frozen right?

  9. sipa commented at 11:16 PM on January 21, 2016: member

    Performance improvement, and only that. Certainly nothing that should go in 0.12 now.

  10. laanwj merged this on Jan 22, 2016
  11. laanwj closed this on Jan 22, 2016

  12. laanwj referenced this in commit 6a07208388 on Jan 22, 2016
  13. dcousens commented at 10:24 PM on January 22, 2016: contributor

    So I guess that means we'll have this for 0.12 @laanwj? I'll start testing with it in any case.

  14. laanwj commented at 10:25 AM on January 23, 2016: member

    @dcousens No, I'm not going to backport it, there's no urgent need, this is fine for 0.13 which means it can be implicitly tested for 6 months in master

  15. dcousens commented at 11:01 AM on January 23, 2016: contributor

    No worries. I wasn't sure if master was still for 0.12 or not :+1:

  16. codablock referenced this in commit 45de3c4cfa on Sep 16, 2017
  17. codablock referenced this in commit c3a9fdf89e on Sep 19, 2017
  18. codablock referenced this in commit 8b3884acf6 on Sep 27, 2017
  19. codablock referenced this in commit 54fda0f7c3 on Oct 12, 2017
  20. codablock referenced this in commit 996f5103a0 on Oct 19, 2017
  21. UdjinM6 referenced this in commit 96b2075e8a on Nov 8, 2017
  22. MarcoFalke 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-04-18 09:15 UTC

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