Skip to content
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

Parameterize governance version in the redeemer #56

Open
Tracked by #48
jstolarek opened this issue Jul 9, 2024 · 0 comments
Open
Tracked by #48

Parameterize governance version in the redeemer #56

jstolarek opened this issue Jul 9, 2024 · 0 comments
Labels
governance The governance mechanism

Comments

@jstolarek
Copy link
Contributor

jstolarek commented Jul 9, 2024

This ticket is part of #48 and should be done once input-output-hk/trustless-sidechain#832 is merged, possibly after input-output-hk/trustless-sidechain#860 as well.

When using updatable governance we must specify which exact version of governance to use, since the governance is now stored in the versioning system. This information is being passed in the redeemers of relevant commands. As of the moment of this writing this information is hardcoded in offchain/src/TrustlessSidechain/NativeTokenManagement/Reserve.purs. For example:

  reserveAuthPolicyRedeemer :: ReserveAuthPolicyRedeemer
  reserveAuthPolicyRedeemer = ReserveAuthPolicyRedeemer
    { governanceVersion: BigInt.fromInt 1
    }
<> TxConstraints.mustSpendScriptOutput (fst utxo)
  (RedeemerDatum $ toData $ UpdateReserve { governanceVersion: BigInt.fromInt 1 })

This needs to be parameterized. At this point, since we only support one version of governance anyway, this parameter does not need to be exposed via the CLI, but it should be pulled up to a sufficiently high level.

Most likely the right solution to this is putting the version information into the Env effect.


IOG Jira: https://input-output.atlassian.net/browse/ETCM-7869

@tgunnoe tgunnoe transferred this issue from another repository Jul 25, 2024
@jstolarek jstolarek added the governance The governance mechanism label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
governance The governance mechanism
Projects
None yet
Development

No branches or pull requests

1 participant