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

feat: route state-backed requests to archive nodes #65

Merged
merged 16 commits into from
Sep 26, 2022

Conversation

IvanVergiliev
Copy link
Contributor

Description

  • Added a new NodeFilter to route state RPC methods only to archive nodes.
  • Added nodeType to the UpstreamConfig so that we know which nodes maintain full historic state.

Type of change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 😎 New feature (non-breaking change which adds functionality)
  • ⁉️ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ⚒️ Refactor (no functional changes)
  • 📖 Documentation (updating or adding docs)

How Has This Been Tested?

Unit tests for the RequestMetadataParser and SimpleIsStatePresentFilter.

Copy link
Member

@brianluong brianluong left a comment

Choose a reason for hiding this comment

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

LGTM

result := RequestMetadata{}

switch requestBody.Method {
case "eth_getBalance", "eth_getStorageAt", "eth_getTransactionCount", "eth_getCode", "eth_call", "eth_estimateGas":
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we include add a link to the Eth docs that say which methods are state methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, good point! Added.

@IvanVergiliev IvanVergiliev merged commit b4647ae into main Sep 26, 2022
@IvanVergiliev IvanVergiliev deleted the state-presence-filter branch September 26, 2022 13:10
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.

2 participants