phoreproject / graphene

Phore Synapse working repository
MIT License
13 stars 6 forks source link

Fixed #37 Re-request epoch data after getting an error #45

Closed wqking closed 5 years ago

codecov-io commented 5 years ago

Codecov Report

Merging #45 into master will not change coverage. The diff coverage is 8.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #45   +/-   ##
=======================================
  Coverage   35.06%   35.06%           
=======================================
  Files          20       20           
  Lines        3431     3431           
=======================================
  Hits         1203     1203           
  Misses       2092     2092           
  Partials      136      136
Impacted Files Coverage Δ
beacon/syncmanager.go 0% <0%> (ø) :arrow_up:
beacon/state.go 60.97% <8.69%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0e027de...dc9bee8. Read the comment docs.

meyer9 commented 5 years ago

Please rebase with master and switch target branch. Testnet was merged into master.

wqking commented 5 years ago

Done

meyer9 commented 5 years ago

The errors here happen when submitting a block. If the beacon block hash is out of sync or something, submitting a block will error out. Then, we should re-request epoch data.

wqking commented 5 years ago

Done

meyer9 commented 5 years ago

Sorry, I should be more clear. It should always retry.

Currently, the validator asks the beacon chain for the entire epoch of proposals/attestations and then launches goroutines that wait for the slot and propose/attest as needed.

Sometimes, after it requests the entire epoch, something is updated and the older epoch assignment becomes invalid, in which case it will error when submitting a block. If this happens, the validator should cancel all current assignments (all goroutines started) and re-request epoch data, then start the goroutines again.