Compact Block Tweaks (rebase of #8235) #8637

Merged
merged 4 commits into from Oct 18, 2016

Projects

None yet

7 participants

@sipa
Member
sipa commented Aug 31, 2016

This is a rebase of #8235, with unit tests from #8418 adapted, and some comments addressed.

@sipa sipa referenced this pull request Aug 31, 2016
Closed

Compact Block Tweaks #8235

@instagibbs instagibbs and 2 others commented on an outdated diff Sep 1, 2016
@@ -88,6 +88,9 @@ static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
* less than this number, we reached its tip. Changing this value is a protocol upgrade. */
static const unsigned int MAX_HEADERS_RESULTS = 2000;
+/** Maximum age (in blocks) of blocks we're willing to serve as compact blocks to peers
+ * when requested. For older blocks, a regular BLOCK response will be sent. */
+static const int MAX_COMPACT_BLOCK_DEPTH = 5;
@instagibbs
instagibbs Sep 1, 2016 Contributor

It's been too long since I've looked at this code, but this sure seems close to MAX_CMPCTBLOCK_DEPTH

@sipa
sipa Sep 1, 2016 Member

Where do you see MAX_CMPCTBLOCK_DEPTH?

@laanwj
laanwj Sep 1, 2016 Member

There's a MAX_CMPCTBLOCK_DEPTH in the p2p-compactblocks.py test, but I'd say it's not a concern here.

@instagibbs
instagibbs Sep 1, 2016 Contributor

ah right I noticed that then forgot when looking this morning. Forgive me.

@sipa
sipa Sep 1, 2016 Member

Oh, right. I'll make the constant names correspond.

@sipa
Member
sipa commented Sep 1, 2016

Updated with exactly corresponding constant names between the tests and the implementation.

@gmaxwell
Member
gmaxwell commented Sep 9, 2016

Needs rebase

@sipa
Member
sipa commented Sep 19, 2016

Rebased.

@gmaxwell
Member

ACK

@TheBlueMatt
Contributor

At the risk of holding things up, you might want TheBlueMatt@654f83f as well.

@TheBlueMatt
Contributor
TheBlueMatt commented Oct 3, 2016 edited

Actually, I'll do that separately (it will conflict with #8393, though that should probably be merged first to make backporting easier), utACK on the contents here.

@TheBlueMatt
Contributor
TheBlueMatt commented Oct 6, 2016 edited

Version rebased on #8393 with the cs_main fix on top (I'll pr that separately if you dont want to take it here):
https://github.com/TheBlueMatt/bitcoin/commits/cmpctblock

@laanwj
Member
laanwj commented Oct 11, 2016

utACK 1bcdb3d

@TheBlueMatt
Contributor

Needs rebase (see rebased version at https://github.com/TheBlueMatt/bitcoin/commits/cmpctblock).

@instagibbs
Contributor

utACK 7e2f31e

@TheBlueMatt
Contributor

utACK 3ac6de0

@btcdrak
Member
btcdrak commented Oct 18, 2016

utACK 3ac6de0

@laanwj laanwj merged commit 3ac6de0 into bitcoin:master Oct 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@laanwj laanwj added a commit that referenced this pull request Oct 18, 2016
@laanwj laanwj Merge #8637: Compact Block Tweaks (rebase of #8235)
3ac6de0 Align constant names for maximum compact block / blocktxn depth (Pieter Wuille)
b2e93a3 Add cmpctblock to debug help list (instagibbs)
fe998e9 More agressively filter compact block requests (Matt Corallo)
02a337d Dont remove a "preferred" cmpctblock peer if they provide a block (Matt Corallo)
0b5a997
@MarcoFalke MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Nov 20, 2016
@TheBlueMatt @MarcoFalke TheBlueMatt + MarcoFalke Dont remove a "preferred" cmpctblock peer if they provide a block
Github-Pull: #8637
Rebased-From: 02a337d
36e3b95
@MarcoFalke MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Nov 20, 2016
@TheBlueMatt @MarcoFalke TheBlueMatt + MarcoFalke More agressively filter compact block requests
Unit test adaptations by Pieter Wuille.

Github-Pull: #8637
Rebased-From: fe998e9
76ba1c9
@MarcoFalke MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Nov 20, 2016
@instagibbs @MarcoFalke instagibbs + MarcoFalke Add cmpctblock to debug help list
Github-Pull: #8637
Rebased-From: b2e93a3
3d23a0e
@MarcoFalke MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Nov 20, 2016
@sipa @MarcoFalke sipa + MarcoFalke Align constant names for maximum compact block / blocktxn depth
Github-Pull: #8637
Rebased-From: 3ac6de0
2cad5db
@MarcoFalke MarcoFalke referenced this pull request Nov 20, 2016
Merged

[qa] 0.13.2 Backports #9191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment