Skip to content
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
683 changes: 369 additions & 314 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ license = "MIT OR Apache-2.0"
[workspace.dependencies]
anyhow = "1.0"
async-graphql = { version = "7.0.15", features = ["chrono", "uuid"] }
async-graphql-axum = "7.0.11"
axum = "0.7.5"
bs58 = "0.5.1"
async-graphql-axum = "7.0.15"
axum = "0.8.1"
chrono = "0.4.38"
bs58 = "0.5.1"
clap = { version = "4.5.4", features = ["derive", "env"] }
derivative = "2.2.0"
diesel = { version = "2.2.4", features = [
Expand All @@ -68,8 +68,8 @@ graphman = { path = "./core/graphman" }
graphman-store = { path = "./core/graphman_store" }
itertools = "0.13.0"
lazy_static = "1.5.0"
prost = "0.12.6"
prost-types = "0.12.6"
prost = "0.13"
prost-types = "0.13"
regex = "1.5.4"
reqwest = "0.12.5"
serde = { version = "1.0.126", features = ["rc"] }
Expand All @@ -87,11 +87,14 @@ syn = { version = "2.0.87", features = ["full"] }
test-store = { path = "./store/test-store" }
thiserror = "1.0.25"
tokio = { version = "1.38.0", features = ["full"] }
tonic = { version = "0.11.0", features = ["tls-roots", "gzip"] }
tonic-build = { version = "0.11.0", features = ["prost"] }
tonic = { version = "0.12.3", features = ["tls-roots", "gzip"] }
tonic-build = { version = "0.12.3", features = ["prost"] }
tower-http = { version = "0.5.2", features = ["cors"] }
wasmparser = "0.118.1"
wasmtime = "15.0.1"
substreams = "=0.6.0"
substreams-entity-change = "2"
substreams-near-core = "=0.10.2"

# Incremental compilation on Rust 1.58 causes an ICE on build. As soon as graph node builds again, these can be removed.
[profile.test]
Expand Down
2 changes: 1 addition & 1 deletion chain/arweave/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ fn main() {
println!("cargo:rerun-if-changed=proto");
tonic_build::configure()
.out_dir("src/protobuf")
.compile(&["proto/arweave.proto"], &["proto"])
.compile_protos(&["proto/arweave.proto"], &["proto"])
.expect("Failed to compile Firehose Arweave proto(s)");
}
5 changes: 0 additions & 5 deletions chain/arweave/src/protobuf/sf.arweave.r#type.v1.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigInt {
#[prost(bytes = "vec", tag = "1")]
pub bytes: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
/// Firehose block version (unrelated to Arweave block version)
Expand Down Expand Up @@ -75,7 +73,6 @@ pub struct Block {
pub poa: ::core::option::Option<ProofOfAccess>,
}
/// A succinct proof of access to a recall byte found in a TX
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProofOfAccess {
/// The recall byte option chosen; global offset of index byte
Expand All @@ -94,7 +91,6 @@ pub struct ProofOfAccess {
#[prost(bytes = "vec", tag = "4")]
pub chunk: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transaction {
/// 1 or 2 for v1 or v2 transactions. More allowable in the future
Expand Down Expand Up @@ -137,7 +133,6 @@ pub struct Transaction {
#[prost(message, optional, tag = "12")]
pub reward: ::core::option::Option<BigInt>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tag {
#[prost(bytes = "vec", tag = "1")]
Expand Down
2 changes: 1 addition & 1 deletion chain/ethereum/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ fn main() {

tonic_build::configure()
.out_dir("src/protobuf")
.compile(&["proto/ethereum.proto"], &["proto"])
.compile_protos(&["proto/ethereum.proto"], &["proto"])
.expect("Failed to compile Firehose Ethereum proto(s)");
}
122 changes: 51 additions & 71 deletions chain/ethereum/src/protobuf/sf.ethereum.r#type.v2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
#[prost(int32, tag = "1")]
Expand Down Expand Up @@ -32,7 +31,6 @@ pub struct Block {
///
/// WARN: this is a client-side optimization pattern and should be moved in the
/// consuming code.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeaderOnlyBlock {
#[prost(message, optional, tag = "5")]
Expand All @@ -41,7 +39,6 @@ pub struct HeaderOnlyBlock {
/// BlockWithRefs is a lightweight block, with traces and transactions
/// purged from the `block` within, and only. It is used in transports
/// to pass block data around.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockWithRefs {
#[prost(string, tag = "1")]
Expand All @@ -53,27 +50,23 @@ pub struct BlockWithRefs {
#[prost(bool, tag = "4")]
pub irreversible: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionRefs {
#[prost(bytes = "vec", repeated, tag = "1")]
pub hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnclesHeaders {
#[prost(message, repeated, tag = "1")]
pub uncles: ::prost::alloc::vec::Vec<BlockHeader>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockRef {
#[prost(bytes = "vec", tag = "1")]
pub hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "2")]
pub number: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockHeader {
#[prost(bytes = "vec", tag = "1")]
Expand Down Expand Up @@ -163,13 +156,11 @@ pub struct BlockHeader {
#[prost(message, optional, tag = "18")]
pub base_fee_per_gas: ::core::option::Option<BigInt>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigInt {
#[prost(bytes = "vec", tag = "1")]
pub bytes: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionTrace {
/// consensus
Expand Down Expand Up @@ -290,9 +281,9 @@ pub mod transaction_trace {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::TrxTypeLegacy => "TRX_TYPE_LEGACY",
Type::TrxTypeAccessList => "TRX_TYPE_ACCESS_LIST",
Type::TrxTypeDynamicFee => "TRX_TYPE_DYNAMIC_FEE",
Self::TrxTypeLegacy => "TRX_TYPE_LEGACY",
Self::TrxTypeAccessList => "TRX_TYPE_ACCESS_LIST",
Self::TrxTypeDynamicFee => "TRX_TYPE_DYNAMIC_FEE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -308,7 +299,6 @@ pub mod transaction_trace {
}
/// AccessTuple represents a list of storage keys for a given contract's address and is used
/// for AccessList construction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessTuple {
#[prost(bytes = "vec", tag = "1")]
Expand All @@ -317,15 +307,13 @@ pub struct AccessTuple {
pub storage_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// TransactionTraceWithBlockRef
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionTraceWithBlockRef {
#[prost(message, optional, tag = "1")]
pub trace: ::core::option::Option<TransactionTrace>,
#[prost(message, optional, tag = "2")]
pub block_ref: ::core::option::Option<BlockRef>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionReceipt {
/// State root is an intermediate state_root hash, computed in-between transactions to make
Expand All @@ -350,7 +338,6 @@ pub struct TransactionReceipt {
#[prost(message, repeated, tag = "4")]
pub logs: ::prost::alloc::vec::Vec<Log>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Log {
#[prost(bytes = "vec", tag = "1")]
Expand Down Expand Up @@ -384,7 +371,6 @@ pub struct Log {
#[prost(uint64, tag = "7")]
pub ordinal: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Call {
#[prost(uint32, tag = "1")]
Expand Down Expand Up @@ -477,7 +463,6 @@ pub struct Call {
#[prost(message, repeated, tag = "33")]
pub account_creations: ::prost::alloc::vec::Vec<AccountCreation>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageChange {
#[prost(bytes = "vec", tag = "1")]
Expand All @@ -491,7 +476,6 @@ pub struct StorageChange {
#[prost(uint64, tag = "5")]
pub ordinal: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BalanceChange {
#[prost(bytes = "vec", tag = "1")]
Expand Down Expand Up @@ -550,22 +534,22 @@ pub mod balance_change {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Reason::Unknown => "REASON_UNKNOWN",
Reason::RewardMineUncle => "REASON_REWARD_MINE_UNCLE",
Reason::RewardMineBlock => "REASON_REWARD_MINE_BLOCK",
Reason::DaoRefundContract => "REASON_DAO_REFUND_CONTRACT",
Reason::DaoAdjustBalance => "REASON_DAO_ADJUST_BALANCE",
Reason::Transfer => "REASON_TRANSFER",
Reason::GenesisBalance => "REASON_GENESIS_BALANCE",
Reason::GasBuy => "REASON_GAS_BUY",
Reason::RewardTransactionFee => "REASON_REWARD_TRANSACTION_FEE",
Reason::RewardFeeReset => "REASON_REWARD_FEE_RESET",
Reason::GasRefund => "REASON_GAS_REFUND",
Reason::TouchAccount => "REASON_TOUCH_ACCOUNT",
Reason::SuicideRefund => "REASON_SUICIDE_REFUND",
Reason::SuicideWithdraw => "REASON_SUICIDE_WITHDRAW",
Reason::CallBalanceOverride => "REASON_CALL_BALANCE_OVERRIDE",
Reason::Burn => "REASON_BURN",
Self::Unknown => "REASON_UNKNOWN",
Self::RewardMineUncle => "REASON_REWARD_MINE_UNCLE",
Self::RewardMineBlock => "REASON_REWARD_MINE_BLOCK",
Self::DaoRefundContract => "REASON_DAO_REFUND_CONTRACT",
Self::DaoAdjustBalance => "REASON_DAO_ADJUST_BALANCE",
Self::Transfer => "REASON_TRANSFER",
Self::GenesisBalance => "REASON_GENESIS_BALANCE",
Self::GasBuy => "REASON_GAS_BUY",
Self::RewardTransactionFee => "REASON_REWARD_TRANSACTION_FEE",
Self::RewardFeeReset => "REASON_REWARD_FEE_RESET",
Self::GasRefund => "REASON_GAS_REFUND",
Self::TouchAccount => "REASON_TOUCH_ACCOUNT",
Self::SuicideRefund => "REASON_SUICIDE_REFUND",
Self::SuicideWithdraw => "REASON_SUICIDE_WITHDRAW",
Self::CallBalanceOverride => "REASON_CALL_BALANCE_OVERRIDE",
Self::Burn => "REASON_BURN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -592,7 +576,6 @@ pub mod balance_change {
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NonceChange {
#[prost(bytes = "vec", tag = "1")]
Expand All @@ -604,15 +587,13 @@ pub struct NonceChange {
#[prost(uint64, tag = "4")]
pub ordinal: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountCreation {
#[prost(bytes = "vec", tag = "1")]
pub account: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "2")]
pub ordinal: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodeChange {
#[prost(bytes = "vec", tag = "1")]
Expand All @@ -634,8 +615,7 @@ pub struct CodeChange {
///
/// Hence, we only index some of them, those that are costly like all the calls
/// one, log events, return data, etc.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GasChange {
#[prost(uint64, tag = "1")]
pub old_value: u64,
Expand Down Expand Up @@ -696,27 +676,27 @@ pub mod gas_change {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Reason::Unknown => "REASON_UNKNOWN",
Reason::Call => "REASON_CALL",
Reason::CallCode => "REASON_CALL_CODE",
Reason::CallDataCopy => "REASON_CALL_DATA_COPY",
Reason::CodeCopy => "REASON_CODE_COPY",
Reason::CodeStorage => "REASON_CODE_STORAGE",
Reason::ContractCreation => "REASON_CONTRACT_CREATION",
Reason::ContractCreation2 => "REASON_CONTRACT_CREATION2",
Reason::DelegateCall => "REASON_DELEGATE_CALL",
Reason::EventLog => "REASON_EVENT_LOG",
Reason::ExtCodeCopy => "REASON_EXT_CODE_COPY",
Reason::FailedExecution => "REASON_FAILED_EXECUTION",
Reason::IntrinsicGas => "REASON_INTRINSIC_GAS",
Reason::PrecompiledContract => "REASON_PRECOMPILED_CONTRACT",
Reason::RefundAfterExecution => "REASON_REFUND_AFTER_EXECUTION",
Reason::Return => "REASON_RETURN",
Reason::ReturnDataCopy => "REASON_RETURN_DATA_COPY",
Reason::Revert => "REASON_REVERT",
Reason::SelfDestruct => "REASON_SELF_DESTRUCT",
Reason::StaticCall => "REASON_STATIC_CALL",
Reason::StateColdAccess => "REASON_STATE_COLD_ACCESS",
Self::Unknown => "REASON_UNKNOWN",
Self::Call => "REASON_CALL",
Self::CallCode => "REASON_CALL_CODE",
Self::CallDataCopy => "REASON_CALL_DATA_COPY",
Self::CodeCopy => "REASON_CODE_COPY",
Self::CodeStorage => "REASON_CODE_STORAGE",
Self::ContractCreation => "REASON_CONTRACT_CREATION",
Self::ContractCreation2 => "REASON_CONTRACT_CREATION2",
Self::DelegateCall => "REASON_DELEGATE_CALL",
Self::EventLog => "REASON_EVENT_LOG",
Self::ExtCodeCopy => "REASON_EXT_CODE_COPY",
Self::FailedExecution => "REASON_FAILED_EXECUTION",
Self::IntrinsicGas => "REASON_INTRINSIC_GAS",
Self::PrecompiledContract => "REASON_PRECOMPILED_CONTRACT",
Self::RefundAfterExecution => "REASON_REFUND_AFTER_EXECUTION",
Self::Return => "REASON_RETURN",
Self::ReturnDataCopy => "REASON_RETURN_DATA_COPY",
Self::Revert => "REASON_REVERT",
Self::SelfDestruct => "REASON_SELF_DESTRUCT",
Self::StaticCall => "REASON_STATIC_CALL",
Self::StateColdAccess => "REASON_STATE_COLD_ACCESS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -763,10 +743,10 @@ impl TransactionTraceStatus {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
TransactionTraceStatus::Unknown => "UNKNOWN",
TransactionTraceStatus::Succeeded => "SUCCEEDED",
TransactionTraceStatus::Failed => "FAILED",
TransactionTraceStatus::Reverted => "REVERTED",
Self::Unknown => "UNKNOWN",
Self::Succeeded => "SUCCEEDED",
Self::Failed => "FAILED",
Self::Reverted => "REVERTED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down Expand Up @@ -799,12 +779,12 @@ impl CallType {
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
CallType::Unspecified => "UNSPECIFIED",
CallType::Call => "CALL",
CallType::Callcode => "CALLCODE",
CallType::Delegate => "DELEGATE",
CallType::Static => "STATIC",
CallType::Create => "CREATE",
Self::Unspecified => "UNSPECIFIED",
Self::Call => "CALL",
Self::Callcode => "CALLCODE",
Self::Delegate => "DELEGATE",
Self::Static => "STATIC",
Self::Create => "CREATE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand Down
2 changes: 1 addition & 1 deletion chain/near/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fn main() {
tonic_build::configure()
.out_dir("src/protobuf")
.extern_path(".sf.near.codec.v1", "crate::codec::pbcodec")
.compile(
.compile_protos(
&["proto/near.proto", "proto/substreams-triggers.proto"],
&["proto"],
)
Expand Down
1 change: 0 additions & 1 deletion chain/near/src/protobuf/receipts.v1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockAndReceipts {
#[prost(message, optional, tag = "1")]
Expand Down
Loading
Loading