Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace numbers and arrays with LEB128 implementations where appropriate #40

Merged
merged 3 commits into from
May 29, 2024

Conversation

Jac0xb
Copy link
Owner

@Jac0xb Jac0xb commented May 10, 2024

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 Jac0xb marked this pull request as ready for review May 10, 2024 19:31
@Jac0xb Jac0xb merged commit 0277941 into main May 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant