Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement Bridge Module #3703

Closed
wants to merge 13 commits into from
Closed

Implement Bridge Module #3703

wants to merge 13 commits into from

Conversation

HCastano
Copy link
Contributor

@HCastano HCastano commented Sep 26, 2019

This PR is going to track the development of #1850. Development will be done on other branches and PR'd into this one. This is being done in order to not have half baked code in Substrate, as well as making it easier for others to review.

Some of the TODOs are:

  • Have a module that can act as a light client for another chain (not necessarily do anything with that data though)
  • Verify GRANDPA finality proofs on-chain
  • Verify block ancestry proofs on-chain
  • Have an RPC for actors to submit claims from other chains
  • Message delivery and acknowledgement infrastructure
  • Default message handler for the receiving end of the bridge

Additionally, a bridge relay node will need to be implemented, which will need to do the following:

  • Relay finalized headers to bridged chains
  • Relay outbound messages to bridged chains
  • Relay message delivery acknowledgements to bridged chains

The bridge relay node issues could probably be tracked in a separate issue as they are fairly independent of the module itself.

cc @jimpo

@HCastano HCastano added the A3-in_progress Pull request is in progress. No review needed at this stage. label Sep 26, 2019
@parity-cla-bot

This comment has been minimized.

srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
srml/bridge/Cargo.toml Outdated Show resolved Hide resolved
srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
srml/bridge/src/lib.rs Outdated Show resolved Hide resolved
HCastano and others added 12 commits January 10, 2020 15:17
* Make tests work after the changes introduced in #3793

* Remove unneccessary import
* Make StorageProofChecker happy

* Update some tests

* Check given validator set against set found in storage

* Use Finality Grandpa's Authority Id and Weight

* Add better error handling

* Use error type from decl_error! macro
* Create module for checking ancestry proofs

* Use Vec of Headers instead of a HashMap

* Move the ancestry verification into the lib.rs file

* Change the proof format to exclude `child` and `ancestor` headers

* Add a testing function for building header chains

* Rename AncestorNotFound error to InvalidAncestryProof

* Use ancestor hash instead of header when verifying ancestry

* Clean up some stuff missed in the merge
* Move `bridge` crate into `frame` folder

* Make `bridge` pallet compile after `the-big-reorg`
* Update decl_error usage

* WIP: Update error handling to use DispatchResult

* Get module compiling with new error handling

* Make tests compile again

Main change was updating the usage of InMemoryBackend

* Move `sp-state-machine` into dev-dependencies

* Bump dependencies to v2.0.0

* Remove some stray comments

* Appy code review suggestion
@HCastano
Copy link
Contributor Author

Closing this in favour of paritytech/parity-bridges-common#18.

@HCastano HCastano closed this Feb 20, 2020
@bkchr bkchr deleted the hc-jp-bridge-module branch February 20, 2020 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A3-in_progress Pull request is in progress. No review needed at this stage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants