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

Allow assembling transactions with no witnesses #4408

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

LudvikGalois
Copy link
Contributor

@LudvikGalois LudvikGalois commented Aug 31, 2022

It's possible to write a script which requires no signatures, for
example

{
    "scripts": [
        {
            "keyHash": "df243ee05bbe556970c9f8b48088b90549b8c9e41a3380fdede62d16",
            "type": "sig"
        },
        {
            "keyHash": "452c6cc84a5430b4ff720d5692e0ce7f4d37b1f78a3bea99fdbab240",
            "type": "sig"
        },
        {
            "keyHash": "9b925a6b6462e0c7c48fc69a06d1e72d03da30655fd5af40e988140e",
            "type": "sig"
        }
    ],
    "type": "atLeast",
    "required": 0
}

As such, it should be supported by the CLI to assemble a transaction
with no witnesses.

Fixes: #3835
Closes: #4471

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.

@LudvikGalois have you confirmed this works on a local testnet?

@LudvikGalois
Copy link
Contributor Author

@LudvikGalois have you confirmed this works on a local testnet?

I've tested that it works in so far as the command in the ticket works and you can assemble the transaction. I didn't check if it was actually a useful thing to do, and it seems like it's not, since it's impossible to submit that transaction. I'm not even sure how to redeem from a SimpleScript - the docs are out of date.

@LudvikGalois
Copy link
Contributor Author

@LudvikGalois have you confirmed this works on a local testnet?

I have now confirmed that this allows spending of transactions from script addresses containing a script that requires no signatures.

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.

LGTM, QA approval needed

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale label Nov 12, 2022
@LudvikGalois LudvikGalois force-pushed the ludvikgalois/no-wit-transactions branch from 9b0605a to 442b357 Compare December 28, 2022 01:20
@Jimbo4350 Jimbo4350 force-pushed the ludvikgalois/no-wit-transactions branch 3 times, most recently from 9f7dd3c to 62f99cd Compare January 5, 2023 18:21
It's possible to write a script which requires no signatures, for
example

```
{
    "scripts": [
        {
            "keyHash": "df243ee05bbe556970c9f8b48088b90549b8c9e41a3380fdede62d16",
            "type": "sig"
        },
        {
            "keyHash": "452c6cc84a5430b4ff720d5692e0ce7f4d37b1f78a3bea99fdbab240",
            "type": "sig"
        },
        {
            "keyHash": "9b925a6b6462e0c7c48fc69a06d1e72d03da30655fd5af40e988140e",
            "type": "sig"
        }
    ],
    "type": "atLeast",
    "required": 0
}
```

As such, it should be supported by the CLI to assemble a transaction
with no witnesses. Both the assemble and sign commands have been updated
to support this.

Fixes: #3835
@Jimbo4350 Jimbo4350 force-pushed the ludvikgalois/no-wit-transactions branch from 62f99cd to faa52ab Compare January 5, 2023 18:27
@Jimbo4350 Jimbo4350 merged commit f8cf478 into master Jan 5, 2023
@iohk-bors iohk-bors bot deleted the ludvikgalois/no-wit-transactions branch January 5, 2023 19:09
@IntersectMBO IntersectMBO deleted a comment Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants