Commit graph

10 commits

Author SHA1 Message Date
Santiago Carmuega
67789f25cd
feat(applying): include main constants in pparams (#565) 2024-12-22 12:06:47 -03:00
Santiago Carmuega
537cd45c23
refactor: support roundtrip encoding for script data hash components (#526) 2024-10-22 10:09:37 -03:00
Matthias Benkort
969d5612b7
refactor: Re-organize and clean-up pallas-primitives (#523)
* Re-organize and clean-up pallas-primitives

  Namely:

  - Move _common_ (i.e. era-independent) types and structures up to the
    `lib` module; to be shared across all eras. If any of those deviate
    in a subsequent era, it is easy to bring them down and define new
    types from the point of divergence onward. This simplifies the scope
    of each era-specific module and make them slightly easier to
    navigate.

    Note that, each era module still re-export all of the common types
    that's relevant to that particular era. So technically, this
    reorganization doesn't really change anything for callers/users of
    the library.

  - Rename `Scripthash` to `ScriptHash`. Before this commit, both
    actually existed as `ScriptHash` was introduced with the Conway era.
    Yet, they refer to the same thing, so the duplication is simply
    confusing.

  - Rename `One` / `Two` constructors for `NetworkId` to `Testnet` and
    `Mainnet` respectively. Also defined idiomatic `From` & `TryFrom`
    implementation for conversion to and from `u8`. This is a lot let
    confusing!

  - Generalize `PlutusScript` with a constant generic, to avoid
    repetition for each plutus script generated for specific version.
    Note that a distinction is still _necessary_ if we want to provie
    out-of-the-box serialisers for Plutus scripts, which are serialised
    with a tag prefix depending on the language. All else apart, they
    are strictly similar types.

  - Rename `CostMdls` to `CostModels`. Because, common.

  - Rename `plutus_script` to `plutus_v1_script` in the Alonzo's witness
    set, for consistency with other eras.

* Fix ordering of ScriptHash variants.

  This is an odd one. See the note.

* Bump minicbor to v0.25.1

* Add aliases with deprecation warnings to various fields and types.

* revert renaming plutus_script to plutus_v1_script in Alonzo witness

  See https://github.com/txpipe/pallas/pull/523#discussion_r1807329742
2024-10-22 08:57:21 -03:00
Pedro Sánchez Terraf
07b74515a4
feat(applying): add cert and native script validation for ShelleyMA (#510)
BREAKING CHANGE: the `validate` fn signature has changed to support these changes

---------

Co-authored-by: Ale Gadea <ale.gadea@txpipe.io>
2024-09-23 13:24:32 -03:00
Santiago Carmuega
92da124247
feat(traverse): track original era for tx outputs (#447) 2024-04-18 22:36:19 -03:00
Maico Leberle
a0c409b65e
refactor(applying): unify approach for protocol params access (#432) 2024-04-11 21:41:27 -03:00
Maico Leberle
1a0fc322fa
feat(applying): add support for preview / preprod networks (#422) 2024-04-01 13:49:14 -03:00
Maico Leberle
181a13c3d6
feat: add Babbage phase-1 validations (#405) 2024-02-20 20:30:09 -03:00
Santiago Carmuega
3dd00ad3cd
chore: fix new lint warnings (#400) 2024-02-11 17:56:22 -03:00
Maico Leberle
7b2894e4a2
feat(applying): implement Alonzo phase-1 validations (#380) 2024-01-19 22:19:46 -03:00