Skip to content

Hashing Buffers #22

Description

@macalinao

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions