Skip to content

Commit

Permalink
Merge pull request #187 from starkware-libs/add_da_consumption_to_rec…
Browse files Browse the repository at this point in the history
…eipts

Add data consumption to receipts and traces (#187)
  • Loading branch information
ArielElp authored Feb 2, 2024
2 parents 4966593 + 69760fc commit 830d153
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 6 deletions.
44 changes: 42 additions & 2 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3768,8 +3768,8 @@
"price_in_fri"
]
},
"EXECUTION_RESOURCES": {
"title": "Execution resources",
"COMPUTATION_RESOURCES": {
"title": "Computation resources",
"description": "The resources consumed by the VM",
"type": "object",
"properties": {
Expand Down Expand Up @@ -3857,6 +3857,46 @@
"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"
},
{
"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"
]
}
]
}
},
"errors": {
Expand Down
29 changes: 25 additions & 4 deletions api/starknet_trace_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@
"description": "the state diffs induced by the transaction",
"$ref": "#/components/schemas/STATE_DIFF"
},
"execution_resources": {
"title": "Execution resources",
"description": "the resources consumed by the transaction, includes both computation and data",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
},
"type": {
"title": "Type",
"type": "string",
Expand All @@ -193,7 +198,8 @@
},
"required": [
"type",
"execute_invocation"
"execute_invocation",
"execution_resources"
]
},
{
Expand All @@ -212,6 +218,11 @@
"description": "the state diffs induced by the transaction",
"$ref": "#/components/schemas/STATE_DIFF"
},
"execution_resources": {
"title": "Execution resources",
"description": "the resources consumed by the transaction, includes both computation and data",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
},
"type": {
"title": "Type",
"type": "string",
Expand All @@ -221,7 +232,8 @@
}
},
"required": [
"type"
"type",
"execution_resources"
]
},
{
Expand All @@ -244,6 +256,11 @@
"description": "the state diffs induced by the transaction",
"$ref": "#/components/schemas/STATE_DIFF"
},
"execution_resources": {
"title": "Execution resources",
"description": "the resources consumed by the transaction, includes both computation and data",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
},
"type": {
"title": "Type",
"type": "string",
Expand All @@ -254,6 +271,7 @@
},
"required": [
"type",
"execution_resources",
"constructor_invocation"
]
},
Expand Down Expand Up @@ -354,9 +372,9 @@
}
},
"execution_resources": {
"title": "Execution resources",
"title": "Computation resources",
"description": "Resources consumed by the internal call",
"$ref": "#/components/schemas/EXECUTION_RESOURCES"
"$ref": "#/components/schemas/COMPUTATION_RESOURCES"
}
},
"required": [
Expand Down Expand Up @@ -453,6 +471,9 @@
"STATE_DIFF": {
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/STATE_DIFF"
},
"COMPUTATION_RESOURCES": {
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/COMPUTATION_RESOURCES"
},
"EXECUTION_RESOURCES": {
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/EXECUTION_RESOURCES"
}
Expand Down

0 comments on commit 830d153

Please sign in to comment.