diff --git a/Cargo.toml b/Cargo.toml index ac691dd..d00f841 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,13 +16,12 @@ version = "0.0.0" [workspace.dependencies] substreams = "0.6" -substreams-database-change = "2" substreams-ethereum = "0.10" substreams-antelope = "0.6" substreams-solana = "0.14" substreams-cosmos = "0.2" +substreams-bitcoin = "2.0" prost = "0.13" prost-types = "0.13" serde_json = "1.0" -substreams-bitcoin = "2.0" # substreams-near = "0.9" diff --git a/blocks/beacon/Cargo.toml b/blocks/beacon/Cargo.toml index 12ae20d..59a1eef 100644 --- a/blocks/beacon/Cargo.toml +++ b/blocks/beacon/Cargo.toml @@ -9,7 +9,6 @@ crate-type = ["cdylib"] [dependencies] common = { path = "../../common" } substreams-ethereum = { workspace = true } -substreams-database-change = { workspace = true } substreams = { workspace = true } prost = { workspace = true } prost-types = { workspace = true } diff --git a/blocks/beacon/Makefile b/blocks/beacon/Makefile index f502dbf..46fd8f4 100644 --- a/blocks/beacon/Makefile +++ b/blocks/beacon/Makefile @@ -1,29 +1,17 @@ .PHONY: all all: make build - make pack - make graph - make info .PHONY: build build: cargo build --target wasm32-unknown-unknown --release - -.PHONY: pack -pack: substreams pack - -.PHONY: graph -graph: substreams graph - -.PHONY: info -info: substreams info .PHONY: protogen protogen: - substreams protogen --exclude-paths google + substreams protogen .PHONY: parquet parquet: diff --git a/blocks/beacon/proto/beacon.rawblocks.proto b/blocks/beacon/proto/beacon.rawblocks.proto deleted file mode 100644 index f0aa117..0000000 --- a/blocks/beacon/proto/beacon.rawblocks.proto +++ /dev/null @@ -1,194 +0,0 @@ -syntax = "proto3"; - -package beacon.rawblocks; - -import "google/protobuf/timestamp.proto"; - -message Events { - repeated Block blocks = 1; - repeated Blob blobs = 2; - repeated Deposit deposits = 3; - repeated Withdrawal withdrawals = 4; - repeated Attestation attestations = 5; - repeated AttesterSlashing attester_slashings = 6; - repeated BlsToExecutionChange bls_to_execution_changes = 7; - repeated ProposerSlashing proposer_slashings = 8; - repeated VoluntaryExit voluntary_exits = 9; -} - - -message Block { - // clock - google.protobuf.Timestamp time = 1; - uint64 number = 2; - string date = 3; - string hash = 4; - - // block - uint32 version = 5; - string spec = 6; - uint64 slot = 7; - uint64 parent_slot = 8; - string root = 9; - string parent_root = 10; - string state_root = 11; - uint64 proposer_index = 12; - string body_root = 13; - string signature = 14; -} - -message Blob { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // blob - uint64 index = 5; - string blob = 6; - string kzg_commitment = 7; - string kzg_proof = 8; - // csv string for now but should be array(text) once supported - string kzg_commitment_inclusion_proof = 9; -} - -message Deposit { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // deposit - uint64 index = 5; - // csv string for now but should be array(text) once supported - string proof = 6; - string pubkey = 7; - string withdrawal_credentials = 8; - string signature = 9; - uint64 gwei = 10; -} - -message Withdrawal { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // withdrawal - uint64 withdrawal_index = 5; - uint64 validator_index = 6; - string address = 7; - uint64 gwei = 8; -} - -message Attestation { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // attestation - uint64 index = 5; - string aggregation_bits = 6; - uint64 slot = 7; - uint64 committee_index = 8; - string beacon_block_root = 9; - uint64 source_epoch = 10; - string source_root = 11; - uint64 target_epoch = 12; - string target_root = 13; - string signature = 14; -} - -message AttesterSlashing { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // attester slashing - uint64 index = 5; - - // attestation 1 - string attestation_1_attesting_indices = 6; - uint64 attestation_1_slot = 7; - uint64 attestation_1_committee_index = 8; - string attestation_1_beacon_block_root = 9; - uint64 attestation_1_source_epoch = 10; - string attestation_1_source_root = 11; - uint64 attestation_1_target_epoch = 12; - string attestation_1_target_root = 13; - string attestation_1_signature = 14; - - // attestation 2 - string attestation_2_attesting_indices = 15; - uint64 attestation_2_slot = 16; - uint64 attestation_2_committee_index = 17; - string attestation_2_beacon_block_root = 18; - uint64 attestation_2_source_epoch = 19; - string attestation_2_source_root = 20; - uint64 attestation_2_target_epoch = 21; - string attestation_2_target_root = 22; - string attestation_2_signature = 23; -} - -message BlsToExecutionChange { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // bls to execution change - uint64 index = 5; - uint64 validator_index = 6; - string from_bls_pubkey = 7; - string to_execution_address = 8; - string signature = 9; -} - -message ProposerSlashing { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // proposer slashing - uint64 index = 5; - - // signed header 1 - uint64 signed_header_1_slot = 6; - uint64 signed_header_1_proposer_index = 7; - string signed_header_1_parent_root = 8; - string signed_header_1_state_root = 9; - string signed_header_1_body_root = 10; - string signed_header_1_signature = 11; - - // signed header 2 - uint64 signed_header_2_slot = 12; - uint64 signed_header_2_proposer_index = 13; - string signed_header_2_parent_root = 14; - string signed_header_2_state_root = 15; - string signed_header_2_body_root = 16; - string signed_header_2_signature = 17; -} - -message VoluntaryExit { - // clock - google.protobuf.Timestamp block_time = 1; - uint64 block_number = 2; - string block_date = 3; - string block_hash = 4; - - // voluntary exit - uint64 index = 5; - uint64 epoch = 6; - uint64 validator_index = 7; - string signature = 8; -} diff --git a/blocks/beacon/src/pb/beacon.rawblocks.rs b/blocks/beacon/src/pb/beacon.rawblocks.rs deleted file mode 100644 index 88437ab..0000000 --- a/blocks/beacon/src/pb/beacon.rawblocks.rs +++ /dev/null @@ -1,309 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Events { - #[prost(message, repeated, tag="1")] - pub blocks: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="2")] - pub blobs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="3")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub withdrawals: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub attestations: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub attester_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="7")] - pub bls_to_execution_changes: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub proposer_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="9")] - pub voluntary_exits: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Block { - /// clock - #[prost(message, optional, tag="1")] - pub time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub number: u64, - #[prost(string, tag="3")] - pub date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub hash: ::prost::alloc::string::String, - /// block - #[prost(uint32, tag="5")] - pub version: u32, - #[prost(string, tag="6")] - pub spec: ::prost::alloc::string::String, - #[prost(uint64, tag="7")] - pub slot: u64, - #[prost(uint64, tag="8")] - pub parent_slot: u64, - #[prost(string, tag="9")] - pub root: ::prost::alloc::string::String, - #[prost(string, tag="10")] - pub parent_root: ::prost::alloc::string::String, - #[prost(string, tag="11")] - pub state_root: ::prost::alloc::string::String, - #[prost(uint64, tag="12")] - pub proposer_index: u64, - #[prost(string, tag="13")] - pub body_root: ::prost::alloc::string::String, - #[prost(string, tag="14")] - pub signature: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Blob { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// blob - #[prost(uint64, tag="5")] - pub index: u64, - #[prost(string, tag="6")] - pub blob: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub kzg_commitment: ::prost::alloc::string::String, - #[prost(string, tag="8")] - pub kzg_proof: ::prost::alloc::string::String, - /// csv string for now but should be array(text) once supported - #[prost(string, tag="9")] - pub kzg_commitment_inclusion_proof: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Deposit { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// deposit - #[prost(uint64, tag="5")] - pub index: u64, - /// csv string for now but should be array(text) once supported - #[prost(string, tag="6")] - pub proof: ::prost::alloc::string::String, - #[prost(string, tag="7")] - pub pubkey: ::prost::alloc::string::String, - #[prost(string, tag="8")] - pub withdrawal_credentials: ::prost::alloc::string::String, - #[prost(string, tag="9")] - pub signature: ::prost::alloc::string::String, - #[prost(uint64, tag="10")] - pub gwei: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Withdrawal { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// withdrawal - #[prost(uint64, tag="5")] - pub withdrawal_index: u64, - #[prost(uint64, tag="6")] - pub validator_index: u64, - #[prost(string, tag="7")] - pub address: ::prost::alloc::string::String, - #[prost(uint64, tag="8")] - pub gwei: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Attestation { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// attestation - #[prost(uint64, tag="5")] - pub index: u64, - #[prost(string, tag="6")] - pub aggregation_bits: ::prost::alloc::string::String, - #[prost(uint64, tag="7")] - pub slot: u64, - #[prost(uint64, tag="8")] - pub committee_index: u64, - #[prost(string, tag="9")] - pub beacon_block_root: ::prost::alloc::string::String, - #[prost(uint64, tag="10")] - pub source_epoch: u64, - #[prost(string, tag="11")] - pub source_root: ::prost::alloc::string::String, - #[prost(uint64, tag="12")] - pub target_epoch: u64, - #[prost(string, tag="13")] - pub target_root: ::prost::alloc::string::String, - #[prost(string, tag="14")] - pub signature: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttesterSlashing { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// attester slashing - #[prost(uint64, tag="5")] - pub index: u64, - /// attestation 1 - #[prost(string, tag="6")] - pub attestation_1_attesting_indices: ::prost::alloc::string::String, - #[prost(uint64, tag="7")] - pub attestation_1_slot: u64, - #[prost(uint64, tag="8")] - pub attestation_1_committee_index: u64, - #[prost(string, tag="9")] - pub attestation_1_beacon_block_root: ::prost::alloc::string::String, - #[prost(uint64, tag="10")] - pub attestation_1_source_epoch: u64, - #[prost(string, tag="11")] - pub attestation_1_source_root: ::prost::alloc::string::String, - #[prost(uint64, tag="12")] - pub attestation_1_target_epoch: u64, - #[prost(string, tag="13")] - pub attestation_1_target_root: ::prost::alloc::string::String, - #[prost(string, tag="14")] - pub attestation_1_signature: ::prost::alloc::string::String, - /// attestation 2 - #[prost(string, tag="15")] - pub attestation_2_attesting_indices: ::prost::alloc::string::String, - #[prost(uint64, tag="16")] - pub attestation_2_slot: u64, - #[prost(uint64, tag="17")] - pub attestation_2_committee_index: u64, - #[prost(string, tag="18")] - pub attestation_2_beacon_block_root: ::prost::alloc::string::String, - #[prost(uint64, tag="19")] - pub attestation_2_source_epoch: u64, - #[prost(string, tag="20")] - pub attestation_2_source_root: ::prost::alloc::string::String, - #[prost(uint64, tag="21")] - pub attestation_2_target_epoch: u64, - #[prost(string, tag="22")] - pub attestation_2_target_root: ::prost::alloc::string::String, - #[prost(string, tag="23")] - pub attestation_2_signature: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlsToExecutionChange { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// bls to execution change - #[prost(uint64, tag="5")] - pub index: u64, - #[prost(uint64, tag="6")] - pub validator_index: u64, - #[prost(string, tag="7")] - pub from_bls_pubkey: ::prost::alloc::string::String, - #[prost(string, tag="8")] - pub to_execution_address: ::prost::alloc::string::String, - #[prost(string, tag="9")] - pub signature: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ProposerSlashing { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// proposer slashing - #[prost(uint64, tag="5")] - pub index: u64, - /// signed header 1 - #[prost(uint64, tag="6")] - pub signed_header_1_slot: u64, - #[prost(uint64, tag="7")] - pub signed_header_1_proposer_index: u64, - #[prost(string, tag="8")] - pub signed_header_1_parent_root: ::prost::alloc::string::String, - #[prost(string, tag="9")] - pub signed_header_1_state_root: ::prost::alloc::string::String, - #[prost(string, tag="10")] - pub signed_header_1_body_root: ::prost::alloc::string::String, - #[prost(string, tag="11")] - pub signed_header_1_signature: ::prost::alloc::string::String, - /// signed header 2 - #[prost(uint64, tag="12")] - pub signed_header_2_slot: u64, - #[prost(uint64, tag="13")] - pub signed_header_2_proposer_index: u64, - #[prost(string, tag="14")] - pub signed_header_2_parent_root: ::prost::alloc::string::String, - #[prost(string, tag="15")] - pub signed_header_2_state_root: ::prost::alloc::string::String, - #[prost(string, tag="16")] - pub signed_header_2_body_root: ::prost::alloc::string::String, - #[prost(string, tag="17")] - pub signed_header_2_signature: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VoluntaryExit { - /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, - #[prost(uint64, tag="2")] - pub block_number: u64, - #[prost(string, tag="3")] - pub block_date: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub block_hash: ::prost::alloc::string::String, - /// voluntary exit - #[prost(uint64, tag="5")] - pub index: u64, - #[prost(uint64, tag="6")] - pub epoch: u64, - #[prost(uint64, tag="7")] - pub validator_index: u64, - #[prost(string, tag="8")] - pub signature: ::prost::alloc::string::String, -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/src/pb/mod.rs b/blocks/beacon/src/pb/mod.rs index 1d73c48..1ca33d6 100644 --- a/blocks/beacon/src/pb/mod.rs +++ b/blocks/beacon/src/pb/mod.rs @@ -1,50 +1,10 @@ // @generated -// @@protoc_insertion_point(attribute:beacon) -pub mod beacon { - include!("beacon.rs"); - // @@protoc_insertion_point(beacon) -} -pub mod sf { +pub mod pinax { pub mod beacon { - pub mod r#type { - // @@protoc_insertion_point(attribute:sf.beacon.type.v1) - pub mod v1 { - include!("sf.beacon.type.v1.rs"); - // @@protoc_insertion_point(sf.beacon.type.v1) - } - } - } - // @@protoc_insertion_point(attribute:sf.substreams) - pub mod substreams { - include!("sf.substreams.rs"); - // @@protoc_insertion_point(sf.substreams) - pub mod index { - // @@protoc_insertion_point(attribute:sf.substreams.index.v1) - pub mod v1 { - include!("sf.substreams.index.v1.rs"); - // @@protoc_insertion_point(sf.substreams.index.v1) - } - } - pub mod rpc { - // @@protoc_insertion_point(attribute:sf.substreams.rpc.v2) - pub mod v2 { - include!("sf.substreams.rpc.v2.rs"); - // @@protoc_insertion_point(sf.substreams.rpc.v2) - } - } - pub mod sink { - pub mod service { - // @@protoc_insertion_point(attribute:sf.substreams.sink.service.v1) - pub mod v1 { - include!("sf.substreams.sink.service.v1.rs"); - // @@protoc_insertion_point(sf.substreams.sink.service.v1) - } - } - } - // @@protoc_insertion_point(attribute:sf.substreams.v1) + // @@protoc_insertion_point(attribute:pinax.beacon.v1) pub mod v1 { - include!("sf.substreams.v1.rs"); - // @@protoc_insertion_point(sf.substreams.v1) + include!("pinax.beacon.v1.rs"); + // @@protoc_insertion_point(pinax.beacon.v1) } } } diff --git a/blocks/beacon/src/pb/beacon.rs b/blocks/beacon/src/pb/pinax.beacon.v1.rs similarity index 79% rename from blocks/beacon/src/pb/beacon.rs rename to blocks/beacon/src/pb/pinax.beacon.v1.rs index ee8405f..1bb2155 100644 --- a/blocks/beacon/src/pb/beacon.rs +++ b/blocks/beacon/src/pb/pinax.beacon.v1.rs @@ -77,7 +77,6 @@ pub struct Blob { pub kzg_commitment: ::prost::alloc::string::String, #[prost(string, tag="8")] pub kzg_proof: ::prost::alloc::string::String, - /// csv string for now but should be array(text) once supported #[prost(string, repeated, tag="9")] pub kzg_commitment_inclusion_proof: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } @@ -96,7 +95,6 @@ pub struct Deposit { /// deposit #[prost(uint64, tag="5")] pub index: u64, - /// csv string for now but should be array(text) once supported #[prost(string, repeated, tag="6")] pub proof: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, tag="7")] @@ -179,44 +177,25 @@ pub struct AttesterSlashing { /// attester slashing #[prost(uint64, tag="5")] pub index: u64, - /// attestation 1 + /// attestation #[prost(string, tag="6")] - pub attestation_1_attesting_indices: ::prost::alloc::string::String, + pub attestation_attesting_indices: ::prost::alloc::string::String, #[prost(uint64, tag="7")] - pub attestation_1_slot: u64, + pub attestation_slot: u64, #[prost(uint64, tag="8")] - pub attestation_1_committee_index: u64, + pub attestation_committee_index: u64, #[prost(string, tag="9")] - pub attestation_1_beacon_block_root: ::prost::alloc::string::String, + pub attestation_beacon_block_root: ::prost::alloc::string::String, #[prost(uint64, tag="10")] - pub attestation_1_source_epoch: u64, + pub attestation_source_epoch: u64, #[prost(string, tag="11")] - pub attestation_1_source_root: ::prost::alloc::string::String, + pub attestation_source_root: ::prost::alloc::string::String, #[prost(uint64, tag="12")] - pub attestation_1_target_epoch: u64, + pub attestation_target_epoch: u64, #[prost(string, tag="13")] - pub attestation_1_target_root: ::prost::alloc::string::String, + pub attestation_target_root: ::prost::alloc::string::String, #[prost(string, tag="14")] - pub attestation_1_signature: ::prost::alloc::string::String, - /// attestation 2 - #[prost(string, tag="15")] - pub attestation_2_attesting_indices: ::prost::alloc::string::String, - #[prost(uint64, tag="16")] - pub attestation_2_slot: u64, - #[prost(uint64, tag="17")] - pub attestation_2_committee_index: u64, - #[prost(string, tag="18")] - pub attestation_2_beacon_block_root: ::prost::alloc::string::String, - #[prost(uint64, tag="19")] - pub attestation_2_source_epoch: u64, - #[prost(string, tag="20")] - pub attestation_2_source_root: ::prost::alloc::string::String, - #[prost(uint64, tag="21")] - pub attestation_2_target_epoch: u64, - #[prost(string, tag="22")] - pub attestation_2_target_root: ::prost::alloc::string::String, - #[prost(string, tag="23")] - pub attestation_2_signature: ::prost::alloc::string::String, + pub attestation_signature: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -257,32 +236,19 @@ pub struct ProposerSlashing { /// proposer slashing #[prost(uint64, tag="5")] pub index: u64, - /// signed header 1 + /// signed header #[prost(uint64, tag="6")] - pub signed_header_1_slot: u64, + pub signed_header_slot: u64, #[prost(uint64, tag="7")] - pub signed_header_1_proposer_index: u64, + pub signed_header_proposer_index: u64, #[prost(string, tag="8")] - pub signed_header_1_parent_root: ::prost::alloc::string::String, + pub signed_header_parent_root: ::prost::alloc::string::String, #[prost(string, tag="9")] - pub signed_header_1_state_root: ::prost::alloc::string::String, + pub signed_header_state_root: ::prost::alloc::string::String, #[prost(string, tag="10")] - pub signed_header_1_body_root: ::prost::alloc::string::String, + pub signed_header_body_root: ::prost::alloc::string::String, #[prost(string, tag="11")] - pub signed_header_1_signature: ::prost::alloc::string::String, - /// signed header 2 - #[prost(uint64, tag="12")] - pub signed_header_2_slot: u64, - #[prost(uint64, tag="13")] - pub signed_header_2_proposer_index: u64, - #[prost(string, tag="14")] - pub signed_header_2_parent_root: ::prost::alloc::string::String, - #[prost(string, tag="15")] - pub signed_header_2_state_root: ::prost::alloc::string::String, - #[prost(string, tag="16")] - pub signed_header_2_body_root: ::prost::alloc::string::String, - #[prost(string, tag="17")] - pub signed_header_2_signature: ::prost::alloc::string::String, + pub signed_header_signature: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/blocks/beacon/src/pb/sf.beacon.type.v1.rs b/blocks/beacon/src/pb/sf.beacon.type.v1.rs deleted file mode 100644 index d9d399e..0000000 --- a/blocks/beacon/src/pb/sf.beacon.type.v1.rs +++ /dev/null @@ -1,488 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Block { - #[prost(uint32, tag="1")] - pub version: u32, - #[prost(enumeration="Spec", tag="2")] - pub spec: i32, - #[prost(uint64, tag="3")] - pub slot: u64, - #[prost(uint64, tag="4")] - pub parent_slot: u64, - #[prost(bytes="vec", tag="5")] - pub root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="6")] - pub parent_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="7")] - pub state_root: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="8")] - pub proposer_index: u64, - #[prost(bytes="vec", tag="9")] - pub body_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="30")] - pub signature: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="31")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(oneof="block::Body", tags="20, 21, 22, 23, 24")] - pub body: ::core::option::Option, -} -/// Nested message and enum types in `Block`. -pub mod block { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Body { - #[prost(message, tag="20")] - Phase0(super::Phase0Body), - #[prost(message, tag="21")] - Altair(super::AltairBody), - #[prost(message, tag="22")] - Bellatrix(super::BellatrixBody), - #[prost(message, tag="23")] - Capella(super::CapellaBody), - #[prost(message, tag="24")] - Deneb(super::DenebBody), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Phase0Body { - #[prost(bytes="vec", tag="1")] - pub rando_reveal: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub eth1_data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub graffiti: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub proposer_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub attester_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub attestations: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="7")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub voluntary_exits: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AltairBody { - #[prost(bytes="vec", tag="1")] - pub rando_reveal: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub eth1_data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub graffiti: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub proposer_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub attester_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub attestations: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="7")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub voluntary_exits: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="9")] - pub sync_aggregate: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BellatrixBody { - #[prost(bytes="vec", tag="1")] - pub rando_reveal: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub eth1_data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub graffiti: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub proposer_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub attester_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub attestations: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="7")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub voluntary_exits: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="9")] - pub sync_aggregate: ::core::option::Option, - #[prost(message, optional, tag="10")] - pub execution_payload: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CapellaBody { - #[prost(bytes="vec", tag="1")] - pub rando_reveal: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub eth1_data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub graffiti: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub proposer_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub attester_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub attestations: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="7")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub voluntary_exits: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="9")] - pub sync_aggregate: ::core::option::Option, - #[prost(message, optional, tag="10")] - pub execution_payload: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenebBody { - #[prost(bytes="vec", tag="1")] - pub rando_reveal: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub eth1_data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub graffiti: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="4")] - pub proposer_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="5")] - pub attester_slashings: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="6")] - pub attestations: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="7")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub voluntary_exits: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="9")] - pub sync_aggregate: ::core::option::Option, - #[prost(message, optional, tag="10")] - pub execution_payload: ::core::option::Option, - #[prost(message, repeated, tag="11")] - pub bls_to_execution_changes: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", repeated, tag="12")] - pub blob_kzg_commitments: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, repeated, tag="20")] - pub embedded_blobs: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Eth1Data { - #[prost(bytes="vec", tag="1")] - pub deposit_root: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="2")] - pub deposit_count: u64, - #[prost(bytes="vec", tag="3")] - pub block_hash: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ProposerSlashing { - #[prost(message, optional, tag="1")] - pub signed_header_1: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub signed_header_2: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttesterSlashing { - #[prost(message, optional, tag="1")] - pub attestation_1: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub attestation_2: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Attestation { - #[prost(bytes="vec", tag="1")] - pub aggregation_bits: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Deposit { - #[prost(bytes="vec", repeated, tag="1")] - pub proof: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignedVoluntaryExit { - #[prost(message, optional, tag="1")] - pub message: ::core::option::Option, - #[prost(bytes="vec", tag="2")] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SyncAggregate { - #[prost(bytes="vec", tag="1")] - pub sync_commitee_bits: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="2")] - pub sync_comittee_signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BellatrixExecutionPayload { - #[prost(bytes="vec", tag="1")] - pub parent_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="2")] - pub fee_recipient: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub state_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="4")] - pub receipts_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="5")] - pub logs_bloom: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="6")] - pub prev_randao: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="7")] - pub block_number: u64, - #[prost(uint64, tag="8")] - pub gas_limit: u64, - #[prost(uint64, tag="9")] - pub gas_used: u64, - #[prost(message, optional, tag="10")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(bytes="vec", tag="11")] - pub extra_data: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="12")] - pub base_fee_per_gas: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="13")] - pub block_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", repeated, tag="14")] - pub transactions: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CapellaExecutionPayload { - #[prost(bytes="vec", tag="1")] - pub parent_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="2")] - pub fee_recipient: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub state_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="4")] - pub receipts_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="5")] - pub logs_bloom: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="6")] - pub prev_randao: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="7")] - pub block_number: u64, - #[prost(uint64, tag="8")] - pub gas_limit: u64, - #[prost(uint64, tag="9")] - pub gas_used: u64, - #[prost(message, optional, tag="10")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(bytes="vec", tag="11")] - pub extra_data: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="12")] - pub base_fee_per_gas: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="13")] - pub block_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", repeated, tag="14")] - pub transactions: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, repeated, tag="15")] - pub withdrawals: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenebExecutionPayload { - #[prost(bytes="vec", tag="1")] - pub parent_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="2")] - pub fee_recipient: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub state_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="4")] - pub receipts_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="5")] - pub logs_bloom: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="6")] - pub prev_randao: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="7")] - pub block_number: u64, - #[prost(uint64, tag="8")] - pub gas_limit: u64, - #[prost(uint64, tag="9")] - pub gas_used: u64, - #[prost(message, optional, tag="10")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, - #[prost(bytes="vec", tag="11")] - pub extra_data: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="12")] - pub base_fee_per_gas: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="13")] - pub block_hash: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", repeated, tag="14")] - pub transactions: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, repeated, tag="15")] - pub withdrawals: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="16")] - pub blob_gas_used: u64, - #[prost(uint64, tag="17")] - pub excess_blob_gas: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignedBlsToExecutionChange { - #[prost(message, optional, tag="1")] - pub message: ::core::option::Option, - #[prost(bytes="vec", tag="2")] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlsToExecutionChange { - #[prost(uint64, tag="1")] - pub validator_index: u64, - #[prost(bytes="vec", tag="2")] - pub from_bls_pub_key: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub to_execution_address: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Withdrawal { - #[prost(uint64, tag="1")] - pub withdrawal_index: u64, - #[prost(uint64, tag="2")] - pub validator_index: u64, - #[prost(bytes="vec", tag="3")] - pub address: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="4")] - pub gwei: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct VoluntaryExit { - #[prost(uint64, tag="1")] - pub epoch: u64, - #[prost(uint64, tag="2")] - pub validator_index: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DepositData { - #[prost(bytes="vec", tag="1")] - pub public_key: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="2")] - pub withdrawal_credentials: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="3")] - pub gwei: u64, - #[prost(bytes="vec", tag="4")] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct IndexedAttestation { - #[prost(uint64, repeated, tag="1")] - pub attesting_indices: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="2")] - pub data: ::core::option::Option, - #[prost(bytes="vec", tag="3")] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AttestationData { - #[prost(uint64, tag="1")] - pub slot: u64, - #[prost(uint64, tag="2")] - pub committee_index: u64, - #[prost(bytes="vec", tag="3")] - pub beacon_block_root: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="4")] - pub source: ::core::option::Option, - #[prost(message, optional, tag="5")] - pub target: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Checkpoint { - #[prost(uint64, tag="1")] - pub epoch: u64, - #[prost(bytes="vec", tag="2")] - pub root: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignedBeaconBlockHeader { - #[prost(message, optional, tag="1")] - pub message: ::core::option::Option, - #[prost(bytes="vec", tag="2")] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BeaconBlockHeader { - #[prost(uint64, tag="1")] - pub slot: u64, - #[prost(uint64, tag="2")] - pub proposer_index: u64, - #[prost(bytes="vec", tag="3")] - pub parent_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="4")] - pub state_root: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="5")] - pub body_root: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Blob { - #[prost(uint64, tag="1")] - pub index: u64, - #[prost(bytes="vec", tag="2")] - pub blob: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="3")] - pub kzg_commitment: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="4")] - pub kzg_proof: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", repeated, tag="5")] - pub kzg_commitment_inclusion_proof: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum Spec { - Unspecified = 0, - Phase0 = 1, - Altair = 2, - Bellatrix = 3, - Capella = 4, - Deneb = 5, -} -impl Spec { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Spec::Unspecified => "UNSPECIFIED", - Spec::Phase0 => "PHASE0", - Spec::Altair => "ALTAIR", - Spec::Bellatrix => "BELLATRIX", - Spec::Capella => "CAPELLA", - Spec::Deneb => "DENEB", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNSPECIFIED" => Some(Self::Unspecified), - "PHASE0" => Some(Self::Phase0), - "ALTAIR" => Some(Self::Altair), - "BELLATRIX" => Some(Self::Bellatrix), - "CAPELLA" => Some(Self::Capella), - "DENEB" => Some(Self::Deneb), - _ => None, - } - } -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/src/pb/sf.substreams.index.v1.rs b/blocks/beacon/src/pb/sf.substreams.index.v1.rs deleted file mode 100644 index 6f309bb..0000000 --- a/blocks/beacon/src/pb/sf.substreams.index.v1.rs +++ /dev/null @@ -1,9 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Keys { - #[prost(string, repeated, tag="1")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/src/pb/sf.substreams.rpc.v2.rs b/blocks/beacon/src/pb/sf.substreams.rpc.v2.rs deleted file mode 100644 index ab38ad2..0000000 --- a/blocks/beacon/src/pb/sf.substreams.rpc.v2.rs +++ /dev/null @@ -1,341 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Request { - #[prost(int64, tag="1")] - pub start_block_num: i64, - #[prost(string, tag="2")] - pub start_cursor: ::prost::alloc::string::String, - #[prost(uint64, tag="3")] - pub stop_block_num: u64, - /// With final_block_only, you only receive blocks that are irreversible: - /// 'final_block_height' will be equal to current block and no 'undo_signal' will ever be sent - #[prost(bool, tag="4")] - pub final_blocks_only: bool, - /// Substreams has two mode when executing your module(s) either development mode or production - /// mode. Development and production modes impact the execution of Substreams, important aspects - /// of execution include: - /// * The time required to reach the first byte. - /// * The speed that large ranges get executed. - /// * The module logs and outputs sent back to the client. - /// - /// By default, the engine runs in developer mode, with richer and deeper output. Differences - /// between production and development modes include: - /// * Forward parallel execution is enabled in production mode and disabled in development mode - /// * The time required to reach the first byte in development mode is faster than in production mode. - /// - /// Specific attributes of development mode include: - /// * The client will receive all of the executed module's logs. - /// * It's possible to request specific store snapshots in the execution tree (via `debug_initial_store_snapshot_for_modules`). - /// * Multiple module's output is possible. - /// - /// With production mode`, however, you trade off functionality for high speed enabling forward - /// parallel execution of module ahead of time. - #[prost(bool, tag="5")] - pub production_mode: bool, - #[prost(string, tag="6")] - pub output_module: ::prost::alloc::string::String, - #[prost(message, optional, tag="7")] - pub modules: ::core::option::Option, - /// Available only in developer mode - #[prost(string, repeated, tag="10")] - pub debug_initial_store_snapshot_for_modules: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Response { - #[prost(oneof="response::Message", tags="1, 2, 3, 4, 5, 10, 11")] - pub message: ::core::option::Option, -} -/// Nested message and enum types in `Response`. -pub mod response { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Message { - /// Always sent first - #[prost(message, tag="1")] - Session(super::SessionInit), - /// Progress of data preparation, before sending in the stream of `data` events. - #[prost(message, tag="2")] - Progress(super::ModulesProgress), - #[prost(message, tag="3")] - BlockScopedData(super::BlockScopedData), - #[prost(message, tag="4")] - BlockUndoSignal(super::BlockUndoSignal), - #[prost(message, tag="5")] - FatalError(super::Error), - /// Available only in developer mode, and only if `debug_initial_store_snapshot_for_modules` is set. - #[prost(message, tag="10")] - DebugSnapshotData(super::InitialSnapshotData), - /// Available only in developer mode, and only if `debug_initial_store_snapshot_for_modules` is set. - #[prost(message, tag="11")] - DebugSnapshotComplete(super::InitialSnapshotComplete), - } -} -/// BlockUndoSignal informs you that every bit of data -/// with a block number above 'last_valid_block' has been reverted -/// on-chain. Delete that data and restart from 'last_valid_cursor' -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockUndoSignal { - #[prost(message, optional, tag="1")] - pub last_valid_block: ::core::option::Option, - #[prost(string, tag="2")] - pub last_valid_cursor: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockScopedData { - #[prost(message, optional, tag="1")] - pub output: ::core::option::Option, - #[prost(message, optional, tag="2")] - pub clock: ::core::option::Option, - #[prost(string, tag="3")] - pub cursor: ::prost::alloc::string::String, - /// Non-deterministic, allows substreams-sink to let go of their undo data. - #[prost(uint64, tag="4")] - pub final_block_height: u64, - #[prost(message, repeated, tag="10")] - pub debug_map_outputs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="11")] - pub debug_store_outputs: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SessionInit { - #[prost(string, tag="1")] - pub trace_id: ::prost::alloc::string::String, - #[prost(uint64, tag="2")] - pub resolved_start_block: u64, - #[prost(uint64, tag="3")] - pub linear_handoff_block: u64, - #[prost(uint64, tag="4")] - pub max_parallel_workers: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InitialSnapshotComplete { - #[prost(string, tag="1")] - pub cursor: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InitialSnapshotData { - #[prost(string, tag="1")] - pub module_name: ::prost::alloc::string::String, - #[prost(message, repeated, tag="2")] - pub deltas: ::prost::alloc::vec::Vec, - #[prost(uint64, tag="4")] - pub sent_keys: u64, - #[prost(uint64, tag="3")] - pub total_keys: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MapModuleOutput { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub map_output: ::core::option::Option<::prost_types::Any>, - /// DebugOutputInfo is available in non-production mode only - #[prost(message, optional, tag="10")] - pub debug_info: ::core::option::Option, -} -/// StoreModuleOutput are produced for store modules in development mode. -/// It is not possible to retrieve store models in production, with parallelization -/// enabled. If you need the deltas directly, write a pass through mapper module -/// that will get them down to you. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreModuleOutput { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(message, repeated, tag="2")] - pub debug_store_deltas: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="10")] - pub debug_info: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct OutputDebugInfo { - #[prost(string, repeated, tag="1")] - pub logs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// LogsTruncated is a flag that tells you if you received all the logs or if they - /// were truncated because you logged too much (fixed limit currently is set to 128 KiB). - #[prost(bool, tag="2")] - pub logs_truncated: bool, - #[prost(bool, tag="3")] - pub cached: bool, -} -/// ModulesProgress is a message that is sent every 500ms -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModulesProgress { - /// List of jobs running on tier2 servers - #[prost(message, repeated, tag="2")] - pub running_jobs: ::prost::alloc::vec::Vec, - /// Execution statistics for each module - #[prost(message, repeated, tag="3")] - pub modules_stats: ::prost::alloc::vec::Vec, - /// Stages definition and completed block ranges - #[prost(message, repeated, tag="4")] - pub stages: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="5")] - pub processed_bytes: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct ProcessedBytes { - #[prost(uint64, tag="1")] - pub total_bytes_read: u64, - #[prost(uint64, tag="2")] - pub total_bytes_written: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Error { - #[prost(string, tag="1")] - pub module: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub reason: ::prost::alloc::string::String, - #[prost(string, repeated, tag="3")] - pub logs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// FailureLogsTruncated is a flag that tells you if you received all the logs or if they - /// were truncated because you logged too much (fixed limit currently is set to 128 KiB). - #[prost(bool, tag="4")] - pub logs_truncated: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct Job { - #[prost(uint32, tag="1")] - pub stage: u32, - #[prost(uint64, tag="2")] - pub start_block: u64, - #[prost(uint64, tag="3")] - pub stop_block: u64, - #[prost(uint64, tag="4")] - pub processed_blocks: u64, - #[prost(uint64, tag="5")] - pub duration_ms: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Stage { - #[prost(string, repeated, tag="1")] - pub modules: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, repeated, tag="2")] - pub completed_ranges: ::prost::alloc::vec::Vec, -} -/// ModuleStats gathers metrics and statistics from each module, running on tier1 or tier2 -/// All the 'count' and 'time_ms' values may include duplicate for each stage going over that module -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleStats { - /// name of the module - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - /// total_processed_blocks is the sum of blocks sent to that module code - #[prost(uint64, tag="2")] - pub total_processed_block_count: u64, - /// total_processing_time_ms is the sum of all time spent running that module code - #[prost(uint64, tag="3")] - pub total_processing_time_ms: u64, - /// // external_calls are chain-specific intrinsics, like "Ethereum RPC calls". - #[prost(message, repeated, tag="4")] - pub external_call_metrics: ::prost::alloc::vec::Vec, - /// total_store_operation_time_ms is the sum of all time spent running that module code waiting for a store operation (ex: read, write, delete...) - #[prost(uint64, tag="5")] - pub total_store_operation_time_ms: u64, - /// total_store_read_count is the sum of all the store Read operations called from that module code - #[prost(uint64, tag="6")] - pub total_store_read_count: u64, - /// total_store_write_count is the sum of all store Write operations called from that module code (store-only) - #[prost(uint64, tag="10")] - pub total_store_write_count: u64, - /// total_store_deleteprefix_count is the sum of all store DeletePrefix operations called from that module code (store-only) - /// note that DeletePrefix can be a costly operation on large stores - #[prost(uint64, tag="11")] - pub total_store_deleteprefix_count: u64, - /// store_size_bytes is the uncompressed size of the full KV store for that module, from the last 'merge' operation (store-only) - #[prost(uint64, tag="12")] - pub store_size_bytes: u64, - /// total_store_merging_time_ms is the time spent merging partial stores into a full KV store for that module (store-only) - #[prost(uint64, tag="13")] - pub total_store_merging_time_ms: u64, - /// store_currently_merging is true if there is a merging operation (partial store to full KV store) on the way. - #[prost(bool, tag="14")] - pub store_currently_merging: bool, - /// highest_contiguous_block is the highest block in the highest merged full KV store of that module (store-only) - #[prost(uint64, tag="15")] - pub highest_contiguous_block: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExternalCallMetric { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(uint64, tag="2")] - pub count: u64, - #[prost(uint64, tag="3")] - pub time_ms: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StoreDelta { - #[prost(enumeration="store_delta::Operation", tag="1")] - pub operation: i32, - #[prost(uint64, tag="2")] - pub ordinal: u64, - #[prost(string, tag="3")] - pub key: ::prost::alloc::string::String, - #[prost(bytes="vec", tag="4")] - pub old_value: ::prost::alloc::vec::Vec, - #[prost(bytes="vec", tag="5")] - pub new_value: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `StoreDelta`. -pub mod store_delta { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Operation { - Unset = 0, - Create = 1, - Update = 2, - Delete = 3, - } - impl Operation { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Operation::Unset => "UNSET", - Operation::Create => "CREATE", - Operation::Update => "UPDATE", - Operation::Delete => "DELETE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNSET" => Some(Self::Unset), - "CREATE" => Some(Self::Create), - "UPDATE" => Some(Self::Update), - "DELETE" => Some(Self::Delete), - _ => None, - } - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct BlockRange { - #[prost(uint64, tag="2")] - pub start_block: u64, - #[prost(uint64, tag="3")] - pub end_block: u64, -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/src/pb/sf.substreams.rs b/blocks/beacon/src/pb/sf.substreams.rs deleted file mode 100644 index 246b1c5..0000000 --- a/blocks/beacon/src/pb/sf.substreams.rs +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct FieldOptions { - /// this option informs the `substreams pack` command that it should treat the corresponding manifest value as a path to a file, putting its content as bytes in this field. - /// must be applied to a `bytes` or `string` field - #[prost(bool, tag="1")] - pub load_from_file: bool, - /// this option informs the `substreams pack` command that it should treat the corresponding manifest value as a path to a folder, zipping its content and putting the zip content as bytes in this field. - /// must be applied to a `bytes` field - #[prost(bool, tag="2")] - pub zip_from_folder: bool, -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/src/pb/sf.substreams.sink.service.v1.rs b/blocks/beacon/src/pb/sf.substreams.sink.service.v1.rs deleted file mode 100644 index ba96cb4..0000000 --- a/blocks/beacon/src/pb/sf.substreams.sink.service.v1.rs +++ /dev/null @@ -1,228 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeployRequest { - #[prost(message, optional, tag="1")] - pub substreams_package: ::core::option::Option, - #[prost(bool, tag="2")] - pub development_mode: bool, - #[prost(message, repeated, tag="3")] - pub parameters: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Parameter { - #[prost(string, tag="1")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub value: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeployResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub status: i32, - /// deployment_id is a short name (max 8 characters) that uniquely identifies your deployment - #[prost(string, tag="2")] - pub deployment_id: ::prost::alloc::string::String, - #[prost(map="string, string", tag="3")] - pub services: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(string, tag="4")] - pub reason: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub motd: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateRequest { - #[prost(message, optional, tag="1")] - pub substreams_package: ::core::option::Option, - #[prost(string, tag="2")] - pub deployment_id: ::prost::alloc::string::String, - #[prost(bool, tag="3")] - pub reset: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UpdateResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub status: i32, - #[prost(map="string, string", tag="2")] - pub services: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(string, tag="3")] - pub reason: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub motd: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InfoRequest { - #[prost(string, tag="1")] - pub deployment_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InfoResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub status: i32, - #[prost(map="string, string", tag="2")] - pub services: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(string, tag="3")] - pub reason: ::prost::alloc::string::String, - #[prost(message, optional, tag="4")] - pub package_info: ::core::option::Option, - #[prost(message, optional, tag="5")] - pub progress: ::core::option::Option, - #[prost(string, tag="6")] - pub motd: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct SinkProgress { - #[prost(uint64, tag="1")] - pub last_processed_block: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PackageInfo { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub output_module_name: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub output_module_hash: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct ListRequest { -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListResponse { - #[prost(message, repeated, tag="1")] - pub deployments: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DeploymentWithStatus { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(enumeration="DeploymentStatus", tag="2")] - pub status: i32, - #[prost(string, tag="3")] - pub reason: ::prost::alloc::string::String, - #[prost(message, optional, tag="4")] - pub package_info: ::core::option::Option, - #[prost(message, optional, tag="5")] - pub progress: ::core::option::Option, - #[prost(string, tag="6")] - pub motd: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RemoveRequest { - #[prost(string, tag="1")] - pub deployment_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct RemoveResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub previous_status: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PauseRequest { - #[prost(string, tag="1")] - pub deployment_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct PauseResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub previous_status: i32, - #[prost(enumeration="DeploymentStatus", tag="2")] - pub new_status: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StopRequest { - #[prost(string, tag="1")] - pub deployment_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct StopResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub previous_status: i32, - #[prost(enumeration="DeploymentStatus", tag="2")] - pub new_status: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ResumeRequest { - #[prost(string, tag="1")] - pub deployment_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] -pub struct ResumeResponse { - #[prost(enumeration="DeploymentStatus", tag="1")] - pub previous_status: i32, - #[prost(enumeration="DeploymentStatus", tag="2")] - pub new_status: i32, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum DeploymentStatus { - Unknown = 0, - Running = 1, - Failing = 2, - Paused = 3, - Stopped = 4, - Starting = 5, - Pausing = 6, - Stopping = 7, - Removing = 8, - Resuming = 9, -} -impl DeploymentStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - DeploymentStatus::Unknown => "UNKNOWN", - DeploymentStatus::Running => "RUNNING", - DeploymentStatus::Failing => "FAILING", - DeploymentStatus::Paused => "PAUSED", - DeploymentStatus::Stopped => "STOPPED", - DeploymentStatus::Starting => "STARTING", - DeploymentStatus::Pausing => "PAUSING", - DeploymentStatus::Stopping => "STOPPING", - DeploymentStatus::Removing => "REMOVING", - DeploymentStatus::Resuming => "RESUMING", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "RUNNING" => Some(Self::Running), - "FAILING" => Some(Self::Failing), - "PAUSED" => Some(Self::Paused), - "STOPPED" => Some(Self::Stopped), - "STARTING" => Some(Self::Starting), - "PAUSING" => Some(Self::Pausing), - "STOPPING" => Some(Self::Stopping), - "REMOVING" => Some(Self::Removing), - "RESUMING" => Some(Self::Resuming), - _ => None, - } - } -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/src/pb/sf.substreams.v1.rs b/blocks/beacon/src/pb/sf.substreams.v1.rs deleted file mode 100644 index b126937..0000000 --- a/blocks/beacon/src/pb/sf.substreams.v1.rs +++ /dev/null @@ -1,325 +0,0 @@ -// @generated -// This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Modules { - #[prost(message, repeated, tag="1")] - pub modules: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="2")] - pub binaries: ::prost::alloc::vec::Vec, -} -/// Binary represents some code compiled to its binary form. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Binary { - #[prost(string, tag="1")] - pub r#type: ::prost::alloc::string::String, - #[prost(bytes="vec", tag="2")] - pub content: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Module { - #[prost(string, tag="1")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag="4")] - pub binary_index: u32, - #[prost(string, tag="5")] - pub binary_entrypoint: ::prost::alloc::string::String, - #[prost(message, repeated, tag="6")] - pub inputs: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag="7")] - pub output: ::core::option::Option, - #[prost(uint64, tag="8")] - pub initial_block: u64, - #[prost(message, optional, tag="9")] - pub block_filter: ::core::option::Option, - #[prost(oneof="module::Kind", tags="2, 3, 10")] - pub kind: ::core::option::Option, -} -/// Nested message and enum types in `Module`. -pub mod module { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct BlockFilter { - #[prost(string, tag="1")] - pub module: ::prost::alloc::string::String, - #[prost(oneof="block_filter::Query", tags="2, 3")] - pub query: ::core::option::Option, - } - /// Nested message and enum types in `BlockFilter`. - pub mod block_filter { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Query { - #[prost(string, tag="2")] - QueryString(::prost::alloc::string::String), - /// QueryFromStore query_from_store_keys = 3; - #[prost(message, tag="3")] - QueryFromParams(super::QueryFromParams), - } - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Copy, PartialEq, ::prost::Message)] - pub struct QueryFromParams { - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct KindMap { - #[prost(string, tag="1")] - pub output_type: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct KindStore { - /// The `update_policy` determines the functions available to mutate the store - /// (like `set()`, `set_if_not_exists()` or `sum()`, etc..) in - /// order to ensure that parallel operations are possible and deterministic - /// - /// Say a store cumulates keys from block 0 to 1M, and a second store - /// cumulates keys from block 1M to 2M. When we want to use this - /// store as a dependency for a downstream module, we will merge the - /// two stores according to this policy. - #[prost(enumeration="kind_store::UpdatePolicy", tag="1")] - pub update_policy: i32, - #[prost(string, tag="2")] - pub value_type: ::prost::alloc::string::String, - } - /// Nested message and enum types in `KindStore`. - pub mod kind_store { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum UpdatePolicy { - Unset = 0, - /// Provides a store where you can `set()` keys, and the latest key wins - Set = 1, - /// Provides a store where you can `set_if_not_exists()` keys, and the first key wins - SetIfNotExists = 2, - /// Provides a store where you can `add_*()` keys, where two stores merge by summing its values. - Add = 3, - /// Provides a store where you can `min_*()` keys, where two stores merge by leaving the minimum value. - Min = 4, - /// Provides a store where you can `max_*()` keys, where two stores merge by leaving the maximum value. - Max = 5, - /// Provides a store where you can `append()` keys, where two stores merge by concatenating the bytes in order. - Append = 6, - /// Provides a store with both `set()` and `sum()` functions. - SetSum = 7, - } - impl UpdatePolicy { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - UpdatePolicy::Unset => "UPDATE_POLICY_UNSET", - UpdatePolicy::Set => "UPDATE_POLICY_SET", - UpdatePolicy::SetIfNotExists => "UPDATE_POLICY_SET_IF_NOT_EXISTS", - UpdatePolicy::Add => "UPDATE_POLICY_ADD", - UpdatePolicy::Min => "UPDATE_POLICY_MIN", - UpdatePolicy::Max => "UPDATE_POLICY_MAX", - UpdatePolicy::Append => "UPDATE_POLICY_APPEND", - UpdatePolicy::SetSum => "UPDATE_POLICY_SET_SUM", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UPDATE_POLICY_UNSET" => Some(Self::Unset), - "UPDATE_POLICY_SET" => Some(Self::Set), - "UPDATE_POLICY_SET_IF_NOT_EXISTS" => Some(Self::SetIfNotExists), - "UPDATE_POLICY_ADD" => Some(Self::Add), - "UPDATE_POLICY_MIN" => Some(Self::Min), - "UPDATE_POLICY_MAX" => Some(Self::Max), - "UPDATE_POLICY_APPEND" => Some(Self::Append), - "UPDATE_POLICY_SET_SUM" => Some(Self::SetSum), - _ => None, - } - } - } - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct KindBlockIndex { - #[prost(string, tag="1")] - pub output_type: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Input { - #[prost(oneof="input::Input", tags="1, 2, 3, 4")] - pub input: ::core::option::Option, - } - /// Nested message and enum types in `Input`. - pub mod input { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Source { - /// ex: "sf.ethereum.type.v1.Block" - #[prost(string, tag="1")] - pub r#type: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Map { - /// ex: "block_to_pairs" - #[prost(string, tag="1")] - pub module_name: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Store { - #[prost(string, tag="1")] - pub module_name: ::prost::alloc::string::String, - #[prost(enumeration="store::Mode", tag="2")] - pub mode: i32, - } - /// Nested message and enum types in `Store`. - pub mod store { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum Mode { - Unset = 0, - Get = 1, - Deltas = 2, - } - impl Mode { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Mode::Unset => "UNSET", - Mode::Get => "GET", - Mode::Deltas => "DELTAS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNSET" => Some(Self::Unset), - "GET" => Some(Self::Get), - "DELTAS" => Some(Self::Deltas), - _ => None, - } - } - } - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Params { - #[prost(string, tag="1")] - pub value: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Input { - #[prost(message, tag="1")] - Source(Source), - #[prost(message, tag="2")] - Map(Map), - #[prost(message, tag="3")] - Store(Store), - #[prost(message, tag="4")] - Params(Params), - } - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Output { - #[prost(string, tag="1")] - pub r#type: ::prost::alloc::string::String, - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Kind { - #[prost(message, tag="2")] - KindMap(KindMap), - #[prost(message, tag="3")] - KindStore(KindStore), - #[prost(message, tag="10")] - KindBlockIndex(KindBlockIndex), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Package { - /// Needs to be one so this file can be used _directly_ as a - /// buf `Image` andor a ProtoSet for grpcurl and other tools - #[prost(message, repeated, tag="1")] - pub proto_files: ::prost::alloc::vec::Vec<::prost_types::FileDescriptorProto>, - #[prost(uint64, tag="5")] - pub version: u64, - #[prost(message, optional, tag="6")] - pub modules: ::core::option::Option, - #[prost(message, repeated, tag="7")] - pub module_meta: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag="8")] - pub package_meta: ::prost::alloc::vec::Vec, - /// Source network for Substreams to fetch its data from. - #[prost(string, tag="9")] - pub network: ::prost::alloc::string::String, - #[prost(message, optional, tag="10")] - pub sink_config: ::core::option::Option<::prost_types::Any>, - #[prost(string, tag="11")] - pub sink_module: ::prost::alloc::string::String, - /// image is the bytes to a JPEG, WebP or PNG file. Max size is 2 MiB - #[prost(bytes="vec", tag="12")] - pub image: ::prost::alloc::vec::Vec, - #[prost(map="string, message", tag="13")] - pub networks: ::std::collections::HashMap<::prost::alloc::string::String, NetworkParams>, - #[prost(map="string, string", tag="14")] - pub block_filters: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NetworkParams { - #[prost(map="string, uint64", tag="1")] - pub initial_blocks: ::std::collections::HashMap<::prost::alloc::string::String, u64>, - #[prost(map="string, string", tag="2")] - pub params: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PackageMetadata { - #[prost(string, tag="1")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub url: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub doc: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ModuleMetadata { - /// Corresponds to the index in `Package.metadata.package_meta` - #[prost(uint64, tag="1")] - pub package_index: u64, - #[prost(string, tag="2")] - pub doc: ::prost::alloc::string::String, -} -/// Clock is a pointer to a block with added timestamp -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Clock { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(uint64, tag="2")] - pub number: u64, - #[prost(message, optional, tag="3")] - pub timestamp: ::core::option::Option<::prost_types::Timestamp>, -} -/// BlockRef is a pointer to a block to which we don't know the timestamp -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockRef { - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - #[prost(uint64, tag="2")] - pub number: u64, -} -// @@protoc_insertion_point(module) diff --git a/blocks/beacon/substreams.yaml b/blocks/beacon/substreams.yaml index 6e35fab..91402e5 100644 --- a/blocks/beacon/substreams.yaml +++ b/blocks/beacon/substreams.yaml @@ -12,7 +12,6 @@ binaries: protobuf: files: - beacon.proto - - sf.beacon.type.v1.proto importPaths: - ../../proto excludePaths: diff --git a/proto/beacon.proto b/proto/beacon.proto index 566802b..3b9a28c 100644 --- a/proto/beacon.proto +++ b/proto/beacon.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package beacon; +package pinax.beacon.v1; import "google/protobuf/timestamp.proto"; @@ -16,7 +16,6 @@ message Events { repeated VoluntaryExit voluntary_exits = 9; } - message Block { // clock google.protobuf.Timestamp time = 1; @@ -112,27 +111,16 @@ message AttesterSlashing { // attester slashing uint64 index = 5; - // attestation 1 - string attestation_1_attesting_indices = 6; - uint64 attestation_1_slot = 7; - uint64 attestation_1_committee_index = 8; - string attestation_1_beacon_block_root = 9; - uint64 attestation_1_source_epoch = 10; - string attestation_1_source_root = 11; - uint64 attestation_1_target_epoch = 12; - string attestation_1_target_root = 13; - string attestation_1_signature = 14; - - // attestation 2 - string attestation_2_attesting_indices = 15; - uint64 attestation_2_slot = 16; - uint64 attestation_2_committee_index = 17; - string attestation_2_beacon_block_root = 18; - uint64 attestation_2_source_epoch = 19; - string attestation_2_source_root = 20; - uint64 attestation_2_target_epoch = 21; - string attestation_2_target_root = 22; - string attestation_2_signature = 23; + // attestation + string attestation_attesting_indices = 6; + uint64 attestation_slot = 7; + uint64 attestation_committee_index = 8; + string attestation_beacon_block_root = 9; + uint64 attestation_source_epoch = 10; + string attestation_source_root = 11; + uint64 attestation_target_epoch = 12; + string attestation_target_root = 13; + string attestation_signature = 14; } message BlsToExecutionChange { @@ -160,21 +148,13 @@ message ProposerSlashing { // proposer slashing uint64 index = 5; - // signed header 1 - uint64 signed_header_1_slot = 6; - uint64 signed_header_1_proposer_index = 7; - string signed_header_1_parent_root = 8; - string signed_header_1_state_root = 9; - string signed_header_1_body_root = 10; - string signed_header_1_signature = 11; - - // signed header 2 - uint64 signed_header_2_slot = 12; - uint64 signed_header_2_proposer_index = 13; - string signed_header_2_parent_root = 14; - string signed_header_2_state_root = 15; - string signed_header_2_body_root = 16; - string signed_header_2_signature = 17; + // signed header + uint64 signed_header_slot = 6; + uint64 signed_header_proposer_index = 7; + string signed_header_parent_root = 8; + string signed_header_state_root = 9; + string signed_header_body_root = 10; + string signed_header_signature = 11; } message VoluntaryExit {