mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
pset, doc: Remove requirement to remove blinded amounts and assets
This commit is contained in:
parent
37c925f472
commit
9856f2caa2
1 changed files with 7 additions and 16 deletions
|
|
@ -84,7 +84,7 @@ The currently defined elements per-input proprietary types are as folows:
|
|||
| None
|
||||
| No key data
|
||||
| <tt><64-bit int></tt>
|
||||
| The explicit little endian 64-bit integer for the value of this issuance. This is mutually exclusive with <tt>PSBT_ELEMENTS_IN_ISSUANCE_VALUE_COMMITMENT</tt>
|
||||
| The explicit little endian 64-bit integer for the value of this issuance.
|
||||
|
|
||||
| 0
|
||||
| 2
|
||||
|
|
@ -94,7 +94,7 @@ The currently defined elements per-input proprietary types are as folows:
|
|||
| None
|
||||
| No key data
|
||||
| <tt><33 byte commitment></tt>
|
||||
| The 33 byte Value Commitment. This is mutually exclusive with <tt>PSBT_IN_ISSUANCE_VALUE</tt>.
|
||||
| The 33 byte Value Commitment.
|
||||
|
|
||||
| 0
|
||||
| 2
|
||||
|
|
@ -184,7 +184,7 @@ The currently defined elements per-input proprietary types are as folows:
|
|||
| None
|
||||
| No key data
|
||||
| <tt><64-bit int></tt>
|
||||
| The value for the inflation keys output to set in this issuance. This is mutually exclusive with <tt>PSBT_ELEMENTS_IN_ISSUANCE_INFLATION_KEYS</tt>.
|
||||
| The value for the inflation keys output to set in this issuance.
|
||||
|
|
||||
| 0
|
||||
| 2
|
||||
|
|
@ -194,7 +194,7 @@ The currently defined elements per-input proprietary types are as folows:
|
|||
| None
|
||||
| No key data
|
||||
| <tt><33 byte commitment></tt>
|
||||
| The 33 byte commitment to the inflation keys output value in this issuance. This is mutually exclusive with <tt>PSBT_ELEMENTS_IN_ISSUANCE_INFLATION_KEYS</tt>
|
||||
| The 33 byte commitment to the inflation keys output value in this issuance.
|
||||
|
|
||||
| 0
|
||||
| 2
|
||||
|
|
@ -258,7 +258,7 @@ The currently defined elements per-output proprietary types are as follows:
|
|||
| None
|
||||
| No key data
|
||||
| <tt><32 byte asset tag></tt>
|
||||
| The explicit 32 byte asset tag for this output. This is mutually exclusive with <tt>PSBT_ELEMENTS_OUT_ASSET_COMMITMENT</tt>.
|
||||
| The explicit 32 byte asset tag for this output.
|
||||
|
|
||||
| 0
|
||||
| 2
|
||||
|
|
@ -268,7 +268,7 @@ The currently defined elements per-output proprietary types are as follows:
|
|||
| None
|
||||
| No key data
|
||||
| <tt><33 byte commitment></tt>
|
||||
| The 33 byte Asset Commitment for this output. This is mutually exclusive with <tt>PSBT_ELEMENTS_OUT_ASSET</tt>.
|
||||
| The 33 byte Asset Commitment for this output.
|
||||
|
|
||||
| 0
|
||||
| 2
|
||||
|
|
@ -324,8 +324,6 @@ The currently defined elements per-output proprietary types are as follows:
|
|||
| 2
|
||||
|}
|
||||
|
||||
In addition to these new types, the <tt>PSBT_OUT_AMOUNT</tt> field is no longer required so long as <tt>PSBT_ELEMENTS_OUT_VALUE_COMMITMENT</tt> is present.
|
||||
|
||||
The PSET Magic Bytes are <tt>0x70736574</tt>
|
||||
|
||||
===Handling Duplicated Keys===
|
||||
|
|
@ -373,15 +371,12 @@ A single entity is likely to be both a Creator and Updater.
|
|||
PSET requires a role not present in PSBT, the Blinder. Blinders are similar to Signers and own inputs.
|
||||
The Blinder adds the blinding data to a transaction.
|
||||
|
||||
If Bit 0 of <tt>PSBT_ELEMENTS_GLOBAL_TX_MODIFIABLE</tt> is 0, the Blinder must do nothing.
|
||||
|
||||
For issuance inputs that belong to the Blinder, the Blinder should generate a random blinding factor and create a value commitment for the issuance value.
|
||||
It will then add the value commitment in the <tt>PSBT_ELEMENTS_IN_ISSUANCE_VALUE_COMMITMENT</tt>. When it does so, it must remove the <tt>PSBT_ELEMENTS_IN_ISSUANCE_VALUE</tt> field.
|
||||
It will then add the value commitment in the <tt>PSBT_ELEMENTS_IN_ISSUANCE_VALUE_COMMITMENT</tt>.
|
||||
The blinder will also add the issuance value rangeproof and the issuance keys rangeproof in their respective fields.
|
||||
For ease of identifying the blinder for an issuance, the input the issuance is attached to must belong to the blinder for the issuance.
|
||||
|
||||
For the Blinder's outputs that are to be blinded (i.e. they have a blinding pubkey), the Blinder will create value and asset commitments and put them in their respective fields.
|
||||
When they do so, the <tt>PSBT_ELEMENTS_OUT_VALUE</tt> and <tt>PSBT_ELEMENTS_OUT_ASSET</tt> fields must be removed.
|
||||
The Blinder will create the Value Rangeproof and Asset Surjection Proof and put them in their respective fields.
|
||||
It will also add the ephemeral pubkey used for ECDH of the nonce for the rangeproof to the <tt>PSBT_ELEMENTS_OUT_ECDH_PUBKEY</tt> field.
|
||||
|
||||
|
|
@ -400,17 +395,13 @@ It will then compute a final scalar offset.
|
|||
Then it will subtract all of the scalar offsets from the value blinding factor for the last output and the result is the value blinding factor to be used for that last output.
|
||||
The creation of the commitments, proofs, and other fields proceeds as usual.
|
||||
Once all outputs are blinded, all <tt>PSBT_ELEMENTS_GLOBAL_SCALAR</tt> fields must be removed from the PSET.
|
||||
Once all outputs are blinded, Bit 0 of <tt>PSBT_ELEMENTS_GLOBAL_TX_MODIFIABLE</tt> must be set to 0.
|
||||
|
||||
A single entity is likely to be a Creator, Updater, and Blinder.
|
||||
In that case, the PSET should never be output with <tt>PSBT_ELEMENTS_IN_ISSUANCE_VALUE</tt>, <tt>PSBT_ELEMENTS_IN_ISSUANCE_INFLATION_KEYS</tt>, <tt>PSBT_ELEMENTS_OUT_VALUE</tt>, or <tt>PSBT_ELEMENTS_OUT_ASSET</tt> except for unblinded issuances and unblinded outputs.
|
||||
|
||||
===Signer===
|
||||
|
||||
In addition to the BIP 370 PSBT Signer behavior, PSET specifies some addtional constraints.
|
||||
Before signing, the Signer must check whether blinding is complete. If any output contains a blinding pubkey but no commitments or proofs, then it must not sign.
|
||||
This is easily done by checking whether Bit 0 of <tt>PSBT_ELEMENTS_GLOBAL_TX_MODIFIABLE</tt> is 1.
|
||||
If so, the Signer must do nothing.
|
||||
|
||||
===Combiner===
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue