bump `execution-apis` to `v1.0.0-beta.4` (#145)
- https://github.com/ethereum/execution-apis/releases/tag/v1.0.0-beta.4 This was already partially applied, the following commits were missing: - update the doc of eth_getBalance to put block as required parameters - schemas/filter: fixup some bugs in null filter topics and address - tests: regenerate tests with new rpctestgen chain - tests: add forkenv.json for hive - tests: add headfcu.json - tests: add comments in tests - Specify Client Versions on Engine API - Add eth_blobBaseFee; add blobs to eth_feeHistory - Added engine_getPayloadV4 and engine_newPayloadV4 for Prague - Update receipt.yaml to title instead of name - Move EIP-6110 to Prague - Add EIP-7251 to Prague - engine: rename for 7002 partial withdrawals and 7685 requests
This commit is contained in:
parent
9620fee53f
commit
290acb6e62
|
@ -1 +1 @@
|
|||
Subproject commit cea7eeb642052f4c2e03449dc48296def4aafc24
|
||||
Subproject commit 7907424db935b93c2fe6a3c0faab943adebe8557
|
|
@ -153,3 +153,11 @@ proc installHandlers*(server: RpcServer) =
|
|||
if x != "-1".JsonString:
|
||||
res = decodeFromString(x, seq[byte])
|
||||
return res.RlpEncodedBytes
|
||||
|
||||
server.rpc("eth_blobBaseFee") do(x: JsonString) -> Quantity:
|
||||
if x != "-1".JsonString:
|
||||
return decodeFromString(x, Quantity)
|
||||
|
||||
server.rpc("eth_getLogs") do(x: JsonString, filterOptions: FilterOptions) -> seq[LogObject]:
|
||||
if x != "-1".JsonString:
|
||||
return decodeFromString(x, seq[LogObject])
|
||||
|
|
|
@ -12,6 +12,7 @@ import
|
|||
type
|
||||
TestData = tuple
|
||||
file: string
|
||||
description: string
|
||||
input: RequestTx
|
||||
output: ResponseRx
|
||||
|
||||
|
@ -82,13 +83,37 @@ func toTx(req: RequestRx): RequestTx =
|
|||
)
|
||||
|
||||
proc extractTest(fileName: string): TestData {.raises: [IOError, SerializationError].} =
|
||||
let
|
||||
lines = readFile(fileName).split("\n")
|
||||
input = lines[0].strip()
|
||||
output = lines[1].strip()
|
||||
let lines = readFile(fileName).split("\n")
|
||||
var
|
||||
description = ""
|
||||
input = ""
|
||||
output = ""
|
||||
for line in lines:
|
||||
if line == "":
|
||||
continue
|
||||
if line.startsWith("// "):
|
||||
if description == "":
|
||||
description = line.strip()
|
||||
else:
|
||||
description = description & " " & line.strip()
|
||||
elif line.startsWith(">> "):
|
||||
if input != "":
|
||||
raise (ref IOError)(msg: "Test contains multiple inputs: " & fileName)
|
||||
input = line
|
||||
elif line.startsWith("<< "):
|
||||
if output != "":
|
||||
raise (ref IOError)(msg: "Test contains multiple outputs: " & fileName)
|
||||
output = line
|
||||
if input == "":
|
||||
raise (ref IOError)(msg: "Test contains no input: " & fileName)
|
||||
if output == "":
|
||||
raise (ref IOError)(msg: "Test contains no output: " & fileName)
|
||||
input = input.strip()
|
||||
output = output.strip()
|
||||
|
||||
return (
|
||||
file: fileName,
|
||||
description: description,
|
||||
input: JrpcSys.decode(input, RequestRx).toTx,
|
||||
output: JrpcSys.decode(output, ResponseRx),
|
||||
)
|
||||
|
@ -117,6 +142,7 @@ proc callWithParams(client: RpcClient, data: TestData): Future[bool] {.async.} =
|
|||
|
||||
if not compareValue(wantVal, getVal):
|
||||
debugEcho data.file
|
||||
debugEcho data.description
|
||||
debugEcho "EXPECT: ", res.result
|
||||
debugEcho "GET: ", resJson.string
|
||||
return false
|
||||
|
@ -147,6 +173,7 @@ suite "Ethereum execution api":
|
|||
srv.start()
|
||||
|
||||
for idx, item in testCases:
|
||||
checkpoint item.file & ": " & item.description
|
||||
let input = item.input
|
||||
let methodName = input.`method`
|
||||
|
||||
|
|
Loading…
Reference in New Issue