reth-indexer icon indicating copy to clipboard operation
reth-indexer copied to clipboard

Support reth database version 2

Open halljson opened this issue 1 year ago • 3 comments

Reth recently did an upgrade that required resyncing the entire database.

Reth-indexer does not support the new database version.

halljson avatar Mar 20 '24 17:03 halljson

thanks for raising this - I am currently on holiday till the 8th of April cc @liangjh if he is around to look

joshstevens19 avatar Mar 23 '24 09:03 joshstevens19

hey guys! @halljson @joshstevens19 @liangjh am I right that Reth-indexer at this moment can't work with the most recent reth because of DB changes? I didn't saw any new commits since March so it's just for clarification and peace of my mind I tried to understand why I got these errors on the synced holesky node :) basically bigquery barks that there is no rows to insert


hint: you can go to your postgres to see it writing in real time...
last block number in provider Ok(0)
best block number in provider Err(Database(InitCursor(-30798)))
Executing sync_state_to_db for table: "approval"
   writing / sync bigquery table: "approval"
row cnt gcp: 0
gcp insert request: TableDataInsertAllRequest { ignore_unknown_values: false, kind: None, rows: [], skip_invalid_rows: false, template_suffix: None }
Failed, reason: ResponseError { error: ResponseError { error: NestedResponseError { code: 400, errors: [{"reason": "invalid", "domain": "global", "message": "No rows present in the request."}], message: "No rows present in the request.", status: "INVALID_ARGUMENT" } } }
Executing sync_state_to_db for table: "swap"
   writing / sync bigquery table: "swap"
row cnt gcp: 0
gcp insert request: TableDataInsertAllRequest { ignore_unknown_values: false, kind: None, rows: [], skip_invalid_rows: false, template_suffix: None }
Failed, reason: ResponseError { error: ResponseError { error: NestedResponseError { code: 400, errors: [{"domain": "global", "message": "No rows present in the request.", "reason": "invalid"}], message: "No rows present in the request.", status: "INVALID_ARGUMENT" } } }
Executing sync_state_to_db for table: "transfer"
   writing / sync bigquery table: "transfer"
row cnt gcp: 0
gcp insert request: TableDataInsertAllRequest { ignore_unknown_values: false, kind: None, rows: [], skip_invalid_rows: false, template_suffix: None }
Failed, reason: ResponseError { error: ResponseError { error: NestedResponseError { code: 400, errors: [{"message": "No rows present in the request.", "domain": "global", "reason": "invalid"}], message: "No rows present in the request.", status: "INVALID_ARGUMENT" } } }
postgres sync is now complete
Elapsed time: 1.14s

thanks

allnil avatar May 16 '24 20:05 allnil

@allnil yeah it just needs migrating to the new reth database tables it should be a quick fix, up against it atm to fix this really trying to make time so will accept a PR if you want to have ago

joshstevens19 avatar May 18 '24 00:05 joshstevens19