lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Replace numbers and arrays with LEB128 implementations where appropriate

Open Jac0xb opened this issue 1 month ago • 0 comments

PR

  • Use unsigned LEB128 encoding in conjunction with borsh to reduce instruction data overhead for instructions with offsets and lengths called a CompactU64.

  • Use unsigned LEB128 encoding as length for multi-assertion instructions to reduce overhead from 4 bytes per vector to 1 byte (common case) called a LEB128Vec.

  • Switch from Option<u16> to CompactU64 for start and length of hash verify for AccountData since offset and length of account data needs to be known in order to hash.

Jac0xb avatar May 10 '24 01:05 Jac0xb