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

IF: Modify the action_receipt digest to be computed by concatenating and hashing a pair constructed from act_digest and the rest of the values of the action_receipt #2161

Closed
systemzax opened this issue Jan 30, 2024 · 2 comments · Fixed by #2326
Assignees

Comments

@systemzax
Copy link
Member

systemzax commented Jan 30, 2024

Depends on #2162.

This allows for a smaller proof footprint, and faster verification by smart contracts and light clients.

https://github.com/AntelopeIO/leap/blob/hotstuff_integration/libraries/chain/include/eosio/chain/action_receipt.hpp#L19

@arhag
Copy link
Member

arhag commented Jan 31, 2024

The new action digest should instead be the concatenation of the following:

  1. The 64-bit value for the receiver name.
  2. The 64-bit recv_sequence.
  3. The 64-bit value for the action's code account name (called action_base::account in the code).
  4. The 64-bit value for the action's name (called action_base::name in the code).
  5. The act_digest.
  6. A 32-byte digest committing to the rest of the information in the action_receipt that wasn't already committed to by the above two fields.

This is to enable, without extra hashing needed for verification of the typical case, and with still small fixed sized proofs, the ability to prove actions for IBC purposes while supporting a means of replay protection that enforced actions to a contract are processed in the order they were processed on the source chain. This enabled replay protection with fixed size storage on the destination chain.

@greg7mdp
Copy link
Contributor

Should the digest change unconditionally, or be triggered when something happens?

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