From 88f71e099bcb962eed1884a22b9117d09802d5c6 Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Sun, 12 Nov 2023 14:19:02 +0200 Subject: [PATCH 1/2] bound number fields by FELT and make builtin resources optional --- api/starknet_api_openrpc.json | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index a7aa93f..cc144f9 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -2376,7 +2376,7 @@ "version": { "title": "Version", "description": "Version of the transaction scheme", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" }, "type": { "title": "Deploy", @@ -2657,7 +2657,7 @@ "version": { "title": "Version", "description": "Version of the transaction scheme", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" }, "type": { "title": "type", @@ -3621,17 +3621,17 @@ "gas_consumed": { "title": "Gas consumed", "description": "The Ethereum gas cost of the transaction (see https://docs.starknet.io/docs/Fees/fee-mechanism for more info)", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" }, "gas_price": { "title": "Gas price", "description": "The gas price (in gwei) that was used in the cost estimation", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" }, "overall_fee": { "title": "Overall fee", "description": "The estimated fee for the transaction (in gwei), product of gas_consumed and gas_price", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" } }, "required": [ @@ -3698,12 +3698,12 @@ "max_amount": { "title": "max amount", "description": "the max amount of the resource that can be used in the tx", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" }, "max_price_per_unit": { "title": "max price", "description": "the max price per unit of this resource for this tx", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" } }, "required": [ @@ -3717,12 +3717,12 @@ "price_in_strk": { "title": "price in strk", "description": "the price of one unit of the given resource, denominated in strk", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" }, "price_in_wei": { "title": "price in wei", "description": "the price of one unit of the given resource, denominated in wei", - "$ref": "#/components/schemas/NUM_AS_HEX" + "$ref": "#/components/schemas/FELT" } }, "required": [ @@ -3782,14 +3782,7 @@ } }, "required": [ - "steps", - "range_check_builtin_applications", - "pedersen_builtin_applications", - "poseidon_builtin_applications", - "ec_op_builtin_applications", - "ecdsa_builtin_applications", - "bitwise_builtin_applications", - "keccak_builtin_applications" + "steps" ] } }, From 274656b1d327b3b0acd7290d30f7261746ba6730 Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Sun, 12 Nov 2023 17:10:21 +0200 Subject: [PATCH 2/2] add >0 constraint to builtins --- api/starknet_api_openrpc.json | 45 ++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index cc144f9..ec7fc67 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -3738,47 +3738,74 @@ "steps": { "title": "Steps", "description": "The number of Cairo steps used", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "memory_holes": { "title": "Memory holes", "description": "The number of unused memory cells (each cell is roughly equivalent to a step)", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "range_check_builtin_applications": { "title": "Range check applications", "description": "The number of RANGE_CHECK builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "pedersen_builtin_applications": { "title": "Pedersen applications", "description": "The number of Pedersen builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "poseidon_builtin_applications": { "title": "Poseidon applications", "description": "The number of Poseidon builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "ec_op_builtin_applications": { "title": "EC_OP applications", "description": "the number of EC_OP builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "ecdsa_builtin_applications": { "title": "ECDSA applications", "description": "the number of ECDSA builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "bitwise_builtin_applications": { "title": "BITWISE applications", "description": "the number of BITWISE builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } }, "keccak_builtin_applications": { "title": "Keccak applications", "description": "The number of KECCAK builtin instances", - "type": "integer" + "type": "integer", + "not": { + "const": 0 + } } }, "required": [