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

📝 Document what is packing verifier #48

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/packing-verifier.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Packing Verifier

There are two ways to pack CoBuild message in the witness.

- If there's a lock script supports CoBuild in the transaction, it can utilize the new `WitnessLayout` format and pack the message in the `SighashAll` variant.
- If there are no lock scripts using the `WitnessLayout` witness format, the message can be packed as a `SighashAll` with an empty `seal`. It will then be stored at the witness position `n + 1`, where n represents the number of inputs in the transaction. This is possible because most lock scripts include the witnesses at positions beyond the input count in the digest to prevent tampering.

However, before system contract DAO upgrades, no scripts will verify the DAO action data in the CoBuild message. This proof-of-concept (PoC) employs a workaround to include the DAO verifier cell as an output in the transaction. The cell utilizes the [dao-action-verifier](../contracts/dao-action-verifier/) contract as its type script, ensuring the verification of the DAO action data.
Loading