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

Get Block Range API #16

Merged
merged 5 commits into from
Feb 19, 2023
Merged

Conversation

Rishi556
Copy link
Contributor

@Rishi556 Rishi556 commented Feb 5, 2023

Allows for getting information on blocks in a range with a single call.

This is a very heavy api and should not be enabled on public nodes. To make sure this doesn't happen, a config feature has been added to allow disabling certain RPC methods. The default config disables the new method.

@Rishi556 Rishi556 changed the base branch from main to qa February 5, 2023 07:15
Copy link
Contributor

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

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

Mostly looks good, just a couple things that can be improved on (see comments below).

plugins/JsonRPCServer.js Show resolved Hide resolved
config.json Show resolved Hide resolved
Copy link
Contributor

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

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

One more thing: please make sure that the getStatus API itself can never be disabled. It should always be possible to check on a node's status.

Operator can still put getStatus in their blocklist, but it won't be respected. getStatus will still report getStatus as being blocked.
@Rishi556
Copy link
Contributor Author

One more thing: please make sure that the getStatus API itself can never be disabled. It should always be possible to check on a node's status.

Resolved in 7c2b045.

While the operator can still place it in the blocklist, the block of getStatus won't be respected.

Copy link
Contributor

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

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

Everything looks good now, thanks!

@bt-cryptomancer bt-cryptomancer merged commit 10c7a52 into hive-engine:qa Feb 19, 2023
@Rishi556 Rishi556 deleted the json-rpc-methods branch April 30, 2023 23:58
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

Successfully merging this pull request may close these issues.

None yet

2 participants