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

Make script invalid flag an assertion #3093

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Aug 18, 2021

This means if --script-invalid is specified, the build transaction will fail if the scripts are valid.

@newhoggy
Copy link
Contributor Author

$ scripts/plutus/always-fails.sh
Socket path: example/node-bft1/node.sock
Socket path: /Users/jky/wrk/iohk/cardano-node
srwxr-xr-x  1 jky  staff  0 18 Aug 15:25 example/node-bft1/node.sock
Always succeeds Plutus script in use. Any datum and redeemer combination will succeed.
Script at: ./scripts/plutus/scripts/always-succeeds-spending.plutus
{
    "16b0125dc3fb55644bc189aedea012efa4a48382480d879c4593eb3833deeff0#0": {
        "address": "addr_test1vz680r6cw6g5kd492arhgc3mug3z25jyx2cglsjhx36n4dsa7yh3t",
        "value": {
            "lovelace": 1000000000000
        }
    }
}Transaction successfully submitted.
Pausing for 5 seconds...
{
    "e0ae1388a7866ebadfbdd14409fde0c6bdb4a4e25a2755fc9eab89ef232bfacd#0": {
        "address": "addr_test1vz680r6cw6g5kd492arhgc3mug3z25jyx2cglsjhx36n4dsa7yh3t",
        "value": {
            "lovelace": 666666666394
        }
    }
}Plutus txin
e0ae1388a7866ebadfbdd14409fde0c6bdb4a4e25a2755fc9eab89ef232bfacd#1
Collateral
e0ae1388a7866ebadfbdd14409fde0c6bdb4a4e25a2755fc9eab89ef232bfacd#0
Command failed: transaction build  Error: One or more of the scripts were expected to fail validation, but none did.

… is specified, the build transaction will fail if the scripts are valid.
@newhoggy newhoggy force-pushed the make-script-invalid-flag-an-assertion branch from bfff3c8 to e3367ef Compare August 18, 2021 05:38
@newhoggy newhoggy marked this pull request as ready for review August 18, 2021 05:41
@newhoggy newhoggy changed the title Make script invalid flag an assertion. This means if --script-invali… Make script invalid flag an assertion Aug 18, 2021
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, one minor change.

cardano-api/src/Cardano/Api/Fees.hs Show resolved Hide resolved
@newhoggy
Copy link
Contributor Author

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 18, 2021

@iohk-bors iohk-bors bot merged commit 9ee60ae into master Aug 18, 2021
@iohk-bors iohk-bors bot deleted the make-script-invalid-flag-an-assertion branch August 18, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants