Skip to content

Commit d2ec499

Browse files
docs: invalid signature description (#21)
* docs: invalid signature description Co-authored-by: Yukang <[email protected]> --------- Co-authored-by: Yukang <[email protected]>
1 parent 7424540 commit d2ec499

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/advanced.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ A multisig configuration uses the following structure:
2121
Each field here serves a different purpose:
2222

2323
* `S`: `S` represents a reserved field. It must be of value `0x80`, the value is intentially chosen to be different from the secp256k1 multisig lock deployed in CKB's genesis block.
24-
* `R`: `R` represents how many starting public keys are required. For example, in a 3-of-5 setup, one might want to say that signatures for public key A and B must always be present so as to unlock the cell. In this case one can put ublic key A and B at the start of the public key list, and then set `R` to 2.
24+
* `R`: `R` represents how many starting public keys are required. For example, in a 3-of-5 setup, one might want to say that signatures for public key A and B must always be present so as to unlock the cell. In this case one can put public key A and B at the start of the public key list, and then set `R` to 2.
2525
* `M`: `M` represents the threshold, meaning how many signatures must be provided to unlock the cell. For instance, in a 3-of-5 setup, `M` must be 3.
2626
* `N`: `N` represents the avialble public keys, in a 3-of-5 setup, `N` must be 5.
2727

28+
If any signature fails verification, the entire process fails, even when the remaining signatures (more than `M`) are valid.
29+
In the UTXO model, transactions can be validated off-chain by SDKs or tools, allowing invalid signatures to be removed before broadcasting to the P2P network. Therefore, the design enforces a strict limit: provide exactly $M$ signatures (no more, no less).
30+
2831
`N` also denotes how many pairs of `param flag` and `public key` will follow. Each `param id` will be 1 byte, the higher 7 bit represents `param ID`, denoting the parameter set to use, the lowest bit is a signature flag, for multisig configuration, this bit is always 0. A public key can range from 48 to 64 depending on the parameter set. The exact of value in `param id` indicates the length of public key followed.
2932

3033
## Multisig ID, Param ID

0 commit comments

Comments
 (0)