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

Alonzo Scripts cahnged to simple Sum type. #2221

Closed
wants to merge 5 commits into from
Closed

Conversation

TimSheard
Copy link
Contributor

The Script in the Alonzo era has been changed to a simple Sum type with two
constructors. This is possible because both variants store there original bytes,
so the SafeToHash instance does not need a Memobytes to memoize the originalBytes.

Also fixed up validating scripts, by using the Plutus side validateScript. this allowed
the repository to not need the serialize or the flat packages, which were removed
from the cabal file.

In order to validate data in both AuxiliaryData and in the WitnessSet, deserializing
a Plutus Data, with a ByteString type, whose length is greater than 64 now raises
a deserialisation error. Added a new combinator (<?) to Data.Coders that lets any
'constructor' raise an error. Also added roundtrip tests to be sure we actually
catch these cases.
Removed calls to error, because the method indexOf might fail.
Also tracked down a few others.
Also discovered that STS.ApplyTx hardcodes in Shelley Tx, rather than Core.Tx
Relplace Tx with COre.Tx is its defintion in Shelley.Spec.Ledger.API.Mempool
Still Having some trouble writing an ApplyTX for Alonzo.
The Scrit in the Alonzo era has been changed to a simpe Sum type with two
constructors. This is possible because both variants store there original bytes,
so the SafeToHash instance does not need a Memobytes to memoize the originalBytes.

Also fixed up validting scripts, by using the Plutus side validateScript. this allowed
the repository to not need the serialize or the flat packages, which were removed
from the cabal file.
@TimSheard TimSheard requested review from nc6 and redxaxder April 7, 2021 14:02
Copy link
Contributor

@nc6 nc6 left a comment

Choose a reason for hiding this comment

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

Can you rebase this without the 64-byte test stuff, generally looks good.

@TimSheard
Copy link
Contributor Author

This PR has been superceeded by #2226 and will be closed.

@TimSheard TimSheard closed this Apr 8, 2021
@JaredCorduan JaredCorduan deleted the ts-script-nomemo branch August 16, 2022 13:44
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.

2 participants