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

Improving the use of reference scripts #447

Closed
mmontin opened this issue Aug 16, 2024 · 0 comments · Fixed by #449
Closed

Improving the use of reference scripts #447

mmontin opened this issue Aug 16, 2024 · 0 comments · Fixed by #449

Comments

@mmontin
Copy link
Collaborator

mmontin commented Aug 16, 2024

At the moment, using reference scripts is done when specifying redeemers and attaching a TxOutRef. Maybe this passing of utxo could be avoided.

Already, when we consume a utxo belonging to a script, we don't provide the script itself and cooked finds it directly into a certain inner part of the mockchain state. Maybe we could have another map there, or a list, to store utxos that have been attached to reference scripts (or simply look at them through the existing index and dont add any other structure ...).

Then, whenever a script witness is necessary in a skeleton, we could look in those utxos and, if we find a reference script there with the right hash, we would feed it directly as reference script.

There could still be the option to pass it explicitly, and we could use the new logging mechanism to ensure that this is not 100% silent and the user gets a notification when a reference script is attached directly.

This issue comes from the fact that it's very annoying to carry around reference script utxos in traces.

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 a pull request may close this issue.

1 participant