From b197c065129268e8d55bb624e689528b73c5ea1c Mon Sep 17 00:00:00 2001 From: Santiago Carmuega Date: Mon, 8 Aug 2022 18:46:13 -0300 Subject: [PATCH] chore(deps): Update Pallas to v0.13.1 --- Cargo.lock | 33 +++++++++++++++++---------------- Cargo.toml | 2 +- src/mapper/babbage.rs | 7 ++++++- src/mapper/collect.rs | 4 ++-- src/mapper/map.rs | 7 ++++++- 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf809db1..d054dbfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1612,9 +1612,9 @@ dependencies = [ [[package]] name = "pallas" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802148f029e497e8ad0a18dd7f2cc76ae13820dcbc5495c03880024bf6de429a" +checksum = "5711fa25deb586af47c041e6e472e74844f47f9c6971dbefc65db2c69f2b75d9" dependencies = [ "pallas-addresses", "pallas-codec", @@ -1627,9 +1627,9 @@ dependencies = [ [[package]] name = "pallas-addresses" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e12453402bfb583cf1a3dd446ad4501565b97dbacdd4ab92e2d550a18cf0d3e" +checksum = "e3f8d2673a5ec3c9182cb2f7e521385ae486a79162a832a27b9fffc2541d4e28" dependencies = [ "base58", "bech32 0.8.1", @@ -1641,18 +1641,18 @@ dependencies = [ [[package]] name = "pallas-codec" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a89a612dc4ab37fb2bd8b7a699834fe8e0aafc61ff63b6637d0d77d82f31cc3" +checksum = "86b2d0d289ff1934ccda25c7eebb3243aefe510f34c6f9d3159d6d67aa9c8b5f" dependencies = [ "minicbor", ] [[package]] name = "pallas-crypto" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6845888ac675c4cbef6fb9d8c2b33bb05e6a3e7a7cf8e9f8e8faed1422119d" +checksum = "07503c84c9d2632baee6e3d84f6a6cdd08ea6bb8bb415a8e51ae3e8b91581aba" dependencies = [ "cryptoxide", "hex", @@ -1663,9 +1663,9 @@ dependencies = [ [[package]] name = "pallas-miniprotocols" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a5fbaf41ef00894ffa592535e7c784cee463b449c4b89c136bb6d092b20458" +checksum = "8062c656dd9786babd5727d312701e620662118509432e072f74a5d5466c7778" dependencies = [ "hex", "itertools", @@ -1677,9 +1677,9 @@ dependencies = [ [[package]] name = "pallas-multiplexer" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf31e5a0c22c63622e3460330876f9190ebf49a280ac03bd83891e3884d18b" +checksum = "1beba6c206cc72135b504380f18fcfa503a421cf9677aa7eb60798504c3ea22b" dependencies = [ "byteorder 1.4.3", "hex", @@ -1691,9 +1691,9 @@ dependencies = [ [[package]] name = "pallas-primitives" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c703999adeb83e08cc406e70dc0c8036ff0974d172a785150edb05473961ef" +checksum = "ee88fa9dada5146c6851f69787175d76714ef81a150e1474cd212750f05eb062" dependencies = [ "base58", "bech32 0.9.0", @@ -1707,11 +1707,12 @@ dependencies = [ [[package]] name = "pallas-traverse" -version = "0.11.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f84c669596744b97384bfbaed7e222ff76f4ba2fe8939abc3a9335a8080b00b" +checksum = "34bf17f3f33e3483e96bee513a0796affe2223852a880b9a4f48b1a9bfbb9735" dependencies = [ "hex", + "pallas-addresses", "pallas-codec", "pallas-crypto", "pallas-primitives", diff --git a/Cargo.toml b/Cargo.toml index 61d2241c..ee06f0cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ authors = ["Santiago Carmuega "] [dependencies] -pallas = "0.11.0" +pallas = "0.13.1" # pallas = { git = "https://github.com/txpipe/pallas" } # pallas = { path = "../pallas/pallas" } hex = "0.4.3" diff --git a/src/mapper/babbage.rs b/src/mapper/babbage.rs index c623416f..5906043c 100644 --- a/src/mapper/babbage.rs +++ b/src/mapper/babbage.rs @@ -116,7 +116,12 @@ impl EventWriter { slot: source.header.header_body.slot, epoch: relative_epoch.map(|(epoch, _)| epoch), epoch_slot: relative_epoch.map(|(_, epoch_slot)| epoch_slot), - previous_hash: hex::encode(source.header.header_body.prev_hash), + previous_hash: source + .header + .header_body + .prev_hash + .map(hex::encode) + .unwrap_or_default(), cbor_hex: match self.config.include_block_cbor { true => hex::encode(cbor).into(), false => None, diff --git a/src/mapper/collect.rs b/src/mapper/collect.rs index b31140c7..68cbb875 100644 --- a/src/mapper/collect.rs +++ b/src/mapper/collect.rs @@ -6,7 +6,7 @@ use pallas::{ Redeemer, TransactionInput, VKeyWitness, Value, }, babbage::{ - LegacyTransacionOutput, PlutusV2Script, PostAlonzoTransactionOutput, TransactionOutput, + LegacyTransactionOutput, PlutusV2Script, PostAlonzoTransactionOutput, TransactionOutput, }, ToHash, }, @@ -33,7 +33,7 @@ impl EventWriter { pub fn collect_legacy_output_records( &self, - source: &[LegacyTransacionOutput], + source: &[LegacyTransactionOutput], ) -> Result, Error> { source .iter() diff --git a/src/mapper/map.rs b/src/mapper/map.rs index 9c5dc677..9322d905 100644 --- a/src/mapper/map.rs +++ b/src/mapper/map.rs @@ -469,7 +469,12 @@ impl EventWriter { slot: source.header.header_body.slot, epoch: relative_epoch.map(|(epoch, _)| epoch), epoch_slot: relative_epoch.map(|(_, epoch_slot)| epoch_slot), - previous_hash: hex::encode(source.header.header_body.prev_hash), + previous_hash: source + .header + .header_body + .prev_hash + .map(hex::encode) + .unwrap_or_default(), cbor_hex: match self.config.include_block_cbor { true => hex::encode(cbor).into(), false => None,