Pull-mirror of github.com/Sulkta-Coop/pallas. Canonical lives on GitHub; this is a LAN-fast read-only cache.
Find a file
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
.chglog docs: Add retroactive change log 2022-04-29 20:34:12 -03:00
.github chore[applying]: Fix cargo fmt from previous commits 2024-09-26 07:58:08 -04:00
assets chore: Add logo assets 2022-02-06 21:36:42 -03:00
examples fix(interop): use correct input order to match redeemers (#487) 2024-07-14 13:48:05 -03:00
pallas Release 0.30.2 2024-09-08 18:49:23 -03:00
pallas-addresses feat(crypto): Add Key Evolving Signatures (KES) 2024-10-17 15:12:33 -04:00
pallas-applying refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-bech32 fix: add missing READMEs for crate publish 2024-01-04 11:58:28 -03:00
pallas-codec refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-configs refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-crypto feat(crypto): Add Key Evolving Signatures (KES) 2024-10-17 15:12:33 -04:00
pallas-hardano Release 0.30.2 2024-09-08 18:49:23 -03:00
pallas-math fix[pallas-math]: use malachite as default 2024-09-26 07:58:08 -04:00
pallas-network refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-primitives refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-rolldb Release 0.30.2 2024-09-08 18:49:23 -03:00
pallas-traverse refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-txbuilder refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-utxorpc refactor: Re-organize and clean-up pallas-primitives (#523) 2024-10-22 08:57:21 -03:00
pallas-wallet Release 0.30.2 2024-09-08 18:49:23 -03:00
test_data feat: add support for Conway config and params traverse (#521) 2024-10-16 21:43:23 -03:00
.gitignore feat(network): update n2n handshake versions & add keepalive miniprotocol (#362) 2023-12-19 07:56:10 -03:00
Cargo.toml chore(math): initialize pallas-math crate (#474) 2024-06-29 17:43:06 -03:00
CHANGELOG.md Release 0.30.1 2024-08-25 14:35:15 -03:00
LICENSE Fill in place holders 2021-12-02 19:55:54 -03:00
README.md chore(math): initialize pallas-math crate (#474) 2024-06-29 17:43:06 -03:00
rustfmt.toml Implement multiplexer and mini-protocols PoC 2021-11-20 11:33:45 -03:00
SECURITY.md docs: define security policy (#464) 2024-05-22 10:53:39 -03:00

Pallas Logo Pallas Logo

Rust-native building blocks for the Cardano blockchain ecosystem

GitHub Crates.io GitHub Workflow Status

Introduction

Pallas is an expanding collection of modules that re-implements common Ouroboros / Cardano logic in native Rust. This crate doesn't provide any particular application, it is meant to be used as a base layer to facilitate the development of higher-level use-cases, such as explorers, wallets, etc (who knows, maybe even a full node in a far away future).

Unboxing

The repository is organized as a Cargo workspace. Each Pallas "building block" lives in its own crate. The root pallas crate serves as an all-in-one dependency that re-exports all of the other modules in an hierarchically organized fashion, using Cargo features to tailor the setup for each use-case.

As already explained, Pallas aims at being an expanding set of components. The following tables describe the currently available crates, as well as the planned ones.

Ouroboros Network

Crates Description
pallas-network Network stack providing a multiplexer and mini-protocol implementations

Ouroboros Consensus

Crates Description
pallas-leadership Implementation of the slot leadership selection algorithm
pallas-selection Implementation of the consensus chain-selection algorithm

Cardano Ledger

Crates Description
pallas-primitives Ledger primitives and cbor codec for the different Cardano eras
pallas-traverse Utilities to traverse over multi-era block data
pallas-addresses Encode / decode Cardano addresses of any type
pallas-ticking Time passage implementation for consensus algorithm
pallas-applying Logic for validating and applying new blocks and txs to the chain state
pallas-forecasting Ledger forecasting algorithm to be used by the consensus layer

Shared

Crates Description
pallas-crypto Shared Cryptographic primitives
pallas-codec Shared CBOR encoding / decoding using minicbor lib
pallas-math Shared mathematics functions

Etymology

Pallas: (Greek mythology) goddess of wisdom and useful arts and prudent warfare;