Skip to content

Commit dc6168f

Browse files
authored
feat: make v1 compatible with Conway era (#807)
1 parent 5bf6b83 commit dc6168f

19 files changed

+905
-226
lines changed

Cargo.lock

+79-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+10-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ authors = ["Santiago Carmuega <[email protected]>"]
1212

1313

1414
[dependencies]
15-
pallas = "0.18.2"
15+
pallas-multiplexer = "0.18.2"
16+
pallas-miniprotocols = "0.18.2"
17+
pallas-primitives = "0.29.0"
18+
pallas-traverse = "0.29.0"
19+
pallas-addresses = "0.29.0"
20+
pallas-codec = "0.29.0"
21+
pallas-crypto = "0.29.0"
1622
# pallas = { git = "https://github.com/txpipe/pallas" }
1723
# pallas = { path = "../pallas/pallas" }
1824
hex = "0.4.3"
@@ -30,6 +36,7 @@ strum = "0.24"
3036
strum_macros = "0.24"
3137
prometheus_exporter = { version = "0.8.5", default-features = false }
3238
unicode-truncate = "0.2.0"
39+
time = "0.3.36"
3340

3441
# feature logs
3542
file-rotate = { version = "0.7.1", optional = true }
@@ -63,7 +70,7 @@ redis = { version = "0.21.6", optional = true, features = ["tokio-comp"] }
6370

6471
# features: gcp
6572

66-
google-cloud-gax = {version ="0.17.0", optional = true }
73+
google-cloud-gax = { version = "0.17.0", optional = true }
6774
google-cloud-pubsub = { version = "0.23.0", optional = true }
6875
google-cloud-googleapis = { version = "0.12.0", optional = true }
6976

@@ -80,5 +87,5 @@ elasticsink = ["elasticsearch", "tokio"]
8087
fingerprint = ["murmur3"]
8188
aws = ["aws-config", "aws-sdk-sqs", "aws-sdk-lambda", "aws-sdk-s3", "tokio"]
8289
redissink = ["redis", "tokio"]
83-
gcp = ["google-cloud-pubsub", "google-cloud-googleapis", "tokio", "web" ,"google-cloud-gax"]
90+
gcp = ["google-cloud-pubsub", "google-cloud-googleapis", "tokio", "web", "google-cloud-gax"]
8491
rabbitmqsink = ["lapin", "tokio"]

src/mapper/babbage.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use pallas::codec::utils::KeepRaw;
1+
use pallas_codec::utils::KeepRaw;
22

3-
use pallas::ledger::primitives::babbage::{
3+
use pallas_primitives::babbage::{
44
AuxiliaryData, MintedBlock, MintedDatumOption, MintedPostAlonzoTransactionOutput,
55
MintedTransactionBody, MintedTransactionOutput, MintedWitnessSet, NetworkId,
66
};
77

8-
use pallas::crypto::hash::Hash;
9-
use pallas::ledger::traverse::OriginalHash;
8+
use pallas_crypto::hash::Hash;
9+
use pallas_traverse::OriginalHash;
1010

1111
use crate::model::{BlockRecord, Era, TransactionRecord};
1212
use crate::utils::time::TimeProvider;
@@ -199,7 +199,7 @@ impl EventWriter {
199199
let record = self.to_post_alonzo_output_record(output)?;
200200
self.append(record.into())?;
201201

202-
let address = pallas::ledger::addresses::Address::from_bytes(&output.address)?;
202+
let address = pallas_addresses::Address::from_bytes(&output.address)?;
203203

204204
let child = &self.child_writer(EventContext {
205205
output_address: address.to_string().into(),
@@ -389,7 +389,7 @@ impl EventWriter {
389389
/// Entry-point to start crawling a blocks for events. Meant to be used when
390390
/// we haven't decoded the CBOR yet (for example, N2N).
391391
pub fn crawl_from_babbage_cbor(&self, cbor: &[u8]) -> Result<(), Error> {
392-
let (_, block): (u16, MintedBlock) = pallas::codec::minicbor::decode(cbor)?;
392+
let (_, block): (u16, MintedBlock) = pallas_codec::minicbor::decode(cbor)?;
393393
self.crawl_babbage_with_cbor(&block, cbor)
394394
}
395395
}

0 commit comments

Comments
 (0)