3
The code says MAX_BLOCK_SERIALIZED_SIZE = 4000000, but that is actually not a actually consensus rule as stated here:
https://github.com/bitcoin/bitcoin/issues/10289
The actual consensus rule is based on MAX_BLOCK_WEIGHT, which is also 4000000. It's unclear to me what the minimum weight a p2wpk or p2wsh transaction can have. Specifically, what's the best witness-serialized size/weight ratio that a transaction can have post-segwit activation?
That should answer the question of what is the largest block size possible post-segwit activation.
1Coinbase transactions can't spend anything. – Pieter Wuille – 2017-06-27T08:16:18.943
All. I thought there has been a coinbase in the past that spent coins. I guess I'm mistaken. – Andrew Chow – 2017-06-27T08:24:13.860
Is the 80-byte block header included in the calculation? – Jimmy Song – 2017-06-27T16:17:51.263
I'm pretty sure it is. – Andrew Chow – 2017-06-27T16:21:33.243
Total Size and Base Size both include nonwitness data? So some bytes are being counted twice? That means a 4MB block would be impossible – pinhead – 2017-07-28T21:49:34.143
@PieterWuille is the 4MB answer correct? Wouldn't it be smaller because "total size" and "base size" BOTH include the same non-witness data? In calculating a block weight (with Max 400000) some bytes are counted twice, a 4MB block is impossible. – pinhead – 2017-08-10T01:41:25.673
1In theory, you can get pretty close to 4M, by having transactions that consist almost entirely of witness data. In practice, that won't happen for normal financial transactions, closer to 2M. – Pieter Wuille – 2017-08-10T02:35:09.933
1@PieterWuille is it a mistake to measure weight in bytes? (Or MB) – pinhead – 2017-08-23T21:46:22.960