Closed rrw-zilliqa closed 5 months ago
I think both of your suggestions are sensible.
We should fix the Deserialization
impl to cope with arrays - https://github.com/Zilliqa/zq2/pull/1077
And we should remove JSON anyway. It makes no sense to use different formats for broadcasts and p2p messages - https://github.com/Zilliqa/zq2/pull/1078
To reproduce, start a network with z2, then fire the txns from zilliqa-experimental/richard/hello-forge at it. You'll get a serialisation error and the nodes will panic.
They do this because
p2p_node.rs:299
fails:and this in turn fails because JSON-encoded transactions encode their tx data as an array of bytes (rather than rlp) and the visitor for rlp_encoded txns in transaction.rs:96 doesn't implement visit_seq<>, presumably because you can't easily transmit a byte sequence in JSON.
Two things might help here: