Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP: Specify Payment API #56

Closed
daira opened this issue Jul 20, 2016 · 5 comments
Closed

ZIP: Specify Payment API #56

daira opened this issue Jul 20, 2016 · 5 comments

Comments

@daira
Copy link
Collaborator

daira commented Jul 20, 2016

Placeholder. See https://zcash.slack.com/archives/paymentapi/p1468977244000002 for a discussion about how to represent amounts. (To do: that archive is not public, copy the relevant parts.)

@nathan-at-least
Copy link
Contributor

Related is how to manage proving parameters: zcash/zcash#432 (comment)

Tangential topics for SPV clients: #288 delegated JoinSplit detection and #1113 delegated proving.

@nathan-at-least
Copy link
Contributor

Unresolved issue: How do we represent values in the API? We want lossless representation, but we also are dealing with Bitcoin's API which may use "float-ish" numbers. Something to review and make an explicit decision on.

@zookozcash
Copy link

Re "floatish", the problem is that if we send or accept decimals in the
API, then a lot of programmers will use floats/doubles to produce or
consume those numbers, which will lead to bugs.

It's entirely possible to use a proper decimal datatype instead of
floats/doubles in all modern languages, so a potential mitigation is just
to add documentation saying "do NOT ever use floats/doubles to store or
process this. There is a library in your language that handles decimals. Go
find out and use it and nothing but it to handle these numbers."

Here's a simple example of the problems with using floats for decimals: 0.1

  • 0.1 != 0.01

Not only is 0.1 times 0.1 not exactly 0.01, it isn't even the closest
possible
number to 0.01.

https://web.archive.org/web/20140723054136/https://zooko.com/uri/URI:DIR2-MDMF-RO:dwvqalbdt4ax4vgupcewxljg3u:bej7hhojmpuugy77oyydmazf6uu7huiipkctih7adky7e6txavnq/klog.html#pyutil.jsonutil

On Jul 20, 2016 10:52 AM, "Nathan Wilcox" notifications@github.com wrote:

Unresolved issue: How do we represent values in the API? We want lossless
representation, but we also are dealing with Bitcoin's API which may use
"float-ish" numbers. Something to review and make an explicit decision on.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#56 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/APp9QFNXyBUCPrv5CeOBs5zjQsm7WECIks5qXlIxgaJpZM4JQ52P
.

@ebfull
Copy link
Contributor

ebfull commented Jul 22, 2016

Hm, is the payment API in scope for the specification?

@daira daira added this to the Payment API spec milestone Aug 7, 2016
@daira daira added the ZIP idea label Sep 26, 2016
@daira daira changed the title Specify Payment API ZIP: Specify Payment API Sep 26, 2016
@daira
Copy link
Collaborator Author

daira commented Sep 26, 2016

I'm deciding that it is not in scope for the specification, but should be maintained as a ZIP. Can someone convert https://github.com/zcash/zcash/blob/master/doc/payment-api.md to rST and submit it please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants