Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data consumption to receipts and traces #187

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading