Skip to content

Commit

Permalink
Simplify test vector
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Dec 20, 2024
1 parent 18c0a2b commit b5e3ebe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 64 deletions.
18 changes: 2 additions & 16 deletions tests/engine_api/newPayloadV4_empty_requests_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@
"receiptsRoot": "0x86b0c83ced5201a87641678023531e90eddfacb8e3ce78256bf7417037d387b9",
"stateRoot": "0x4a7f23a99ac14da1af4f1d0ca0b740c8cda0753676f2cf079089a74dcb2d4f24",
"timestamp": "0x671b65c6",
"transactions": [
"0xf86b8233c8858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0db0d13a11dc81e1b9297eb0322f26f6ff3380d7c7ec3929ee839fb7e9961b2ffa02588e1e28146dfc70e475ed89720db3dd7deeb4bdf16d67d33246465ab9fbcc1",
"0xf86b8233c9858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a005ddb5765e447c0cfe7394804bc868b95ec89e3aad4ce75142b94964648dcbc8a032edba7aa886708e13418b27325de673dd992fe0fc16e2432201320c737a8ebc",
"0xf86b8233ca858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a058303cc9724abc56bf143ce355f26042fd19dec468783b7dec3144ee378a7870a00d00461b597d96144fed4134cef4399d61f490d7dba3552faf32a7d4ff651956",
"0xf86b8233cb858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0687ca518efea103a78c902b6dec99bae14e3d7e7c8c669cf34731ee326d8aa26a0641d4c0f4e51c7031b5d127b109f2f0c3faec4f4af6666aee4ec28576aa989db",
"0xf86b823360858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ba0ceedcb6ecf00c691f319aa3e290162aa6a7c1904d8d037ff673aa22022069a062d9a5866974973a83ef187e95ab73db1036deca8e0ba8da19399159d8e5aead",
"0xf86b823361858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ddbf85460a81bd05f260e539565af01e92e9e6727d3d07263bd84b42663cd1cfa0058600ed2e85cd0ccc36519d474def27b04f56e3dd9d8a8bd91c66dda2de8fe9",
"0xf86b823362858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a063d1f8b06a59c32d01cbb07e90c6efaedf5ae2d898b2e391293faba38552a784a01dcb02b8273e9db61cdf072ad170bb102bf26d467bb0082796c45dff44c62c2c",
"0xf86b823363858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b7a01481bb0af1c56554c8ce345ba305fa4c80efcf66b9900f75cc2a0b3e76e6014ba04b019b2ed72d9f078dc10485b5948cafa284ac5d7ab15c47925d37ec4477a0ee",
"0x03f89a8501a3ca344a8212cb84773594008504a817c8008252089407e25e7883c6466d579c0df73bff083ce63084e88080c08504a817c800e1a0012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c487980a0be40054b628bc6f8cdf110cb98064a6128584baea76b283c0a565f716f1a7f39a046566f55da48b57cac3b5acd0f1ee1a8cd07c9ed99aa8a85b8aa0fad02f26824",
"0x03f89a8501a3ca344a8212f584773594008504a817c80082520894a49dfd382668a2d7778fadd68da1bac21d3c78ac8080c08504a817c800e1a00139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c101a0dd6b92a173426adbf4052dc6b92a895a14a0f8f80d4007dc2d9a3a9bee5675f8a03b4ed09b34720a911d5a89041f45d76ce817eb073b00b35ae23063963abb572c"
],
"transactions": [],
"withdrawals": []
},
"expectedBlobVersionedHashes": [
"0x012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c4879",
"0x0139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c1"
],
"expectedBlobVersionedHashes": [],
"parentBeaconBlockRoot": "0x25b66ce21990ffcbbb6248952c6ef7939dbddfb90f6659a2bb43ff369f47c23b",
"executionRequests": [
"0x00"
Expand Down
18 changes: 2 additions & 16 deletions tests/engine_api/newPayloadV4_invalid_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@
"receiptsRoot": "0x86b0c83ced5201a87641678023531e90eddfacb8e3ce78256bf7417037d387b9",
"stateRoot": "0x4a7f23a99ac14da1af4f1d0ca0b740c8cda0753676f2cf079089a74dcb2d4f24",
"timestamp": "0x671b65c6",
"transactions": [
"0xf86b8233c8858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0db0d13a11dc81e1b9297eb0322f26f6ff3380d7c7ec3929ee839fb7e9961b2ffa02588e1e28146dfc70e475ed89720db3dd7deeb4bdf16d67d33246465ab9fbcc1",
"0xf86b8233c9858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a005ddb5765e447c0cfe7394804bc868b95ec89e3aad4ce75142b94964648dcbc8a032edba7aa886708e13418b27325de673dd992fe0fc16e2432201320c737a8ebc",
"0xf86b8233ca858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a058303cc9724abc56bf143ce355f26042fd19dec468783b7dec3144ee378a7870a00d00461b597d96144fed4134cef4399d61f490d7dba3552faf32a7d4ff651956",
"0xf86b8233cb858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0687ca518efea103a78c902b6dec99bae14e3d7e7c8c669cf34731ee326d8aa26a0641d4c0f4e51c7031b5d127b109f2f0c3faec4f4af6666aee4ec28576aa989db",
"0xf86b823360858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ba0ceedcb6ecf00c691f319aa3e290162aa6a7c1904d8d037ff673aa22022069a062d9a5866974973a83ef187e95ab73db1036deca8e0ba8da19399159d8e5aead",
"0xf86b823361858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ddbf85460a81bd05f260e539565af01e92e9e6727d3d07263bd84b42663cd1cfa0058600ed2e85cd0ccc36519d474def27b04f56e3dd9d8a8bd91c66dda2de8fe9",
"0xf86b823362858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a063d1f8b06a59c32d01cbb07e90c6efaedf5ae2d898b2e391293faba38552a784a01dcb02b8273e9db61cdf072ad170bb102bf26d467bb0082796c45dff44c62c2c",
"0xf86b823363858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b7a01481bb0af1c56554c8ce345ba305fa4c80efcf66b9900f75cc2a0b3e76e6014ba04b019b2ed72d9f078dc10485b5948cafa284ac5d7ab15c47925d37ec4477a0ee",
"0x03f89a8501a3ca344a8212cb84773594008504a817c8008252089407e25e7883c6466d579c0df73bff083ce63084e88080c08504a817c800e1a0012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c487980a0be40054b628bc6f8cdf110cb98064a6128584baea76b283c0a565f716f1a7f39a046566f55da48b57cac3b5acd0f1ee1a8cd07c9ed99aa8a85b8aa0fad02f26824",
"0x03f89a8501a3ca344a8212f584773594008504a817c80082520894a49dfd382668a2d7778fadd68da1bac21d3c78ac8080c08504a817c800e1a00139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c101a0dd6b92a173426adbf4052dc6b92a895a14a0f8f80d4007dc2d9a3a9bee5675f8a03b4ed09b34720a911d5a89041f45d76ce817eb073b00b35ae23063963abb572c"
],
"transactions": [],
"withdrawals": []
},
"expectedBlobVersionedHashes": [
"0x012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c4879",
"0x0139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c1"
],
"expectedBlobVersionedHashes": [],
"parentBeaconBlockRoot": "0x25b66ce21990ffcbbb6248952c6ef7939dbddfb90f6659a2bb43ff369f47c23b",
"executionRequests": [
"0x"
Expand Down
18 changes: 2 additions & 16 deletions tests/engine_api/newPayloadV4_invalid_requests_order.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@
"receiptsRoot": "0x86b0c83ced5201a87641678023531e90eddfacb8e3ce78256bf7417037d387b9",
"stateRoot": "0x4a7f23a99ac14da1af4f1d0ca0b740c8cda0753676f2cf079089a74dcb2d4f24",
"timestamp": "0x671b65c6",
"transactions": [
"0xf86b8233c8858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0db0d13a11dc81e1b9297eb0322f26f6ff3380d7c7ec3929ee839fb7e9961b2ffa02588e1e28146dfc70e475ed89720db3dd7deeb4bdf16d67d33246465ab9fbcc1",
"0xf86b8233c9858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a005ddb5765e447c0cfe7394804bc868b95ec89e3aad4ce75142b94964648dcbc8a032edba7aa886708e13418b27325de673dd992fe0fc16e2432201320c737a8ebc",
"0xf86b8233ca858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a058303cc9724abc56bf143ce355f26042fd19dec468783b7dec3144ee378a7870a00d00461b597d96144fed4134cef4399d61f490d7dba3552faf32a7d4ff651956",
"0xf86b8233cb858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0687ca518efea103a78c902b6dec99bae14e3d7e7c8c669cf34731ee326d8aa26a0641d4c0f4e51c7031b5d127b109f2f0c3faec4f4af6666aee4ec28576aa989db",
"0xf86b823360858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ba0ceedcb6ecf00c691f319aa3e290162aa6a7c1904d8d037ff673aa22022069a062d9a5866974973a83ef187e95ab73db1036deca8e0ba8da19399159d8e5aead",
"0xf86b823361858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ddbf85460a81bd05f260e539565af01e92e9e6727d3d07263bd84b42663cd1cfa0058600ed2e85cd0ccc36519d474def27b04f56e3dd9d8a8bd91c66dda2de8fe9",
"0xf86b823362858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a063d1f8b06a59c32d01cbb07e90c6efaedf5ae2d898b2e391293faba38552a784a01dcb02b8273e9db61cdf072ad170bb102bf26d467bb0082796c45dff44c62c2c",
"0xf86b823363858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b7a01481bb0af1c56554c8ce345ba305fa4c80efcf66b9900f75cc2a0b3e76e6014ba04b019b2ed72d9f078dc10485b5948cafa284ac5d7ab15c47925d37ec4477a0ee",
"0x03f89a8501a3ca344a8212cb84773594008504a817c8008252089407e25e7883c6466d579c0df73bff083ce63084e88080c08504a817c800e1a0012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c487980a0be40054b628bc6f8cdf110cb98064a6128584baea76b283c0a565f716f1a7f39a046566f55da48b57cac3b5acd0f1ee1a8cd07c9ed99aa8a85b8aa0fad02f26824",
"0x03f89a8501a3ca344a8212f584773594008504a817c80082520894a49dfd382668a2d7778fadd68da1bac21d3c78ac8080c08504a817c800e1a00139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c101a0dd6b92a173426adbf4052dc6b92a895a14a0f8f80d4007dc2d9a3a9bee5675f8a03b4ed09b34720a911d5a89041f45d76ce817eb073b00b35ae23063963abb572c"
],
"transactions": [],
"withdrawals": []
},
"expectedBlobVersionedHashes": [
"0x012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c4879",
"0x0139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c1"
],
"expectedBlobVersionedHashes": [],
"parentBeaconBlockRoot": "0x25b66ce21990ffcbbb6248952c6ef7939dbddfb90f6659a2bb43ff369f47c23b",
"executionRequests": [
"0x0001020304050607",
Expand Down
18 changes: 2 additions & 16 deletions tests/engine_api/newPayloadV4_invalid_requests_type.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@
"receiptsRoot": "0x86b0c83ced5201a87641678023531e90eddfacb8e3ce78256bf7417037d387b9",
"stateRoot": "0x4a7f23a99ac14da1af4f1d0ca0b740c8cda0753676f2cf079089a74dcb2d4f24",
"timestamp": "0x671b65c6",
"transactions": [
"0xf86b8233c8858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0db0d13a11dc81e1b9297eb0322f26f6ff3380d7c7ec3929ee839fb7e9961b2ffa02588e1e28146dfc70e475ed89720db3dd7deeb4bdf16d67d33246465ab9fbcc1",
"0xf86b8233c9858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a005ddb5765e447c0cfe7394804bc868b95ec89e3aad4ce75142b94964648dcbc8a032edba7aa886708e13418b27325de673dd992fe0fc16e2432201320c737a8ebc",
"0xf86b8233ca858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a058303cc9724abc56bf143ce355f26042fd19dec468783b7dec3144ee378a7870a00d00461b597d96144fed4134cef4399d61f490d7dba3552faf32a7d4ff651956",
"0xf86b8233cb858bb2c972bc82520894d3248ba3e5492d767f8e427cb9c7b9d5c3972d7b01808503479468b7a0687ca518efea103a78c902b6dec99bae14e3d7e7c8c669cf34731ee326d8aa26a0641d4c0f4e51c7031b5d127b109f2f0c3faec4f4af6666aee4ec28576aa989db",
"0xf86b823360858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ba0ceedcb6ecf00c691f319aa3e290162aa6a7c1904d8d037ff673aa22022069a062d9a5866974973a83ef187e95ab73db1036deca8e0ba8da19399159d8e5aead",
"0xf86b823361858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a0ddbf85460a81bd05f260e539565af01e92e9e6727d3d07263bd84b42663cd1cfa0058600ed2e85cd0ccc36519d474def27b04f56e3dd9d8a8bd91c66dda2de8fe9",
"0xf86b823362858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b8a063d1f8b06a59c32d01cbb07e90c6efaedf5ae2d898b2e391293faba38552a784a01dcb02b8273e9db61cdf072ad170bb102bf26d467bb0082796c45dff44c62c2c",
"0xf86b823363858bb2c972bc82520894454b0ea7d8ad3c56d0cf2e44ed97b2feab4d7af201808503479468b7a01481bb0af1c56554c8ce345ba305fa4c80efcf66b9900f75cc2a0b3e76e6014ba04b019b2ed72d9f078dc10485b5948cafa284ac5d7ab15c47925d37ec4477a0ee",
"0x03f89a8501a3ca344a8212cb84773594008504a817c8008252089407e25e7883c6466d579c0df73bff083ce63084e88080c08504a817c800e1a0012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c487980a0be40054b628bc6f8cdf110cb98064a6128584baea76b283c0a565f716f1a7f39a046566f55da48b57cac3b5acd0f1ee1a8cd07c9ed99aa8a85b8aa0fad02f26824",
"0x03f89a8501a3ca344a8212f584773594008504a817c80082520894a49dfd382668a2d7778fadd68da1bac21d3c78ac8080c08504a817c800e1a00139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c101a0dd6b92a173426adbf4052dc6b92a895a14a0f8f80d4007dc2d9a3a9bee5675f8a03b4ed09b34720a911d5a89041f45d76ce817eb073b00b35ae23063963abb572c"
],
"transactions": [],
"withdrawals": []
},
"expectedBlobVersionedHashes": [
"0x012b9d1f8cf08c0a807e226a130be45165e48cae7e7be5ee4d3079bc629c4879",
"0x0139c61fb5022f854e37742230a76e524166c0f1b2d67a152d4f5a488b5159c1"
],
"expectedBlobVersionedHashes": [],
"parentBeaconBlockRoot": "0x25b66ce21990ffcbbb6248952c6ef7939dbddfb90f6659a2bb43ff369f47c23b",
"executionRequests": [
"0x0F01020304050607"
Expand Down
3 changes: 3 additions & 0 deletions tests/test_engine_api.nim
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ proc newPayloadV4InvalidRequests(env: TestEnv): Result[void, string] =
if $engineApiInvalidParams notin res.error:
return err("invalid error code: " & res.error & " expect: " & $engineApiInvalidParams)

if "request" notin res.error:
return err("expect \"request\" in error message: " & res.error)

ok()

const testList = [
Expand Down

0 comments on commit b5e3ebe

Please sign in to comment.