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

Hashing Buffers #22

Open
macalinao opened this issue Oct 16, 2021 · 0 comments
Open

Hashing Buffers #22

macalinao opened this issue Oct 16, 2021 · 0 comments

Comments

@macalinao
Copy link
Contributor

Buffers could be hashed on-chain to allow for easier program verification. This would remove the need for someone to download the buffer to verify it.

https://github.com/solana-labs/solana/blob/d3a3a7548c857f26ec2cb10e270da72d373020ec/sdk/src/process_instruction.rs#L107

85 + # bytes compute budget means that we can hash a ~200kb program in one transaction. This is insufficient.

However, we can instead create a sha256 hash of each 128kb sector of the buffer then hash the concatenated hashes.

It may be worth putting this into a separate program in the future, coupling this with a validator system that runs verifiable program builds and attests their hashes on-chain.

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

No branches or pull requests

1 participant