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): implement candidate validation pre-check #4205

Closed

Conversation

edwardmack
Copy link
Member

@edwardmack edwardmack commented Sep 30, 2024

Changes

Implement code for candidate validation pre-check subsystem.

  • precheckPvF function for determining if the validation code in valid:
    • Retrieves the validation code from the relay parent's runtime instance.
    • Determines executor parameters for pre-check.
    • Determines timeout durations
    • calls pvf host precheck function

Implements code in pvf host:

  • handlePrecheckPvF returns error if there is an issue compiling validation code
  • modify addNewWorker to accept timeout duration.

Create tests for pre-checks.

Tests

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

Issues

closes: #3921

add updated mock files

clean-up unused comments
…4067)

Co-authored-by: Timothy Wu <tim.wu@chainsafe.io>

test(dot/parachain/backing): make sure parachain candidate reaches quorum (#4115)

- written integration test to check everything mentioned above
- I re-wrote the logic to convert the attested to the backed candidate. (was not working as expected)
- minor changes in dot/parachain/backing/per_relay_parent_state.go to improve the readability.

test(dot/parachain/backing): validation fail does not stop the candidate backing subsystem (#4117)

address merge conflicts

chore(dot/parachain): improve Run method of subsystems (#4113)

- I have updated the Run method of the subsystem interface to pass only necessary arguments.
- removed context, context cancel func, wait group and OverseerToSubSystem channel from the state struct of all the subsystems(example: candidateBacking{}, AvailabilityStoreSubsystem{}).
- improved Run method of some subsystems.
- removed return type from RegisterSubsystem method of overseer.
- because of these changes, some tests were failing, so I fixed those tests.
test(dot/parachain/backing): can not second multiple candidate per relay parent without prospective parachain (#4134)

- I have written a test to ensure it's impossible to second multiple candidates per relay parent when prospective parachain mode is inactive(async backing is not supported).
    - received a candidate backing message to second a candidate. Ensured it seconds the candidate.
    - I received another candidate backing message to second a candidate with the same relay parent. I ensured this candidate got rejected.
- Written some helper functions to reuse the code.
- Added a function to stop the mockable overseer and wait some time to finish the ongoing process before exiting the test.
- I have added an extra check to handle expected overseer action in the mockable overseer.
- Because of this extra check, other tests failed, so I fixed them.

refactor go concurrancy

test(dot/parachain/backing): ensure new lead view doesn't clobber the old view (#4148)
added missing mock file

address deep source comments

address PR comments

make private functions/structs private
address PR comments

address PR comments, rename variables and functions

fix test

remove printf from debugging

address PR comments

test(dot/parachain/backing): ensure conflicting statments treated as misbehavior (#4164)

fix merge conflicts
add maybeCompressedBlobDecompress function and test

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

Statement Distribution subsystem is responsible for distributing signed statements that we have generated and forwarding statements generated by our peers.
This commit just introduces a skeleton for it.
- implements the subsystem interface
- registers the subsystem with overseer
- add the processMessage method with messages to be handled

Issue #3583

cleanup remove un-used code

add comments

regenerate mocks

feat(dot/parachain): receiver side of network bridge (#3955)

- handled active leaves update message
- handled block finalized message
- relay network protocol messages
- handle view update message for receiver side of the network bridge #3864
- decode messages to wire message (PR #4188), Fixes #4108
- handle our view change in collator protocol validator side (PR #4197), Issue #4156
- Handle network bridge messages (UpdateAuthorityIDs and NewGossipTopology) Fixes #3862
- process network events for receiver side of network bridge Issue Fixes #3863
-  process overseer signals for network bridge Fixes #3861
@edwardmack edwardmack force-pushed the ed/feat/candidate_validation_precheck branch from 7f80875 to 2750b20 Compare October 4, 2024 20:58
@edwardmack edwardmack requested a review from P1sar as a code owner October 4, 2024 20:58
@edwardmack
Copy link
Member Author

Closed and replaced by PR #4223.

@edwardmack edwardmack closed this Oct 4, 2024
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.

1 participant