Skip to content

Commit

Permalink
Merge branch 'main' into fix/refactor-chain-follower
Browse files Browse the repository at this point in the history
  • Loading branch information
bkioshn authored Jan 9, 2025
2 parents 60c7237 + 6a00a8b commit f4717e7
Show file tree
Hide file tree
Showing 12 changed files with 1,306 additions and 16 deletions.
7 changes: 6 additions & 1 deletion rust/cardano-blockchain-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ workspace = true
pallas = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
pallas-crypto = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
# pallas-hardano = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" }
cbork-utils = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.11" }
catalyst-types = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "r20250108-00" }

ouroboros = "0.18.4"
tracing = "0.1.41"
Expand All @@ -33,4 +35,7 @@ dashmap = "6.1.0"
blake2b_simd = "1.0.2"
minicbor = { version = "0.25.1", features = ["alloc"] }
num-traits = "0.2.19"
ed25519-dalek = "2.1.1"
ed25519-dalek = "2.1.1"
serde = "1.0.210"
num-bigint = "0.4.6"
serde_json = "1.0.134"
6 changes: 3 additions & 3 deletions rust/cardano-blockchain-types/src/auxdata/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ impl TryFrom<&MultiEraBlock<'_>> for BlockAuxData {
for (txn_idx, metadata) in alonzo_block.auxiliary_data_set.iter() {
let mut d = minicbor::Decoder::new(metadata.raw_cbor());
let txn_aux_data = d.decode::<TransactionAuxData>()?;
aux_data.insert(TxnIndex::from_saturating(*txn_idx), txn_aux_data);
aux_data.insert((*txn_idx).into(), txn_aux_data);
}
} else if let Some(babbage_block) = block.as_babbage() {
for (txn_idx, metadata) in babbage_block.auxiliary_data_set.iter() {
let mut d = minicbor::Decoder::new(metadata.raw_cbor());
let txn_aux_data = d.decode::<TransactionAuxData>()?;
aux_data.insert(TxnIndex::from_saturating(*txn_idx), txn_aux_data);
aux_data.insert((*txn_idx).into(), txn_aux_data);
}
} else if let Some(conway_block) = block.as_conway() {
for (txn_idx, metadata) in conway_block.auxiliary_data_set.iter() {
let mut d = minicbor::Decoder::new(metadata.raw_cbor());
let txn_aux_data = d.decode::<TransactionAuxData>()?;
aux_data.insert(TxnIndex::from_saturating(*txn_idx), txn_aux_data);
aux_data.insert((*txn_idx).into(), txn_aux_data);
}
} else {
bail!("Undecodable metadata, unknown Era");
Expand Down
2 changes: 2 additions & 0 deletions rust/cardano-blockchain-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mod auxdata;
pub mod conversion;
mod fork;
pub mod hashes;
mod metadata;
mod multi_era_block_data;
mod network;
mod point;
Expand All @@ -20,6 +21,7 @@ pub use auxdata::{
scripts::{Script, ScriptArray, ScriptType, TransactionScripts},
};
pub use fork::Fork;
pub use metadata::cip36::{voting_pk::VotingPubKey, Cip36};
pub use multi_era_block_data::MultiEraBlock;
pub use network::Network;
pub use point::Point;
Expand Down
Loading

0 comments on commit f4717e7

Please sign in to comment.