Commit graph

24 commits

Author SHA1 Message Date
Santiago Carmuega
7c6ccac3ed feat(applying): include main constants in pparams (#565) 2024-12-22 12:06:47 -03:00
Santiago Carmuega
3b5dcef195 refactor: support roundtrip encoding for script data hash components (#526) 2024-10-22 10:09:37 -03:00
Matthias Benkort
6b667c78a3 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
Santiago Carmuega
19b0ac3072 feat: add support for Conway config and params traverse (#521)
Co-authored-by: Clark Alesna <clark_alesna@hotmail.com>
Co-authored-by: johnquinnvictaboada <quinnvictaboada@gmail.com>
2024-10-16 21:43:23 -03:00
Andrew Westberg
50b947624f chore[applying]: Fix cargo fmt from previous commits 2024-09-26 07:58:08 -04:00
Pedro Sánchez Terraf
7c7a3c25ab 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
5a189a2f30 fix(applying): use correct cost model for Conway (#508) 2024-08-25 13:00:59 -03:00
Santiago Carmuega
7b5a25a8f6 fix(applying): add missing Conway pparams variant (#507) 2024-08-25 12:42:27 -03:00
Santiago Carmuega
ab8bd49701 fix: relax CBOR decoding of Conway protocol params update (#473) 2024-06-18 13:03:07 -03:00
Maico Leberle
59a5db0143 fix(applying): fix tx size calculation (#443) 2024-05-14 07:40:52 -03:00
Santiago Carmuega
0b82bb702a feat(traverse): track original era for tx outputs (#447) 2024-04-18 22:36:19 -03:00
Santiago Carmuega
4a3a8fb0da chore(applying): prepare pparams for folding logic (#438) 2024-04-15 21:53:33 -03:00
Maico Leberle
fb8b7402fe refactor(applying): unify approach for protocol params access (#432) 2024-04-11 21:41:27 -03:00
Harper
0c84dc4983 feat: add Conway 2024-03 CDDL conformity (#424) 2024-04-01 14:02:52 -03:00
Maico Leberle
f1fca9f445 feat(applying): add support for preview / preprod networks (#422) 2024-04-01 13:49:14 -03:00
Maico Leberle
eade9eca82 feat: add Babbage phase-1 validations (#405) 2024-02-20 20:30:09 -03:00
Maico Leberle
da3e636759 feat(applying): implement Alonzo phase-1 validations (#380) 2024-01-19 22:19:46 -03:00
Harper
5d02b2c31d fix: update pallas-applying to work with keepraw native scripts (#370) 2024-01-03 08:41:06 -03:00
Maico Leberle
4e1eb79ef4 feat(applying): implement ShelleyMA phase-1 validations (#354) 2023-12-12 07:53:10 -03:00
Maico Leberle
99b4c1fa4e fix(applying): contemplate fee rules for genesis UTxOs (#332) 2023-11-14 17:42:59 -03:00
Maico Leberle
85d4470ddd feat(applying): add remaining validations for Byron era (#325) 2023-11-09 14:50:46 -03:00
Maico Leberle
1635f8eb95 feat(applying): validate all inputs in UTxO set (#324) 2023-11-07 18:29:23 -03:00
Maico Leberle
2dca64c4c9 feat(applying): check non-empty set of inputs and outputs (#312) 2023-11-03 18:15:17 -03:00
Maico Leberle
5391a037d6 feat: scaffold Byron phase-1 validations (#300)
Co-authored-by: Santiago Carmuega <santiago@carmuega.me>
2023-10-10 17:16:26 -03:00