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

feat(dot/parachain): Confirm invalidity errors are implemented in candidate validation. #4163

Open
wants to merge 38 commits into
base: feat/parachain
Choose a base branch
from

Conversation

edwardmack
Copy link
Member

@edwardmack edwardmack commented Sep 5, 2024

Changes

Polkadot has an defined an enum (https://github.com/paritytech/polkadot/blob/153543b0c8c582e73f520e5c08cbe33bddfb5f69/node/primitives/src/lib.rs#L229) to represent the types of candidate invalidity that can happen during candidate validation.

This PR:

  • implements code for handling invalidity conditions
  • Add tests to confirm these invalidity types are handled.

Tests

go test github.com/ChainSafe/gossamer/dot/parachain/candidate-validation

Issues

closes issue #3426

Primary Reviewer

@axaysagathiya @kishansagathiya @timwu20

@edwardmack edwardmack force-pushed the ed/feat/candidate_validation_confirm_errors branch from d19c27e to cdc3514 Compare September 6, 2024 20:50
@edwardmack edwardmack self-assigned this Sep 11, 2024
@edwardmack edwardmack marked this pull request as ready for review September 11, 2024 13:00
@edwardmack edwardmack changed the title Draft: implement timeout check in candidate-validation executeRequest feat(dot/parachain): Confirm invalidity errors are implemented in candidate validation. Sep 11, 2024
mockValidationInstance := NewMockValidatorInstance(ctrl)
mockValidationInstance.EXPECT().ValidateBlock(gomock.Any()).DoAndReturn(func(parachain.
ValidationParameters) (*parachain.ValidationResult, error) {
time.Sleep(3 * time.Second) // sleep to simulate execution time
Copy link
Contributor

Choose a reason for hiding this comment

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

does it really need to be this long?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is 3 seconds since the default timeout period is 2 seconds.

Base automatically changed from ed/feat/candidate_validation_pvf_host_base to feat/parachain September 19, 2024 13:02
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