-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch the hotshot liveness instead of inferring it #171
base: integration
Are you sure you want to change the base?
Conversation
staker/block_validator.go
Outdated
var isHotShotLive bool | ||
isHotShotLive, err := v.lightClientReader.IsHotShotLive(msg.Message.Header.BlockNumber) | ||
if err != nil { | ||
return false, fmt.Errorf("error fetching the hotshot liveness") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we should also attach the error here like - fmt.Errorf("error fetching the hotshot liveness: %v", err)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also attach the block number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what happens if we cant fetch the liveness - should we just assume that Hotshot
is down? and still proceed with transactions
e35ef9b
to
e60c027
Compare
e60c027
to
eed2ff0
Compare
For now, the validators will just retry it again and again since there is a periodic task. The hotshot livenesses are stored in the L1 so I think there should not be a large probability that we failed to get it. |
2c7422e
to
320c73f
Compare
320c73f
to
fd7db10
Compare
This PR:
Validators will not infer the hotshot liveness from the messages. It would fetch the hotshot liveness from the hotshot light client contract.
This provides the STF the correct information to check the hotshot liveness.