-
Notifications
You must be signed in to change notification settings - Fork 87
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
Align minting policy #720
Closed
3 tasks done
Milestone
Comments
ch1bo
added
💬 feature
A feature on our roadmap
green 💚
Low complexity or well understood feature
and removed
💭 idea
An idea or feature request
labels
Feb 10, 2023
20 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why
The minting policy ensures security of a Hydra Head on-chain by:
Within this feature we want to make observing arbitrary, proper Heads correct and as simple as possible. While observing and deciding whether to interact with a head in the
hydra-node
may still involve some off-chain checks.The overall strategy should be that off-chain code ensures that minting policy ran for a given InitTx.
What
We want to implement a "full" minting policy to do some checks on-chain and simplify the off-chain handling. See #718 for some more details and rationale.
✔ Ensure minting policy
mu_head
is parameterized by anout-ref
, it's policy id / currency symbol then is the uniqueheadId
out-ref
is spent when minting any token under this policy✔ Ensure
out-ref
and theheadId
are in the datum of the first output of the transaction which mints tokens.✔ Off-chain, we use the
out-ref
andheadId
from the datum to check whetherheadId == hash(mu_head(out-ref))
holds.✔️ Ensure the minting policy
mu_head
also checks on-chain when minting:v_head
, which ensures continuity✔️ Do not restrict burning on the
mu_head
at all. It is ensured by thev_head
validator, when tokens of a specificheadId
may be burned.✔️ Additional checks we decide to do off-chain still (when constructing and observing the init tx) :
How
init
andabort
transactions to verify correct working ofmu_head
initTx
andobserveInitTx
to satisfy and do the off-chain checks aboveintialize
andobserveInit
functions and verify inStateSpec
The text was updated successfully, but these errors were encountered: