This patch ensure that all message are capped to 1MB, except for message that can possibly containt the block content. In this case, the size of the accepted message is scaled with the accepted block size.
Details
- Reviewers
jasonbcox - Group Reviewers
Restricted Project - Maniphest Tasks
- T297: Allow for 32 Megabyte blocks
- Commits
- rSTAGING1a15d96e564f: Accept network messages for 32MB blocks and larger.
rABC1a15d96e564f: Accept network messages for 32MB blocks and larger.
Upated intergation tests to check it is now possible to accept blocks of 32MB.
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- biggerblocks
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 1931 Build 2020: Bitcoin ABC Buildbot (legacy) Build 2019: arc lint + arc unit
Event Timeline
src/net.h | ||
---|---|---|
65 ↗ | (On Diff #2978) | So is it 2MB or 1MB? |
src/net.cpp | ||
---|---|---|
715 | What's the purpose of this? It seems like for the foreseeable future, max block size will be quite a bit larger than MAX_PROTOCOL_MESSAGE_LENGTH, rendering this if-statement useless. If you feel that there's some worth to scaling the accepted message size, perhaps MAX_PROTOCOL_MESSAGE_LENGTH should be scaled according to max block size instead? |
src/net.cpp | ||
---|---|---|
715 | Why would you accept absurdly large protocol message for anything that's not the content of a block ? It just opens you to DoS with zero benefits. |
src/net.cpp | ||
---|---|---|
715 | You wouldn't. I'm saying this if-statement will not be reached if msg.hdr.nMessageSize > MAX_PROTOCOL_MESSAGE_LENGTH, where MAX_PROTOCOL_MESSAGE_LENGTH is always (usually?) < 2 * config.GetMaxBlockSize(). |
src/net.cpp | ||
---|---|---|
715 | It also checks for NetMsgType::IsBlockLike . It'll fail only if this isn't a message that can contain a block content. |