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

Specify Payment API #2310

Closed
daira opened this issue Apr 27, 2017 · 7 comments
Closed

Specify Payment API #2310

daira opened this issue Apr 27, 2017 · 7 comments
Assignees
Labels

Comments

@daira
Copy link
Contributor

daira commented Apr 27, 2017

Issue by daira
Wednesday Jul 20, 2016 at 15:31 UTC
Originally opened as zcash/zips#56


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.)

@daira
Copy link
Contributor Author

daira commented Apr 27, 2017

Comment by nathan-at-least
Wednesday Jul 20, 2016 at 16:45 UTC


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

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

@daira
Copy link
Contributor Author

daira commented Apr 27, 2017

Comment by nathan-at-least
Wednesday Jul 20, 2016 at 16:52 UTC


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.

@daira
Copy link
Contributor Author

daira commented Apr 27, 2017

Comment by zookozcash
Wednesday Jul 20, 2016 at 18:54 UTC


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
zcash/zips#56 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/APp9QFNXyBUCPrv5CeOBs5zjQsm7WECIks5qXlIxgaJpZM4JQ52P
.

@daira
Copy link
Contributor Author

daira commented Apr 27, 2017

Comment by ebfull
Friday Jul 22, 2016 at 02:02 UTC


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

@daira
Copy link
Contributor Author

daira commented Apr 27, 2017

Comment by daira
Monday Sep 26, 2016 at 10:07 UTC


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?

@daira daira added A-documentation Area: Documentation A-rpc-interface Area: RPC interface labels Apr 27, 2017
@daira
Copy link
Contributor Author

daira commented Apr 27, 2017

ZIPs can (as of now) be in Markdown, as well as reStructuredText or LaTeX, so the conversion isn't necessary.

@daira daira self-assigned this Apr 27, 2017
@ioptio ioptio added this to Product Backlog in Documentation Aug 3, 2018
@ioptio ioptio moved this from Product Backlog to Blocked/Tracking in Documentation Dec 19, 2018
@daira daira added this to Product Backlog in Arborist Team Dec 24, 2018
@daira
Copy link
Contributor Author

daira commented May 5, 2020

Duplicate of #2317.

@daira daira closed this as completed May 5, 2020
Arborist Team automation moved this from Needs Prioritization to Complete May 5, 2020
@daira daira removed this from the Core ZIPs for Zcash 1.0 milestone May 5, 2020
@daira daira changed the title ZIP: Specify Payment API Specify Payment API May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Arborist Team
  
Complete
Documentation
  
Blocked/Tracking
Development

No branches or pull requests

1 participant