You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if indexers want to inspect & maybe clear the Ethereum call cache, they need to access and alter Postgres directly. This is error prone. There could be a dedicated graphman command to streamline this process:
graphman chain cache-get <chain> <contract_address> [--block <number>|--from <number> --to <number>] to print what’s in the call cache
graphman chain cache-remove <same args as cache_get>
Example existing process, when the call cache is found to be malformed:
# graphman rewind
# prerequisites
have graph nodes at least v0.23.1 and configured with the config toml files
# stop index node containers, keep query node
docker stop index-node-0 index-node-1 indexer-agent indexer-service
# connect to query-node-0 container
./shell query-node-0
# rewind subgraphs
graphman rewind <IPFS_hash> <block_hash> <block_number>
# delete eth call cache
# connect to postgres container
./shell postgres
# connect to your graph-node database
psql <db_name> <db_user>
# find ethereum chain namespace in the db
select * from chains;
# navigate to the namespace
set search_path to chain1;
# find latest block number in the call_cache table
select block_number from call_cache order by block_number desc limit 1;
# delete eth_call_cache to make sure you don't write the same identical data
DELETE FROM call_cache where block_number between X and Y;
or
DELETE FROM `call_cache` WHERE block_number >=X and id<= Y;
The text was updated successfully, but these errors were encountered:
Currently if indexers want to inspect & maybe clear the Ethereum call cache, they need to access and alter Postgres directly. This is error prone. There could be a dedicated
graphman
command to streamline this process:Example existing process, when the call cache is found to be malformed:
The text was updated successfully, but these errors were encountered: