-
Notifications
You must be signed in to change notification settings - Fork 383
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
Packet Spec: Hash App data rather than standardizing encoding #1152
base: feat/v2-spec
Are you sure you want to change the base?
Conversation
Dropping some thoughts about the cons: "Multiple hashes might be slow and expensive in certain environments (e.g. EVM, and ZKVM)"
So, intra-platform (e.g. Cosmos to Cosmos, EVM to EVM, Sol to Sol ...) we could use the native hashing functions being fast and cheap. However inter-platform (e.g EVM to Solana..) we must use one hashing function and use it in both the environments, which may affect the computation of one of the side. |
} | ||
buffer = sha256.Hash(destIdentifier) | ||
buffer = append(buffer, sha256.hash(bigEndian(timeoutBytes))) | ||
buffer = append(buffer, sha256.hash(data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buffer = append(buffer, sha256.hash(data)) | |
buffer = append(buffer, sha256.hash(packet.data)) |
The following is the Packet spec that uses only hashing rather than the cbor encoding in the previous spec. This is meant to allow reviewers to compare the two options.
Benefits:
Cons: