From 50c85e1a0da911a3097b2cdd11838865b2150bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dillan=20Choini=C3=A8re?= Date: Wed, 27 Nov 2024 10:26:09 -0500 Subject: [PATCH] Use string instead of proto timestamp --- blocks/antelope/src/actions.rs | 2 +- blocks/antelope/src/blocks.rs | 2 +- blocks/antelope/src/db_ops.rs | 2 +- blocks/antelope/src/feature_ops.rs | 2 +- blocks/antelope/src/pb/pinax.antelope.v1.rs | 48 ++-- blocks/antelope/src/perm_ops.rs | 2 +- blocks/antelope/src/ram_ops.rs | 2 +- blocks/antelope/src/table_ops.rs | 2 +- blocks/antelope/src/transactions.rs | 2 +- blocks/beacon/src/attestations.rs | 2 +- blocks/beacon/src/attester_slashings.rs | 2 +- blocks/beacon/src/blobs.rs | 2 +- blocks/beacon/src/blocks.rs | 2 +- blocks/beacon/src/bls_to_execution_changes.rs | 2 +- blocks/beacon/src/deposits.rs | 2 +- blocks/beacon/src/pb/pinax.beacon.v1.rs | 54 ++-- blocks/beacon/src/proposer_slashings.rs | 2 +- blocks/beacon/src/voluntary_exits.rs | 2 +- blocks/beacon/src/withdrawals.rs | 2 +- blocks/bitcoin/src/blocks.rs | 2 +- blocks/bitcoin/src/inputs.rs | 2 +- blocks/bitcoin/src/outputs.rs | 2 +- blocks/bitcoin/src/pb/pinax.bitcoin.v1.rs | 24 +- blocks/bitcoin/src/transactions.rs | 2 +- blocks/solana/src/account_activity.rs | 4 +- blocks/solana/src/blocks.rs | 4 +- blocks/solana/src/collect_events.rs | 2 +- blocks/solana/src/events.rs | 2 +- blocks/solana/src/instruction_calls.rs | 6 +- blocks/solana/src/pb/mod.rs | 14 +- blocks/solana/src/pb/pinax.solana.v1.rs | 259 ++++++++++++++++++ blocks/solana/src/rewards.rs | 4 +- blocks/solana/src/transactions.rs | 4 +- blocks/starknet/src/blocks.rs | 2 +- blocks/starknet/src/events.rs | 2 +- blocks/starknet/src/pb/pinax.starknet.v1.rs | 28 +- blocks/starknet/src/transactions.rs | 4 +- proto/antelope.proto | 16 +- proto/beacon.proto | 18 +- proto/bitcoin.proto | 8 +- proto/solana.proto | 10 +- proto/starknet.proto | 12 +- 42 files changed, 440 insertions(+), 127 deletions(-) create mode 100644 blocks/solana/src/pb/pinax.solana.v1.rs diff --git a/blocks/antelope/src/actions.rs b/blocks/antelope/src/actions.rs index 563a807..fc6fe7e 100644 --- a/blocks/antelope/src/actions.rs +++ b/blocks/antelope/src/actions.rs @@ -25,7 +25,7 @@ pub fn collect_tx_actions(block: &Block, transaction: &TransactionTrace, timesta actions.push(Action { // block - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/antelope/src/blocks.rs b/blocks/antelope/src/blocks.rs index c81b778..14b753c 100644 --- a/blocks/antelope/src/blocks.rs +++ b/blocks/antelope/src/blocks.rs @@ -13,7 +13,7 @@ pub fn collect_block(block: &Block, timestamp: &BlockTimestamp) -> EventsBlock { EventsBlock { // clock - time: Some(timestamp.time), + time: timestamp.time.to_string(), number: timestamp.number, date: timestamp.date.clone(), hash: timestamp.hash.clone(), diff --git a/blocks/antelope/src/db_ops.rs b/blocks/antelope/src/db_ops.rs index 86585a5..c170fa1 100644 --- a/blocks/antelope/src/db_ops.rs +++ b/blocks/antelope/src/db_ops.rs @@ -21,7 +21,7 @@ pub fn collect_tx_db_ops(transaction: &TransactionTrace, timestamp: &BlockTimest for (index, db_op) in transaction.db_ops.iter().enumerate() { db_ops.push(DbOp { // block - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/antelope/src/feature_ops.rs b/blocks/antelope/src/feature_ops.rs index 4802092..b5741e1 100644 --- a/blocks/antelope/src/feature_ops.rs +++ b/blocks/antelope/src/feature_ops.rs @@ -11,7 +11,7 @@ pub fn collect_tx_feature_ops(transaction: &TransactionTrace, timestamp: &BlockT feature_ops.push(FeatureOp { // block - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/antelope/src/pb/pinax.antelope.v1.rs b/blocks/antelope/src/pb/pinax.antelope.v1.rs index 6bab2ba..bacb1c2 100644 --- a/blocks/antelope/src/pb/pinax.antelope.v1.rs +++ b/blocks/antelope/src/pb/pinax.antelope.v1.rs @@ -24,8 +24,10 @@ pub struct Events { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { /// clock - #[prost(message, optional, tag="1")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub number: u64, #[prost(string, tag="3")] @@ -82,8 +84,10 @@ pub struct Block { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transaction { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -123,8 +127,10 @@ pub struct Transaction { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Action { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -194,8 +200,10 @@ pub struct Action { #[derive(Clone, PartialEq, ::prost::Message)] pub struct DbOp { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -242,8 +250,10 @@ pub struct DbOp { #[derive(Clone, PartialEq, ::prost::Message)] pub struct FeatureOp { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -272,8 +282,10 @@ pub struct FeatureOp { #[derive(Clone, PartialEq, ::prost::Message)] pub struct PermOp { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -324,8 +336,10 @@ pub struct PermOp { #[derive(Clone, PartialEq, ::prost::Message)] pub struct TableOp { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -360,8 +374,10 @@ pub struct TableOp { #[derive(Clone, PartialEq, ::prost::Message)] pub struct RamOp { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] diff --git a/blocks/antelope/src/perm_ops.rs b/blocks/antelope/src/perm_ops.rs index ac0f25c..265b63d 100644 --- a/blocks/antelope/src/perm_ops.rs +++ b/blocks/antelope/src/perm_ops.rs @@ -40,7 +40,7 @@ pub fn collect_tx_perm_ops(transaction: &TransactionTrace, timestamp: &BlockTime perm_ops.push(PermOp { // block - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/antelope/src/ram_ops.rs b/blocks/antelope/src/ram_ops.rs index 7d9e40f..7cd4dd8 100644 --- a/blocks/antelope/src/ram_ops.rs +++ b/blocks/antelope/src/ram_ops.rs @@ -70,7 +70,7 @@ pub fn collect_tx_ram_ops(transaction: &TransactionTrace, timestamp: &BlockTimes for ram_op in transaction.ram_ops.iter() { ram_ops.push(RamOp { // block - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/antelope/src/table_ops.rs b/blocks/antelope/src/table_ops.rs index 2b64755..afd5203 100644 --- a/blocks/antelope/src/table_ops.rs +++ b/blocks/antelope/src/table_ops.rs @@ -17,7 +17,7 @@ pub fn collect_tx_table_ops(transaction: &TransactionTrace, timestamp: &BlockTim for (index, table_op) in transaction.table_ops.iter().enumerate() { table_ops.push(TableOp { - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/antelope/src/transactions.rs b/blocks/antelope/src/transactions.rs index 22ca2ce..c6a0f4a 100644 --- a/blocks/antelope/src/transactions.rs +++ b/blocks/antelope/src/transactions.rs @@ -35,7 +35,7 @@ pub fn collect_transaction(block: &Block, transaction: &TransactionTrace, timest Transaction { // block - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), diff --git a/blocks/beacon/src/attestations.rs b/blocks/beacon/src/attestations.rs index 0302b4f..3d61693 100644 --- a/blocks/beacon/src/attestations.rs +++ b/blocks/beacon/src/attestations.rs @@ -10,7 +10,7 @@ pub fn collect_attestations(attestations: &Vec, timestamp: &BlockTi for (index, attestation) in attestations.iter().enumerate() { vec.push(RawAttestation { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), diff --git a/blocks/beacon/src/attester_slashings.rs b/blocks/beacon/src/attester_slashings.rs index d944009..6a17282 100644 --- a/blocks/beacon/src/attester_slashings.rs +++ b/blocks/beacon/src/attester_slashings.rs @@ -24,7 +24,7 @@ pub fn parse_attester_slashings(index: u64, indexed_attestation: &IndexedAttesta let target = data.target.as_ref().unwrap(); RawAttesterSlashing { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), diff --git a/blocks/beacon/src/blobs.rs b/blocks/beacon/src/blobs.rs index 07f16cf..391d9c2 100644 --- a/blocks/beacon/src/blobs.rs +++ b/blocks/beacon/src/blobs.rs @@ -11,7 +11,7 @@ pub fn collect_blobs(blobs: &Vec, timestamp: &BlockTimestamp) -> Vec, timestamp: &BlockTimestamp) -> for (index, d) in deposits.iter().enumerate() { vec.push(RawDeposit { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), diff --git a/blocks/beacon/src/pb/pinax.beacon.v1.rs b/blocks/beacon/src/pb/pinax.beacon.v1.rs index 38978be..a3be59d 100644 --- a/blocks/beacon/src/pb/pinax.beacon.v1.rs +++ b/blocks/beacon/src/pb/pinax.beacon.v1.rs @@ -26,8 +26,10 @@ pub struct Events { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { /// clock - #[prost(message, optional, tag="1")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub number: u64, #[prost(string, tag="3")] @@ -60,8 +62,10 @@ pub struct Block { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Blob { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -84,8 +88,10 @@ pub struct Blob { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Deposit { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -110,8 +116,10 @@ pub struct Deposit { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Withdrawal { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -132,8 +140,10 @@ pub struct Withdrawal { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Attestation { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -166,8 +176,10 @@ pub struct Attestation { #[derive(Clone, PartialEq, ::prost::Message)] pub struct AttesterSlashing { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -201,8 +213,10 @@ pub struct AttesterSlashing { #[derive(Clone, PartialEq, ::prost::Message)] pub struct BlsToExecutionChange { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -225,8 +239,10 @@ pub struct BlsToExecutionChange { #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProposerSlashing { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -254,8 +270,10 @@ pub struct ProposerSlashing { #[derive(Clone, PartialEq, ::prost::Message)] pub struct VoluntaryExit { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] diff --git a/blocks/beacon/src/proposer_slashings.rs b/blocks/beacon/src/proposer_slashings.rs index 034587f..db2cb87 100644 --- a/blocks/beacon/src/proposer_slashings.rs +++ b/blocks/beacon/src/proposer_slashings.rs @@ -25,7 +25,7 @@ pub fn collect_proposer_slashings(proposer_slashings: &[ProposerSlashing], times pub fn parse_proposer_slashings(index: u64, message: &BeaconBlockHeader, signature: Vec, timestamp: &BlockTimestamp) -> RawProposerSlashing { RawProposerSlashing { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), diff --git a/blocks/beacon/src/voluntary_exits.rs b/blocks/beacon/src/voluntary_exits.rs index 696b6c6..e8bda81 100644 --- a/blocks/beacon/src/voluntary_exits.rs +++ b/blocks/beacon/src/voluntary_exits.rs @@ -12,7 +12,7 @@ pub fn collect_voluntary_exits(voluntary_exits: &[SignedVoluntaryExit], timestam let message = voluntary_exit.message.as_ref().unwrap(); vec.push(RawVoluntaryExit { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), diff --git a/blocks/beacon/src/withdrawals.rs b/blocks/beacon/src/withdrawals.rs index eeb4d13..9d1f10c 100644 --- a/blocks/beacon/src/withdrawals.rs +++ b/blocks/beacon/src/withdrawals.rs @@ -10,7 +10,7 @@ pub fn collect_withdrawals(withdrawals: &Vec, timestamp: &BlockTimes for (index, w) in withdrawals.iter().enumerate() { vec.push(RawWithdrawal { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), diff --git a/blocks/bitcoin/src/blocks.rs b/blocks/bitcoin/src/blocks.rs index 724146b..2148f76 100644 --- a/blocks/bitcoin/src/blocks.rs +++ b/blocks/bitcoin/src/blocks.rs @@ -9,7 +9,7 @@ pub fn collect_block(block: &Block, timestamp: &BlockTimestamp) -> OutputBlock { OutputBlock { // clock - time: Some(timestamp.time), + time: timestamp.time.to_string(), height: block.height as u32, date: timestamp.date.clone(), hash: block.hash.clone(), diff --git a/blocks/bitcoin/src/inputs.rs b/blocks/bitcoin/src/inputs.rs index f953ebd..5a3de2e 100644 --- a/blocks/bitcoin/src/inputs.rs +++ b/blocks/bitcoin/src/inputs.rs @@ -12,7 +12,7 @@ pub fn collect_transaction_inputs(transaction: &Transaction, timestamp: &BlockTi let witness_data = if input.txinwitness.len() > 0 { input.txinwitness.clone() } else { vec![String::new()] }; inputs.push(Input { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_date: timestamp.date.clone(), block_height: timestamp.number as u32, block_hash: timestamp.hash.clone(), diff --git a/blocks/bitcoin/src/outputs.rs b/blocks/bitcoin/src/outputs.rs index ba639ea..4f4957d 100644 --- a/blocks/bitcoin/src/outputs.rs +++ b/blocks/bitcoin/src/outputs.rs @@ -10,7 +10,7 @@ pub fn collect_transaction_outputs(transaction: &Transaction, timestamp: &BlockT let script_pub_key = output.script_pub_key.as_ref().unwrap(); outputs.push(Output { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_date: timestamp.date.clone(), block_height: timestamp.number as u32, block_hash: timestamp.hash.clone(), diff --git a/blocks/bitcoin/src/pb/pinax.bitcoin.v1.rs b/blocks/bitcoin/src/pb/pinax.bitcoin.v1.rs index e7ad085..699883d 100644 --- a/blocks/bitcoin/src/pb/pinax.bitcoin.v1.rs +++ b/blocks/bitcoin/src/pb/pinax.bitcoin.v1.rs @@ -16,8 +16,10 @@ pub struct Events { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { /// clock - #[prost(message, optional, tag="1")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub time: ::prost::alloc::string::String, #[prost(uint32, tag="2")] pub height: u32, #[prost(string, tag="3")] @@ -65,8 +67,10 @@ pub struct Block { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transaction { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(string, tag="2")] pub block_date: ::prost::alloc::string::String, #[prost(uint32, tag="3")] @@ -107,8 +111,10 @@ pub struct Transaction { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Input { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(string, tag="2")] pub block_date: ::prost::alloc::string::String, #[prost(uint32, tag="3")] @@ -156,8 +162,10 @@ pub struct Input { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Output { /// block - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(string, tag="2")] pub block_date: ::prost::alloc::string::String, #[prost(uint32, tag="3")] diff --git a/blocks/bitcoin/src/transactions.rs b/blocks/bitcoin/src/transactions.rs index 8353fb2..03d8785 100644 --- a/blocks/bitcoin/src/transactions.rs +++ b/blocks/bitcoin/src/transactions.rs @@ -5,7 +5,7 @@ use crate::pb::pinax::bitcoin::v1::Transaction as OutputTransaction; pub fn collect_transaction(transaction: &Transaction, timestamp: &BlockTimestamp, index: u32) -> OutputTransaction { OutputTransaction { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_date: timestamp.date.clone(), block_height: timestamp.number as u32, block_hash: timestamp.hash.clone(), diff --git a/blocks/solana/src/account_activity.rs b/blocks/solana/src/account_activity.rs index 85da2e6..2b13b3a 100644 --- a/blocks/solana/src/account_activity.rs +++ b/blocks/solana/src/account_activity.rs @@ -1,7 +1,7 @@ use substreams_solana::pb::sf::solana::r#type::v1::{ConfirmedTransaction, MessageHeader, TokenBalance, Transaction}; use crate::{ - pb::solana::AccountActivity, + pb::pinax::solana::v1::AccountActivity, structs::{BlockInfo, BlockTimestamp}, utils::get_account_keys_extended, }; @@ -68,7 +68,7 @@ pub fn collect_tx_account_activities(transaction: &ConfirmedTransaction, index: let writable = writability.get(balance_index).unwrap_or(&false); account_activities.push(AccountActivity { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), block_slot: block_info.slot, diff --git a/blocks/solana/src/blocks.rs b/blocks/solana/src/blocks.rs index 6f72e61..100b4f0 100644 --- a/blocks/solana/src/blocks.rs +++ b/blocks/solana/src/blocks.rs @@ -1,7 +1,7 @@ use substreams_solana::pb::sf::solana::r#type::v1::Block; use crate::structs::BlockTimestamp; -use crate::{pb::solana::Block as RawBlock, structs::BlockInfo}; +use crate::{pb::pinax::solana::v1::Block as RawBlock, structs::BlockInfo}; use crate::counters::get_block_counters; @@ -18,7 +18,7 @@ pub fn collect_block(block: &Block, timestamp: &BlockTimestamp, block_info: &Blo let counters = get_block_counters(block); RawBlock { - time: Some(timestamp.time), + time: timestamp.time.to_string(), date: timestamp.date.clone(), hash: timestamp.hash.clone(), slot: block.slot, diff --git a/blocks/solana/src/collect_events.rs b/blocks/solana/src/collect_events.rs index 2485d8b..7ee4583 100644 --- a/blocks/solana/src/collect_events.rs +++ b/blocks/solana/src/collect_events.rs @@ -8,7 +8,7 @@ use crate::{ account_activity::collect_tx_account_activities, blocks::{collect_block, get_block_info}, instruction_calls::collect_tx_instruction_calls, - pb::solana::Events, + pb::pinax::solana::v1::Events, rewards::collect_rewards, transactions::collect_transaction, utils::get_timestamp_without_number, diff --git a/blocks/solana/src/events.rs b/blocks/solana/src/events.rs index 56b5ede..0b31cdf 100644 --- a/blocks/solana/src/events.rs +++ b/blocks/solana/src/events.rs @@ -3,7 +3,7 @@ use substreams::pb::substreams::Clock; use substreams_solana::pb::sf::solana::r#type::v1::Block; use crate::collect_events::{collect_events_with_votes, collect_events_without_votes}; -use crate::pb::solana::Events; +use crate::pb::pinax::solana::v1::Events; #[substreams::handlers::map] pub fn map_events(clock: Clock, block: Block) -> Result { diff --git a/blocks/solana/src/instruction_calls.rs b/blocks/solana/src/instruction_calls.rs index a85a6c0..483dbfa 100644 --- a/blocks/solana/src/instruction_calls.rs +++ b/blocks/solana/src/instruction_calls.rs @@ -2,7 +2,7 @@ use substreams::Hex; use substreams_solana::{base58, block_view::InstructionView, pb::sf::solana::r#type::v1::ConfirmedTransaction}; use crate::{ - pb::solana::InstructionCall, + pb::pinax::solana::v1::InstructionCall, structs::{BlockInfo, BlockTimestamp}, }; @@ -39,7 +39,7 @@ fn collect_outer_instruction(vec: &mut Vec, timestamp: &BlockTi let data = Hex::encode(&instruction_view.data()); vec.push(InstructionCall { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), block_slot: block_info.slot, @@ -70,7 +70,7 @@ fn collect_inner_instructions(vec: &mut Vec, timestamp: &BlockT let account_arguments = inner_instruction.accounts().iter().map(|arg| arg.to_string()).collect::>(); vec.push(InstructionCall { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), block_slot: block_info.slot, diff --git a/blocks/solana/src/pb/mod.rs b/blocks/solana/src/pb/mod.rs index 29ec2b2..5afdae8 100644 --- a/blocks/solana/src/pb/mod.rs +++ b/blocks/solana/src/pb/mod.rs @@ -1,4 +1,13 @@ // @generated +pub mod pinax { + pub mod solana { + // @@protoc_insertion_point(attribute:pinax.solana.v1) + pub mod v1 { + include!("pinax.solana.v1.rs"); + // @@protoc_insertion_point(pinax.solana.v1) + } + } +} pub mod sf { pub mod solana { pub mod r#type { @@ -26,8 +35,3 @@ pub mod sol { } } } -// @@protoc_insertion_point(attribute:solana) -pub mod solana { - include!("solana.rs"); - // @@protoc_insertion_point(solana) -} diff --git a/blocks/solana/src/pb/pinax.solana.v1.rs b/blocks/solana/src/pb/pinax.solana.v1.rs new file mode 100644 index 0000000..fbe14af --- /dev/null +++ b/blocks/solana/src/pb/pinax.solana.v1.rs @@ -0,0 +1,259 @@ +// @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 rewards: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="3")] + pub transactions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="4")] + pub instruction_calls: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="5")] + pub account_activity: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="6")] + pub vote_transactions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="7")] + pub vote_instruction_calls: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="8")] + pub vote_account_activity: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Block { + /// clock + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub time: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub date: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub hash: ::prost::alloc::string::String, + /// block + #[prost(uint64, tag="4")] + pub slot: u64, + #[prost(uint64, tag="5")] + pub height: u64, + #[prost(string, tag="6")] + pub previous_block_hash: ::prost::alloc::string::String, + #[prost(uint64, tag="7")] + pub parent_slot: u64, + /// counters + #[prost(uint64, tag="8")] + pub total_transactions: u64, + #[prost(uint64, tag="9")] + pub successful_transactions: u64, + #[prost(uint64, tag="10")] + pub failed_transactions: u64, + #[prost(uint64, tag="11")] + pub total_vote_transactions: u64, + #[prost(uint64, tag="12")] + pub total_non_vote_transactions: u64, + #[prost(uint64, tag="13")] + pub successful_vote_transactions: u64, + #[prost(uint64, tag="14")] + pub successful_non_vote_transactions: u64, + #[prost(uint64, tag="15")] + pub failed_vote_transactions: u64, + #[prost(uint64, tag="16")] + pub failed_non_vote_transactions: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Reward { + /// clock + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub block_date: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub block_hash: ::prost::alloc::string::String, + /// block + #[prost(uint64, tag="4")] + pub block_slot: u64, + #[prost(uint64, tag="5")] + pub block_height: u64, + #[prost(string, tag="6")] + pub block_previous_block_hash: ::prost::alloc::string::String, + #[prost(uint64, tag="7")] + pub block_parent_slot: u64, + /// reward + #[prost(string, tag="8")] + pub pubkey: ::prost::alloc::string::String, + #[prost(int64, tag="9")] + pub lamports: i64, + #[prost(uint64, tag="10")] + pub pre_balance: u64, + #[prost(uint64, tag="11")] + pub post_balance: u64, + #[prost(string, tag="12")] + pub reward_type: ::prost::alloc::string::String, + #[prost(string, tag="13")] + pub commission: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Transaction { + /// clock + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub block_hash: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub block_date: ::prost::alloc::string::String, + /// block + #[prost(uint64, tag="4")] + pub block_slot: u64, + #[prost(uint64, tag="5")] + pub block_height: u64, + #[prost(string, tag="6")] + pub block_previous_block_hash: ::prost::alloc::string::String, + #[prost(uint64, tag="7")] + pub block_parent_slot: u64, + /// transaction + #[prost(string, tag="8")] + pub id: ::prost::alloc::string::String, + #[prost(uint32, tag="9")] + pub index: u32, + #[prost(uint64, tag="10")] + pub fee: u64, + #[prost(uint32, tag="11")] + pub required_signatures: u32, + #[prost(uint32, tag="12")] + pub required_signed_accounts: u32, + #[prost(uint32, tag="13")] + pub required_unsigned_accounts: u32, + #[prost(string, tag="14")] + pub signature: ::prost::alloc::string::String, + #[prost(bool, tag="15")] + pub success: bool, + #[prost(string, tag="16")] + pub error: ::prost::alloc::string::String, + #[prost(string, tag="17")] + pub recent_block_hash: ::prost::alloc::string::String, + #[prost(string, repeated, tag="18")] + pub account_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="19")] + pub log_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(uint64, repeated, tag="20")] + pub pre_balances: ::prost::alloc::vec::Vec, + #[prost(uint64, repeated, tag="21")] + pub post_balances: ::prost::alloc::vec::Vec, + #[prost(string, repeated, tag="22")] + pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, tag="23")] + pub signer: ::prost::alloc::string::String, + #[prost(string, repeated, tag="24")] + pub signers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InstructionCall { + /// clock + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub block_hash: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub block_date: ::prost::alloc::string::String, + /// block + #[prost(uint64, tag="4")] + pub block_slot: u64, + #[prost(uint64, tag="5")] + pub block_height: u64, + #[prost(string, tag="6")] + pub block_previous_block_hash: ::prost::alloc::string::String, + #[prost(uint64, tag="7")] + pub block_parent_slot: u64, + /// transaction + #[prost(string, tag="8")] + pub tx_id: ::prost::alloc::string::String, + #[prost(uint32, tag="9")] + pub tx_index: u32, + #[prost(string, tag="10")] + pub tx_signer: ::prost::alloc::string::String, + #[prost(bool, tag="11")] + pub tx_success: bool, + #[prost(string, repeated, tag="12")] + pub log_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// instruction + #[prost(uint32, tag="13")] + pub outer_instruction_index: u32, + #[prost(int32, tag="14")] + pub inner_instruction_index: i32, + #[prost(string, tag="15")] + pub inner_executing_account: ::prost::alloc::string::String, + #[prost(string, tag="16")] + pub outer_executing_account: ::prost::alloc::string::String, + #[prost(string, tag="17")] + pub executing_account: ::prost::alloc::string::String, + #[prost(bool, tag="18")] + pub is_inner: bool, + #[prost(string, tag="19")] + pub data: ::prost::alloc::string::String, + #[prost(string, repeated, tag="20")] + pub account_arguments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// TODO: Use repeated InnerInstruction when supported by parquet sink + #[prost(string, tag="21")] + pub inner_instructions: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AccountActivity { + /// clock + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub block_hash: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub block_date: ::prost::alloc::string::String, + /// block + #[prost(uint64, tag="4")] + pub block_slot: u64, + #[prost(uint64, tag="5")] + pub block_height: u64, + #[prost(string, tag="6")] + pub block_previous_block_hash: ::prost::alloc::string::String, + #[prost(uint64, tag="7")] + pub block_parent_slot: u64, + #[prost(string, tag="8")] + pub address: ::prost::alloc::string::String, + #[prost(uint32, tag="9")] + pub tx_index: u32, + #[prost(string, tag="10")] + pub tx_id: ::prost::alloc::string::String, + #[prost(bool, tag="11")] + pub tx_success: bool, + #[prost(bool, tag="12")] + pub signed: bool, + #[prost(bool, tag="13")] + pub writable: bool, + #[prost(string, optional, tag="14")] + pub token_mint_address: ::core::option::Option<::prost::alloc::string::String>, + #[prost(uint64, tag="15")] + pub pre_balance: u64, + #[prost(uint64, tag="16")] + pub post_balance: u64, + #[prost(int64, tag="17")] + pub balance_change: i64, + #[prost(double, optional, tag="18")] + pub pre_token_balance: ::core::option::Option, + #[prost(double, optional, tag="19")] + pub post_token_balance: ::core::option::Option, + #[prost(double, optional, tag="20")] + pub token_balance_change: ::core::option::Option, + #[prost(string, optional, tag="21")] + pub token_balance_owner: ::core::option::Option<::prost::alloc::string::String>, +} +// @@protoc_insertion_point(module) diff --git a/blocks/solana/src/rewards.rs b/blocks/solana/src/rewards.rs index 2f324a7..48915c7 100644 --- a/blocks/solana/src/rewards.rs +++ b/blocks/solana/src/rewards.rs @@ -1,7 +1,7 @@ use substreams_solana::pb::sf::solana::r#type::v1::Block; use crate::{ - pb::solana::Reward, + pb::pinax::solana::v1::Reward, structs::{BlockInfo, BlockTimestamp}, }; @@ -16,7 +16,7 @@ pub fn collect_rewards(block: &Block, timestamp: &BlockTimestamp, block_info: &B block_height: block_info.height, block_previous_block_hash: block_info.previous_block_hash.clone(), block_parent_slot: block_info.parent_slot, - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_date: timestamp.date.clone(), block_hash: timestamp.hash.clone(), pubkey: reward.pubkey.clone(), diff --git a/blocks/solana/src/transactions.rs b/blocks/solana/src/transactions.rs index 8c1511d..4e00595 100644 --- a/blocks/solana/src/transactions.rs +++ b/blocks/solana/src/transactions.rs @@ -1,7 +1,7 @@ use substreams_solana::{base58, pb::sf::solana::r#type::v1::ConfirmedTransaction}; use crate::{ - pb::solana::Transaction as RawTransaction, + pb::pinax::solana::v1::Transaction as RawTransaction, structs::{BlockInfo, BlockTimestamp}, tx_errors::TransactionErrorDecoder, utils::get_account_keys_extended, @@ -23,7 +23,7 @@ pub fn collect_transaction(transaction: &ConfirmedTransaction, index: usize, blo let signers = message.account_keys.iter().take(trx.signatures.len()).map(|key| base58::encode(key)).collect::>(); RawTransaction { - block_time: Some(timestamp.time), + block_time: timestamp.time.to_string(), block_hash: timestamp.hash.clone(), block_date: timestamp.date.clone(), block_slot: block_info.slot, diff --git a/blocks/starknet/src/blocks.rs b/blocks/starknet/src/blocks.rs index 32f61dd..763cdac 100644 --- a/blocks/starknet/src/blocks.rs +++ b/blocks/starknet/src/blocks.rs @@ -16,7 +16,7 @@ pub fn collect_block(block: &Block, timestamp: &BlockTimestamp, block_hashes: &B let state_diff = block.state_update.as_ref().expect("State diff missing").state_diff.as_ref().expect("State diff missing"); BlockOutput { - time: Some(timestamp.time.clone()), + time: timestamp.time.to_string(), number: timestamp.number, date: timestamp.date.clone(), hash: timestamp.hash.clone(), diff --git a/blocks/starknet/src/events.rs b/blocks/starknet/src/events.rs index 97ef8d1..945ea15 100644 --- a/blocks/starknet/src/events.rs +++ b/blocks/starknet/src/events.rs @@ -21,7 +21,7 @@ pub fn collect_events(block: &Block, transaction: &TransactionWithReceipt, times if let Some(receipt) = &transaction.receipt { for (i, event) in receipt.events.iter().enumerate() { events.push(Event { - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_date: timestamp.date.clone(), block_hash: block_hashes.new_root.clone(), diff --git a/blocks/starknet/src/pb/pinax.starknet.v1.rs b/blocks/starknet/src/pb/pinax.starknet.v1.rs index c3a0d93..edfb30c 100644 --- a/blocks/starknet/src/pb/pinax.starknet.v1.rs +++ b/blocks/starknet/src/pb/pinax.starknet.v1.rs @@ -17,8 +17,9 @@ pub struct EventsOutput { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Block { - #[prost(message, optional, tag="1")] - pub time: ::core::option::Option<::prost_types::Timestamp>, + /// TIMESTAMP + #[prost(string, tag="1")] + pub time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub number: u64, #[prost(string, tag="3")] @@ -51,10 +52,11 @@ pub struct Block { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transaction { + /// TIMESTAMP #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, + #[prost(string, tag="2")] pub block_date: ::prost::alloc::string::String, - #[prost(message, optional, tag="2")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, #[prost(uint64, tag="3")] pub block_number: u64, #[prost(string, tag="4")] @@ -161,8 +163,10 @@ pub struct Transaction { #[derive(Clone, PartialEq, ::prost::Message)] pub struct MessageSent { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -199,8 +203,10 @@ pub struct MessageSent { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Event { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] @@ -245,8 +251,10 @@ pub struct Event { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Call { /// clock - #[prost(message, optional, tag="1")] - pub block_time: ::core::option::Option<::prost_types::Timestamp>, + /// + /// TIMESTAMP + #[prost(string, tag="1")] + pub block_time: ::prost::alloc::string::String, #[prost(uint64, tag="2")] pub block_number: u64, #[prost(string, tag="3")] diff --git a/blocks/starknet/src/transactions.rs b/blocks/starknet/src/transactions.rs index 8e894ba..cf090fe 100644 --- a/blocks/starknet/src/transactions.rs +++ b/blocks/starknet/src/transactions.rs @@ -32,7 +32,7 @@ pub fn collect_transaction( let transaction = Transaction { block_date: timestamp.date.clone(), - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: timestamp.hash.clone(), block_l1_da_mode: l1_da_mode_to_string(block.l1_da_mode), @@ -94,7 +94,7 @@ pub fn collect_transaction( for message in receipt.messages_sent.iter() { messages_sent.push(MessageSent { block_date: timestamp.date.clone(), - block_time: Some(timestamp.time.clone()), + block_time: timestamp.time.to_string(), block_number: timestamp.number, block_hash: block_hashes.new_root.clone(), block_l1_da_mode: l1_da_mode_to_string(block.l1_da_mode), diff --git a/proto/antelope.proto b/proto/antelope.proto index eb8a3a8..3bfc71f 100644 --- a/proto/antelope.proto +++ b/proto/antelope.proto @@ -17,7 +17,7 @@ message Events { message Block { // clock - google.protobuf.Timestamp time = 1; + string time = 1; // TIMESTAMP uint64 number = 2; string date = 3; string hash = 4; @@ -52,7 +52,7 @@ message Block { message Transaction { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; @@ -77,7 +77,7 @@ message Transaction { message Action { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; @@ -120,7 +120,7 @@ message Action { message DbOp { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; @@ -150,7 +150,7 @@ message DbOp { message FeatureOp { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; @@ -171,7 +171,7 @@ message FeatureOp { message PermOp { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; @@ -208,7 +208,7 @@ message PermOp { message TableOp { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; @@ -232,7 +232,7 @@ message TableOp { message RamOp { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_hash = 3; string block_date = 4; diff --git a/proto/beacon.proto b/proto/beacon.proto index ef9080e..345038c 100644 --- a/proto/beacon.proto +++ b/proto/beacon.proto @@ -18,7 +18,7 @@ message Events { message Block { // clock - google.protobuf.Timestamp time = 1; + string time = 1; // TIMESTAMP uint64 number = 2; string date = 3; string hash = 4; @@ -38,7 +38,7 @@ message Block { message Blob { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -53,7 +53,7 @@ message Blob { message Deposit { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -69,7 +69,7 @@ message Deposit { message Withdrawal { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -83,7 +83,7 @@ message Withdrawal { message Attestation { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -103,7 +103,7 @@ message Attestation { message AttesterSlashing { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -125,7 +125,7 @@ message AttesterSlashing { message BlsToExecutionChange { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -140,7 +140,7 @@ message BlsToExecutionChange { message ProposerSlashing { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -159,7 +159,7 @@ message ProposerSlashing { message VoluntaryExit { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; diff --git a/proto/bitcoin.proto b/proto/bitcoin.proto index 99489d0..b1b46c4 100644 --- a/proto/bitcoin.proto +++ b/proto/bitcoin.proto @@ -13,7 +13,7 @@ message Events { message Block { // clock - google.protobuf.Timestamp time = 1; + string time = 1; // TIMESTAMP uint32 height = 2; string date = 3; string hash = 4; @@ -42,7 +42,7 @@ message Block { message Transaction { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_date = 2; uint32 block_height = 3; string block_hash = 4; @@ -66,7 +66,7 @@ message Transaction { message Input { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_date = 2; uint32 block_height = 3; string block_hash = 4; @@ -96,7 +96,7 @@ message Input { message Output { // block - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_date = 2; uint32 block_height = 3; string block_hash = 4; diff --git a/proto/solana.proto b/proto/solana.proto index 3b74893..a070869 100644 --- a/proto/solana.proto +++ b/proto/solana.proto @@ -17,7 +17,7 @@ message Events { message Block { // clock - google.protobuf.Timestamp time = 1; + string time = 1; // TIMESTAMP string date = 2; string hash = 3; @@ -41,7 +41,7 @@ message Block { message Reward { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_date = 2; string block_hash = 3; @@ -62,7 +62,7 @@ message Reward { message Transaction { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_hash = 2; string block_date = 3; @@ -94,7 +94,7 @@ message Transaction { message InstructionCall { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_hash = 2; string block_date = 3; @@ -126,7 +126,7 @@ message InstructionCall { message AccountActivity { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP string block_hash = 2; string block_date = 3; diff --git a/proto/starknet.proto b/proto/starknet.proto index 8a6129d..0eb931a 100644 --- a/proto/starknet.proto +++ b/proto/starknet.proto @@ -15,7 +15,7 @@ message EventsOutput { } message Block { - google.protobuf.Timestamp time = 1; + string time = 1; // TIMESTAMP uint64 number = 2; string date = 3; string hash = 4; @@ -34,8 +34,8 @@ message Block { message Transaction { - string block_date = 1; - google.protobuf.Timestamp block_time = 2; + string block_time = 1; // TIMESTAMP + string block_date = 2; uint64 block_number = 3; string block_hash = 4; string block_l1_da_mode = 5; @@ -92,7 +92,7 @@ message Transaction { message MessageSent { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -117,7 +117,7 @@ message MessageSent { message Event { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4; @@ -146,7 +146,7 @@ message Event { message Call { // clock - google.protobuf.Timestamp block_time = 1; + string block_time = 1; // TIMESTAMP uint64 block_number = 2; string block_date = 3; string block_hash = 4;