Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump tonic-build from 0.8.4 to 0.11.0 #5231

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
338 changes: 223 additions & 115 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
diesel_derives = "2.1.4"
diesel-dynamic-schema = "0.2.1"
diesel_migrations = "2.1.0"
prost = "0.11.9"
prost-types = "0.11.9"
prost = "0.12.6"
prost-types = "0.12.6"
serde = { version = "1.0.126", features = ["rc"] }
serde_derive = "1.0.125"
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
serde_regex = "1.1.0"
serde_yaml = "0.9.21"
sqlparser = "0.46.0"
syn = { version = "2.0.65", features = ["full"] }
tonic = { version = "0.8.3", features = ["tls-roots", "gzip"] }
tonic-build = { version = "0.8.4", features = ["prost"] }
tonic = { version = "0.11.0", features = ["tls-roots", "gzip"] }
tonic-build = { version = "0.11.0", features = ["prost"] }
wasmtime = "15.0.1"
wasmparser = "0.118.1"
clap = { version = "4.5.4", features = ["derive", "env"] }
Expand Down
2 changes: 1 addition & 1 deletion chain/arweave/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl FirehoseMapperTrait<Chain> for FirehoseMapper {
logger: &Logger,
response: &firehose::Response,
) -> Result<BlockStreamEvent<Chain>, FirehoseError> {
let step = ForkStep::from_i32(response.step).unwrap_or_else(|| {
let step = ForkStep::try_from(response.step).unwrap_or_else(|_| {
panic!(
"unknown step i32 value {}, maybe you forgot update & re-regenerate the protobuf definitions?",
response.step
Expand Down
1 change: 1 addition & 0 deletions chain/arweave/src/protobuf/sf.arweave.r#type.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigInt {
Expand Down
3 changes: 2 additions & 1 deletion chain/cosmos/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use graph::blockchain::{BlockIngestor, NoopDecoderHook};
use graph::env::EnvVars;
use graph::prelude::MetricsRegistry;
use graph::substreams::Clock;
use std::convert::TryFrom;
use std::sync::Arc;

use graph::blockchain::block_stream::{BlockStreamError, BlockStreamMapper, FirehoseCursor};
Expand Down Expand Up @@ -381,7 +382,7 @@ impl FirehoseMapperTrait<Chain> for FirehoseMapper {
logger: &Logger,
response: &firehose::Response,
) -> Result<BlockStreamEvent<Chain>, FirehoseError> {
let step = ForkStep::from_i32(response.step).unwrap_or_else(|| {
let step = ForkStep::try_from(response.step).unwrap_or_else(|_| {
panic!(
"unknown step i32 value {}, maybe you forgot update & re-regenerate the protobuf definitions?",
response.step
Expand Down
1 change: 1 addition & 0 deletions chain/cosmos/src/protobuf/sf.cosmos.r#type.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[graph_runtime_derive::generate_asc_type(
__required__{header:Header,
result_begin_block:ResponseBeginBlock,
Expand Down
2 changes: 1 addition & 1 deletion chain/ethereum/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ impl FirehoseMapperTrait<Chain> for FirehoseMapper {
logger: &Logger,
response: &firehose::Response,
) -> Result<BlockStreamEvent<Chain>, FirehoseError> {
let step = ForkStep::from_i32(response.step).unwrap_or_else(|| {
let step = ForkStep::try_from(response.step).unwrap_or_else(|_| {
panic!(
"unknown step i32 value {}, maybe you forgot update & re-regenerate the protobuf definitions?",
response.step
Expand Down
21 changes: 11 additions & 10 deletions chain/ethereum/src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ impl TryInto<web3::types::Call> for Call {
.map_or_else(|| U256::from(0), |v| v.into()),
gas: U256::from(self.gas_limit),
input: Bytes::from(self.input.clone()),
call_type: CallType::from_i32(self.call_type)
.ok_or_else(|| format_err!("invalid call type: {}", self.call_type,))?
call_type: CallType::try_from(self.call_type)
.map_err(|_| graph::anyhow::anyhow!("invalid call type: {}", self.call_type))?
.into(),
})
}
Expand Down Expand Up @@ -300,13 +300,14 @@ impl TryInto<EthereumBlockWithCalls> for &Block {
match t.calls.len() {
0 => None,
_ => {
match CallType::from_i32(t.calls[0].call_type)
.ok_or_else(|| {
format_err!(
match CallType::try_from(t.calls[0].call_type).map_err(
|_| {
graph::anyhow::anyhow!(
"invalid call type: {}",
t.calls[0].call_type,
)
})? {
},
)? {
CallType::Create => {
Some(t.calls[0].address.try_decode_proto(
"transaction contract address",
Expand All @@ -322,9 +323,9 @@ impl TryInto<EthereumBlockWithCalls> for &Block {
.iter()
.map(|l| LogAt::new(l, self, t).try_into())
.collect::<Result<Vec<_>, Error>>()?,
status: TransactionTraceStatus::from_i32(t.status)
.ok_or_else(|| {
format_err!(
status: TransactionTraceStatus::try_from(t.status)
.map_err(|_| {
graph::anyhow::anyhow!(
"invalid transaction trace status: {}",
t.status
)
Expand Down Expand Up @@ -533,7 +534,7 @@ fn get_to_address(trace: &TransactionTrace) -> Result<Option<H160>, Error> {
// Try to detect contract creation transactions, which have no 'to' address
let is_contract_creation = trace.to.len() == 0
|| trace.calls.get(0).map_or(false, |call| {
CallType::from_i32(call.call_type)
CallType::try_from(call.call_type)
.map_or(false, |call_type| call_type == CallType::Create)
});

Expand Down
5 changes: 3 additions & 2 deletions chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
Expand Down Expand Up @@ -369,8 +370,8 @@ pub struct Log {
/// that emitted the log has been reverted by the chain.
///
/// Currently, there is two locations where a Log can be obtained:
/// - block.transaction_traces\[].receipt.logs[\]
/// - block.transaction_traces\[].calls[].logs[\]
/// - block.transaction_traces\[\].receipt.logs\[\]
/// - block.transaction_traces\[\].calls\[\].logs\[\]
///
/// In the `receipt` case, the logs will be populated only when the call
/// that emitted them has not been reverted by the chain and when in this
Expand Down
2 changes: 1 addition & 1 deletion chain/near/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ impl FirehoseMapperTrait<Chain> for FirehoseMapper {
logger: &Logger,
response: &firehose::Response,
) -> Result<BlockStreamEvent<Chain>, FirehoseError> {
let step = ForkStep::from_i32(response.step).unwrap_or_else(|| {
let step = ForkStep::try_from(response.step).unwrap_or_else(|_| {
panic!(
"unknown step i32 value {}, maybe you forgot update & re-regenerate the protobuf definitions?",
response.step
Expand Down
1 change: 1 addition & 0 deletions chain/near/src/protobuf/receipts.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockAndReceipts {
Expand Down
2 changes: 1 addition & 1 deletion chain/starknet/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl FirehoseMapperTrait<Chain> for FirehoseMapper {
logger: &Logger,
response: &firehose::Response,
) -> Result<BlockStreamEvent<Chain>, FirehoseError> {
let step = ForkStep::from_i32(response.step).unwrap_or_else(|| {
let step = ForkStep::try_from(response.step).unwrap_or_else(|_| {
panic!(
"unknown step i32 value {}, maybe you forgot update & re-regenerate the protobuf definitions?",
response.step
Expand Down
1 change: 1 addition & 0 deletions chain/starknet/src/protobuf/zklend.starknet.r#type.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
Expand Down
2 changes: 1 addition & 1 deletion chain/starknet/src/runtime/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl ToAscObj<AscTransaction> for codec::Transaction {
Ok(AscTransaction {
r#type: asc_new(
heap,
&codec::TransactionType::from_i32(self.r#type)
&codec::TransactionType::try_from(self.r#type)
.expect("invalid TransactionType value"),
gas,
)?,
Expand Down
1 change: 1 addition & 0 deletions chain/substreams/src/protobuf/substreams.entity.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityChanges {
Expand Down
2 changes: 1 addition & 1 deletion graph/src/blockchain/firehose_block_ingestor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ where
while let Some(message) = stream.next().await {
match message {
Ok(v) => {
let step = ForkStep::from_i32(v.step)
let step = ForkStep::try_from(v.step)
.expect("Fork step should always match to known value");

let result = match step {
Expand Down
1 change: 1 addition & 0 deletions graph/src/firehose/sf.cosmos.transform.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventTypeFilter {
Expand Down
1 change: 1 addition & 0 deletions graph/src/firehose/sf.ethereum.transform.v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
/// CombinedFilter is a combination of "LogFilters" and "CallToFilters"
///
/// It transforms the requested stream in two ways:
Expand Down
Loading
Loading