Skip to content

Commit

Permalink
feat: make v1 compatible with Conway era
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Aug 3, 2024
1 parent 5bf6b83 commit 09ae5ad
Show file tree
Hide file tree
Showing 18 changed files with 890 additions and 219 deletions.
99 changes: 66 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ authors = ["Santiago Carmuega <[email protected]>"]


[dependencies]
pallas = "0.18.2"
pallas-multiplexer = "0.18.2"
pallas-miniprotocols = "0.18.2"
pallas-primitives = "0.29.0"
pallas-traverse = "0.29.0"
pallas-addresses = "0.29.0"
pallas-codec = "0.29.0"
pallas-crypto = "0.29.0"
# pallas = { git = "https://github.com/txpipe/pallas" }
# pallas = { path = "../pallas/pallas" }
hex = "0.4.3"
Expand Down Expand Up @@ -63,7 +69,7 @@ redis = { version = "0.21.6", optional = true, features = ["tokio-comp"] }

# features: gcp

google-cloud-gax = {version ="0.17.0", optional = true }
google-cloud-gax = { version = "0.17.0", optional = true }
google-cloud-pubsub = { version = "0.23.0", optional = true }
google-cloud-googleapis = { version = "0.12.0", optional = true }

Expand All @@ -80,5 +86,5 @@ elasticsink = ["elasticsearch", "tokio"]
fingerprint = ["murmur3"]
aws = ["aws-config", "aws-sdk-sqs", "aws-sdk-lambda", "aws-sdk-s3", "tokio"]
redissink = ["redis", "tokio"]
gcp = ["google-cloud-pubsub", "google-cloud-googleapis", "tokio", "web" ,"google-cloud-gax"]
gcp = ["google-cloud-pubsub", "google-cloud-googleapis", "tokio", "web", "google-cloud-gax"]
rabbitmqsink = ["lapin", "tokio"]
12 changes: 6 additions & 6 deletions src/mapper/babbage.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use pallas::codec::utils::KeepRaw;
use pallas_codec::utils::KeepRaw;

use pallas::ledger::primitives::babbage::{
use pallas_primitives::babbage::{
AuxiliaryData, MintedBlock, MintedDatumOption, MintedPostAlonzoTransactionOutput,
MintedTransactionBody, MintedTransactionOutput, MintedWitnessSet, NetworkId,
};

use pallas::crypto::hash::Hash;
use pallas::ledger::traverse::OriginalHash;
use pallas_crypto::hash::Hash;
use pallas_traverse::OriginalHash;

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

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

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

0 comments on commit 09ae5ad

Please sign in to comment.