Skip to content

Commit

Permalink
feat(rust/immutable-ledger): block encoding decoding and validation (#67
Browse files Browse the repository at this point in the history
)

* feat(decode and encode block header): wip

barebones

* feat(block decoding): wip

* feat(validators): block signatures

* feat(validators): block signatures

* feat(validators): block signatures

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* ci(pr name): housekeeping

* ci(pr name): housekeeping

* ci(pr name): housekeeping

* ci(pr name): housekeeping

* ci(pr name): housekeeping

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* feat(block validation): ledger

* ci(lints): fix

* ci(lints): fix

* ci(lints): fix

* ci(lints): fix

* ci(lints): fix

* ci(lints): fix

* refactor(encode block): simpler api

* refactor(encode block): simpler api

* refactor(encode block): simpler api

* refactor(encode block): simpler api

* refactor(add block types and cddl tests): verifcation and refactor

* refactor(add block types and cddl tests): verifcation and refactor

* refactor(add block types and cddl tests): verifcation and refactor

* refactor(rm redundant test): test

* refactor(deny.toml): rustsec

* refactor(deny.toml): rustsec

* refactor(deny.toml): rustsec

* Update rust/immutable-ledger/src/serialize.rs

Co-authored-by: Alex Pozhylenkov <[email protected]>

* Update rust/immutable-ledger/src/serialize.rs

Co-authored-by: Alex Pozhylenkov <[email protected]>

* refactor(agnostic signing algo and proptest): generic

* refactor(agnostic signing algo and proptest): generic

* refactor(agnostic signing algo and proptest): generic

* refactor(agnostic signing algo and proptest): generic

* refactor(agnostic signing algo and proptest): generic

* ci

---------

Co-authored-by: Alex Pozhylenkov <[email protected]>
Co-authored-by: Oleksandr Prokhorenko <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent 575a153 commit 405f07a
Show file tree
Hide file tree
Showing 10 changed files with 954 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/semantic_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
rust/c509-certificate
rust/cardano-chain-follower
rust/catalyst-voting
rust/immutable-ledger
rust/vote-tx-v1
rust/vote-tx-v2
rust/cbork
Expand Down
1 change: 1 addition & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ VERSION 0.8
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.23 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.23 AS cspell-ci


FROM debian:stable-slim

# check-markdown : markdown check using catalyst-ci.
Expand Down
1 change: 1 addition & 0 deletions docs/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.23 AS docs-ci


IMPORT .. AS repo

# Copy all the source we need to build the docs
Expand Down
2 changes: 2 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ members = [
"cbork-abnf-parser",
"cbork-cddl-parser",
"catalyst-voting",
"catalyst-voting",
"immutable-ledger",
"vote-tx-v1",
"vote-tx-v2",
]
Expand Down
4 changes: 2 additions & 2 deletions rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY_SRC:
catalyst-voting vote-tx-v1 vote-tx-v2 \
cbork cbork-abnf-parser cbork-cddl-parser \
hermes-ipfs \
.
immutable-ledger .

# builder : Set up our target toolchains, and copy our files.
builder:
Expand Down Expand Up @@ -90,4 +90,4 @@ check-builder-src-cache:
# local-ci-run: This step simulates the full CI run for local purposes only.
local-ci-run:
BUILD +check
BUILD +build
BUILD +build
1 change: 1 addition & 0 deletions rust/c509-certificate/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.23 AS rust-ci


IMPORT .. AS rust-local
IMPORT ../.. AS repo

Expand Down
1 change: 1 addition & 0 deletions rust/cbork/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.23 AS rust-ci


IMPORT .. AS rust-local

# Run build using the most efficient host tooling
Expand Down
33 changes: 33 additions & 0 deletions rust/immutable-ledger/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "immutable-ledger"
version = "0.1.0"
edition.workspace = true
authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
ed25519-dalek = "2.1.1"
anyhow = "1.0.86"
minicbor = { version = "0.24", features = ["std"] }
uuid = { version = "1.10.0", features = ["v4", "serde"] }
ulid = { version = "1.1.3", features = ["serde", "uuid"] }
hex = "0.4.3"
blake2b_simd = "1.0.2"
blake3 = "=0.1.3"
proptest = { version = "1.5.0" }

[package.metadata.cargo-machete]
ignored = ["proptest"]



[lints]
workspace = true


[dev-dependencies]
test-strategy = "0.4.0"


8 changes: 8 additions & 0 deletions rust/immutable-ledger/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! Block Serialization
//!
//! Facilitates block serialization and validation for immutable ledger
//!
//! Spec: `<https://input-output-hk.github.io/catalyst-voices/architecture/08_concepts/immutable_ledger/ledger>`
/// Block encoding decoding and validation
pub mod serialize;
Loading

0 comments on commit 405f07a

Please sign in to comment.