-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92add9a
commit 575e89d
Showing
9 changed files
with
107 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//! Types used in mining RPC methods. | ||
pub(crate) mod coinbase; | ||
pub(crate) mod default_roots; | ||
pub(crate) mod get_block_template; | ||
pub(crate) mod transaction; |
5 changes: 5 additions & 0 deletions
5
zebra-rpc/src/methods/get_block_template_rpcs/types/coinbase.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//! The `Coinbase` type is part of the `getblocktemplate` RPC method output. | ||
/// documentation and fields to be added in #5453. | ||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||
pub struct Coinbase {} |
18 changes: 18 additions & 0 deletions
18
zebra-rpc/src/methods/get_block_template_rpcs/types/default_roots.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! The `DefaultRoots` type is part of the `getblocktemplate` RPC method output. | ||
/// Documentation to be added in #5452 or #5455. | ||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||
pub struct DefaultRoots { | ||
/// Add documentation. | ||
#[serde(rename = "merkleroot")] | ||
pub merkle_root: String, | ||
/// Add documentation. | ||
#[serde(rename = "chainhistoryroot")] | ||
pub chain_history_root: String, | ||
/// Add documentation. | ||
#[serde(rename = "authdataroot")] | ||
pub auth_data_root: String, | ||
/// Add documentation. | ||
#[serde(rename = "blockcommitmentshash")] | ||
pub block_commitments_hash: String, | ||
} |
57 changes: 57 additions & 0 deletions
57
zebra-rpc/src/methods/get_block_template_rpcs/types/get_block_template.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
//! The `GetBlockTempate` type is the output of the `getblocktemplate` RPC method. | ||
use crate::methods::get_block_template_rpcs::types::{ | ||
coinbase::Coinbase, default_roots::DefaultRoots, transaction::Transaction, | ||
}; | ||
|
||
/// Documentation to be added after we document all the individual fields. | ||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||
pub struct GetBlockTemplate { | ||
/// Add documentation. | ||
pub capabilities: Vec<String>, | ||
/// Add documentation. | ||
pub version: usize, | ||
/// Add documentation. | ||
#[serde(rename = "previousblockhash")] | ||
pub previous_block_hash: String, | ||
/// Add documentation. | ||
#[serde(rename = "blockcommitmentshash")] | ||
pub block_commitments_hash: String, | ||
/// Add documentation. | ||
#[serde(rename = "lightclientroothash")] | ||
pub light_client_root_hash: String, | ||
/// Add documentation. | ||
#[serde(rename = "finalsaplingroothash")] | ||
pub final_sapling_root_hash: String, | ||
/// Add documentation. | ||
#[serde(rename = "defaultroots")] | ||
pub default_roots: DefaultRoots, | ||
/// Add documentation. | ||
pub transactions: Vec<Transaction>, | ||
/// Add documentation. | ||
#[serde(rename = "coinbasetxn")] | ||
pub coinbase_txn: Coinbase, | ||
/// Add documentation. | ||
pub target: String, | ||
/// Add documentation. | ||
#[serde(rename = "mintime")] | ||
pub min_time: u32, | ||
/// Add documentation. | ||
pub mutable: Vec<String>, | ||
/// Add documentation. | ||
#[serde(rename = "noncerange")] | ||
pub nonce_range: String, | ||
/// Add documentation. | ||
#[serde(rename = "sigoplimit")] | ||
pub sigop_limit: u32, | ||
/// Add documentation. | ||
#[serde(rename = "sizelimit")] | ||
pub size_limit: u32, | ||
/// Add documentation. | ||
#[serde(rename = "curtime")] | ||
pub cur_time: u32, | ||
/// Add documentation. | ||
pub bits: String, | ||
/// Add documentation. | ||
pub height: u32, | ||
} |
5 changes: 5 additions & 0 deletions
5
zebra-rpc/src/methods/get_block_template_rpcs/types/transaction.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//! The `Transaction` type is part of the `getblocktemplate` RPC method output. | ||
/// Documentation and fields to be added in #5454. | ||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize)] | ||
pub struct Transaction {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters