livepeer/go-livepeer

Check if ETH node is synced on startup

オープン

#1,564 opened on 2020/07/08

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Go (223 件のフォーク)auto 404
area: blockchaingood first issuehelp wanted

Repository metrics

Stars
 (583 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

A user may try connecting the livepeer node to an Ethereum node that is not fully synced - this can cause issues such as the code for the livepeer contracts not existing.

Describe the solution you'd like A clear and concise description of what you want to happen.

The livepeer node can use the eth_syncing RPC call on startup to check if the Ethereum node it is connected to is fully synced. If the Ethereum node is not fully synced, there are a few options:

  • Wait for the Ethereum node to be fully synced
  • Exit early and tell the user that the Ethereum node is not fully synced and to try running livepeer again when the Ethereum node is fully synced

I think something along the lines of the latter is probably better since in the former the Ethereum node could take awhile to sync.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

A user in Discord tried connecting to an Ethereum node that was not fully synced and encountered:

E0709 06:18:18.756417    3944 client.go:222] Error getting LivepeerToken address: no contract code at given address
E0709 06:18:18.758606    3944 livepeer.go:378] Failed to setup client: no contract code at given address
I0709 06:18:18.761430    3944 db.go:381] Closing DB

コントリビューターガイド