Open kosso opened 1 year ago
The sync is still stopped, days later. Is this service going to be returning?
Or should we look for alternative sources of data? This is quite frustrating.
I found a few more subgraphs on thegraph.com, and they have the same problem with sync. It seems to me that there is some kind of global problem with block sync :((
It appears that they restarted the sync on the UniswapV2 subgraph yesterday. It's still catching up the syncing. Currently got as far as somewhere around Sunday 4am UK time.
I also use the blocklytics/ethereum-blocks
Subgraph. That seems to be all up to date.
I'm using uniswap/uniswap-v2 and ianlapham/uniswapv2 to get data for pairs of pools, and I see that they are not synchronized -2 days, I did not find other options ...
Right. I use the ianlapham version as a backup too. I see that restarted syncing yesterday too. It also appears to have got as far as Sun May 14 2023 04:22:35 GMT+0100, and still syncing.
How long will it sync to real time ? I see that it periodically falls and then restarts. Yesterday there was a sync delay of -2 days, todays the same...
It seems that there is another issue with the subgraph - are there any official channels where I can get updated on status, short of scraping through Discord occasionally?
any news on this?
bump
Why is the last synced blocked in May? It is one month behind the current block, when will this be fixed? Are there any alternatives?
Try this dev version, which seems to be working and staying up to date : https://thegraph.com/hosted-service/subgraph/ianlapham/uniswap-v2-dev
bump
Possible fix in the ian/overflow-fix branch (could we merge it? @ianlapham), and steps I took (which may be wrong) for updating a local graph-node with the new code:
git clone https://github.com/Uniswap/v2-subgraph.git
git switch ian/overflow-fix
yarn.lock
because yarn
was failing with broken deps (maybe they were unneeded?), then ran yarn
again, and yarn codegen
subgraph.yaml
graft
section of this branch has the correct block number to graft from to fix this bug, but you may need to edit the base
field to point your actual subgraph ID, as described here: https://ethereum.stackexchange.com/a/143648./node_modules/.bin/graph deploy davekaj/uniswap --debug --ipfs http://localhost:5001 --node http://127.0.0.1:8020
(modify --ipfs
and --node
flags as appropriate)graph-node
database, subgraphs
schema, copy_table_state
table--
The Postgres data copy will take hours/days, I'm curious if anyone knows a way or quick/dirty hack to update the subgraph code without "grafting" (copying) the uniswap-v2 subgraph data (which is about 700GB).
--
Ian's branch was discovered by browsing https://github.com/Uniswap/v2-subgraph/network, shift+right arrow to go to the end, then left arrow to go backwards while hovering over the dots to find bug fixes
--
actual error from graph-node
database, subgraphs
schema, subgraph_error
table:
Mapping aborted at ~lib/@graphprotocol/graph-ts/index.ts, line 324, column 8, with message: overflow converting 0x0000000000000000000000000000000000000000000000000000000067e53c31 to u32 wasm backtrace: 0: 0x1c54 -
Update, 4 days later:
The total time to graft ianlapham's branch of the uniswap v2 subgraph was 4 days, and it failed with the same error.
2 problems with the previous approach:
fetchTokenDecimals
QmXYAmabbEmnSDNR5GWJhmm2NQKXnPkSJEBC3EsMwjXr4e
. But trying to use this content hash by updating the subgraph SQL also fails because the content doesn't appear to be on IPFS as of 2023-08-28 (just times out).Quick/dirty/dangerous hack fix that worked for me without grafting:
diff --git a/src/mappings/helpers.ts b/src/mappings/helpers.ts
index b5fd836..7774ccb 100644
--- a/src/mappings/helpers.ts
+++ b/src/mappings/helpers.ts
@@ -134,6 +134,10 @@ export function fetchTokenTotalSupply(tokenAddress: Address): BigInt {
}
export function fetchTokenDecimals(tokenAddress: Address): BigInt {
+ if (SKIP_TOTAL_SUPPLY.includes(tokenAddress.toHexString())) {
+ return BigInt.fromI32(0)
+ }
+
// static definitions overrides
let staticDefinition = TokenDefinition.fromAddress(tokenAddress)
if (staticDefinition != null) {
run ./node_modules/.bin/graph build --ipfs http://localhost:5001 --node http://127.0.0.1:8020
to upload the subgraph manifest to IPFS
run the following SQL after finding "QmXYAmabbEmnSDNR5GWJhmm2NQKXnPkSJEBC3EsMwjXr4e" and replacing in the SQL code below with the content hash of your existing uni v2 subgraph (may need to find/replace "7507e562bea1b434c37d29df3a02fa11" if it differs in your setup)
UPDATE "subgraphs"."subgraph_features" SET "id"='QmSRB7XjkL6JHZSsfDibjSFhurkuSdE7H8vcrVZHJpfLry' WHERE "id"='QmXYAmabbEmnSDNR5GWJhmm2NQKXnPkSJEBC3EsMwjXr4e';
UPDATE "public"."deployment_schemas" SET "subgraph"='QmSRB7XjkL6JHZSsfDibjSFhurkuSdE7H8vcrVZHJpfLry' WHERE "subgraph"='QmXYAmabbEmnSDNR5GWJhmm2NQKXnPkSJEBC3EsMwjXr4e';
UPDATE "subgraphs"."subgraph_version" SET "deployment"='QmSRB7XjkL6JHZSsfDibjSFhurkuSdE7H8vcrVZHJpfLry' WHERE "subgraph"='7507e562bea1b434c37d29df3a02fa11';
DELETE FROM "subgraphs"."subgraph_error" WHERE subgraph_id='QmXYAmabbEmnSDNR5GWJhmm2NQKXnPkSJEBC3EsMwjXr4e';
UPDATE "subgraphs"."subgraph_deployment" SET "deployment"='QmSRB7XjkL6JHZSsfDibjSFhurkuSdE7H8vcrVZHJpfLry',"fatal_error"=NULL, "health"='healthy', "failed"=false, "synced"=true WHERE "deployment"='QmXYAmabbEmnSDNR5GWJhmm2NQKXnPkSJEBC3EsMwjXr4e';
The syncing of the Subgraph hosted at The Graph https://thegraph.com/hosted-service/subgraph/uniswap/uniswap-v2?selected=logs appears to have stopped. (see debug tab)
12/05/2023, 20:37:13 - Subgraph stopped, WASM runtime thread terminated
Any ideas when this might be back up and running again?