Skip to content

Commit adc3ff5

Browse files
committed
debug, schemas: make timeout advisory for streaming clients
Clients that do not support execution timeouts (e.g. streaming JSON-RPC implementations) MAY ignore the timeout field. When a timeout is supported and reached, the client MUST still return an error with no partial results. Made-with: Cursor
1 parent c0b4d9d commit adc3ff5

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/debug/trace.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
2020
The response is an array ordered by transaction index within the block.
2121
Each entry includes the transaction hash paired with its trace result.
22-
If the execution timeout is reached before tracing completes, the client
23-
MUST return an error; no partial results are returned.
22+
If a timeout is configured and reached before tracing completes, the
23+
client MUST return an error; no partial results are returned. Clients
24+
that do not support execution timeouts MAY ignore the timeout field.
2425
params:
2526
- name: Block
2627
required: true
@@ -127,8 +128,9 @@
127128
128129
The response is an array ordered by transaction index within the block.
129130
Each entry includes the transaction hash paired with its trace result.
130-
If the execution timeout is reached before tracing completes, the client
131-
MUST return an error; no partial results are returned.
131+
If a timeout is configured and reached before tracing completes, the
132+
client MUST return an error; no partial results are returned. Clients
133+
that do not support execution timeouts MAY ignore the timeout field.
132134
133135
Clients MUST return an error if no block with the given hash is found.
134136
params:

src/schemas/opcode-tracer.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ TraceConfig:
3838
timeout:
3939
title: execution timeout
4040
description: >-
41-
Duration string specifying a timeout for trace execution. Applies to
42-
all tracers. Accepts Go duration strings (e.g. "5s", "300ms", "2m").
43-
Default: "5s". When the timeout is reached, the client MUST return an
44-
error; no partial results are returned.
41+
Optional duration string specifying a timeout for trace execution.
42+
Clients that do not support execution timeouts (e.g. streaming
43+
implementations) MAY ignore this field. When supported and the timeout
44+
is reached, the client MUST return an error; no partial results are
45+
returned. Accepts Go duration strings (e.g. "5s", "300ms", "2m").
4546
type: string
4647
disableStorage:
4748
title: disable storage capture

0 commit comments

Comments
 (0)