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

rpc: add configuration / status #201

Closed
dmvt opened this issue Jul 5, 2019 · 8 comments · Fixed by #322
Closed

rpc: add configuration / status #201

dmvt opened this issue Jul 5, 2019 · 8 comments · Fixed by #322
Assignees
Labels
enhancement New feature or request

Comments

@dmvt
Copy link

dmvt commented Jul 5, 2019

I'd like to be able to request the configuration and current status from an rpc endpoint. This would include:

  • ethereum network id
  • current block number / last block number received by mesh
@fabioberger fabioberger self-assigned this Jul 5, 2019
@fabioberger
Copy link
Contributor

Thanks for the suggestion @dmvt. I really like this idea. I've moved out your second suggestion into it's own PR: #202.

@fabioberger fabioberger added this to the Beta Release milestone Jul 5, 2019
@fabioberger
Copy link
Contributor

Thoughts on adding this @albrow?

@albrow
Copy link
Contributor

albrow commented Jul 8, 2019

@dmvt the Ethereum network id is an environment variable which is required during initialization. It's set by you and will never change unless you change it, so I think there is limited value in having an RPC endpoint for it.

An endpoint for getting the block number makes a lot more sense to me. Can you share more about your use case so we can determine how to prioritize this?

@fabioberger fabioberger removed this from the Beta Release milestone Jul 10, 2019
@dmvt
Copy link
Author

dmvt commented Jul 22, 2019

Hey @albrow. I'd like to have the ability to confirm that Mesh and the ETH node being used by an individual application are in sync. The network id being returned by Mesh would allow me to verify on startup that the application has not been directed to connect to a Mesh node on a different network than the ETH node. Likewise, knowing the Mesh node's current block will allow the software to compare it against the RPC endpoint for the ETH node and verify that neither is behind the other (within a tolerance zone). In both cases, error states can trigger proactive notification to devops.

It's true that if the entire stack is configured correctly these details are not needed, but I prefer writing guards to protect against bad configuration instead of assuming that people will do things correctly.

@albrow albrow added the enhancement New feature or request label Jul 24, 2019
@albrow
Copy link
Contributor

albrow commented Jul 24, 2019

Makes sense. We could also have this endpoint return other information like how many peers you are currently connected to.

@dmvt
Copy link
Author

dmvt commented Jul 25, 2019

That would be great. Any idea on ETA for this feature?

@albrow
Copy link
Contributor

albrow commented Jul 25, 2019

@dmvt we're focusing on tech debt and bug fixes at the moment. It would be next week at the earliest.

Also, if you or someone else in the community wants to take this on, we would be happy to review a PR.

@fabioberger
Copy link
Contributor

@dmvt working on this now.

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

Successfully merging a pull request may close this issue.

3 participants