Rust-native building blocks for the Cardano blockchain ecosystem

Related tags

Cryptography pallas
Overview

Pallas

Rust-native building blocks for the Cardano blockchain ecosystem.

Introduction

Pallas is an expanding collection of modules that re-implements common 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 the far away future).

Etymology

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

Comments
  • Offer a faster way to compute the hash of an encodable object

    Offer a faster way to compute the hash of an encodable object

    I also bumped to the latest version of cryptoxide. There's been a lot of performance improvements that have been made since then and this would be a shame to not leverage this (though it's mostly for Curve25519).

    This PR remove the temporary (useless?) serialisation of the Encode-able object. That way we now have a memory overhead allocation to do the hash.

    • [ ] there is no way this can fail minicbor::Encoder have only the Write error. In the case of Blake2b being the writeable object, there is not error possible (none we can/should handle in the code. Shall we remove the Result<(), Box<dyn Error>> ?
    • [ ] shall we have a pallas-crypto with the different crypto utils we will be using in our code?
    opened by NicolasDP 4
  • Due diligence for storage layer planning

    Due diligence for storage layer planning

    In order to start planning a roadmap for the development of the storage layer, we need some due diligence on the state of existing Rust libraries to avoid overlap with other open-source development efforts.

    In particular, we need to research:

    • is there an existing Rust implementation of the ChainDB component?
    • should Pallas be binary-compatible a the file system level with the Haskell implementation?

    cc @mark-stopka

    question 
    opened by scarmuega 3
  • Revisit choice of CBOR library

    Revisit choice of CBOR library

    Opening this issue to collectively discuss alternatives to CBOR-handling libraries. I'll append my own findings from when I first evaluated minicbor and similar libraries. If a more suitable candidate is selected, we can work on the appropriate changes.

    question 
    opened by scarmuega 3
  • Match CBOR encoding of plutus data with the haskell implementation.

    Match CBOR encoding of plutus data with the haskell implementation.

    Fixes #211.

    I've seen you already decided to fix the problem of ambiguous CBOR encodings with KeepRaw and keeping the initial bytes to be used for hashing etc.

    But it is only a plus to make encodings here follow the ones in the haskell implementation, so I made the change.

    I've looked on PlutusData encoding only. The differences to haskell implementation were:

    • empty lists and lists of arguments to a constructor are encoded as a special case as 0-length definite length arrays
    • maps are encoded as definite arrays (!)
    • bytestrings over 64 bytes are encoded as indefinite bytestrings

    I modified those 3 to match haskell. There is a new type PlutusBytes, same as Bytes but the encoding/decoding different. There is a test case plutus_data_isomorphic_decoding_encoding.

    opened by zmrocze 2
  • Getters for witness fields

    Getters for witness fields

    I'm not sure what is the policy for flattening fields for Pallas. Presumably based on the way blocks and txs are handled, the policy is to flatten stuff when it's shared between eras? Based on this I added some getters for the witness types

    opened by SebastienGllmt 2
  • Ok CBOR, you win

    Ok CBOR, you win

    Cardano doesn't use a deterministic mechanism for CBOR encoding. The same block / tx data can be encoded in practically infinite variations, each one resulting in a different hash.

    The process of decoding CBOR into a Rust struct involves loosing the information about these slight variations in encoding (eg: indefinite / definite arrays, int size, map orders, etc). So far, Pallas has been dealing with this problem by enriching the structures with extra data that allows to replicate the same variation when re-encoding a struct.

    After dealing with several edge cases I thought I had won the battle. We actually managed to process the whole mainnet history without a mismatch. I felt a nice sense of accomplishment, I fought against the odds and survived...

    ... but I was wrong, CBOR had more tricks under the sleeve. A testnet Tx was found that had a mismatch in the resulting hash: https://github.com/txpipe/oura/issues/307

    This time, the problem was that a Tx input tuple (hash, index) was encoded as a CBOR indefinite array. Why on earth would someone encode a fixed tuple as an indefinite array? I don't know, but it was clear that this is not a war that can be won.

    It is now 100% clear to me that the only way to maintain consistency on the hash generation process is to retain the original CBOR data, something that @NicolasDP has been telling me since quite a while now.

    The question is how do we accomplish this without an impact on memory.

    In this PR I introduce a generic structure called KeepRaw<T> that wraps an inner CBOR-encodable structure while tracking the start / end positions that represent the segment of the original bytestream relevant to that particular inner struct:

    use pallas_codec::utils::KeepRaw;
    
    let a = (123u16, (456u16, 789u16), 123u16);
    let data = minicbor::to_vec(a).unwrap();
    
    let (_, keeper, _): (u16, KeepRaw<(u16, u16)>, u16) = minicbor::decode(&data).unwrap();
    
    // this returns a &[u8] slice of the total bytestream
    keeper.raw_cbor()
    

    In this way, we can start wrapping ledger primitives, allowing us to retain the original CBOR and hash accordingly:

    impl ToHash<32> for KeepRaw<'_, TransactionBody> {
        fn to_hash(&self) -> pallas_crypto::hash::Hash<32> {
            Hasher::<256>::hash(self.raw_cbor())
        }
    }
    

    I'm not ashamed to say that CBOR has won, it was an honourable fight.

    opened by scarmuega 2
  • AuxiliaryData encoding is not using uint keys

    AuxiliaryData encoding is not using uint keys

    The line here uses the type transaction_metadata: &KeyValuePairs<Metadatum, Metadatum> which doesn't match the Cardano binary spec. While Metadatum uses int, the spec has a special type for top-level keys called transaction_metadatum_label which uses uint instead.

    Concretely, you can see in this transaction that the metadata representation used by Oura ends up being 82a21b12127f810d7dcee28264594554491907e53b08ef38d198e051b4a080 which gives the following cbor.me representation:

    82                        # array(2)
       A2                     # map(2)
          1B 12127F810D7DCEE2 # unsigned(1302243434517352162)
          82                  # array(2)
             64               # text(4)
                59455449      # "YETI"
             19 07E5          # unsigned(2021)
          3B 08EF38D198E051B4 # negative(643795744601428404)
          A0                  # map(0)
       80                     # array(0)
    
    

    As you can see, instead of the expected 17802948329108123211 key, we instead get -643795744601428404

    You can see, for example, Cardano Multiplatform Lib uses the special label type here

    bug 
    opened by SebastienGllmt 2
  • chore: Merge mini-protocols into single crate

    chore: Merge mini-protocols into single crate

    closes #29

    The goal is to have the following network-related crates:

    • pallas-multiplexer
    • pallas-miniprotocols

    The argument against merging the two crates into a potential "pallas-network" is that it would be an artificial coupling not really required at the code level. Multiplexing is agnostic of the mini-protocols (even agnostic of the cbor encoding). Having it as different crates would allow easier repurposing of either crate.

    documentation enhancement 
    opened by scarmuega 2
  • build(deps): update cryptoxide requirement from 0.3.6 to 0.4.1

    build(deps): update cryptoxide requirement from 0.3.6 to 0.4.1

    Updates the requirements on cryptoxide to permit the latest version.

    Changelog

    Sourced from cryptoxide's changelog.

    0.4.1

    • add some extra legacy blake2b contextes between 256 and 384 bits

    0.4.0

    • add a new simpler and more individual APIs for hashing in hashing
    • optimise and reorganise curve25519 and ed25519
    • optimise various hashing algorithms: sha1, sha3, ripemd160

    0.3.5

    • Add some const qualifier in Sha1 and Sha2
    • Revert partially some curve25519 interface changes

    0.3.4

    • Documentation and examples for all modules
    • Unpublish some internals arithmetic from curve25519

    0.3.3

    • Add Scrypt
    • Add SHA1 despite unsecure in hashing context, since it is still used a lot in other context

    0.3.2

    • Fix blake2 block size specified in bits instead of the expected value in bytes, that will result in bug when using with HMAC

    0.3.1

    • remove unnecessary inline attribute on macro (lint warning)

    0.3.0

    • remove SymmetricCipher trait in favor of using simple function associated with the cipher.
    • remove Buffer abstraction
    • cargo clippy pass

    0.2.1

    • fix bug in blake2 difference between new_keyed and reset_with_key when key is empty

    0.2.0

    • Rewrite and optimise Blake2 for AVX and AVX2
    • Rewrite and optimise Sha2 for AVX and AVX2
    • Optimise ChaCha for AVX and AVX2
    • Rewrite SHA3 interface to have specific instance for each size

    ... (truncated)

    Commits
    • 8c8288d release 0.4.1
    • 6cc16d0 blake2b: add support for some odd contexts between 256 and 384 bits
    • edba382 fix some last minutes problem with doctest
    • 7cae459 release 0.4.0
    • 3581d0b Merge pull request #31 from typed-io/curve25519-opt
    • 1050ee1 [curve25519] add some simple code comment
    • 78c3828 make 2 methods public
    • 79c0a9d [curve25519] make scalar nibbles 8 bytes at a time
    • 62ffe28 [curve25519] tidy up scalar base mult
    • b9206cf [curve25519] introduce scalar nibbles
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Another canonical CBOR problem.

    Another canonical CBOR problem.

    CBOR lists can be encoded in two ways: definite and indefinite length.

    As seen for example here the encoding of PlutusData - here Constr concretely - uses indefinite length lists. I've seen you changed the implementation all over the place to use indefinite length lists in the commit 4f9fc1e40d94bfcbee532010738f2e50ad74970e. The comment says "we use indef array by default to match the approach used by the cardano-cli". So my question is

    • In what scenario does cardano-cli do this encoding? Is it when we provide plutus data for redeemers/datums in the json format?

    And my problem is

    • haskell's Codec.Serialise.serialise (which I'd call "canonical" implementation right?) serialises plutus-data Constructor using definite length list. When PlutusData value gets serialized as a part of plutus script it results in a different script serialization and then the hash.

    So it looks like either

    • the haskell implementations already encode cbor inconsequentialy
    • there's a default that luckily is used by every "official" (iog haskell) implementation

    And my hope is that you were wrong with how cardano-cli encodes plutus data and we can revert the implementation to use definite length lists (which suits me).

    opened by zmrocze 1
  • feat: add `to_hex` and `to_bech32` methods for address payment and delegation parts

    feat: add `to_hex` and `to_bech32` methods for address payment and delegation parts

    While being a nice to have feature in general, this will also allow us to progress filtering by address payment or delegate part in Scrolls in a cleaner way.

    Prefixes from CIP 5.

    opened by jmhrpr 1
  • build(deps): update minicbor requirement from 0.18 to 0.19

    build(deps): update minicbor requirement from 0.18 to 0.19

    Updates the requirements on minicbor to permit the latest version.

    Changelog

    Sourced from minicbor's changelog.

    0.19.0

    • Added the trait CborLen and functions minicbor::len and minicbor::len_with to allow client code to calculate the length in bytes of a value's CBOR representation. See issue #32 and merge request !23 for details.

    0.18.0

    • Remove feature partial-derive-support. Encode and Decode can always be derived. See commits 21060b3272d4d09af88aa8543f682c8c4477a886 and 9038d3cced197588ae4d8d2c891d6f51029a9e7d for details.
    • Rework encode::Write impls. The blanket impl for types implementing std::io::Write has been removed. The impl for Vec<u8> now always uses Infallible as its error type and minicbor::{to_vec, to_vec_with} no longer require feature "std". See commit 498043ddce69e3da0dcc66593afdeea0dd058fb8 for details.
    • Depend on minicbor-derive-0.12.0.

    0.17.1

    • Fix missing import for cargo feature derive.

    0.17.0

    • Remove cargo feature partial-skip-support. The method Decoder::skip is now always available. With cargo feature alloc, every CBOR item can be skipped over, otherwise attempting to skip over indefinite-length arrays or maps inside of regular arrays or maps will result in an error.
    • Depend on minicbor-derive-0.11.0.

    0.16.1

    • Specialise Cow<_, [u8]> by adding implementations of minicbor::bytes::{EncodeBytes, DecodeBytes}.

    0.16.0

    • No change since 0.16.0-rc.1.

    0.16.0-rc.1

    • ⚠️ Breaking ⚠️: The Encode and Decode traits are now parameterised by a context type and the context value is passed as another argument to Encode::encode and Decode::decode (see merge request !21 and issue #26 for details). Implementations of these traits that do not make use of the context need to be generic in the type variable and accept the context parameter, e.g. instead of

      struct T;
      

      impl Encode for T { fn encode<W: Write>(&self, e: &mut Encoder<W>) -> Result<(), Error<W::Error>> { ... } }

    ... (truncated)

    Commits
    • c30734d Merge branch 'develop'
    • a21703f Update CHANGELOG and increment versions.
    • 9492d90 Clarify that the derive macro uses Ctx name.
    • e8a6bf9 Merge branch 'cbor_len' into develop
    • f69c5d0 Add some documentation comments about cbor_len.
    • b4ab8aa Pass context as argument to cbor_len.
    • 4ab5f12 Use custom is_nil attribute when deriving CborLen.
    • cbd5427 Enable external cbor_len functions.
    • b723cc0 Add CborLen instances for types in bytes mod.
    • 3f3b39a Add derive support for CborLen.
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): update env_logger requirement from 0.9.0 to 0.10.0

    build(deps): update env_logger requirement from 0.9.0 to 0.10.0

    Updates the requirements on env_logger to permit the latest version.

    Changelog

    Sourced from env_logger's changelog.

    0.10.0 - 2022-11-24

    MSRV changed to 1.60 to hide optional dependencies

    Fixes

    • Resolved soundness issue by switching from atty to is-terminal

    Breaking Changes

    To open room for changing dependencies:

    • Renamed termcolor feature to color
    • Renamed atty feature to auto-color

    0.9.3 - 2022-11-07

    • Fix a regression from v0.9.2 where env_logger would fail to compile with the termcolor feature turned off.

    0.9.2 - 2022-11-07

    • Fix and un-deprecate Target::Pipe, which was basically not working at all before and deprecated in 0.9.1.

    0.9.0 -- 2022-07-14

    Breaking Changes

    • Default message format now prints the target instead of the module

    Improvements

    • Added a method to print the module instead of the target
    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • New methods needed by reducers in MultiEraBlock or MultiEra header.

    New methods needed by reducers in MultiEraBlock or MultiEra header.

    function epoch_no() -> u64
    
    function time() -> std::time::Instant
    

    This code available in scrolls could be useful to write at least one of this method:

    // TODO this is temporary, we should actually use this code from Pallas as this
    // is very generic code
    
    use pallas::ledger::traverse::MultiEraBlock;
    
    fn post_byron_epoch_for_slot(shelley_known_slot: u64, shelley_epoch_length: u32, slot: u64) -> u64 {
        let last_byron_epoch_no = 208;
    
        let shelley_known_slot = shelley_known_slot as u64;
        let shelley_epoch_length = shelley_epoch_length as u64;
    
        let shelley_epoch_no = (slot - shelley_known_slot) / shelley_epoch_length;
    
        return last_byron_epoch_no + shelley_epoch_no;
    }
    
    fn byron_epoch_for_slot(byron_epoch_length: u32, byron_slot_length: u32, slot: u64) -> u64 {
        let byron_epoch_length = byron_epoch_length as u64;
        let byron_slot_length = byron_slot_length as u64;
    
        return slot / (byron_epoch_length / byron_slot_length);
    }
    
    pub fn block_epoch(chain: &super::ChainWellKnownInfo, block: &MultiEraBlock) -> u64 {
        let slot = block.slot();
    
        match block.era() {
            pallas::ledger::traverse::Era::Byron => {
                byron_epoch_for_slot(chain.byron_epoch_length, chain.byron_slot_length, slot)
            }   
            _ => post_byron_epoch_for_slot(chain.shelley_known_slot, chain.shelley_epoch_length, slot),
        }
    }
    
    opened by matiwinnetou 0
  • "Local Tx-Submission" mini-protocol CDDL

    Pallas aims to provide an implementation of each of the mini-protocols described in the Ouroboros network spec. We rely on the CDDL definitions to implement the CBOR wire-format required by each protocol.

    Most of the wire-format is fully defined by the spec, except for certain messages which are specific to the ledger implementation. In particular, the "Local Tx-Submission" mini-protocol specification skips the definitions for the rejection reason message.

    We've tried reverse-engineering the Haskell code to infer the CBOR structures, but it's a hard and error-prone process. On top of that, each cardano-node version might potentially change / augment these definitions.

    We need to build / acquire a CDDL document that describes the missing structures of the "Local Tx-Submission" mini-protocol to facilitate the development of the corresponding Pallas implementation.

    help wanted node-spec 
    opened by scarmuega 5
  • "Local State Query" mini-protocol CDDL

    Pallas aims to provide an implementation of each of the mini-protocols described in the Ouroboros network spec. We rely on the CDDL definitions to implement the CBOR wire-format required by each protocol.

    Most of the wire-format is fully defined by the spec, except for certain messages which are specific to the ledger implementation. In particular, the "Local State Query" mini-protocol specification skips the definitions for the query and result messages.

    We've tried reverse-engineering the Haskell code to infer the CBOR structures, but it's a hard and error-prone process. On top of that, each cardano-node version might potentially change / augment these definitions.

    We need to build / acquire a CDDL document that describes the missing structures of the "Local State Query" mini-protocol to facilitate the development of the corresponding Pallas implementation.

    help wanted node-spec 
    opened by scarmuega 2
Releases(v0.15.0)
  • v0.15.0(Nov 13, 2022)

    v0.15.0 (2022-11-13)

    Features

    • Migrate to dumb agents (#198)
    • traverse: produces_at method for MultiEraTx (#200)

    Bug Fixes

    • primitives: Handle generic int in Plutus data (#202)

    Chore

    • Remove lagging pre-release ref (#206)
    • Fix lint warnings (#205)
    • Remove pre-release ref from deps (#204)
    • Fix address lint issue (#201)
    • miniprotocols: Fix integration tests after preview respin (#203)
    • miniprotocols: Add chain-sync tip test (#199)

    BREAKING CHANGE

    handshake, chainsync, localstate and blockfetch mini-protocols changed the API surface

    Source code(tar.gz)
    Source code(zip)
  • v0.14.0(Oct 13, 2022)

    v0.14.0 (2022-10-13)

    Features

    • return indexes along with outputs returned by produces() (#193)
    • Provide access to all assets at a tx out (#180)
    • Add magic constants for preview and preprod environments (#179)
    • Introduce Bech32 crate (#176)
    • addresses: Add hex and bech32 for Shelley parts (#181)
    • primitives: Preserve order of map structures (#192)
    • primitives: Enable serde of ledger structs (#169)
    • traverse: Add helper methods to Asset data (#195)
    • traverse: Provide access to original Datum hash (#189)
    • traverse: Introduce new MultiEraTx helpers (#184)

    Bug Fixes

    • Stop double CBOR encoding of Plutus script used for hashing (#188)
    • use correct prefix when hashing plutus v2 script (#182)
    • codec: Make Int struct copy (#170)
    • primitives: Add missing PartialOrd and Ord to TransactionInput (#191)
    • traverse: Make ToHash trait public outside crate (#186)
    • Handle undefined CBOR maps in Plutus data (#196)

    Build

    • deps: update minicbor requirement from 0.17 to 0.18 (#134)
    • deps: update bech32 requirement from 0.8.1 to 0.9.1 (#177)

    Chore

    • Fix linter warnings (#194)
    • Fix lint warnings (#190)
    • Move fee logic out of primitives (#174)
    • Move time logic out of primitives (#173)
    • Move hash logic out of primitives (#172)
    • primitives: Remove redundant address logic (#171)
    Source code(tar.gz)
    Source code(zip)
  • v0.13.3(Oct 13, 2022)

  • v0.14.0-alpha.5(Sep 28, 2022)

  • v0.14.0-alpha.4(Sep 21, 2022)

  • v0.14.0-alpha.3(Sep 15, 2022)

  • v0.14.0-alpha.2(Sep 13, 2022)

  • v0.14.0-alpha.0(Sep 11, 2022)

    v0.14.0-alpha.0 (2022-09-11)

    Features

    • Add magic constants for preview and preprod environments (#179)
    • Introduce Bech32 crate (#176)
    • addresses: Add hex and bech32 for Shelley parts (#181)
    • primitives: Enable serde of ledger structs (#169)
    • traverse: Introduce new MultiEraTx helpers (#184)

    Bug Fixes

    • use correct prefix when hashing plutus v2 script (#182)
    • codec: Make Int struct copy (#170)

    Build

    • deps: update minicbor requirement from 0.17 to 0.18 (#134)
    • deps: update bech32 requirement from 0.8.1 to 0.9.1 (#177)

    Chore

    • Move fee logic out of primitives (#174)
    • Move time logic out of primitives (#173)
    • Move hash logic out of primitives (#172)
    • primitives: Remove redundant address logic (#171)
    Source code(tar.gz)
    Source code(zip)
  • v0.13.2(Aug 20, 2022)

  • v0.13.1(Aug 8, 2022)

  • v0.13.0(Aug 7, 2022)

    v0.13.0 (2022-08-07)

    Features

    • primitives: Add ToHash to DatumOption (#163)
    • traverse: Add missing getters on output (#162)
    • traverse: Add missing getters for witness fields (#160)
    • traverse: Add reference inputs to Tx (#161)
    • traverse: Expose collateral return (#158)

    Bug Fixes

    • primitives: Handle alonzo headers without prev-hash (#164)
    • primitives: Force CBOR null primitive for missing aux data (#159)

    Chore

    • Fix lint warnings (#166)
    • Fix trailing comma lint issue (#165)
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Aug 3, 2022)

  • v0.12.0-alpha.0(Jul 20, 2022)

    v0.12.0-alpha.0 (2022-07-20)

    Features

    • addresses: Improve API ergonomics (#148)
    • miniprotocols: Add Tx-Mempool-Monitoring mini-Protocol (#150)
    • traverse: Introduce more new accessor methods (#153)
    • traverse: Introduce new accessor methods (#152)
    • traverse: Expose multi-era metadata (#151)
    • traverse: Integrate address library (#149)

    Bug Fixes

    • multiplexer: Honor read timeouts in bearer logic (#154)

    Chore

    • Apply code formatting
    • primitives: Add Plutus script hash test (#147)
    Source code(tar.gz)
    Source code(zip)
  • v0.11.1(Jul 4, 2022)

  • v0.11.0(Jul 2, 2022)

    v0.11.0 (2022-07-02)

    Features

    • Add mechanism to check era's features (#120)
    • Introduce 'traverse' library (#117)
    • Introduce Addresses crate (#137)
    • Add Vasil / Babbage compatibility (#126)
    • Implement common traverse iterators (#119)
    • multiplexer: Use single channel for muxer (#133)
    • primitives: Introduce MintedBlock concept (#116)
    • traverse: Add era-handling utilities (#123)
    • traverse: Add output refs for inputs (#122)
    • traverse: Add tx input traversing (#121)
    • traverse: Add output-at helper method (#124)
    • traverse: Add ada amount method on output (#135)
    • traverse: Expose block number value (#140)
    • traverse: Improve MultiEraOutput ergonomics (#141)

    Bug Fixes

    • Add missing README blocking publish
    • Add missing README preventing publish
    • multiplexer: Use buffers that own the inner channel (#113)
    • multiplexer: Handle bearer io error instead of panic (#118)
    • primitives: Handle bytes indef in Plutus data (#143)
    • primitives: Adjust member visibility in structs (#144)
    • traverse: Handle Shelley's lack of invalid_transactions field (#138)

    Docs

    • Update changelog

    Build

    • deps: update bech32 requirement from 0.8.1 to 0.9.0 (#104)

    Chore

    • primitives: Organize test data on a single dir (#112)
    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Jul 2, 2022)

  • v0.11.0-beta.1(Jun 25, 2022)

  • v0.11.0-beta.0(Jun 21, 2022)

  • v0.11.0-alpha.2(Jun 17, 2022)

  • v0.11.0-alpha.0(Jun 10, 2022)

  • v0.10.0(Jun 5, 2022)

    v0.10.0 (2022-06-04)

    Features

    • Improve multiplexer ergonomics (#111)
    • Add mechanism to retain original CBOR (#110)
    • multiplexer: Allow fine-grained control of concurrency strategy (#106)
    • primitives: Add self-contained transaction struct (#107)

    Chore

    • deps: Upgrade to minicbor 0.17 (breaking changes) (#109)
    Source code(tar.gz)
    Source code(zip)
  • v0.9.1(Jun 10, 2022)

  • v0.9.0(Apr 30, 2022)

    v0.9.0 (2022-04-30)

    Docs

    • Add retroactive change log

    Continuous Integration

    • Skip publish confirmation prompt
    • Enable tag-based release workflow
    • Add draft version of the release workflow (#101)

    v0.9.0-alpha.1 (2022-04-29)

    Features

    • Implement Plutus Data hashing / JSON (#100)

    Bug Fixes

    • Use correct struct for metadatum labels (#96)
    • Update failing native script json test (#95)
    • primitives: Fix native scripts policy id (add missing tag) (#94)
    • primitives: Fix native scripts before/after type serialization (#93)

    Chore

    • Add unit test for native script hash (#98)
    • Move miniprotocol examples to custom crate (#97)

    v0.9.0-alpha.0 (2022-04-26)

    Features

    • primitives: Implement length-preserving uints (#92)
    • primitives: Implement canonical JSON serialization (#90)
    Source code(tar.gz)
    Source code(zip)
Owner
null
Marvin-Blockchain-Rust: A Rust-based blockchain implementation, part of the Marvin blockchain project.

Marvin Blockchain - Rust Implementation Welcome to the Rust implementation of the Marvin Blockchain. This project is part of a comparative study on bu

João Henrique Machado Silva 3 Sep 6, 2024
Cardano Command Line Interface (CLI) (Deprecated)

Deprecated Note: This repository implements supports for Cardano Byron, and will not be updated to works on Cardano Shelley and further. cardano-cli T

Input Output 87 Oct 9, 2022
Simple example for building a blockchain in Rust

rust-blockchain-example Simple example for building a blockchain in Rust Start using RUST_LOG=info cargo run This starts the client locally. The block

mario 51 Dec 31, 2022
rust-native-tls — Bindings for native TLS libraries

rust-native-tls Documentation An abstraction over platform-specific TLS implementations. Specifically, this crate uses SChannel on Windows (via the sc

Steven Fackler 371 Jan 8, 2023
Iterate over bitcoin blocks

Blocks iterator Iterates over Bitcoin blocks, decoding data inside Bitcoin Core's blocks directory. Features: Blocks are returned in height order, it

Riccardo Casatta 38 Nov 8, 2022
Common protocol for generating ZK proofs for blocks on different blockchains.

Proof Protocol Decoder A flexible protocol that clients (eg. full nodes) can use to easily generate block proofs for different chains. Specification I

Polygon Zero 3 Oct 5, 2023
A "Type 0" zkEVM. Prove validity of Ethereum blocks using RISC Zero's zkVM

zeth NEW: Zeth now supports Optimism blocks! Just pass in --network=optimism! Zeth is an open-source ZK block prover for Ethereum built on the RISC Ze

RISC Zero 222 Oct 26, 2023
Ethereum (and Ethereum like) indexer using P2P message to fetch blocks and transactions

Ethereum P2P indexer This project is an indexer for Ethereum and Ethereum forks. It takes advantage of the ETH (Ethereum Wire Protocol) to fetch block

null 5 Nov 10, 2023
The underlying cryptographic primitives for Manta Ecosystem

manta crypto The underlying cryptography that manta ecosystem relies on. It comes with the following traits: checksum: definitions for message digest.

Manta Network 10 Nov 10, 2021
The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canisters on IC,

Agent of Internet Computer for Unity The Intro The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canist

Shiku Labs 9 Nov 18, 2022
Simple, reliable, open-source contract verification built for an L2 centric Ethereum ecosystem

Cove This repo contains the backend verification1 code for Cove, a simple, reliable, open-source contract verification built for an L2 centric Ethereu

ScopeLift 12 Apr 1, 2023
flow-rust-sdk utilizes the Flow gRPC AccessAPI to make requests on the flow blockchain.

Welcome to the Flow-Rust-SDK! We're glad to have you here. There are a few important items that we should cover real quick before you dive in. Version

null 8 Jul 26, 2022
A Rust-based CustomVM for the Avalanche blockchain network

A rust-based Custom VM for Avalanche Subnets Curious about how to run Rust-based smart contracts, or just custom VMs for Avalanche blockchain? You're

Archis 11 Dec 29, 2022
A secure development tool box and fintech application made with Rust to be used for developing cryptocurrencies on the blockchain.

Crypto Fintech Tools for Rust (CFT) Dependencies Rust MacOS Homebrew # xcode cli tools xcode-select --install # install dependencies using Homebrew b

Phil Hills 1 Apr 15, 2022
Rust implementation of Namada, a sovereign proof-of-stake blockchain that enables asset-agnostic private transfers

Namada Overview Namada is a sovereign proof-of-stake blockchain, using Tendermint BFT consensus, that enables multi-asset private transfers for any na

anoma 144 Jan 2, 2023
Rust implementation of the Inter-Blockchain Communication (IBC) protocol.

ibc-rs Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts the ibc rust crate which defines the main data str

COSMOS 37 Dec 26, 2022
[Open Source] Blockchain Decentralized Lightweight VPN in Rust

[Open Source] Blockchain Decentralized Lightweight VPN in Rust DCVPN_Rust (Decentralized VPN in Rust) is an open-source initiative started by @anandgo

Anand Gokul 29 Jun 2, 2023
Demonstrating how to use Rust to interact with the Solana blockchain.

Solana Scripts This is a library of Rust scripts for specific purposes: Generate a new wallet Create an SPL token Mint an SPL token Get an associated

Rónán 40 May 28, 2023
A high performance blockchain kernel for enterprise users.

English | 简体中文 What is CITA CITA is a fast and scalable blockchain kernel for enterprises. CITA supports both native contract and EVM contract, by whi

CITAHub 1.3k Dec 22, 2022