Skip to content

Fix statesync - #60

Merged
tqin7 merged 1 commit into
dydx-fork-v0.38.5from
tq/statesync-proposer-priority
Sep 30, 2026
Merged

tqin7 merged 1 commit into
dydx-fork-v0.38.5from
tq/statesync-proposer-priority

Conversation

@tqin7

@tqin7 tqin7 commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

The light client implementation compares the ValidatorSet instances received from different sources (the primary against one or more witnesses). In particular, the state of the proposer selection algorithm, represented by the ProposerPriority field of each Validator present in the ValidatorSet, should be identical.

In order to compare those fields, we add aProposerPriorityHash() to the ValidatorSet type. This is needed because the Hash() method of the same type does not include the ProposerPriority fields in its computation.

When the light client detects distinct states of the proposer selection algorithm, the VerifyLightBlockAtHeight method of the light.Client type, used for instance by the state sync protocol, returns an error.


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

The light client implementation compares the `ValidatorSet` instances
received from different sources (the primary against one or more
witnesses). In particular, the state of the proposer selection
algorithm, represented by the  `ProposerPriority` field of each
`Validator` present in the `ValidatorSet`, should be identical.

In order to compare those fields, we add  a`ProposerPriorityHash()` to
the `ValidatorSet` type. This is needed because the  `Hash()` method of
the same type does not include the `ProposerPriority` fields in its
computation.

When the light client detects distinct states of the proposer selection
algorithm, the `VerifyLightBlockAtHeight` method of the `light.Client`
type, used for instance by the state sync protocol, returns an error.
@tqin7 tqin7 changed the title Merge commit from fork Fix statesync Sep 30, 2026
@tqin7
tqin7 merged commit 0cbd83d into dydx-fork-v0.38.5 Sep 30, 2026
18 of 21 checks passed
@tqin7
tqin7 deleted the tq/statesync-proposer-priority branch September 30, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants