Skip to content

Commit

Permalink
Fix doc stie errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed May 7, 2024
1 parent a08d474 commit ca2a43e
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 41 deletions.
2 changes: 1 addition & 1 deletion doc/read-the-docs-site/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
"source_suffix": source_suffix,
}

html_static_path = ['_static']
html_static_path = []
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ Relevant guides that will help you with this process include:

* `Register a DRep <https://sancho.network/tutorials/drep-registration>`_
* `Delegate votes to a DRep <https://sancho.network/tutorials/delegate-to-drep>`_
* `Creating update-committee governance actions <https://sancho.network/tutorials/actions>#update-committee-actions`_
* `Creating update-committee governance actions <https://sancho.network/tutorials/actions#update-committee-actions>`_
* `Voting on actions <https://sancho.network/tutorials/vote-action>`_
* To ratify an ``update-committee`` action, you will have to vote as both
DReps and SPOs. SPO cold keys are in the directory structure created by
``cardano-testnet``
DReps and SPOs. SPO cold keys are in the directory structure created by
``cardano-testnet``
* You will have to wait for an epoch boundary before the action is ratified,
and it takes another epoch before an ``update-committee`` action is
enacted. Configuring your private testnet to have short epoch lengths is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _init_cold_committee:
.. _init_hot_committee:

Initializing the Hot Committee Credential Script
================================================
Expand Down
2 changes: 1 addition & 1 deletion doc/read-the-docs-site/orchestrator-cli/init-hot-nft.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _init_cold_nft:
.. _init_hot_nft:

Initializing the Hot NFT Payment Credential Script
===================================================
Expand Down
2 changes: 1 addition & 1 deletion doc/read-the-docs-site/orchestrator-cli/unlock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ left to do: recovering the NFTs.
and double check everything when preparing a transaction that unlocks one of
the NFTs.

.. info::
.. note::
Recovering the NFTs after the credentials are inactive is not the only use
case for unlocking. For example, you can upgrade the locking script by
unlocking an NFT and sending it to a new script address.
Expand Down
24 changes: 8 additions & 16 deletions doc/read-the-docs-site/system-overview/cold-nft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,17 @@ If the redeemer is an ``AuthorizeHot`` action:
* The transaction has been signed by a majority of users from the
**delegation group** defined in the datum.
* The transaction contains a hot committee credential authorization certificate
* The cold credential contained in the certificate is the same credential
provided to the script as a parameter.
* the hot credential contained in the certificate is the same credential
provided in the redeemer.
* The cold credential contained in the certificate is the same credential provided to the script as a parameter.
* the hot credential contained in the certificate is the same credential provided in the redeemer.
* The transaction does not contain any other certificates.

If the redeemer is a ``ResignDelegation`` action:

* The transaction sends an output that meets the following criteria:
* The address matches the address of the input being authorized
* The value of the output is the same as the value of the input being
authorized.
* The datum is unchanged with the exception that the resignee specified in
the redeemer is removed from the **delegation group**.
* The reference script in the output is the same if present, otherwise not
set.
* The value of the output is the same as the value of the input being authorized.
* The datum is unchanged with the exception that the resignee specified in the redeemer is removed from the **delegation group**.
* The reference script in the output is the same if present, otherwise not set.
* The transaction does not send any other outputs to an address with the the
script's own payment credential.
* The transaction has been signed by the resignee.
Expand All @@ -61,18 +56,15 @@ If the redeemer is a ``ResignCold`` action:
* The transaction has been signed by a majority of users from the
**membership group** defined in the datum.
* The transaction contains a cold committee resignation certificate.
* The cold credential contained in the certificate is the same credential
provided to the script as a parameter.
* The cold credential contained in the certificate is the same credential provided to the script as a parameter.
* The transaction does not contain any other certificates.

If the redeemer is a ``RotateCold`` action:

* The transaction sends an output that meets the following criteria:
* The address matches the address of the input being authorized
* The value of the output is the same as the value of the input being
authorized.
* The **certificate authority** is the same in the output datum as it is in
the input datum.
* The value of the output is the same as the value of the input being authorized.
* The **certificate authority** is the same in the output datum as it is in the input datum.
* the **membership group** in the output datum is not empty.
* the **delegation group** in the output datum is not empty.
* The output does not contain a reference script.
Expand Down
18 changes: 6 additions & 12 deletions doc/read-the-docs-site/system-overview/hot-nft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,18 @@ If the redeemer is a ``Vote`` action:
* The transaction has been signed by a majority of users from the
**voting group** defined in the datum.
* The transaction contains a committee voting procedure:
* The hot credential performing the vote is the same credential provided to
the script as a parameter.
* The ID of the Governance action being voted on matches the ID in the
redeemer.
* The hot credential performing the vote is the same credential provided to the script as a parameter.
* The ID of the Governance action being voted on matches the ID in the redeemer.
* The vote matches the vote in the redeemer redeemer.
* The transaction does not contain any other votes.

If the redeemer is a ``ResignVoting`` action:

* The transaction sends an output that meets the following criteria:
* The address matches the address of the input being authorized
* The value of the output is the same as the value of the input being
authorized.
* The datum is unchanged with the exception that the resignee specified in
the redeemer is removed from the **voting group**.
* The reference script in the output is the same if present, otherwise not
set.
* The value of the output is the same as the value of the input being authorized.
* The datum is unchanged with the exception that the resignee specified in the redeemer is removed from the **voting group**.
* The reference script in the output is the same if present, otherwise not set.
* The transaction does not send any other outputs to an address with the the
script's own payment credential.
* The transaction has been signed by the resignee.
Expand All @@ -58,8 +53,7 @@ If the redeemer is a ``RotateHot`` action:

* The transaction sends an output that meets the following criteria:
* The address matches the address of the input being authorized
* The value of the output is the same as the value of the input being
authorized.
* The value of the output is the same as the value of the input being authorized.
* the **voting group** in the output datum is not empty.
* The output does not contain a reference script.
* The transaction does not send any other outputs to an address with the the
Expand Down
115 changes: 109 additions & 6 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,119 @@ cabalProject:
description = "Start and run an ephemeral local testnet";
group = "general";
exec = ''
set -e
set -u
set -o pipefail
cd $(git rev-parse --show-toplevel)/testnet
rm -rf example
rm -rf logs
scripts/babbage/mkfiles.sh
cp example/utxo-keys/utxo1.vkey ../orchestrator.vkey
cp example/utxo-keys/utxo1.skey ../orchestrator.skey
cardano-cli address build --payment-verification-key-file ../orchestrator.vkey > ../orchestrator.addr
[ -d example ] || scripts/babbage/mkfiles.sh
example/run/all.sh
'';
};

purge-local-testnet = {
description = "Cleanup the local testnet directory";
group = "general";
exec = ''
set -e
set -u
set -o pipefail
cd $(git rev-parse --show-toplevel)/testnet
rm -rf example logs
'';
};

setup-orchestrator = {
description = "Configure the orchestrator's wallet";
group = "general";
exec = ''
set -e
set -u
set -o pipefail
cd $(git rev-parse --show-toplevel)
cp testnet/example/utxo-keys/utxo1.vkey orchestrator.vkey
cp testnet/example/utxo-keys/utxo1.skey orchestrator.skey
cardano-cli address build \
--payment-verification-key-file orchestrator.vkey \
--out-file orchestrator.addr
'';
};

mint-tokens = {
description = "Mint two NFTs to use with the cold and hot credentials.";
group = "general";
exec = ''
set -e
set -u
set -o pipefail
cd $(git rev-parse --show-toplevel)
UTXO_1_ADDR=$(
cardano-cli address build \
--payment-verification-key-file testnet/example/utxo-keys/utxo1.vkey
)
COLD_INPUT=$(
cardano-cli query utxo --address $UTXO_1_ADDR --output-json \
| jq -r 'keys[0]'
)
UTXO_2_ADDR=$(
cardano-cli address build \
--payment-verification-key-file testnet/example/utxo-keys/utxo2.vkey
)
HOT_INPUT=$(
cardano-cli query utxo --address $UTXO_2_ADDR --output-json \
| jq -r 'keys[0]'
)
COLD_INPUT_CBOR=$(echo $COLD_INPUT | sed 's/#/0/')
HOT_INPUT_CBOR=$(echo $HOT_INPUT | sed 's/#/0/')
cat mint.plutus.template | sed s/{0}/$COLD_INPUT_CBOR/ > coldMint.plutus
cat mint.plutus.template | sed s/{0}/$HOT_INPUT_CBOR/ > hotMint.plutus
cardano-cli transaction policyid --script-file coldMint.plutus > cold.pol
cardano-cli transaction policyid --script-file hotMint.plutus > hot.pol
cardano-cli conway transaction build \
--tx-in $COLD_INPUT \
--tx-in-collateral $COLD_INPUT \
--tx-out "$(cat orchestrator.addr)+5000000 + 1 $(cat cold.pol)" \
--mint "1 $(cat cold.pol)" \
--mint-script-file coldMint.plutus \
--mint-redeemer-value {} \
--change-address $UTXO_1_ADDR \
--out-file coldMint.body
cardano-cli conway transaction build \
--tx-in $HOT_INPUT \
--tx-in-collateral $HOT_INPUT \
--tx-out "$(cat orchestrator.addr)+5000000 + 1 $(cat hot.pol)" \
--mint "1 $(cat hot.pol)" \
--mint-script-file hotMint.plutus \
--mint-redeemer-value {} \
--change-address $UTXO_2_ADDR \
--out-file hotMint.body
cardano-cli conway transaction sign \
--signing-key-file testnet/example/utxo-keys/utxo1.skey \
--tx-body-file coldMint.body \
--tx-file coldMint.tx
cardano-cli conway transaction sign \
--signing-key-file testnet/example/utxo-keys/utxo2.skey \
--tx-body-file hotMint.body \
--tx-file hotMint.tx
cardano-cli conway transaction submit --tx-file coldMint.tx
cardano-cli conway transaction submit --tx-file hotMint.tx
'';
};

orchestrator-cli = {
description = "Wrapper for orchestrator CLI executable";
group = "general";
exec = ''
set -e
set -u
set -o pipefail
cabal run orchestrator-cli -- "$@"
'';
};
};

env = {
Expand Down

0 comments on commit ca2a43e

Please sign in to comment.