-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
I don't think we should stop adhering to the spec explicitly. If the mist/geth teams diverge from it then they have a bug in their software. We could do this in |
Spec here defines how Output values should be formatted. |
So the issue here (spec-wise) is that it actually never defined input parameter format, only output. So technically any input format is acceptable. IMO this was an oversight in the spec and I have made an edit to it accordingly. |
Please note that Geth will start being stricter in the 1.5 release. |
It is perfectly well defined. From https://github.com/ethcore/parity/wiki/JSONRPC :
This is not specific to one side or the other; encoding/decoding refers to both sides of the RPC call, since we're talking about all data which is transported. I'm happy to have this under |
It's well defined in our fork of the spec but not in the Ethereum/wiki version, although I made a tiny patch there to clarify as well. |
this should be reverted ASAP, but seems that for now, it's the least bad option |
Conflicts: rpc/src/v1/types/bytes.rs
"Deserializing empty string as empty bytes. This is a non-standard behaviour that will be removed in future versions. Please update your code to send `0x` instead!" | ||
); | ||
Ok(Bytes::new(Vec::new())) | ||
} else if value.len() >= 2 && &value[0..2] == "0x" && value.len() & 1 == 0 { | ||
Ok(Bytes::new(FromHex::from_hex(&value[2..]).unwrap_or_else(|_| vec![]))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated
unwrap_or_else(|_| vec![])
part is really interesting here. Is it really what geth is doing? It should be an error imo
* 'master' of https://github.com/ethcore/parity: user defaults (#2014) Fixing jit feature compilation (#2310) Lenient bytes deserialization (#2036) Fixing tests saturating add Remove crufty code saturating not overflowing Peek transaction queue via RPC (#2270) Avoid penalizing legit transactions Penalize transactions with gas above gas limit Improving txqueue logs
* js: user defaults (#2014) Fixing jit feature compilation (#2310) Lenient bytes deserialization (#2036) Fixing tests saturating add Remove crufty code saturating not overflowing Peek transaction queue via RPC (#2270) Avoid penalizing legit transactions Penalize transactions with gas above gas limit Improving txqueue logs
Fixes #2023
Possibly related: #2004