Open zancas opened 3 years ago
One place we might arrive at specific understanding is this:
https://zips.z.cash/protocol/blossom.pdf#diffadjustment
I suspect that the type of the "difficulty" field will be made unambiguous by that section.
@AloeareV I think the correct answer is to always use Decimals to represent numbers read in from json-formatted data.
So if the cli
says "numeric"... it means decimal.
@AloeareV @dannasessha I ran this command in a vim command buffer:
s/\(i64\|u64\|f64\)/Decimal/gc
Here's my current thought... a Decimal
is strictly more informative that an integer [u|i]64
, so we should prefer a Decimal
in all 3 cases.
We see several different names for "types" expressed in the help documentation of
zcash-cli
e.g.:We see
ttt
,xxxxxx
,x.xxxx
,host:port
,...
.... as specifiers on the RHS of ":".We also see
string
,numeric
,boolean
, andoptional
at the beginning of the description fields.We'll need to come up with an exhaustive rule-based translation into Rust types based on this and other input data.
Another resource that's relevant is the protocol doc:
https://zips.z.cash/protocol/protocol.pdf