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): receiver side of network bridge #3955

Merged
merged 145 commits into from
Oct 4, 2024

Conversation

kishansagathiya
Copy link
Contributor

@kishansagathiya kishansagathiya commented May 16, 2024

  • handled active leaves update message
  • handled block finalized message

Changes

Tests

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

Issues

Fixes #3861 #3864 #3863 #3862

Primary Reviewer

@edwardmack @axaysagathiya

kanishkatn and others added 30 commits January 24, 2024 20:47
…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
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.
…3382)

Co-authored-by: Kanishka <kanishkatn@gmail.com>
Co-authored-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
Co-authored-by: Axay Sagathiya <axaysagathiya@gmail.com>
#3427)

Co-authored-by: Kishan Sagathiya <kishansagathiya@gmail.com>
Use wazero runtime instance instead of wasmer runtime instance
Co-authored-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
…sons (#3498)

Also, added enums for common reputation values
Copy link
Contributor

@axaysagathiya axaysagathiya left a comment

Choose a reason for hiding this comment

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

I have reviewed a few files and made some comments, and I will continue to review this PR tomorrow.

dot/parachain/collator-protocol/validator_side.go Outdated Show resolved Hide resolved
dot/parachain/collator-protocol/validator_side.go Outdated Show resolved Hide resolved
dot/parachain/collator-protocol/validator_side_test.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/collation_protocol_message.go Outdated Show resolved Hide resolved
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.

Great work, well commented.

dot/parachain/collator-protocol/message_test.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/events/events.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/receiver.go Outdated Show resolved Hide resolved
Copy link
Contributor

@axaysagathiya axaysagathiya left a comment

Choose a reason for hiding this comment

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

I found a bunch of TODOs in dot/parachain/network-bridge/receiver.go.
I have not pointed out all of them in comment but go through this file and tag the issue. Or remove the comment if it's already been addressed.

dot/parachain/collator-protocol/validator_side_test.go Outdated Show resolved Hide resolved
dot/parachain/collator-protocol/validator_side_test.go Outdated Show resolved Hide resolved
dot/parachain/collator-protocol/validator_side_test.go Outdated Show resolved Hide resolved
dot/parachain/collator-protocol/validator_side_test.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/receiver.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/receiver.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/receiver.go Outdated Show resolved Hide resolved
dot/parachain/network-bridge/receiver.go Outdated Show resolved Hide resolved
dot/parachain/overseer/mockable_overseer.go Outdated Show resolved Hide resolved
@kishansagathiya kishansagathiya merged commit 4cc9ce0 into feat/parachain Oct 4, 2024
22 checks passed
@kishansagathiya kishansagathiya deleted the kishan/feat/network-bridge-rx branch October 4, 2024 13:36
edwardmack added a commit that referenced this pull request Oct 4, 2024
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
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