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. gmaxwell commented at 10:34 pm on December 14, 2016: contributor
    Concept ACK, good step forward.
  3. 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).

  4. fanquake added the label P2P on Dec 15, 2016
  5. sdaftuar commented at 3:32 pm on December 15, 2016: member
    @rebroad Responded in #9325 about some of the issues with that patch.
  6. Allow compactblock reconstruction when block is in flight 7017298eb2
  7. [qa] Update compactblocks test for multi-peer reconstruction 813ede91e1
  8. sdaftuar force-pushed on Dec 15, 2016
  9. gmaxwell commented at 6:16 pm on December 15, 2016: contributor
    Testing.
  10. laanwj added the label Needs backport on Dec 15, 2016
  11. laanwj added this to the milestone 0.13.2 on Dec 15, 2016
  12. in src/net_processing.cpp: 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.
  13. instagibbs commented at 2:35 pm on December 16, 2016: member
    utACK 7017298eb2c72e262b865cd417d6844bcdd14a3f
  14. TheBlueMatt commented at 8:23 am on December 17, 2016: member
    utACK 813ede91e12dd777faee60f6286a9ed5bb72761a
  15. gmaxwell commented at 9:08 pm on December 17, 2016: contributor
    ACK. Appears to be highly effective on mainnet too.
  16. btcdrak commented at 5:19 am on December 19, 2016: contributor
    utACK 7017298eb2c72e262b865cd417d6844bcdd14a3f
  17. laanwj merged this on Dec 19, 2016
  18. laanwj closed this on Dec 19, 2016

  19. laanwj referenced this in commit a7f76512d9 on Dec 19, 2016
  20. laanwj commented at 8:02 am on December 19, 2016: member
    This was backported in #9357
  21. laanwj removed the label Needs backport on Dec 19, 2016
  22. morcos commented at 4:46 pm on December 19, 2016: member
    posthumous utACK
  23. gladcow referenced this in commit f4ab946d2b on Mar 5, 2018
  24. gladcow referenced this in commit 193c94a750 on Mar 8, 2018
  25. gladcow referenced this in commit 641c28cfd0 on Mar 13, 2018
  26. gladcow referenced this in commit ae0a10b6bc on Mar 14, 2018
  27. gladcow referenced this in commit eafa6dd353 on Mar 15, 2018
  28. gladcow referenced this in commit a3475a6ca6 on Mar 15, 2018
  29. gladcow referenced this in commit 886520cc79 on Mar 15, 2018
  30. gladcow referenced this in commit bc374a41fa on Mar 15, 2018
  31. gladcow referenced this in commit f643ecdc26 on Mar 24, 2018
  32. gladcow referenced this in commit 36415f8681 on Apr 4, 2018
  33. UdjinM6 referenced this in commit bc45a2f87a on Apr 11, 2018
  34. andvgal referenced this in commit fd5c50bc2b on Jan 6, 2019
  35. CryptoCentric referenced this in commit dd3fd51204 on Feb 28, 2019
  36. 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: 2024-12-19 00:12 UTC

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