Skip to content

Commit

Permalink
📝 Document what is packing verifier (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian authored Feb 18, 2024
1 parent 2913b83 commit dbff89d
Showing 1 changed file with 7 additions and 0 deletions.
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.

0 comments on commit dbff89d

Please sign in to comment.