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

Improve debug forking #3292

Merged
merged 2 commits into from
Mar 21, 2022
Merged

Improve debug forking #3292

merged 2 commits into from
Mar 21, 2022

Conversation

evaporei
Copy link
Contributor

@evaporei evaporei commented Feb 26, 2022

I do accept any suggestions on the CLI API, I'm not sure those parameters should be passed where I've put them (and with those names).

This PR adds:

  • --debug-fork CLI option
  • --start-block CLI option

With those you can basically get any subgraph from the Hosted Service and debug it at any block without having the source code to change the start block, which debug forking currently requires (docs).

Eg (enzyme fork that I've been able to reproduce #3236) :

cargo run -p graph-node -- \
          --postgres-url $THEGRAPH_STORE_POSTGRES_DIESEL_URL \
          --ethereum-rpc $ETHEREUM_RPC_URL \
          --subgraph QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg \
          --ipfs $IPFS_URL \
          --debug-fork QmTBxvMF6YnbT1eYeRx9XQpH4WvxTV53vdptCCZFiZSprg \
          --start-block 0x8e28f0485a3bbcca851d502c2ca1120607b7178bf997ca8a40f4a457b8acb964:14178262 \
          --fork-base $FORK_BASE_URL

I know a lot of parameters, that's why I'm not sure if this is the way to go with the API design.

@VIVelev if you can give any suggestions here, thanks a lot your tool is super useful ❤️

@evaporei evaporei force-pushed the otavio/improve-debug-forking branch from 4e5d5dc to f9b5c32 Compare March 17, 2022 12:04
@evaporei evaporei marked this pull request as ready for review March 17, 2022 12:04
@evaporei evaporei requested a review from mangas March 18, 2022 10:30
@evaporei evaporei merged commit 7e25f86 into master Mar 21, 2022
@evaporei evaporei deleted the otavio/improve-debug-forking branch March 21, 2022 17:35
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