Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@brson
Copy link
Contributor

@brson brson commented Aug 3, 2021

This adds more API docs and examples for the Rust RpcClient.

Followup to #18748

The biggest changes here are relatively complete docs for get_signature_statuses, get_signature_statuses_with_history, confirm_transaction, and confirm_transaction_with_commitment. I have also added preliminary examples for more methods as I familiarize myself with the code. Some of these examples need improvement still, and I intend to revisit them when I write their full docs.

It's been about two weeks of work since my last patch, and this patch is pretty sizable, so I am looking for feedback. After this PR I plan to continue documenting this module. I also have a patch of integration tests for RpcClient that I intend to submit eventually.

@mergify mergify bot added the community Community contribution label Aug 3, 2021
@mergify mergify bot requested a review from a team August 3, 2021 00:22
@brson
Copy link
Contributor Author

brson commented Aug 3, 2021

Another thing this patch does is add an "RPC Reference" section to some of the methods that links to the RPC spec for the underlying protocol. The intent is to avoid having to reproduce the protocol documentation in the API.

@brson brson force-pushed the docs-rpc-client-checkpoint-2 branch from 55b98df to 319c19e Compare August 3, 2021 18:37
@codecov
Copy link

codecov bot commented Aug 3, 2021

Codecov Report

Merging #19021 (319c19e) into master (03353d5) will decrease coverage by 0.0%.
The diff coverage is 53.3%.

❗ Current head 319c19e differs from pull request most recent head 0f039ec. Consider uploading reports for the commit 0f039ec to get more accurate results

@@            Coverage Diff            @@
##           master   #19021     +/-   ##
=========================================
- Coverage    82.7%    82.7%   -0.1%     
=========================================
  Files         449      449             
  Lines      127997   128035     +38     
=========================================
- Hits       105968   105961      -7     
- Misses      22029    22074     +45     

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Just a couple suggestions and nits. (Sorry that there's no good way to preserve 80-char wrapping in github suggestions!)

@brson brson force-pushed the docs-rpc-client-checkpoint-2 branch from ca70369 to 0f039ec Compare August 5, 2021 18:09
@brson
Copy link
Contributor Author

brson commented Aug 5, 2021

Updated with all suggestions resolved. Thanks for the good review @CriesofCarrots

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! lgtm
I'll hand-hold it through CI

@mergify mergify bot requested a review from a team August 5, 2021 20:35
@CriesofCarrots CriesofCarrots merged commit b67ffab into solana-labs:master Aug 5, 2021
mergify bot pushed a commit that referenced this pull request Aug 5, 2021
* Add doc links to Transaction API docs

* Add more RpcClient API docs

* Reflow some rpc_client docs

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/src/transaction.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update RpcClient docs per review

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit b67ffab)
mergify bot added a commit that referenced this pull request Aug 5, 2021
* Add doc links to Transaction API docs

* Add more RpcClient API docs

* Reflow some rpc_client docs

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update client/src/rpc_client.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/src/transaction.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update RpcClient docs per review

Co-authored-by: Tyera Eulberg <[email protected]>
(cherry picked from commit b67ffab)

Co-authored-by: Brian Anderson <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Community contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants