Skip to content

Commit dcbed5e

Browse files
r-neargithub-actions[bot]
authored andcommitted
chore: sync openrpc.json and regenerate types
1 parent eca6161 commit dcbed5e

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed

openrpc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7045,6 +7045,22 @@
70457045
],
70467046
"title": "NonDelegateAction"
70477047
},
7048+
"NonceMode": {
7049+
"description": "Controls how the transaction nonce is validated against the access key nonce.",
7050+
"oneOf": [
7051+
{
7052+
"const": "monotonic",
7053+
"description": "Any nonce strictly greater than the current access key nonce (default behavior).",
7054+
"type": "string"
7055+
},
7056+
{
7057+
"const": "strict",
7058+
"description": "Nonce must be exactly `ak_nonce + 1` (sequential ordering).",
7059+
"type": "string"
7060+
}
7061+
],
7062+
"title": "NonceMode"
7063+
},
70487064
"PeerId": {
70497065
"allOf": [
70507066
{
@@ -8343,6 +8359,12 @@
83438359
"null"
83448360
]
83458361
},
8362+
"transaction_pool_strict_nonce_ttl_blocks": {
8363+
"description": "TTL in blocks for gapped strict-nonce transactions in the pool. Transactions with a\nnonce gap whose block_hash is older than this many blocks are evicted during\nprepare_transactions.",
8364+
"format": "uint64",
8365+
"minimum": 0,
8366+
"type": "integer"
8367+
},
83468368
"transaction_request_handler_threads": {
83478369
"format": "uint",
83488370
"minimum": 0,
@@ -8440,6 +8462,7 @@
84408462
"state_sync_enabled",
84418463
"state_sync",
84428464
"epoch_sync",
8465+
"transaction_pool_strict_nonce_ttl_blocks",
84438466
"enable_multiline_logging",
84448467
"resharding_config",
84458468
"tx_routing_height_horizon",
@@ -10671,6 +10694,16 @@
1067110694
"null"
1067210695
]
1067310696
},
10697+
"nonce_mode": {
10698+
"oneOf": [
10699+
{
10700+
"$ref": "#/components/schemas/NonceMode"
10701+
},
10702+
{
10703+
"type": "null"
10704+
}
10705+
]
10706+
},
1067410707
"priority_fee": {
1067510708
"default": 0,
1067610709
"description": "Deprecated, retained for backward compatibility.",

src/generated.rs

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2915,6 +2915,72 @@ impl ::std::convert::From<WithdrawFromGasKeyAction> for NonDelegateAction {
29152915
Self::WithdrawFromGasKey(value)
29162916
}
29172917
}
2918+
///Controls how the transaction nonce is validated against the access key nonce.
2919+
///
2920+
#[derive(
2921+
::serde::Deserialize,
2922+
::serde::Serialize,
2923+
Clone,
2924+
Copy,
2925+
Debug,
2926+
Eq,
2927+
Hash,
2928+
Ord,
2929+
PartialEq,
2930+
PartialOrd
2931+
)]
2932+
pub enum NonceMode {
2933+
///Any nonce strictly greater than the current access key nonce (default behavior).
2934+
#[serde(rename = "monotonic")]
2935+
Monotonic,
2936+
///Nonce must be exactly `ak_nonce + 1` (sequential ordering).
2937+
#[serde(rename = "strict")]
2938+
Strict,
2939+
}
2940+
impl ::std::fmt::Display for NonceMode {
2941+
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2942+
match *self {
2943+
Self::Monotonic => f.write_str("monotonic"),
2944+
Self::Strict => f.write_str("strict"),
2945+
}
2946+
}
2947+
}
2948+
impl ::std::str::FromStr for NonceMode {
2949+
type Err = self::error::ConversionError;
2950+
fn from_str(
2951+
value: &str,
2952+
) -> ::std::result::Result<Self, self::error::ConversionError> {
2953+
match value {
2954+
"monotonic" => Ok(Self::Monotonic),
2955+
"strict" => Ok(Self::Strict),
2956+
_ => Err("invalid value".into()),
2957+
}
2958+
}
2959+
}
2960+
impl ::std::convert::TryFrom<&str> for NonceMode {
2961+
type Error = self::error::ConversionError;
2962+
fn try_from(
2963+
value: &str,
2964+
) -> ::std::result::Result<Self, self::error::ConversionError> {
2965+
value.parse()
2966+
}
2967+
}
2968+
impl ::std::convert::TryFrom<&::std::string::String> for NonceMode {
2969+
type Error = self::error::ConversionError;
2970+
fn try_from(
2971+
value: &::std::string::String,
2972+
) -> ::std::result::Result<Self, self::error::ConversionError> {
2973+
value.parse()
2974+
}
2975+
}
2976+
impl ::std::convert::TryFrom<::std::string::String> for NonceMode {
2977+
type Error = self::error::ConversionError;
2978+
fn try_from(
2979+
value: ::std::string::String,
2980+
) -> ::std::result::Result<Self, self::error::ConversionError> {
2981+
value.parse()
2982+
}
2983+
}
29182984
///Peer id is the public key.
29192985
///
29202986
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
@@ -3545,6 +3611,10 @@ If disabled, the node will do Block Sync instead of State Sync.*/
35453611
will be unbounded.*/
35463612
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
35473613
pub transaction_pool_size_limit: ::std::option::Option<u64>,
3614+
/**TTL in blocks for gapped strict-nonce transactions in the pool. Transactions with a
3615+
nonce gap whose block_hash is older than this many blocks are evicted during
3616+
prepare_transactions.*/
3617+
pub transaction_pool_strict_nonce_ttl_blocks: u64,
35483618
pub transaction_request_handler_threads: u32,
35493619
///Upper bound of the byte size of contract state that is still viewable. None is no limit
35503620
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
@@ -4745,6 +4815,8 @@ pub struct SignedTransactionView {
47454815
pub nonce: u64,
47464816
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
47474817
pub nonce_index: ::std::option::Option<u16>,
4818+
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4819+
pub nonce_mode: ::std::option::Option<NonceMode>,
47484820
///Deprecated, retained for backward compatibility.
47494821
#[serde(default)]
47504822
pub priority_fee: u64,

0 commit comments

Comments
 (0)