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

fix order of current/previous dependent root in REST SSE #4141

Merged
merged 1 commit into from
Sep 19, 2022
Merged

fix order of current/previous dependent root in REST SSE #4141

merged 1 commit into from
Sep 19, 2022

Conversation

tersec
Copy link
Contributor

@tersec tersec commented Sep 19, 2022

#4119

depRoot = withState(dag.headState): forkyState.proposer_dependent_root
prevDepRoot = withState(dag.headState):
forkyState.attester_dependent_root
epochTransition = (finalizedHead != dag.finalizedHead)
# TODO (cheatfate): Proper implementation required
data = HeadChangeInfoObject.init(dag.head.slot, dag.head.root,
getStateRoot(dag.headState),
epochTransition, depRoot,
prevDepRoot)

calls init with the attester_dependent_root, defined as depending root of get_previous_epoch, as the second dependent root parameter, while
func init*(t: typedesc[HeadChangeInfoObject], slot: Slot, blockRoot: Eth2Digest,
stateRoot: Eth2Digest, epochTransition: bool,
previousDutyDepRoot: Eth2Digest,
currentDutyDepRoot: Eth2Digest): HeadChangeInfoObject =
HeadChangeInfoObject(
slot: slot,
block_root: blockRoot,
state_root: stateRoot,
epoch_transition: epochTransition,
previous_duty_dependent_root: previousDutyDepRoot,
current_duty_dependent_root: currentDutyDepRoot
)

expects it to be first.

@zah zah merged commit e3750e9 into unstable Sep 19, 2022
@zah zah deleted the tCw branch September 19, 2022 10:28
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.

2 participants