Skip to content

Commit

Permalink
Merge pull request #145 from starkware-libs/add_fields_to_pending_block
Browse files Browse the repository at this point in the history
add missing fields to the pending block header (#145)
  • Loading branch information
ArielElp authored Oct 9, 2023
2 parents a53dea6 + 67aba04 commit dcae693
Showing 1 changed file with 48 additions and 39 deletions.
87 changes: 48 additions & 39 deletions api/starknet_api_openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,51 @@
"starknet_version"
]
},
"PENDING_BLOCK_HEADER": {
"title": "Pending block header",
"type": "object",
"properties": {
"block_hash": {
"title": "Block hash",
"$ref": "#/components/schemas/BLOCK_HASH"
},
"parent_hash": {
"title": "Parent hash",
"description": "The hash of this block's parent",
"$ref": "#/components/schemas/BLOCK_HASH"
},
"timestamp": {
"title": "Timestamp",
"description": "The time in which the block was created, encoded in Unix time",
"type": "integer",
"minimum": 0
},
"sequencer_address": {
"title": "Sequencer address",
"description": "The StarkNet identity of the sequencer submitting this block",
"$ref": "#/components/schemas/FELT"
},
"l1_gas_price": {
"title": "L1 gas price",
"descritpion": "The price of l1 gas in the block",
"$ref": "#/components/schemas/RESOURCE_PRICE"
},
"starknet_version": {
"title": "Starknet version",
"description": "Semver of the current Starknet protocol",
"type": "string"
}
},
"required": [
"block_hash",
"parent_hash",
"timestamp",
"sequencer_address",
"l1_gas_price",
"starknet_version"
],
"additionalProperties": false
},
"BLOCK_WITH_TX_HASHES": {
"title": "Block with transaction hashes",
"description": "The block object",
Expand Down Expand Up @@ -1477,25 +1522,7 @@
},
{
"title": "Pending block header",
"type": "object",
"properties": {
"timestamp": {
"title": "Timestamp",
"description": "The time in which the block was created, encoded in Unix time",
"type": "integer",
"minimum": 0
},
"sequencer_address": {
"title": "Sequencer address",
"description": "The StarkNet identity of the sequencer submitting this block",
"$ref": "#/components/schemas/FELT"
},
"parent_hash": {
"title": "Parent hash",
"description": "The hash of this block's parent",
"$ref": "#/components/schemas/BLOCK_HASH"
}
}
"$ref": "#/components/schemas/PENDING_BLOCK_HEADER"
}
],
"additionalProperties": false
Expand All @@ -1509,26 +1536,8 @@
"$ref": "#/components/schemas/BLOCK_BODY_WITH_TXS"
},
{
"type": "object",
"title": "Block Info",
"properties": {
"timestamp": {
"title": "Timestamp",
"description": "The time in which the block was created, encoded in Unix time",
"type": "integer",
"minimum": 0
},
"sequencer_address": {
"title": "Sequencer address",
"description": "The StarkNet identity of the sequencer submitting this block",
"$ref": "#/components/schemas/FELT"
},
"parent_hash": {
"title": "Parent hash",
"description": "The hash of this block's parent",
"$ref": "#/components/schemas/BLOCK_HASH"
}
}
"title": "Pending block header",
"$ref": "#/components/schemas/PENDING_BLOCK_HEADER"
}
],
"additionalProperties": false
Expand Down

0 comments on commit dcae693

Please sign in to comment.