Lighthouse: Limit Block size by block producer

Created on 1 Apr 2020  路  6Comments  路  Source: sigp/lighthouse

Description

The network is only allowed to transmit blocks that have a maximum SSZ size of 1MB.

Rather than having our block producer produce arbitrarily sized blocks then have our network stack reject them, we should add logic to the producer to make smaller blocks such that they will always fit within this limit.

All 6 comments

@michaelsproul @paulhauner - Thoughts on this bad boy

Since all of the fields on the block are either fixed-length or variable length with a maximum capacity I would hope that it's impossible to construct a SignedBeaconBlock larger than the maximum network message size.

We could do the math and determine this ourselves, but perhaps someone like @djrtwo has already done it? If it's possible to produce oversize blocks I'd be thinking that's a spec issue.

I was using this to get a max sized beacon block for some network testing. From the function, the ssz encoded length of a full block (max capacity) is 124384 bytes.

Nice @pawanjay176! Given those figures I think we can close this issue?

I guess this may become more relevant in later phases. Happy to close for now if we are happy we can't hit the limit

Closing since everyone seems happy to close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulhauner picture paulhauner  路  5Comments

michaelsproul picture michaelsproul  路  4Comments

paulhauner picture paulhauner  路  5Comments

wschwab picture wschwab  路  3Comments

nickoneill picture nickoneill  路  3Comments