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

Set head according to fcuState even when attributes are incorrect #6144

Merged
merged 5 commits into from
Oct 4, 2023

Conversation

flcl42
Copy link
Contributor

@flcl42 flcl42 commented Sep 28, 2023

Fixes Closes Resolves hive test

Changes

  • Sets head according to fcuState even when attributes are incorrect

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

@flcl42 flcl42 force-pushed the bugfix/set-head-when-attributes-are-incorrect branch from d0dc381 to 7a2f91f Compare October 2, 2023 13:15
@flcl42 flcl42 changed the title Still set head according to fcuState even when attributes are incorrect Set head according to fcuState even when attributes are incorrect Oct 2, 2023
@flcl42 flcl42 marked this pull request as ready for review October 2, 2023 16:07
@flcl42 flcl42 requested a review from MarekM25 October 2, 2023 16:15
ValidateAttributes(payloadAttributes, version) ??
payloadUpdateResult ??
StartBuildingPayload(newHeadBlock!, forkchoiceState, payloadAttributes)
);
Copy link
Contributor Author

@flcl42 flcl42 Oct 2, 2023

Choose a reason for hiding this comment

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

This is the main change:

  • run ApplyForkchoiceUpdate,
  • only then validate params and fork, return error if found,
  • or error from ApplyForkchoiceUpdate
  • or anything else returned by StartBuildingPayload

@jflo @MarekM25

@LukaszRozmej
Copy link
Member

This looks wrong to me; the wrong version is called and we are doing everything and only returning an error at the end. Sounds wrong. Did you consider that the hive test is poorly constructed and should be amended? Did you discuss it with Hive test guys? Did you discuss it as spec?

@flcl42
Copy link
Contributor Author

flcl42 commented Oct 3, 2023

This looks wrong to me; the wrong version is called and we are doing everything and only returning an error at the end. Sounds wrong.

Wrong version of what? It returns result if presents, result can be an error or SYNCING/VALID, not just error. Let's call?

Did you consider that the hive test is poorly constructed and should be amended? Did you discuss it with Hive test guys? Did you discuss it as spec?

Yes, sure, it was not obvious for me too

Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

I hate the spec and would like to change it, but the PR looks good

@flcl42 flcl42 merged commit 6472650 into master Oct 4, 2023
61 checks passed
@flcl42 flcl42 deleted the bugfix/set-head-when-attributes-are-incorrect branch October 4, 2023 08:16
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.

4 participants