Skip to content
Open
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build: tools
test: tools
./tools/speccheck -v

lint:
lint: build
@[ -f refs-openrpc.json ] || $(MAKE) build >/dev/null
cd tools && go tool openrpc-linter lint ../refs-openrpc.json -r ../openrpc-lint.yml

Expand Down
16 changes: 7 additions & 9 deletions openrpc-lint.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
extends: [recommended]
rules:
error-description:
severity: ignore
example-description:
severity: ignore
method-description:
severity: ignore
method-errors:
severity: warn
method-examples:
severity: warn
method-summary-length:
severity: ignore
result-description:
severity: ignore
schema-description:
severity: ignore
error-description:
severity: ignore
example-description:
severity: ignore
method-summary-length:
schema-title:
severity: ignore
3 changes: 3 additions & 0 deletions src/debug/getters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
- name: debug_getBadBlocks
summary: Returns an array of recent bad blocks that the client has seen on the network.
params: []
errors:
- code: 4444
message: Pruned history unavailable
result:
name: Blocks
schema:
Expand Down
1 change: 1 addition & 0 deletions src/engine/openrpc/methods/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
type: array
items:
type: string
errors: []
examples:
- name: engine_exchangeCapabilities example
params:
Expand Down
41 changes: 38 additions & 3 deletions src/engine/openrpc/methods/forkchoice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
validationError: null
payloadId: '0x0000000021f32cc1'
- name: engine_forkchoiceUpdatedV2
summary: Updates the forkchoice state
summary: Updates the forkchoice state, adds withdrawals
externalDocs:
description: Method specification
url: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_forkchoiceupdatedv2
Expand Down Expand Up @@ -102,7 +102,7 @@
validationError: null
payloadId: '0x0000000021f32cc1'
- name: engine_forkchoiceUpdatedV3
summary: Updates the forkchoice state
summary: Updates the forkchoice state, adds parent beacon block root
externalDocs:
description: Method specification
url: https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_forkchoiceupdatedv3
Expand Down Expand Up @@ -162,7 +162,7 @@
validationError: null
payloadId: '0x0000000021f32cc1'
- name: engine_forkchoiceUpdatedV4
summary: Updates the forkchoice state
summary: Updates the forkchoice state, adds custody columns
externalDocs:
description: Method specification
url: https://github.com/ethereum/execution-apis/blob/main/src/engine/amsterdam.md#engine_forkchoiceupdatedv4
Expand Down Expand Up @@ -196,3 +196,38 @@
message: Unsupported fork
- code: -38006
message: Too deep reorg
examples:
- name: engine_forkchoiceUpdatedV4 example
params:
- name: Forkchoice state
value:
headBlockHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
safeBlockHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
finalizedBlockHash: '0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a'
- name: Payload attributes
value:
timestamp: '0x64e7785b'
prevRandao: '0xc130d5e63c61c935f6089e61140ca9136172677cf6aa5800dcc1cf0a02152a14'
suggestedFeeRecipient: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b'
withdrawals:
- index: '0xf0'
validatorIndex: '0xf0'
address: '0x00000000000000000000000000000000000010f0'
amount: '0x1'
- index: '0xf1'
validatorIndex: '0xf1'
address: '0x00000000000000000000000000000000000010f1'
amount: '0x1'
parentBeaconBlockRoot: '0x11f780a954bcba8889998e4e61deaae6388dd2391e9c810bd9c94962cc1eadc1'
slotNumber: '0x1'
targetGasLimit: '0x1c9c380'
- name: Custody columns
value: null
result:
name: Response object
value:
payloadStatus:
status: VALID
latestValidHash: '0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858'
validationError: null
payloadId: '0x0000000021f32cc1'
21 changes: 12 additions & 9 deletions src/engine/openrpc/methods/payload.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/engine/openrpc/methods/transition_configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
name: Execution client configuration
schema:
$ref: '#/components/schemas/TransitionConfigurationV1'
errors: []
examples:
- name: engine_exchangeTransitionConfigurationV1 example
params:
Expand Down
1 change: 1 addition & 0 deletions src/eth/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
current head block and retention policies for each resource type. This is
useful for RPC routers to determine which historical queries a node can serve.
params: []
errors: []
result:
name: Capabilities
schema:
Expand Down
7 changes: 7 additions & 0 deletions src/eth/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
name: Chain ID
schema:
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_chainId example
params: []
Expand All @@ -18,6 +19,7 @@
name: Syncing status
schema:
$ref: '#/components/schemas/SyncingStatus'
errors: []
examples:
- name: eth_syncing example
params: []
Expand All @@ -34,6 +36,7 @@
name: Coinbase address
schema:
$ref: '#/components/schemas/address'
errors: []
examples:
- name: eth_coinbase example
params: []
Expand All @@ -50,6 +53,7 @@
type: array
items:
$ref: '#/components/schemas/address'
errors: []
examples:
- name: eth_accounts example
params: []
Expand All @@ -64,6 +68,7 @@
name: Block number
schema:
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_blockNumber example
params: []
Expand All @@ -80,6 +85,7 @@
name: Configuration
schema:
$ref: '#/components/schemas/ConfigurationResponse'
errors: []
examples:
- name: eth_config example with no future fork scheduled
params: []
Expand Down Expand Up @@ -127,6 +133,7 @@
name: Network ID
schema:
$ref: '#/components/schemas/uintDecimal'
errors: []
examples:
- name: net_version example
params: []
Expand Down
44 changes: 44 additions & 0 deletions src/eth/execute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
gasUsed:
title: Gas used
$ref: '#/components/schemas/uint'
errors:
- code: 3
message: "execution reverted"
data:
title: "raw EVM revert data"
$ref: "#/components/schemas/bytes"
examples:
- name: eth_createAccessList example
params:
Expand Down Expand Up @@ -165,3 +171,41 @@
message: Max init code size exceeded
- code: -38026
message: Client adjustable limit exceeded
examples:
- name: eth_simulateV1 example
params:
- name: Payload
value:
blockStateCalls:
- calls:
- from: '0xfe3b557e8fb62b89f4916b721be55ceb828dbd73'
to: '0x627306090abab3a6e1400e9345bc60c78a8bef57'
value: '0x1'
- name: Block tag
value: latest
result:
name: Result of calls
value:
- hash: '0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c'
parentHash: '0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d'
sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'
miner: '0xb42b6c4a95406c78ff892d270ad20b22642e102d'
stateRoot: '0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233'
transactionsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'
receiptsRoot: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
number: '0x68b3'
gasLimit: '0x47e7c4'
gasUsed: '0x5208'
timestamp: '0x5835c54d'
extraData: '0x'
mixHash: '0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d'
nonce: '0x0000000000000000'
size: '0x200'
transactions: []
uncles: []
calls:
- status: '0x1'
returnData: '0x'
gasUsed: '0x5208'
logs: []
6 changes: 6 additions & 0 deletions src/eth/fee_market.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
schema:
title: Gas price
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_gasPrice example
params: []
Expand All @@ -20,6 +21,7 @@
schema:
title: Blob gas base fee
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_blobBaseFee example
params: []
Expand All @@ -34,6 +36,7 @@
schema:
title: Max priority fee per gas
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_maxPriorityFeePerGas example
params: []
Expand Down Expand Up @@ -117,6 +120,9 @@
title: rewardPercentile
description: A given percentile sample of effective priority fees per gas from a single block in ascending order, weighted by gas used. Zeroes are returned if the block is empty.
$ref: '#/components/schemas/uint'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_feeHistory example
params:
Expand Down
6 changes: 6 additions & 0 deletions src/eth/filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
name: Filter identifier
schema:
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_newFilter example
params:
Expand All @@ -28,6 +29,7 @@
name: Filter identifier
schema:
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_newBlockFilter example
params: []
Expand All @@ -41,6 +43,7 @@
name: Filter identifier
schema:
$ref: '#/components/schemas/uint'
errors: []
examples:
- name: eth_newPendingTransactionFilter example
params: []
Expand All @@ -58,6 +61,7 @@
name: Success
schema:
type: boolean
errors: []
examples:
- name: eth_uninstallFilter example
params:
Expand All @@ -77,6 +81,7 @@
name: Log objects
schema:
$ref: '#/components/schemas/FilterResults'
errors: []
examples:
- name: eth_getFilterChanges example
params:
Expand Down Expand Up @@ -118,6 +123,7 @@
name: Log objects
schema:
$ref: '#/components/schemas/FilterResults'
errors: []
examples:
- name: eth_getFilterLogs example
params:
Expand Down
6 changes: 6 additions & 0 deletions src/eth/sign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
name: Signature
schema:
$ref: '#/components/schemas/bytes65'
errors:
- code: -32000
message: Unknown account
examples:
- name: eth_sign example
params:
Expand All @@ -34,6 +37,9 @@
name: Encoded transaction
schema:
$ref: '#/components/schemas/bytes'
errors:
- code: -32000
message: Unknown account
examples:
- name: eth_signTransaction example
params:
Expand Down
Loading
Loading