-
Notifications
You must be signed in to change notification settings - Fork 157
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
Collateral inputs #2273
Collateral inputs #2273
Conversation
eval (Alonzo.txins @era txb ⊆ dom utxo) | ||
?! BadInputsUTxO (eval (Alonzo.txins @era txb ➖ dom utxo)) | ||
eval (inputsAndCollateral ⊆ dom utxo) | ||
?! BadInputsUTxO (eval (inputsAndCollateral ➖ dom utxo)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i missed this check! important : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change I made to witsVKeyNeeded
was to include the collateral inputs in the set of keys that require signatures, so that signatures are checked for inputsAndCollateral
not just inputs
I changed the function to have 2 additional things, that ^^ and reqSignerHashes
to avoid the awkward union in the UTXOW rule of the stuff in the Shelley witsVKeyNeeded
function and the two additional things
Thanks for fixing the examples, @JaredCorduan! I'll rebase this on master since it seems to have become outdated. |
This should correspond to the changes made to the spec in #2271. - Fee inputs have now been dropped. Fees may be paid from any TxOut, including Plutus script addresses, and are included in the main inputs as with all previous eras. - Instead, we have "collateral" which must be posted with transactions spending from script addresses. This collateral is only collected if a script fails to validate (e.g. a second phase validation). This collateral must be provided by VKey-locked inputs. - Two new protocol parameters govern this: - The collateral percentage determins the percentage of the fee which must be posted as collateral. - The max collateral inputs determines the maximum number of inputs which must be posted as collateral. - The CDDL is now updated in order to reflect that inputs remain at key '0'. This is OK because collateral is only required for Plutus locked addresses. The limit on the number of collateral inputs, and the restriction to VKey addresses, is done in order to bound the amount of work which may be involved in verifying collateral.
This should correspond to the changes made to the spec in #2271.
including Plutus script addresses, and are included in the main inputs
as with all previous eras.
spending from script addresses. This collateral is only collected if a
script fails to validate (e.g. a second phase validation). This
collateral must be provided by VKey-locked inputs.
must be posted as collateral.
which must be posted as collateral.
'0'. This is OK because collateral is only required for Plutus locked
addresses.
The limit on the number of collateral inputs, and the restriction to
VKey addresses, is done in order to bound the amount of work which may
be involved in verifying collateral.