Skip to content

Commit da43b26

Browse files
committed
Merge branch 'main' into marko/key_rotation
2 parents 0b7bb5a + 01791ca commit da43b26

3 files changed

Lines changed: 1104 additions & 119 deletions

File tree

client/crates/types/src/proto/evnode.v1.messages.rs

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,151 @@ pub struct BlockData {
278278
#[prost(bytes = "vec", repeated, tag = "3")]
279279
pub blobs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
280280
}
281+
/// InitChainRequest contains the genesis parameters for chain initialization
282+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
283+
pub struct InitChainRequest {
284+
/// Timestamp marking chain start time in UTC
285+
#[prost(message, optional, tag = "1")]
286+
pub genesis_time: ::core::option::Option<::prost_types::Timestamp>,
287+
/// First block height (must be > 0)
288+
#[prost(uint64, tag = "2")]
289+
pub initial_height: u64,
290+
/// Unique identifier string for the blockchain
291+
#[prost(string, tag = "3")]
292+
pub chain_id: ::prost::alloc::string::String,
293+
}
294+
/// InitChainResponse contains the initial state and configuration
295+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
296+
pub struct InitChainResponse {
297+
/// Hash representing initial state
298+
#[prost(bytes = "vec", tag = "1")]
299+
pub state_root: ::prost::alloc::vec::Vec<u8>,
300+
}
301+
/// GetTxsRequest is the request for fetching transactions
302+
///
303+
/// Empty for now, may include filtering criteria in the future
304+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
305+
pub struct GetTxsRequest {}
306+
/// GetTxsResponse contains the available transactions
307+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
308+
pub struct GetTxsResponse {
309+
/// Slice of valid transactions from mempool
310+
#[prost(bytes = "vec", repeated, tag = "1")]
311+
pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
312+
}
313+
/// ExecuteTxsRequest contains transactions and block context for execution
314+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
315+
pub struct ExecuteTxsRequest {
316+
/// Ordered list of transactions to execute
317+
#[prost(bytes = "vec", repeated, tag = "1")]
318+
pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
319+
/// Height of block being created (must be > 0)
320+
#[prost(uint64, tag = "2")]
321+
pub block_height: u64,
322+
/// Block creation time in UTC
323+
#[prost(message, optional, tag = "3")]
324+
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
325+
/// Previous block's state root hash
326+
#[prost(bytes = "vec", tag = "4")]
327+
pub prev_state_root: ::prost::alloc::vec::Vec<u8>,
328+
}
329+
/// ExecuteTxsResponse contains the result of transaction execution
330+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
331+
pub struct ExecuteTxsResponse {
332+
/// New state root after executing transactions
333+
#[prost(bytes = "vec", tag = "1")]
334+
pub updated_state_root: ::prost::alloc::vec::Vec<u8>,
335+
/// Maximum allowed transaction size (may change with protocol updates)
336+
#[prost(uint64, tag = "2")]
337+
pub max_bytes: u64,
338+
/// Proposer address that should sign the next block.
339+
/// Empty means the current proposer remains active.
340+
#[prost(bytes = "vec", tag = "3")]
341+
pub next_proposer_address: ::prost::alloc::vec::Vec<u8>,
342+
}
343+
/// SetFinalRequest marks a block as finalized
344+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
345+
pub struct SetFinalRequest {
346+
/// Height of block to finalize
347+
#[prost(uint64, tag = "1")]
348+
pub block_height: u64,
349+
}
350+
/// SetFinalResponse indicates whether finalization was successful
351+
///
352+
/// Empty response, errors are returned via gRPC status
353+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
354+
pub struct SetFinalResponse {}
355+
/// GetExecutionInfoRequest requests execution layer parameters
356+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
357+
pub struct GetExecutionInfoRequest {}
358+
/// GetExecutionInfoResponse contains execution layer parameters
359+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
360+
pub struct GetExecutionInfoResponse {
361+
/// Maximum gas allowed for transactions in a block
362+
/// For non-gas-based execution layers, this should be 0
363+
#[prost(uint64, tag = "1")]
364+
pub max_gas: u64,
365+
/// Proposer address that should sign the next block from the execution
366+
/// layer's current view. Empty means unchanged or unavailable.
367+
#[prost(bytes = "vec", tag = "2")]
368+
pub next_proposer_address: ::prost::alloc::vec::Vec<u8>,
369+
}
370+
/// FilterTxsRequest contains transactions to validate and filter
371+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
372+
pub struct FilterTxsRequest {
373+
/// All transactions (force-included + mempool)
374+
#[prost(bytes = "vec", repeated, tag = "1")]
375+
pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
376+
/// Maximum cumulative size allowed (0 means no size limit)
377+
#[prost(uint64, tag = "2")]
378+
pub max_bytes: u64,
379+
/// Maximum cumulative gas allowed (0 means no gas limit)
380+
#[prost(uint64, tag = "3")]
381+
pub max_gas: u64,
382+
/// Whether force-included transactions are present
383+
#[prost(bool, tag = "4")]
384+
pub has_force_included_transaction: bool,
385+
}
386+
/// FilterTxsResponse contains the filter status for each transaction
387+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
388+
pub struct FilterTxsResponse {
389+
/// Filter status for each transaction (same length as txs in request)
390+
#[prost(enumeration = "FilterStatus", repeated, tag = "1")]
391+
pub statuses: ::prost::alloc::vec::Vec<i32>,
392+
}
393+
/// FilterStatus represents the result of filtering a transaction
394+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
395+
#[repr(i32)]
396+
pub enum FilterStatus {
397+
/// Transaction will make it to the next batch
398+
FilterOk = 0,
399+
/// Transaction will be filtered out because invalid (too big, malformed, etc.)
400+
FilterRemove = 1,
401+
/// Transaction is valid but postponed for later processing due to size/gas constraint
402+
FilterPostpone = 2,
403+
}
404+
impl FilterStatus {
405+
/// String value of the enum field names used in the ProtoBuf definition.
406+
///
407+
/// The values are not transformed in any way and thus are considered stable
408+
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
409+
pub fn as_str_name(&self) -> &'static str {
410+
match self {
411+
Self::FilterOk => "FILTER_OK",
412+
Self::FilterRemove => "FILTER_REMOVE",
413+
Self::FilterPostpone => "FILTER_POSTPONE",
414+
}
415+
}
416+
/// Creates an enum from field names used in the ProtoBuf definition.
417+
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
418+
match value {
419+
"FILTER_OK" => Some(Self::FilterOk),
420+
"FILTER_REMOVE" => Some(Self::FilterRemove),
421+
"FILTER_POSTPONE" => Some(Self::FilterPostpone),
422+
_ => None,
423+
}
424+
}
425+
}
281426
/// Block contains all the components of a complete block
282427
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
283428
pub struct Block {

0 commit comments

Comments
 (0)