New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop message decode max length to 4_000_000 #340
Conversation
It has been a long time since Bitcoin's maximum network message length was 32MB, so we should follow suit. This is also an important DoS limit, so we should limit it as much as possible.
Codecov Report
@@ Coverage Diff @@
## master #340 +/- ##
==========================================
- Coverage 81.89% 81.64% -0.26%
==========================================
Files 38 38
Lines 7169 7032 -137
==========================================
- Hits 5871 5741 -130
+ Misses 1298 1291 -7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Trusting you that this matches Core's behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked Core, LGTM
In the future we might want to decouple the limit for deserializing any |
This adds the feature flag 'bump-decode-max-size' that when set, sets maximum decode size to 32MB, as it was before PR rust-bitcoin#340.
This adds the feature flag 'bump-decode-max-size' that when set, sets maximum decode size to the limit it was before PR rust-bitcoin#340.
…tisfaction size 747876e Rectify `from_multi_a` max satisfaction size (Aman Rojjha) Pull request description: Cost incurred for a single Schnorr signature in the witness stack := `<var_int><64-byte signature><sig_type>` = 1 + 64 + 1 (as clarified by @sanket1729 in rust-bitcoin#340 ). ACKs for top commit: sanket1729: ACK 747876e Tree-SHA512: f20652240f1daa7b33b1d525870114e0bd6412e82845e80a94c616dedcfb3d8ae2f7ef19d7c08760f79270e0d465c18b713eff2e3e599b45c65f2a64da36713b
It has been a long time since Bitcoin's maximum network message
length was 32MB, so we should follow suit. This is also an important
DoS limit, so we should limit it as much as possible.