Skip to content

Commit

Permalink
Merge pull request #216 from starkware-libs/l2_gas
Browse files Browse the repository at this point in the history
Adapt execution_resources to new receipt (#216)
  • Loading branch information
ArielElp authored Sep 17, 2024
2 parents e5ce8c6 + f95f332 commit af3a5ce
Showing 1 changed file with 40 additions and 126 deletions.
166 changes: 40 additions & 126 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,11 @@
"description": "The price of l1 gas in the block",
"$ref": "#/components/schemas/RESOURCE_PRICE"
},
"l2_gas_price": {
"title": "L2 gas price",
"description": "The price of l2 gas in the block",
"$ref": "#/components/schemas/RESOURCE_PRICE"
},
"l1_data_gas_price": {
"title": "L1 data gas price",
"description": "The price of l1 data gas in the block",
Expand Down Expand Up @@ -3346,23 +3351,33 @@
"title": "Fee estimation",
"type": "object",
"properties": {
"gas_consumed": {
"title": "Gas consumed",
"description": "The Ethereum gas consumption of the transaction",
"l1_gas_consumed": {
"title": "L1 gas consumed",
"description": "The Ethereum gas consumption of the transaction, charged for L1->L2 messages and, depending on the block's DA_MODE, state diffs",
"$ref": "#/components/schemas/FELT"
},
"gas_price": {
"title": "Gas price",
"l1_gas_price": {
"title": "L1 gas price",
"description": "The gas price (in wei or fri, depending on the tx version) that was used in the cost estimation",
"$ref": "#/components/schemas/FELT"
},
"data_gas_consumed": {
"title": "Data gas consumed",
"l2_gas_consumed": {
"title": "L2 gas consumed",
"description": "The L2 gas consumption of the transaction",
"$ref": "#/components/schemas/FELT"
},
"l2_gas_price": {
"title": "L2 gas price",
"description": "The L2 gas price (in wei or fri, depending on the tx version) that was used in the cost estimation",
"$ref": "#/components/schemas/FELT"
},
"l1_data_gas_consumed": {
"title": "L1 data gas consumed",
"description": "The Ethereum data gas consumption of the transaction",
"$ref": "#/components/schemas/FELT"
},
"data_gas_price": {
"title": "Data gas price",
"l1_data_gas_price": {
"title": "L1 data gas price",
"description": "The data gas price (in wei or fri, depending on the tx version) that was used in the cost estimation",
"$ref": "#/components/schemas/FELT"
},
Expand Down Expand Up @@ -3451,128 +3466,27 @@
},
"required": ["price_in_wei", "price_in_fri"]
},
"COMPUTATION_RESOURCES": {
"title": "Computation resources",
"description": "The resources consumed by the VM",
"type": "object",
"properties": {
"steps": {
"title": "Steps",
"description": "The number of Cairo steps used",
"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",
"not": {
"const": 0
}
},
"range_check_builtin_applications": {
"title": "Range check applications",
"description": "The number of RANGE_CHECK builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"pedersen_builtin_applications": {
"title": "Pedersen applications",
"description": "The number of Pedersen builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"poseidon_builtin_applications": {
"title": "Poseidon applications",
"description": "The number of Poseidon builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"ec_op_builtin_applications": {
"title": "EC_OP applications",
"description": "the number of EC_OP builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"ecdsa_builtin_applications": {
"title": "ECDSA applications",
"description": "the number of ECDSA builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"bitwise_builtin_applications": {
"title": "BITWISE applications",
"description": "the number of BITWISE builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"keccak_builtin_applications": {
"title": "Keccak applications",
"description": "The number of KECCAK builtin instances",
"type": "integer",
"not": {
"const": 0
}
},
"segment_arena_builtin": {
"title": "Segment arena",
"description": "The number of accesses to the segment arena",
"type": "integer",
"not": {
"const": 0
}
}
},
"required": ["steps"]
},
"EXECUTION_RESOURCES": {
"type": "object",
"title": "Execution resources",
"description": "the resources consumed by the transaction, includes both computation and data",
"allOf": [
{
"title": "ComputationResources",
"$ref": "#/components/schemas/COMPUTATION_RESOURCES"
"description": "the resources consumed by the transaction",
"properties": {
"l1_gas": {
"title": "L1Gas",
"description": "l1 gas consumed by this transaction, used for l2-->l1 messages and state updates if blobs are not used",
"type": "integer"
},
{
"type": "object",
"title": "DataResources",
"description": "the data-availability resources of this transaction",
"properties": {
"data_availability": {
"type": "object",
"properties": {
"l1_gas": {
"title": "L1Gas",
"description": "the gas consumed by this transaction's data, 0 if it uses data gas for DA",
"type": "integer"
},
"l1_data_gas": {
"title": "L1DataGas",
"description": "the data gas consumed by this transaction's data, 0 if it uses gas for DA",
"type": "integer"
}
},
"required": ["l1_gas", "l1_data_gas"]
}
},
"required": ["data_availability"]
"l1_data_gas": {
"title": "L1DataGas",
"description": "data gas consumed by this transaction, 0 if blobs are not used",
"type": "integer"
},
"l2_gas": {
"title": "L2Gas",
"description": "l2 gas consumed by this transaction, used for computation and calldata",
"type": "integer"
}
]
}
}
},
"errors": {
Expand Down

0 comments on commit af3a5ce

Please sign in to comment.