Remove account num, sequence num from serialized std signature struct #2952
Description
Currently the serialized StdSignature struct contains a uint64 account number, and a uint64 sequence number. Clearly these need to be signed over, but they make no sense being serialized in the tx. The reason being, to verify a signature you must fetch the account anyway to ensure correct accNum, sequenceNum. So we don't need this to have ever been included in the tx.
Removing these two values saves us 4-20 bytes per signature!! Mostly like 6 bytes total, (2 bytes for field numbers, 2-18 bytes for raw data types in var int encoding. account number we can expect to be over 128, so it takes at least 2 bytes, and it takes 3 bytes at 16k total accounts.)
Originally posted by @ValarDragon in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMTQ0MTIxODE2OnYy/pull_request_review_threads/discussion
Activity