Skip to content
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
6 changes: 2 additions & 4 deletions tests/test_json_marshalling.nim
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ proc rand[T](_: type seq[T]): seq[T] =
for i in 0..<3:
result[i] = rand(T)

proc rand(_: type array[3, seq[byte]]): array[3, seq[byte]] =
proc rand(_: type seq[seq[byte]]): seq[seq[byte]] =
var z = newSeq[byte](10)
discard randomBytes(z)
result[0] = z
result[1] = z
result[2] = z
@[z, z, z]

proc rand[T](_: type SingleOrList[T]): SingleOrList[T] =
SingleOrList[T](kind: slkSingle, single: rand(T))
Expand Down
4 changes: 2 additions & 2 deletions web3/engine_api.nim
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ createRpcSigsFromNim(RpcClient):
proc engine_newPayloadV1(payload: ExecutionPayloadV1): PayloadStatusV1
proc engine_newPayloadV2(payload: ExecutionPayloadV2): PayloadStatusV1
proc engine_newPayloadV3(payload: ExecutionPayloadV3, expectedBlobVersionedHashes: seq[VersionedHash], parentBeaconBlockRoot: Hash32): PayloadStatusV1
proc engine_newPayloadV4(payload: ExecutionPayloadV3, expectedBlobVersionedHashes: seq[VersionedHash], parentBeaconBlockRoot: Hash32, executionRequests: array[3, seq[byte]]): PayloadStatusV1
proc engine_newPayloadV4(payload: ExecutionPayloadV3, expectedBlobVersionedHashes: seq[VersionedHash], parentBeaconBlockRoot: Hash32, executionRequests: seq[seq[byte]]): PayloadStatusV1
proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Opt[PayloadAttributesV1]): ForkchoiceUpdatedResponse
proc engine_forkchoiceUpdatedV2(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Opt[PayloadAttributesV2]): ForkchoiceUpdatedResponse
proc engine_forkchoiceUpdatedV3(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Opt[PayloadAttributesV3]): ForkchoiceUpdatedResponse
Expand Down Expand Up @@ -55,7 +55,7 @@ createRpcSigsFromNim(RpcClient):
proc engine_newPayloadV4(payload: ExecutionPayload,
expectedBlobVersionedHashes: Opt[seq[VersionedHash]],
parentBeaconBlockRoot: Opt[Hash32],
executionRequests: Opt[array[3, seq[byte]]]): PayloadStatusV1
executionRequests: Opt[seq[seq[byte]]]): PayloadStatusV1
proc engine_forkchoiceUpdatedV2(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Opt[PayloadAttributes]): ForkchoiceUpdatedResponse
proc engine_forkchoiceUpdatedV3(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Opt[PayloadAttributes]): ForkchoiceUpdatedResponse

Expand Down
6 changes: 3 additions & 3 deletions web3/engine_api_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ type
blobsBundle*: BlobsBundleV1
shouldOverrideBuilder*: bool

# https://github.com/ethereum/execution-apis/blob/4140e528360fea53c34a766d86a000c6c039100e/src/engine/prague.md#response-1
# https://github.com/ethereum/execution-apis/blob/7c9772f95c2472ccfc6f6128dc2e1b568284a2da/src/engine/prague.md#response-1
GetPayloadV4Response* = object
executionPayload*: ExecutionPayloadV3
blockValue*: UInt256
blobsBundle*: BlobsBundleV1
shouldOverrideBuilder*: bool
executionRequests*: array[3, seq[byte]]
executionRequests*: seq[seq[byte]]

SomeGetPayloadResponse* =
ExecutionPayloadV1 |
Expand Down Expand Up @@ -256,4 +256,4 @@ template `==`*(a, b: TypedTransaction): bool =
# Backwards compatibility

type
PayloadID* {.deprecated.} = Bytes8
PayloadID* {.deprecated.} = Bytes8
2 changes: 1 addition & 1 deletion web3/execution_types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type
blockValue*: Opt[UInt256]
blobsBundle*: Opt[BlobsBundleV1]
shouldOverrideBuilder*: Opt[bool]
executionRequests*: Opt[array[3, seq[byte]]]
executionRequests*: Opt[seq[seq[byte]]]

Version* {.pure.} = enum
V1
Expand Down