You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(l1): support multiple rpc requests in a single request (#2006)
**Motivation**
The hive tests from `engine-withdrawals` were failing with a panic
because we were asuming only a single RLPRequest could be received but
the test sent an array of requets
**Description**
Introduce a wrapper struct that contains a `Single` type for single
`RPCRequest` and `Multiple` for an array of requests, so serde can
deserialize into the correct one.
If we have an array of request we execute them sequentially. Then return
a json encoded array of responses.
The function `rpc_response` was also changed to return
`serde_json::Value` because it was returning an incorrect value when
using it to create the array of responses.
This PR fixes the following tests from `engine-withdrawals`:
- "Withdrawals Fork on Block 1 - 1 Block Re-Org"
- "Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload"
- "Withdrawals Fork on Block 8 - 10 Block Re-Org NewPayload"
- "Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block
Re-Org"
- "Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block
Re-Org"
Advances #1586
let expected_response_string = r#"{"jsonrpc":"2.0","id":1,"result":{"accessList":[{"address":"0x7dcd17433742f4c0ca53122ab541d0ba67fc27df","storageKeys":["0x0000000000000000000000000000000000000000000000000000000000000000","0x13a08e3cd39a1bc7bf9103f63f83273cced2beada9f723945176d6b983c65bd2"]}],"gasUsed":"0xca3c"}}"#;
0 commit comments