casper-network / casper-sidecar

Apache License 2.0
2 stars 8 forks source link

[SIDECAR] `execution_result` type mismatch #284

Closed ryo-casper closed 2 months ago

ryo-casper commented 2 months ago

execution_result type is incorrect in the info_get_deploy RPC method. Current type: null Actual type: undefined

https://github.com/casper-network/casper-sidecar/blob/016a0f2c2dbf1f3dab75ac58f8d130035e6a7c97/rpc_sidecar/src/rpcs/info.rs#L130-L131

Please check all the fields where serialization is skipped especially for Option<T>, they should be undefined in the schema.

zajko commented 2 months ago

Hi @ryo-casper I'm looking at how we handled info_get_deploy in 1.x node and how we return it in sidecar for 2.0 Those are two different structures. The old one had a collection of execution results, the new one has one optional. The json schema actually allows all three:

ryo-casper commented 2 months ago

Please keep only those cases

"execution_result": value "execution_result": null

and remove this

no execution_result field at all