|
|
@ -5,7 +5,8 @@ |
|
|
|
13-08-2018: Initial Draft |
|
|
|
15-08-2018: Second version after Dev's comments |
|
|
|
28-08-2018: Third version after Ethan's comments |
|
|
|
30-08-2018: AminoOverheadForBlock => MaxAminoOverheadForBlock, added MaxAminoOverheadForTx |
|
|
|
30-08-2018: AminoOverheadForBlock => MaxAminoOverheadForBlock |
|
|
|
31-08-2018: Bounding evidence and chain ID |
|
|
|
|
|
|
|
## Context |
|
|
|
|
|
|
@ -44,12 +45,16 @@ are constants defined inside the `types` package: |
|
|
|
- MaxEvidenceBytes - 364 bytes |
|
|
|
- MaxHeaderBytes - 476 bytes (~276 bytes hashes + 200 bytes - 50 UTF-8 encoded |
|
|
|
symbols of chain ID 4 bytes each in the worst case + amino overhead) |
|
|
|
- MaxAminoOverheadForBlock - 4 bytes (assuming MaxHeaderBytes includes amino |
|
|
|
- MaxAminoOverheadForBlock - 8 bytes (assuming MaxHeaderBytes includes amino |
|
|
|
overhead for encoding header, MaxVoteBytes - for encoding vote, etc.) |
|
|
|
|
|
|
|
ChainID needs to bound to 50 symbols max. |
|
|
|
|
|
|
|
When reaping evidence, we use MaxBytes to calculate the upper bound (e.g. 1/10) |
|
|
|
to save some space for transactions. |
|
|
|
|
|
|
|
NOTE while reaping the `max int` bytes in mempool, we should account that every |
|
|
|
transaction will take `len(tx)+aminoOverhead`, where aminoOverhead=1-4 bytes. |
|
|
|
Therefore, MaxAminoOverheadForTx should be added. |
|
|
|
|
|
|
|
We should write a test that fails if the underlying structs got changed, but |
|
|
|
MaxXXX stayed the same. |
|
|
|