Skip to content

Commit dc0748d

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

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-0
lines changed

openrpc.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6509,6 +6509,15 @@
65096509
"null"
65106510
]
65116511
},
6512+
"max_function_body_size": {
6513+
"description": "If present, stores max byte size of a single function body in a contract",
6514+
"format": "uint64",
6515+
"minimum": 0,
6516+
"type": [
6517+
"integer",
6518+
"null"
6519+
]
6520+
},
65126521
"max_functions_number_per_contract": {
65136522
"description": "If present, stores max number of functions in one contract",
65146523
"format": "uint64",
@@ -6526,6 +6535,15 @@
65266535
],
65276536
"description": "Max amount of gas that can be used, excluding gas attached to promises."
65286537
},
6538+
"max_instrumented_code_size": {
6539+
"description": "If present, stores max byte size of the wasm code after gas instrumentation.\nThis prevents Cranelift's 24-bit SSA counter from overflowing on\npathologically large contracts.",
6540+
"format": "uint64",
6541+
"minimum": 0,
6542+
"type": [
6543+
"integer",
6544+
"null"
6545+
]
6546+
},
65296547
"max_length_method_name": {
65306548
"description": "Max length of any method name (without terminating character).",
65316549
"format": "uint64",
@@ -7227,6 +7245,16 @@
72277245
"const": "TooManyTableElements",
72287246
"description": "Contract contains too many table elements.",
72297247
"type": "string"
7248+
},
7249+
{
7250+
"const": "FunctionBodyTooLarge",
7251+
"description": "A function body in the contract exceeds the size limit.",
7252+
"type": "string"
7253+
},
7254+
{
7255+
"const": "InstrumentedCodeTooLarge",
7256+
"description": "The instrumented code exceeds the size limit.",
7257+
"type": "string"
72307258
}
72317259
],
72327260
"title": "PrepareError"
@@ -8214,6 +8242,10 @@
82148242
"description": "Save observed instances of ChunkStateWitness to the database in DBCol::LatestChunkStateWitnesses.\nSaving the latest witnesses is useful for analysis and debugging.\nThis option can cause extra load on the database and is not recommended for production use.",
82158243
"type": "boolean"
82168244
},
8245+
"save_receipt_to_tx": {
8246+
"description": "Whether to persist receipt-to-tx origin mappings to disk or not.",
8247+
"type": "boolean"
8248+
},
82178249
"save_state_changes": {
82188250
"description": "Whether to persist state changes on disk or not.",
82198251
"type": "boolean"
@@ -8450,6 +8482,7 @@
84508482
"archive",
84518483
"save_trie_changes",
84528484
"save_tx_outcomes",
8485+
"save_receipt_to_tx",
84538486
"save_state_changes",
84548487
"save_untracked_partial_chunks_parts",
84558488
"view_client_threads",
@@ -9224,6 +9257,34 @@
92249257
"title": "RpcReceiptResponse",
92259258
"type": "object"
92269259
},
9260+
"RpcReceiptToTxRequest": {
9261+
"properties": {
9262+
"receipt_id": {
9263+
"$ref": "#/components/schemas/CryptoHash"
9264+
}
9265+
},
9266+
"required": [
9267+
"receipt_id"
9268+
],
9269+
"title": "RpcReceiptToTxRequest",
9270+
"type": "object"
9271+
},
9272+
"RpcReceiptToTxResponse": {
9273+
"properties": {
9274+
"sender_account_id": {
9275+
"$ref": "#/components/schemas/AccountId"
9276+
},
9277+
"transaction_hash": {
9278+
"$ref": "#/components/schemas/CryptoHash"
9279+
}
9280+
},
9281+
"required": [
9282+
"transaction_hash",
9283+
"sender_account_id"
9284+
],
9285+
"title": "RpcReceiptToTxResponse",
9286+
"type": "object"
9287+
},
92279288
"RpcSendTransactionRequest": {
92289289
"properties": {
92299290
"signed_tx_base64": {
@@ -12117,6 +12178,10 @@
1211712178
"minimum": 0,
1211812179
"type": "integer"
1211912180
},
12181+
"one_yocto_on_promise": {
12182+
"description": "See [VMConfig::one_yocto_on_promise](crate::vm::Config::one_yocto_on_promise).",
12183+
"type": "boolean"
12184+
},
1212012185
"reftypes_bulk_memory": {
1212112186
"description": "See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).",
1212212187
"type": "boolean"
@@ -12156,6 +12221,7 @@
1215612221
"reftypes_bulk_memory",
1215712222
"deterministic_account_ids",
1215812223
"gas_key_host_fns",
12224+
"one_yocto_on_promise",
1215912225
"storage_get_mode",
1216012226
"fix_contract_loading_cost",
1216112227
"implicit_account_creation",
@@ -13198,6 +13264,34 @@
1319813264
}
1319913265
]
1320013266
},
13267+
{
13268+
"name": "EXPERIMENTAL_receipt_to_tx",
13269+
"paramStructure": "by-name",
13270+
"params": [
13271+
{
13272+
"name": "receipt_id",
13273+
"required": true,
13274+
"schema": {
13275+
"$ref": "#/components/schemas/CryptoHash"
13276+
}
13277+
}
13278+
],
13279+
"result": {
13280+
"name": "result",
13281+
"schema": {
13282+
"$ref": "#/components/schemas/RpcReceiptToTxResponse"
13283+
}
13284+
},
13285+
"summary": "Resolves a receipt ID back to the originating transaction hash and sender account",
13286+
"tags": [
13287+
{
13288+
"name": "receipt"
13289+
},
13290+
{
13291+
"name": "experimental"
13292+
}
13293+
]
13294+
},
1320113295
{
1320213296
"name": "EXPERIMENTAL_maintenance_windows",
1320313297
"paramStructure": "by-name",

src/generated.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,11 +2404,19 @@ NOTE: It's not a limiter itself, but it's a value we use for initial_memory_page
24042404
///If present, stores max number of elements in a single contract's table
24052405
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24062406
pub max_elements_per_contract_table: ::std::option::Option<u32>,
2407+
///If present, stores max byte size of a single function body in a contract
2408+
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2409+
pub max_function_body_size: ::std::option::Option<u64>,
24072410
///If present, stores max number of functions in one contract
24082411
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
24092412
pub max_functions_number_per_contract: ::std::option::Option<u64>,
24102413
///Max amount of gas that can be used, excluding gas attached to promises.
24112414
pub max_gas_burnt: NearGas,
2415+
/**If present, stores max byte size of the wasm code after gas instrumentation.
2416+
This prevents Cranelift's 24-bit SSA counter from overflowing on
2417+
pathologically large contracts.*/
2418+
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2419+
pub max_instrumented_code_size: ::std::option::Option<u64>,
24122420
///Max length of any method name (without terminating character).
24132421
pub max_length_method_name: u64,
24142422
///Max length of returned data
@@ -3093,6 +3101,10 @@ instantiable and/or un-linkable.*/
30933101
TooManyTables,
30943102
///Contract contains too many table elements.
30953103
TooManyTableElements,
3104+
///A function body in the contract exceeds the size limit.
3105+
FunctionBodyTooLarge,
3106+
///The instrumented code exceeds the size limit.
3107+
InstrumentedCodeTooLarge,
30963108
}
30973109
impl ::std::fmt::Display for PrepareError {
30983110
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
@@ -3108,6 +3120,8 @@ impl ::std::fmt::Display for PrepareError {
31083120
Self::TooManyLocals => f.write_str("TooManyLocals"),
31093121
Self::TooManyTables => f.write_str("TooManyTables"),
31103122
Self::TooManyTableElements => f.write_str("TooManyTableElements"),
3123+
Self::FunctionBodyTooLarge => f.write_str("FunctionBodyTooLarge"),
3124+
Self::InstrumentedCodeTooLarge => f.write_str("InstrumentedCodeTooLarge"),
31113125
}
31123126
}
31133127
}
@@ -3128,6 +3142,8 @@ impl ::std::str::FromStr for PrepareError {
31283142
"TooManyLocals" => Ok(Self::TooManyLocals),
31293143
"TooManyTables" => Ok(Self::TooManyTables),
31303144
"TooManyTableElements" => Ok(Self::TooManyTableElements),
3145+
"FunctionBodyTooLarge" => Ok(Self::FunctionBodyTooLarge),
3146+
"InstrumentedCodeTooLarge" => Ok(Self::InstrumentedCodeTooLarge),
31313147
_ => Err("invalid value".into()),
31323148
}
31333149
}
@@ -3565,6 +3581,8 @@ This option can cause extra load on the database and is not recommended for prod
35653581
Saving the latest witnesses is useful for analysis and debugging.
35663582
This option can cause extra load on the database and is not recommended for production use.*/
35673583
pub save_latest_witnesses: bool,
3584+
///Whether to persist receipt-to-tx origin mappings to disk or not.
3585+
pub save_receipt_to_tx: bool,
35683586
///Whether to persist state changes on disk or not.
35693587
pub save_state_changes: bool,
35703588
/**save_trie_changes should be set to true iff
@@ -3975,6 +3993,19 @@ pub struct RpcReceiptResponse {
39753993
pub receipt_id: CryptoHash,
39763994
pub receiver_id: AccountId,
39773995
}
3996+
///`RpcReceiptToTxRequest`
3997+
///
3998+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3999+
pub struct RpcReceiptToTxRequest {
4000+
pub receipt_id: CryptoHash,
4001+
}
4002+
///`RpcReceiptToTxResponse`
4003+
///
4004+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4005+
pub struct RpcReceiptToTxResponse {
4006+
pub sender_account_id: AccountId,
4007+
pub transaction_hash: CryptoHash,
4008+
}
39784009
///`RpcSendTransactionRequest`
39794010
///
39804011
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
@@ -5640,6 +5671,8 @@ on runtime.*/
56405671
pub linear_op_base_cost: u64,
56415672
///Unit gas cost of a linear operation
56425673
pub linear_op_unit_cost: u64,
5674+
///See [VMConfig::one_yocto_on_promise](crate::vm::Config::one_yocto_on_promise).
5675+
pub one_yocto_on_promise: bool,
56435676
///See [VMConfig::reftypes_bulk_memory](crate::vm::Config::reftypes_bulk_memory).
56445677
pub reftypes_bulk_memory: bool,
56455678
///Gas cost of a regular operation.

0 commit comments

Comments
 (0)