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

Introduced parachain candidate validation #3249

Merged

Conversation

kishansagathiya
Copy link
Contributor

@kishansagathiya kishansagathiya commented May 9, 2023

This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.

  • Implement 3 require import calls or create and issue for them.

This is a simpler version. Eventually as other parts get implemented, we will redo this so that we call run multiple validation code in async way.

Changes

Tests

go test -tags integration github.com/ChainSafe/gossamer

Issues

#2989

Primary Reviewer

@timwu20

This commit adds all the functions required for parachain candidate
validations.

With this commit, we are able to take candidate receipts and
	- get validation data for it,
	- perform basic checks on it,
	- run respective parachain's validate_block on parachain's
	  runtime,
	- get validate results from parachain's runtime and verify those
	  validation results again relaychain runtime,
	- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #3249 (a255619) into feat/parachain (46892e5) will decrease coverage by 0.31%.
The diff coverage is 45.32%.

❗ Current head a255619 differs from pull request most recent head 73a4b62. Consider uploading reports for the commit 73a4b62 to get more accurate results

Additional details and impacted files
@@                Coverage Diff                 @@
##           feat/parachain    #3249      +/-   ##
==================================================
- Coverage           50.97%   50.66%   -0.31%     
==================================================
  Files                 247      249       +2     
  Lines               31829    31968     +139     
==================================================
- Hits                16224    16198      -26     
- Misses              13873    14021     +148     
- Partials             1732     1749      +17     

kishansagathiya and others added 22 commits May 9, 2023 12:56
…3281)

Co-authored-by: Eclésio Junior <eclesiomelo.1@gmail.com>
Co-authored-by: Edward Mack <emack@pop-os.localdomain>
Co-authored-by: Kishan Sagathiya <kishansagathiya@gmail.com>
Co-authored-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
…ement/1 protocol (#3354)

- Added `StatementFetchingRequest` and `StatementFetchingResponse`  varying data types.

- implemented 'network.Message` interface in `StatementFetchingRequest` and 'network.ResponseMessage` interface in `StatementFetchingResponse` as they will be passed into `func (rrp *RequestResponseProtocol) Do(to peer.ID, req Message, res ResponseMessage) error` function as `req` and `res`.

- I didn't want to create a new YAML file here. so I decided to rename the YAML file name and variable(in which data of the YAML file getting unmarshalled) name so that I can use them in this PR.
…chunk/1 protocol (#3362)

- Added `ChunkFetchingRequest` and `ChunkFetchingResponse` types.

- implemented network.Message interface in `ChunkFetchingRequest` and 'network.ResponseMessage' interface in `ChunkFetchingResponse`
…available_data/1 protocol (#3368)

- Added AvailableDataFetchingRequest and AvailableDataFetchingResponse types.
- Implemented 'network.Message' interface in AvailableDataFetchingRequest and 'network.ResponseMessage' interface in AvailableDataFetchingResponse as they will be passed into this function as req and res.
…g statement and collation (#3374)

added New() method and decode test for below varying data types. 
- statement
- statement distribution message
- collation protocol
- collator protocol message
…pov/1 protocol (#3365)

- Added PoVFetchingRequest and PoVFetchingResponse types.
- Implemented 'network.Message' interface in PoVFetchingRequest and 'network.ResponseMessage' interface in PoVFetchingResponse as they will be passed into this function as req and res.
#3277)

- Added parachain service
- Registered collation and validation protocol
- Confirmed that we can communicate with collators by talking to them in `run()` function
Implemented following parachain host runtime calls
- ParachainHost_persisted_validation_data
- ParachainHost_validation_code
kishansagathiya and others added 2 commits August 1, 2023 21:36
Co-authored-by: Eclésio Junior <eclesiomelo.1@gmail.com>
lib/parachain/candidate_validation.go Outdated Show resolved Hide resolved
lib/parachain/types/types.go Outdated Show resolved Hide resolved
…om:ChainSafe/gossamer into kishan/feat/parachain-candidate-validation
Copy link
Member

@edwardmack edwardmack left a comment

Choose a reason for hiding this comment

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

This looks good to me, I just have a couple questions to help build my understanding.

lib/parachain/candidate_validation_test.go Outdated Show resolved Hide resolved
lib/parachain/pvf.go Outdated Show resolved Hide resolved
lib/parachain/pvf.go Outdated Show resolved Hide resolved
@kishansagathiya kishansagathiya merged commit b7d8b91 into feat/parachain Aug 4, 2023
18 of 19 checks passed
@kishansagathiya kishansagathiya deleted the kishan/feat/parachain-candidate-validation branch August 4, 2023 08:39
kishansagathiya added a commit that referenced this pull request Aug 22, 2023
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
kishansagathiya added a commit that referenced this pull request Aug 22, 2023
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
edwardmack pushed a commit that referenced this pull request Aug 30, 2023
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
edwardmack pushed a commit that referenced this pull request Aug 31, 2023
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
kishansagathiya added a commit that referenced this pull request Sep 14, 2023
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
kishansagathiya added a commit that referenced this pull request Jan 23, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
kishansagathiya added a commit that referenced this pull request Jan 24, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
timwu20 pushed a commit that referenced this pull request Jun 15, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
timwu20 pushed a commit that referenced this pull request Jun 17, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
timwu20 pushed a commit that referenced this pull request Jun 20, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
edwardmack pushed a commit that referenced this pull request Jun 26, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
edwardmack pushed a commit that referenced this pull request Jul 12, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
kishansagathiya added a commit that referenced this pull request Jul 15, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
kishansagathiya added a commit that referenced this pull request Jul 15, 2024
This commit adds all the functions required for parachain candidate validations.

With this commit, we are able to take candidate receipts and
- get validation data for it,
- perform basic checks on it,
- run respective parachain's validate_block on parachain's runtime,
- get validate results from parachain's runtime and verify those validation results again relaychain runtime,
- and declare candidate as valid or invalid in the end.

This commit also includes tests for candidate validation.
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.

5 participants