graphprotocol / graphprotocol/graph-node

`web3call` provider validation on start

Open
#4,447 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Do you want to request a feature or report a bug?
bug

What is the current behavior?
When provider of type web3call specified, graph-node doesn't validate it on start. So you can specify any non-existing URL and graph node will not notice it until the first eth_call call.

I guess the issue is that EthereumNetworks::flatten() method that's used for provider validation, omits call_only_adapters field

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Add a provider with non-existing url:
{ label = "calls", details = { type = "web3call", url = "http://asdf", features = [ "archive" ] }},

What is the expected behavior?
Should drop that provider on start.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in chain/ethereum/src/network.rs, especially EthereumNetworks::flatten(), and inspect how call_only_adapters are handled during provider validation. Reproduce the issue with a web3call provider using the non-existent http://asdf URL and confirm that an invalid provider is dropped during startup rather than at the first eth_call.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.