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

Polkadot integration #542

Merged
merged 5 commits into from
Dec 4, 2020
Merged

Conversation

svyatonik
Copy link
Contributor

I didn't wanted to open this PR until we have everything else ready for Polkadot <-> Kusama , because it is another bunch of code to maintain. I also had doubts about bp-polkadot and bp-kusama crates - probably they should be based on polkadot-primitives / polkadot-runtime-common. Opening now on request.

@svyatonik svyatonik marked this pull request as draft December 1, 2020 09:42
@svyatonik svyatonik marked this pull request as ready for review December 1, 2020 10:49
@tomusdrw
Copy link
Contributor

tomusdrw commented Dec 1, 2020

I didn't wanted to open this PR until we have everything else ready for Polkadot <-> Kusama , because it is another bunch of code to maintain.

I agree, but IMHO it's going to be easier to keep Polkadot<>Kusama integration up to date (instead of going through your fork).

I also had doubts about bp-polkadot and bp-kusama crates - probably they should be based on polkadot-primitives / polkadot-runtime-common.

I also wasn't sure what the best place to put them:

  1. Initially I thought they don't belong to the bridges repo at all,
  2. but then I realised it will make it easier for others to build bridges to Kusama or Polkadot.
  3. Having them depend on polkadot/kusama primitives would be good, but if they stay in this repo it creates circular repo-deps problems.

Currently I think that:

  • Long term - these crates should rather be part of polkadot repo (see medium term for details) and they should depend on the same primitives that the runtime of these chains depend (careful with versioning).
  • Medium term - they should stay in bridges-common but all chain-specific stuff should be extracted to a separate directory (see Make relayer loops generic #2491 or Make relay (easy) configurable for other chains #61). As part of our "librarification" efforts, there should be a clear separation between generic components, chain-specific primitives and chain-specific implementations with clear rules how they can depend on each other. I imagine this would be 3 different top level directories: generic, chains/<chain>/primitives, chains/<chain>/relay and the last two would later on be extracted to chain-specific repos (added Split generic and chain-specific code #544 for this)
  • Short term - it's fine as it is currently, we should just be careful to not add any external chains in the same way (like adding constants to primitives/runtime/src/lib.rs for instance).

primitives/runtime/src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
@tomusdrw tomusdrw merged commit 56c0e45 into paritytech:master Dec 4, 2020
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Mar 27, 2024
* kusama primitives + client

* polkadot primitives + client

* lost Chain definitions

* fix compilation and fmt

* Update primitives/runtime/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
serban300 pushed a commit to serban300/parity-bridges-common that referenced this pull request Apr 8, 2024
* kusama primitives + client

* polkadot primitives + client

* lost Chain definitions

* fix compilation and fmt

* Update primitives/runtime/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
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.

3 participants