Attempt reconstruction from all compact block announcements #9352

pull sdaftuar wants to merge 2 commits into bitcoin:master from sdaftuar:optimistic-cb-2 changing 2 files +97 −0
  1. sdaftuar commented at 10:11 PM on December 14, 2016: member

    Previously, once a block was in flight, we would ignore compact block announcements from our high-bandwidth peers, even though the block might reconstruct with no additional bandwidth required.

    This allows us to optimistically try to reconstruct a compact block from our peers, and if it succeeds with no round-trip, then process the block.

  2. sdaftuar cross-referenced this on Dec 14, 2016 from issue Allow first cmpctblock/blocktxn received to be processed (rather than first requested) by rebroad
  3. gmaxwell commented at 10:34 PM on December 14, 2016: contributor

    Concept ACK, good step forward.

  4. rebroad commented at 5:51 AM on December 15, 2016: contributor

    #9325 already does this, and more, doesn't it? i.e. #9325 will already cause the block to be made if a compact block is received and all txs are present, but in addition, it will request the blocktxns which almost always arrive before the full block requested.

    Also, the current logic of requesting a full block, I suspect, will be removed soon as this only happens from peers which cannot provide compact blocks - in a way, these nodes are a hindrance to the network more often than not and I expect a future PR will disable these nodes from being block providers (in much the same way that non-SegWit nodes stop being block providers).

    Also, #9325 is incredibly simple - only 2 lines deleted - the only thing missing that I would propose adding is some logic to restrict how many blocktxns it is allowed to request (currently the worst case scenario is that it can request one for every cmpctblock received - which is limited to 3).

  5. fanquake added the label P2P on Dec 15, 2016
  6. sdaftuar commented at 3:32 PM on December 15, 2016: member

    @rebroad Responded in #9325 about some of the issues with that patch.

  7. Allow compactblock reconstruction when block is in flight 7017298eb2
  8. [qa] Update compactblocks test for multi-peer reconstruction 813ede91e1
  9. sdaftuar force-pushed on Dec 15, 2016
  10. gmaxwell commented at 6:16 PM on December 15, 2016: contributor

    Testing.

  11. sdaftuar cross-referenced this on Dec 15, 2016 from issue [0.13 backport] Attempt reconstruction from all compact block announcements by sdaftuar
  12. laanwj added the label Needs backport on Dec 15, 2016
  13. laanwj added this to the milestone 0.13.2 on Dec 15, 2016
  14. in src/net_processing.cpp:None in 813ede91e1
    1918 | +            {
    1919 | +                LOCK(cs_main);
    1920 | +                mapBlockSource.emplace(pblock->GetHash(), std::make_pair(pfrom->GetId(), false));
    1921 | +            }
    1922 | +            bool fNewBlock = false;
    1923 | +            ProcessNewBlock(chainparams, pblock, true, &fNewBlock);
    


    instagibbs commented at 2:34 PM on December 16, 2016:

    This appears to be a novel use of fForceProcessing(not non-network nor whitelist peer), might want to note that in the argument description.


    TheBlueMatt commented at 8:19 AM on December 17, 2016:

    The documentation is just flat out wrong, it seems. fForceProcessing means "make sure to store this to disk, we decided we wanted to request this block for some reason, so probably want it no matter what validation.cpp thinks". Indeed, the use here is slightly different from elsewhere, but given that we already check for blocks which do not mesh with our idea of the best chain further up, and that we will only get here if the block was within two blocks of our tip, I'm pretty confident this is the right use.

  15. instagibbs commented at 2:35 PM on December 16, 2016: member

    utACK 7017298eb2c72e262b865cd417d6844bcdd14a3f

  16. TheBlueMatt commented at 8:23 AM on December 17, 2016: contributor

    utACK 813ede91e12dd777faee60f6286a9ed5bb72761a

  17. gmaxwell commented at 9:08 PM on December 17, 2016: contributor

    ACK. Appears to be highly effective on mainnet too.

  18. btcdrak commented at 5:19 AM on December 19, 2016: contributor

    utACK 7017298eb2c72e262b865cd417d6844bcdd14a3f

  19. laanwj merged this on Dec 19, 2016
  20. laanwj closed this on Dec 19, 2016

  21. laanwj referenced this in commit a7f76512d9 on Dec 19, 2016
  22. laanwj commented at 8:02 AM on December 19, 2016: member

    This was backported in #9357

  23. laanwj removed the label Needs backport on Dec 19, 2016
  24. morcos commented at 4:46 PM on December 19, 2016: member

    posthumous utACK

  25. morcos cross-referenced this on Dec 29, 2016 from issue Set peers as HB peers upon full block validation by instagibbs
  26. TheBlueMatt cross-referenced this on Oct 7, 2017 from issue Don't process unrequested, low-work blocks by sdaftuar
  27. gladcow cross-referenced this on Mar 1, 2018 from issue Backport compact blocks functionality from bitcoin by gladcow
  28. gladcow referenced this in commit f4ab946d2b on Mar 5, 2018
  29. gladcow referenced this in commit 193c94a750 on Mar 8, 2018
  30. gladcow referenced this in commit 641c28cfd0 on Mar 13, 2018
  31. gladcow referenced this in commit ae0a10b6bc on Mar 14, 2018
  32. gladcow referenced this in commit eafa6dd353 on Mar 15, 2018
  33. gladcow referenced this in commit a3475a6ca6 on Mar 15, 2018
  34. gladcow referenced this in commit 886520cc79 on Mar 15, 2018
  35. gladcow referenced this in commit bc374a41fa on Mar 15, 2018
  36. gladcow referenced this in commit f643ecdc26 on Mar 24, 2018
  37. gladcow referenced this in commit 36415f8681 on Apr 4, 2018
  38. UdjinM6 referenced this in commit bc45a2f87a on Apr 11, 2018
  39. andvgal referenced this in commit fd5c50bc2b on Jan 6, 2019
  40. CryptoCentric referenced this in commit dd3fd51204 on Feb 28, 2019
  41. 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