Skip to content
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

Align to ssv-spec v0.3.3 #1109

Merged
merged 24 commits into from
Oct 24, 2023
Merged

Align to ssv-spec v0.3.3 #1109

merged 24 commits into from
Oct 24, 2023

Conversation

moshe-blox
Copy link
Contributor

@moshe-blox moshe-blox commented Aug 20, 2023

Changes

Recommended QA tests:

  • Since StartNewDuty was modified, confirm that missed attestations aren't due to duties refusing to start.
  • ValidatorRegistrationRunner: Change a fee recipient and check that the relays have received the updated address.

Recommended changes in a followup PR:

  • Add historical syncing mechanism for exporter nodes
  • Remove logic to load/save highest decided as its no longer needed

@moshe-blox moshe-blox changed the title Update ssv-spec to branch drop-blinded-block-rejection Update ssv-spec to latest Sep 20, 2023
@moshe-blox moshe-blox changed the title Update ssv-spec to latest Align to the latest ssv-spec Sep 20, 2023
@moshe-blox moshe-blox marked this pull request as draft September 20, 2023 09:21
@moshe-blox moshe-blox marked this pull request as ready for review October 22, 2023 13:32
@moshe-blox moshe-blox changed the title Align to the latest ssv-spec Align to ssv-spec v0.3.3 Oct 22, 2023
Comment on lines -27 to -36
func (n *p2pNetwork) SyncHighestDecided(mid spectypes.MessageID) error {
ctx := context.TODO() // TODO: pass context to SyncHighestDecided

return n.syncer.SyncHighestDecided(ctx, n.interfaceLogger, mid, func(msg *queue.DecodedSSVMessage) {
n.msgRouter.Route(ctx, msg)
})
}

func (n *p2pNetwork) SyncDecidedByRange(mid spectypes.MessageID, from, to qbft.Height) {
ctx := context.TODO() // TODO: pass context to SyncDecidedByRange
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we said we wanted to leave sync for fullnodes and not just removed entirely. wouldn't just deleting like this stop fullnode/explorer functionality?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but since the history sync was disabled anyway, and we want to redesign the syncing, then we preferred to fully align to spec here by removing SyncDecidedByRange as well.

Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

I just want to say that this is PR seems to mingle many different things and thus is big.
I remember we talked about smaller PRs here 🤷

return c.UponFutureMsg(logger, msg)
} else {
return c.UponExistingInstanceMsg(logger, msg)
return nil, fmt.Errorf("future msg from height, could not process")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec doesn't concern itself with future messages.

Note that in practice, if there is for example a one second drift between different operators clocks, it can potentially cause duties to be missed.

Not sure how common this case is. Also it should effect at least 2 operators in a committee of 4 to have an impact. I understood engineering is not concerned about it.

However, I am writing this comment here for the record


func (b *BaseRunner) ShouldProcessDuty(duty *spectypes.Duty) error {
if b.QBFTController.Height >= specqbft.Height(duty.Slot) {
return errors.Errorf("duty for slot %d already passed. Current height is %d", duty.Slot,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is my bad here...
The bootstrap case isn't covered here (height == 0)
I think I need to create a PR in spec for it.

It isn't a big deal for mainnet but still a bug

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will address it in the next spec aligned version

MatusKysel
MatusKysel previously approved these changes Oct 23, 2023
Copy link
Contributor

@MatusKysel MatusKysel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@y0sher y0sher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runPreTesting is unused, do we want to keep it for future ref or remove it ?

@moshe-blox
Copy link
Contributor Author

runPreTesting is unused, do we want to keep it for future ref or remove it ?

it's not needed, just removed it

@liorrutenberg liorrutenberg merged commit b93b70c into stage Oct 24, 2023
5 checks passed
@GalRogozinski
Copy link
Contributor

" VoluntaryExit support (partially implemented to pass tests, not yet enabled, delayed for a future PR)"
That's a nasty trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants