Struct substreams_antelope_core::pb::antelope::Block
source · pub struct Block {Show 37 fields
pub id: String,
pub number: u32,
pub version: u32,
pub header: Option<BlockHeader>,
pub producer_signature: String,
pub block_extensions: Vec<Extension>,
pub dpos_proposed_irreversible_blocknum: u32,
pub dpos_irreversible_blocknum: u32,
pub blockroot_merkle: Option<BlockRootMerkle>,
pub producer_to_last_produced: Vec<ProducerToLastProduced>,
pub producer_to_last_implied_irb: Vec<ProducerToLastImpliedIrb>,
pub confirm_count: Vec<u32>,
pub pending_schedule: Option<PendingProducerSchedule>,
pub activated_protocol_features: Option<ActivatedProtocolFeatures>,
pub rlimit_ops: Vec<RlimitOp>,
pub unfiltered_transactions: Vec<TransactionReceipt>,
pub filtered_transactions: Vec<TransactionReceipt>,
pub unfiltered_transaction_count: u32,
pub filtered_transaction_count: u32,
pub unfiltered_implicit_transaction_ops: Vec<TrxOp>,
pub filtered_implicit_transaction_ops: Vec<TrxOp>,
pub unfiltered_transaction_traces: Vec<TransactionTrace>,
pub filtered_transaction_traces: Vec<TransactionTrace>,
pub unfiltered_transaction_trace_count: u32,
pub filtered_transaction_trace_count: u32,
pub unfiltered_executed_input_action_count: u32,
pub filtered_executed_input_action_count: u32,
pub unfiltered_executed_total_action_count: u32,
pub filtered_executed_total_action_count: u32,
pub block_signing_key: String,
pub active_schedule_v1: Option<ProducerSchedule>,
pub valid_block_signing_authority_v2: Option<BlockSigningAuthority>,
pub active_schedule_v2: Option<ProducerAuthoritySchedule>,
pub filtering_applied: bool,
pub filtering_include_filter_expr: String,
pub filtering_exclude_filter_expr: String,
pub filtering_system_actions_include_filter_expr: String,
}
Fields§
§id: String
§number: u32
§version: u32
§header: Option<BlockHeader>
§producer_signature: String
§block_extensions: Vec<Extension>
§dpos_proposed_irreversible_blocknum: u32
§dpos_irreversible_blocknum: u32
§blockroot_merkle: Option<BlockRootMerkle>
§producer_to_last_produced: Vec<ProducerToLastProduced>
§producer_to_last_implied_irb: Vec<ProducerToLastImpliedIrb>
§confirm_count: Vec<u32>
§pending_schedule: Option<PendingProducerSchedule>
§activated_protocol_features: Option<ActivatedProtocolFeatures>
§rlimit_ops: Vec<RlimitOp>
§unfiltered_transactions: Vec<TransactionReceipt>
The unfiltered transactions in this block when NO filtering has been applied,
(i.e. filtering_applied = false
). When filtering has been applied on this block,
(i.e. filtering_applied = true
), this field will be set to nil
and instead, the
filtered_transactions
will be populated with only filtered transactions.
Use the helper getter method Transactions()
to automatically pick the correct
field to use (unfiltered_transactions
when filtering_applied == false
and
filtered_transactions
when filtering_applied == true
).
filtered_transactions: Vec<TransactionReceipt>
The filtered transactions in this block when filtering has been applied,
(i.e. filtering_applied = true
). This will be only the transactions
that matched the include filter CEL expression and did NOT match the exclude
filter CEL expression.
Use the helper getter method Transactions()
to automatically the correct
field (unfiltered_transaction
when filtering_applied == false
and
filtered_transactions
when filtering_applied == true
).
unfiltered_transaction_count: u32
Number of transaction executed within this block when no filtering
is applied (filtering_applied == false
).
filtered_transaction_count: u32
Number of transaction that were successfully executed within this block that are found in
the filtered_transactions
array. This field is populated only when the flag
filtering_applied
is true
.
unfiltered_implicit_transaction_ops: Vec<TrxOp>
The unfiltered implicit transaction ops in this block when NO filtering has been applied,
(i.e. filtering_applied = false
). When filtering has been applied on this block,
(i.e. filtering_applied = true
), this field will be set to nil
and instead, the
filtered_implicit_transaction_ops
will be populated with only filtered implicit
transaction ops.
Use the helper getter method ImplicitTransactionOps()
to automatically pick the correct
field to use (unfiltered_implicit_transaction_ops
when filtering_applied == false
and
filtered_implicit_transaction_ops
when filtering_applied == true
).
filtered_implicit_transaction_ops: Vec<TrxOp>
The filtered implicit transaction ops in this block when filtering has been applied,
(i.e. filtering_applied = true
). This will be only the implicit transaction ops
that matched the include filter CEL expression and did NOT match the exclude
filter CEL expression.
Use the helper getter method ImplicitTransactionOps()
to automatically the correct
field (unfiltered_implicit_transaction_ops
when filtering_applied == false
and
filtered_implicit_transaction_ops
when filtering_applied == true
).
unfiltered_transaction_traces: Vec<TransactionTrace>
The unfiltered transaction traces in this block when NO filtering has been applied,
(i.e. filtering_applied = false
). When filtering has been applied on this block,
(i.e. filtering_applied = true
), this field will be set to nil
and instead, the
filtered_transaction_traces
will be populated with only filtered transactions.
Use the helper getter method TransactionTraces()
to automatically pick the correct
field to use (unfiltered_transaction_traces
when filtering_applied == false
and
filtered_transaction_traces
when filtering_applied == true
).
filtered_transaction_traces: Vec<TransactionTrace>
The filtered transaction traces in this block when filtering has been applied,
(i.e. filtering_applied = true
). This will be only the transaction trace
that matched the include filter CEL expression and did NOT match the exclude
filter CEL expression.
Use the helper getter method TransactionTraces()
to automatically pick the correct
field to use (unfiltered_transaction_traces
when filtering_applied == false
and
filtered_transaction_traces
when filtering_applied == true
).
unfiltered_transaction_trace_count: u32
Number of transaction trace executed within this block when no filtering
is applied (filtering_applied == false
).
filtered_transaction_trace_count: u32
Number of transaction trace that were successfully executed within this block that are found in
the filtered_transaction_traces
array. This field is populated only when the flag
filtering_applied
is true
.
unfiltered_executed_input_action_count: u32
Number of top-level actions that were successfully executed within this block when no filtering
is applied (filtering_applied == false
).
filtered_executed_input_action_count: u32
Number of top-level actions that were successfully executed within this block that are found in
the filtered_transaction_traces
array. This field is populated only when the flag
filtering_applied
is true
.
unfiltered_executed_total_action_count: u32
Number of actions that were successfully executed within this block when no filtering
is applied (filtering_applied == false
).
filtered_executed_total_action_count: u32
Number of actions that were successfully executed within this block that are found in
the filtered_transaction_traces
array. This field is populated only when the flag
filtering_applied
is true
.
block_signing_key: String
EOSIO 1.x only
This was a single string element representing a public key (eos-go#ecc.PublicKey).
It has been replaced by valid_block_signing_authority_v2
.
active_schedule_v1: Option<ProducerSchedule>
This was a list of {name, publicKey}
elements, each block being signed by a single key,
the schedule was simply a list of pair, each pair being the producer name and it’s public key
used to sign the block.
EOSIO 2.0.x only
This replaces block_signing_key
with a richer structure
able to handle the weighted threshold multisig for block producers.
This can be downgraded to the old block_signing_key
simply by taking
the first key present in the list. This is of course simple and not
accurate anymore in EOSIO 2.0 system where WTMSIG_BLOCK_SIGNATURES
has been activated AND block producers starts signing blocks with
more than one key.
See BlockSigningAuthority for further details
active_schedule_v2: Option<ProducerAuthoritySchedule>
This repleaces the old type ProducerSchedule
for the active_schedule
field. This was only a type change in EOSIO 2.0, the field’s name remained
the same.
This is the new schedule data layout which is richer than it’s oldest counterpart. The inner element for a producer can then be composed with multiple keys, each with their own weight and the threshold required to accept the block signature.
filtering_applied: bool
Wheter or not a filtering process was run on this block. The filtering process sets to nil
the unfiltered_transaction_traces
to nil
and populate the filtered_transaction_traces
according to the filtering_include_filter_expr
and filtering_exclude_filter_expr
CEL
expressions. A transaction will be present in the filtered_transaction_traces
array if
it matched the filtering_include_filter_expr
and did NOT match the filtering_exclude_filter_expr
.
Moreover, each matching action that brought the transaction to be in filtered_transaction_traces
array will have a filtering_matched
flag set on it to broadcast the fact that this action
match the inclusion/exclusion list.
This flag controls all filtered_*
and unfiltered_*
elements on the Block structure and on
substructures if present.
filtering_include_filter_expr: String
The CEL filter expression used to include transaction in filtered_transaction_traces
array, works
in combination with filtering_exclude_filter_expr
value.
filtering_exclude_filter_expr: String
The CEL filter expression used to exclude transaction in filtered_transaction_traces
array, works
in combination with filtering_include_filter_expr
value.
filtering_system_actions_include_filter_expr: String
The CEL filter expression used to include system actions, required by some systems, works in combination with the two other filters above.
Implementations§
source§impl Block
impl Block
sourcepub fn all_transaction_traces(&self) -> impl Iterator<Item = &TransactionTrace>
pub fn all_transaction_traces(&self) -> impl Iterator<Item = &TransactionTrace>
returns all transaction traces from the block.
sourcepub fn executed_transaction_traces(
&self
) -> impl Iterator<Item = &TransactionTrace>
pub fn executed_transaction_traces(
&self
) -> impl Iterator<Item = &TransactionTrace>
returns all transaction traces which have the status executed
sourcepub fn transaction_traces_count(&self) -> u32
pub fn transaction_traces_count(&self) -> u32
returns the number of transaction traces included in this block
sourcepub fn executed_input_action_count(&self) -> u32
pub fn executed_input_action_count(&self) -> u32
Number of top-level actions that were successfully executed within this block.
sourcepub fn executed_total_action_count(&self) -> u32
pub fn executed_total_action_count(&self) -> u32
Number of actions that were successfully executed within this block.
Trait Implementations§
source§impl Message for Block
impl Message for Block
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.