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

Infura JSON RPC Documentation #127

Closed
mikeonghub opened this issue Jul 17, 2018 · 26 comments
Closed

Infura JSON RPC Documentation #127

mikeonghub opened this issue Jul 17, 2018 · 26 comments

Comments

@mikeonghub
Copy link

mikeonghub commented Jul 17, 2018

This is a Gitcoin bounty to write documentation for the Infura JSON RPC.

This documentation will provide a detailed description of each JSON RPC method supported by Infura, format for calling the method, and format of the method response. The description should include common use cases for each method.

An example of API documentation that we really like is Stripe's API documentation here, https://stripe.com/docs/api#intro

In addition to the detailed description, the documentation needs to include example use cases of each method in Javascript. If time allows, additional examples in other languages such as Python are welcome.

Workflow
Prospective bounty claimer will provide examples of previously written documentation and present familiarity with Infura and its API.

Once approved for the bounty, the person will have a scheduled meeting with one of the maintainers of the JSON RPC API system. The maintainer will provide a detailed breakdown of the required documentation and answer any questions around the API and its use cases.

The person will then write the documentation per the details in this ticket and the provided information from the maintainer.

The person will submit the documentation within the agreed time frame and will address 2 rounds of feedback in the event that it is needed.

Once the feedback rounds are complete, the bounty reward will be distributed if the acceptance criteria are met.

Acceptance criteria
The documentation has clear information for the following:
API call format for each method
API response examples for each method
Example use cases for all API methods including written description of the example
Any other criteria outlined by the maintainer during the scheduled meeting will be recorded here.

Timeline
The expected time to complete the bounty is 9 hours. The timeline will start after the scheduled meeting with the maintainer. We will discuss an agreed upon timeline during the meeting with the maintainer.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1.0 ETH (479.63 USD @ $479.63/ETH) attached to it.

@mikeonghub
Copy link
Author

@vikaskyadav, can you please provide API documentation examples and examples of your familiarity with Infura's JSON RPC API?

@Qqwy
Copy link

Qqwy commented Jul 19, 2018

It might make sense to tackle #124 before this one.

@vikaskyadav
Copy link

vikaskyadav commented Jul 20, 2018 via email

@mikeonghub
Copy link
Author

@vikaskyadav Can you provide examples of your documentation?

@vikaskyadav
Copy link

vikaskyadav commented Jul 20, 2018 via email

@mikeonghub
Copy link
Author

@vikaskyadav Do you have any where you provided code examples?

@vikaskyadav
Copy link

vikaskyadav commented Jul 20, 2018 via email

@mikeonghub
Copy link
Author

To clarify, I meant documentation where you provide coding examples on how to use the API, per the requirements identified in the bounty.

@owocki
Copy link

owocki commented Jul 21, 2018

just rejected the applications above per mike's request

@vikaskyadav
Copy link

vikaskyadav commented Jul 21, 2018 via email

@owocki
Copy link

owocki commented Jul 21, 2018

@vikaskyadav i think he wants to see examples of documentation you've done in the past as you apply

@rahulrumalla
Copy link

hey @mbgodsey

To clarify, I'm guessing you want to capture all the API endpoints ( assuming all of them are indeed supported ), potentially in a .yaml file (like swagger) and to be ported into something like apiary?

I did run into the incomplete apiary docs.

@gitcoinbot
Copy link

gitcoinbot commented Jul 22, 2018

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 4 months, 1 week from now.
Please review their action plans below:

1) rahulrumalla has been approved to start work.

Happy to pick this up. I presume the endpoints here (https://github.com/ethereum/wiki/wiki/JSON-RPC) need to be documented.

Project I contributed to in the past (in apiary)
https://github.com/omi/api-specs
https://omi01.docs.apiary.io

Although I have been working with infura on private projects, I spun up a quick repo in golang to demonstrate my familiarity.
https://github.com/rahulrumalla/go-infura-json-rpc/blob/master/infura/api.go

Learn more on the Gitcoin Issue Details page.

@vikaskyadav
Copy link

@owocki @mbgodsey have sent api swagger link that I created yesterday.

@mikeonghub
Copy link
Author

@rahulrumalla I have approved you to start, will email you with starting meeting suggestions.

@gitcoinbot
Copy link

gitcoinbot commented Jul 25, 2018

@rahulrumalla Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@mikeonghub
Copy link
Author

@rahulrumalla I have snoozed the warnings since we have discussed a timeline offline

@rahulrumalla
Copy link

Perfect. Thanks.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 1.0 ETH (467.3 USD @ $467.3/ETH) has been submitted by:

  1. @rahulrumalla

@mbgodsey please take a look at the submitted work:


@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 1.0 ETH (448.09 USD @ $448.09/ETH) attached to this issue has been approved & issued to @rahulrumalla.

@mikeonghub
Copy link
Author

@rahulrumalla great work on this issue!

@vs77bb
Copy link

vs77bb commented Jul 30, 2018

🎉 🎉 🎉

@chaftacode
Copy link

I think it is important to keep Infura's documentation (and implementation) up-to-date with ethereum/EIPs#1474 when it lands. I think Infura's documentation is fine for now since they both relied on the same eth JSON-RPC wiki.

@ryanschneider
Copy link

Thanks for the heads up on the EIP @chaftacode and for your work in reviewing it, it'll be great to see formalization of the RPC format land as an EIP.

One item that might be interesting to discuss as an addendum to the EIP is additional custom error codes. For example we specifically block certain methods for various reasons, it'd be ideal if we could return an standard JSONRPC error response w/ a specific code like -32004 method unsupported on this platform so that client libraries can respond accordingly. Basically this would be an error that can tells the client "yes the node recognized your request as a valid Ethereum RPC, but we are rejecting it for the reason stated in the error message".

Not sure if you are looking for additions to the current EIP so leaving this comment here, but if you are open to adding a code like that to the EIP before it's merged I'm happy to continue the discussion over there.

@ryanschneider
Copy link

Looks like the case for an "unsupported" error code was also made here:

ethereum/EIPs#136 (comment)

I'll go ahead and move this discussion over the the EIP.

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

No branches or pull requests

9 participants