fix: enforce max size of max_message_size_bytes/2 for proposed blocks#268
Conversation
|
This PR does add block-size validation in My remaining concern is that #252 is specifically about the actual single-message resolver/backfill payloads. On this branch, So the fix seems to rely on the invariant that certificate/resolver/P2P overhead always fits in the remaining half of the message budget. Could we either validate the actual encoded resolver responses directly, or document/prove that this overhead is always bounded below |
68beac1 to
3c4f126
Compare
|
Update(cbd7cef):
|
cbd7cef to
b7ea200
Compare
|
Thanks, the added explanation makes sense to me. Given that proposed/verified/certified blocks are now capped at So I think the substantive issue is addressed. Optional hardening nit: this is still documented as a size proof rather than checked on the actual encoded resolver responses, so if Summit ever supports extremely large validator sets or changes certificate encoding/signature aggregation, this assumption should be revisited. A small regression/unit test around the near-limit |
06cca0a to
366f72a
Compare
|
Update(366f72a):
|
Addresses #252.
Changes:
max_message_size_bytes/2inhandle_verifyandhandle_certify.max_message_size_bytesto 10MB. This ensures that(certificate, block)won't exceedmax_message_size_bytes.