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
Reference script integration #3953
Reference script integration #3953
Conversation
c17663d
to
6be0eae
Compare
2868852
to
19b83d2
Compare
``` | ||
|
||
To start your babbage cluster you need to run the `example/run/all.sh` shell script. | ||
The remainder of this guide briefly talks about the [shell script example](scripts/plutus/example-reference-script-usage.sh) that automatically does everything for you. |
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.
'Further, we briefly discuss the shell script example, which automates your following actions'.
@Jimbo4350 Please see if this makes sense^. If not, I'd suggest changing 'automatically does everything for you' into a clearer statement. Like what exactly does it automate?
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've made a change let me know what you think
…are witnessing a spending input
and runTxBuildRaw functions Update the utxo query in the runTxBuild function to also inlclude reference scripts. This is necessary otherwise the transaction will be constructed without reference scripts (if they are specified at the cli level).
inputs (PlutusReferenceScriptWitnessFiles)
for spending a tx input
Consider renaming |
7747587
to
ac5bdae
Compare
If we're going to leave |
@Jimbo4350 Do these refer to the Shelley(v1) and Allegra(v2) native scripts? If so it may be worth clarifying that in the help text because it wasn't obvious to me. |
ac5bdae
to
fc2973b
Compare
@@ -953,7 +966,7 @@ fromShelleyScriptHash = ScriptHash | |||
|
|||
|
|||
-- ---------------------------------------------------------------------------- | |||
-- The simple native script language | |||
-- The simple simple script language |
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 simple simple script language | |
-- The simple script language |
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.
It's super simple ("simple simple") . Thanks for catching this.
fc2973b
to
8aa99d2
Compare
Opt.flag' (AnyScriptLanguage $ SimpleScriptLanguage SimpleScriptV1) | ||
( Opt.long "simple-script-v1" | ||
<> Opt.help "Specify a simple script v1 reference script. \ | ||
\See documentation at doc/reference/simple-scripts.md" |
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.
This document doesn't refer to v1 and v2. How can we make that distinction clear?
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.
Specify a simple script v1 (Shelley) reference script
Specify a simple script v2 (Allegra) reference script.
?
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.
Also, you could prepend TODO:
until they are supported (because that's what you see when you try to use them)
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 made a few minor comments, but overall this is awesome! This was a huge undertaking, thanks @Jimbo4350 !!
|
||
In this example we will use the [Required Redeemer](scripts/plutus/scripts/v2/required-redeemer.plutus) Plutus spending script. In order to execute a reference Plutus spending script, we require the following: | ||
|
||
- Collateral tx input(s) - these are provided and are forfeited in the event the Plutus script fails to execute. |
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.
Should we ease folks mind by telling them about the fact that a local node will not forward on a failing tx to the relay node unless it is explicitly told to? As you know, I'm sure, the collateral exists to prevent abusive behavior, and under normal circumstances will not be taken.
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.
"... in the event this transaction is submitted with a failing Plutus script. Local validation protects against this by default."
?
@@ -151,7 +151,7 @@ $SED -i "${ROOT}/genesis/shelley/genesis.json" \ | |||
-e 's/"minFeeB": 0/"minFeeB": 155381/' \ | |||
-e 's/"minUTxOValue": 0/"minUTxOValue": 1000000/' \ | |||
-e 's/"decentralisationParam": 1.0/"decentralisationParam": 0.7/' \ | |||
-e 's/"major": 0/"major": 2/' \ | |||
-e 's/"major": 0/"major": 7/' \ |
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.
🎉
bors r+ |
bors r- |
Canceled. |
bors r+ |
Build succeeded: |
bors r+ |
Already running a review |
build-raw
is working with reference scripts.