Skip to content

Conversation

@emostov
Copy link
Contributor

@emostov emostov commented Aug 21, 2020

Closes #225
Closes #168
Closes #220

Overview

This PR implements the node endpoints as specified in the openapi-proposal.yaml. This includes node/version, node/transaction-pool, and node/network.

For each, the code lightly wraps RPC calls. For system_peers, it was found that Parity public nodes do not support the RPC call, so it was wrapped in a try/catch block, and puts in a message if the RPC method does not work.

Bare bones unit tests are implemented to have some degree of a user contract that can be used to show regressions. So far though I have not been able to fully test node/transaction-pool as there has been no pending extrinsic.

Follow up PRs

  • UI for swagger docs, showing the currently implemented v1 routes

Copy link
Collaborator

@joepetrowski joepetrowski left a comment

Choose a reason for hiding this comment

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

I'm not sure if we need to get the latest block and metadata, except maybe for tx pool to decode calls. Could use docs on what is being returned.

@emostov emostov mentioned this pull request Aug 21, 2020
19 tasks
Copy link
Contributor

@danforbes danforbes left a comment

Choose a reason for hiding this comment

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

Mostly nitpicks...this will be a great addition 🚗

Comment on lines 11 to 13
* - `clientImplVersion` Node's implementation's version.
* - `clientImplName` Node's implementation name.
* - `chain` Chain's spec name.
Copy link
Contributor

Choose a reason for hiding this comment

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

Make these a little jazzier.

@emostov emostov requested a review from joepetrowski August 22, 2020 00:32
@emostov emostov added the B3 - API Noteworthy API is not broken, but worth noting label Aug 23, 2020
@joepetrowski joepetrowski merged commit 651601c into master Aug 24, 2020
@joepetrowski joepetrowski deleted the zeke-node-1 branch August 24, 2020 06:01
@emostov emostov mentioned this pull request Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B3 - API Noteworthy API is not broken, but worth noting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement node/version Implement node/network Add api to query pending extrinsics status

4 participants