From f96b9b39648e5dca627ac0154a75c7610a56eaaa Mon Sep 17 00:00:00 2001 From: ozwaldorf Date: Thu, 23 Mar 2023 18:21:46 -0400 Subject: [PATCH 1/4] fix: fvm ipld encoding version selection --- Cargo.toml | 4 ++-- crates/ursa-index-provider/src/provider.rs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5abe628c..bee6536b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ bytes = "1.3.0" clap = { version = "4.0.29", features = ["derive"] } console-subscriber = "0.1.8" ctrlc = "3.2.4" -db = { package = "forest_db", git = "https://github.com/ChainSafe/forest", features = ["rocksdb"] } +db = { package = "forest_db", git = "https://github.com/ChainSafe/forest", rev = "3e682310482718182cb2495fbaec5e575e5884e5", features = ["rocksdb"] } dirs = "4" dotenv = "0.15.0" ethers = { git = "https://github.com/gakonst/ethers-rs" } @@ -49,7 +49,7 @@ futures = "0.3.25" futures-util = "0.3.25" fvm_ipld_blockstore = "0.1" fvm_ipld_car = "0.6" -fvm_ipld_encoding = "=0.3.2" +fvm_ipld_encoding = "0.3.3" geoutils = "0.5" graphsync = { git = "https://github.com/kckeiks/rs-graphsync.git", rev = "b8728c7ad02aa42cc11954192e95875f14fc6380" } hyper = { version = "0.14.23", features = ["full"] } diff --git a/crates/ursa-index-provider/src/provider.rs b/crates/ursa-index-provider/src/provider.rs index 87c4cc28..493fcef3 100644 --- a/crates/ursa-index-provider/src/provider.rs +++ b/crates/ursa-index-provider/src/provider.rs @@ -9,6 +9,7 @@ use axum::{ response::{IntoResponse, Response}, }; use fvm_ipld_blockstore::Blockstore; +#[allow(deprecated)] use fvm_ipld_encoding::Cbor; use libipld::{codec::Encode, multihash::Code, Cid}; use libipld_cbor::DagCborCodec; @@ -183,6 +184,7 @@ where }; info!("Announcing the advertisement with the message {message:?}"); + #[allow(deprecated)] Ok(message.marshal_cbor().unwrap()) } else { Err(anyhow!("No head found for announcement!")) @@ -198,6 +200,7 @@ pub struct Message { pub ExtraData: [u8; 0], } +#[allow(deprecated)] impl Cbor for Message { fn marshal_cbor(&self) -> Result, fvm_ipld_encoding::Error> { const MESSAGE_BUFFER_LENGTH: [u8; 1] = [131]; From eca3b8831040a590ff73d0729e19bfed31e5bde8 Mon Sep 17 00:00:00 2001 From: ozwaldorf Date: Thu, 23 Mar 2023 18:28:19 -0400 Subject: [PATCH 2/4] chore: pin ethers-rs to a git revision to avoid possible breaking changes --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index bee6536b..35bdc2a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ ctrlc = "3.2.4" db = { package = "forest_db", git = "https://github.com/ChainSafe/forest", rev = "3e682310482718182cb2495fbaec5e575e5884e5", features = ["rocksdb"] } dirs = "4" dotenv = "0.15.0" -ethers = { git = "https://github.com/gakonst/ethers-rs" } +ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "16f9fab75cb43e2d9e4c2b74b68afde7577f0e2f" } integer-encoding = "3.0.4" ipld_traversal = { git = "https://github.com/kckeiks/rs-graphsync.git", rev = "b8728c7ad02aa42cc11954192e95875f14fc6380" } fastmurmur3 = "0.1.2" From 1aa05bb2fe75d5b833fa71d503cf30a3557e2b0b Mon Sep 17 00:00:00 2001 From: ozwaldorf Date: Thu, 23 Mar 2023 19:23:56 -0400 Subject: [PATCH 3/4] fix: use workspace dependency for ethers in ursa-app --- crates/ursa-application/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ursa-application/Cargo.toml b/crates/ursa-application/Cargo.toml index f50a99b0..86c4c51b 100644 --- a/crates/ursa-application/Cargo.toml +++ b/crates/ursa-application/Cargo.toml @@ -19,9 +19,9 @@ toml.workspace = true tracing.workspace = true tracing-subscriber.workspace = true tracing-error.workspace = true +ethers.workspace = true abci-rs = { version = "0.11.3", features = ["async-api"] } -ethers = { git = "https://github.com/gakonst/ethers-rs" } revm = { version = "3.0.0", features = [ "serde", ] } From 868e624e0e0e9425a603aaca1a740e457a7d58dc Mon Sep 17 00:00:00 2001 From: ozwaldorf Date: Fri, 24 Mar 2023 10:39:01 -0400 Subject: [PATCH 4/4] Update Cargo.toml Co-authored-by: daltoncoder <71679972+daltoncoder@users.noreply.github.com> --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 35bdc2a2..feee2489 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ ctrlc = "3.2.4" db = { package = "forest_db", git = "https://github.com/ChainSafe/forest", rev = "3e682310482718182cb2495fbaec5e575e5884e5", features = ["rocksdb"] } dirs = "4" dotenv = "0.15.0" -ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "16f9fab75cb43e2d9e4c2b74b68afde7577f0e2f" } +ethers = "1.0.2" integer-encoding = "3.0.4" ipld_traversal = { git = "https://github.com/kckeiks/rs-graphsync.git", rev = "b8728c7ad02aa42cc11954192e95875f14fc6380" } fastmurmur3 = "0.1.2"