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

Expose more ports in dockerfile #373

Merged
merged 1 commit into from Feb 23, 2022
Merged

Expose more ports in dockerfile #373

merged 1 commit into from Feb 23, 2022

Conversation

Dengjianping
Copy link
Contributor

@Dengjianping Dengjianping commented Jan 29, 2022

Description

30334 is a port for connecting relaychain by default, I think we should expose this port in case there's any connection issue between relaychain and parachain.

closes: #372


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (manta or dolphin) with right title (start with [Manta] or [Dolphin]),
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests.
  • Updated relevant documentation in the code.
  • Re-reviewed Files changed in the Github PR explorer.
  • If runtime changes, need to update the version numbers properly:
    • authoring_version: The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.
    • spec_version: The version of the runtime specification. A full node will not attempt to use its native runtime in substitute for the on-chain Wasm runtime unless all of spec_name, spec_version, and authoring_version are the same between Wasm and native.
    • impl_version: The version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different; as long as the other two versions are the same then while the actual code may be different, it is nonetheless required to do the same thing. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the impl_version changing.
    • transaction_version: The version of the extrinsics interface. This number must be updated in the following circumstances: extrinsic parameters (number, order, or types) have been changed; extrinsics or pallets have been removed; or the pallet order in the construct_runtime! macro or extrinsic order in a pallet has been changed. If this number is updated, then the spec_version must also be updated
  • If needed, notify the committer this is a draft-release and a tag is needed after merging the PR.
  • Verify benchmarks & weights have been updated for any modified runtime logics
  • If needed, bump version for every crate.
  • If import a new pallet, choose a proper module index for it, and allow it in BaseFilter. Ensure every extrinsic works from front-end. If there's corresponding tool, ensure both work for each other.
  • If needed, update our Javascript/Typescript APIs. These APIs are offcially used by exchanges or community developers.
  • If we're going to issue a new release, freeze the code one week early(it depends, but usually it's one week), ensure we have enough time for related testing.

@Dengjianping Dengjianping added T-devops Team: Relevant for the DevOps Team A-calamari Area: Issues and PRs related to the Calamari Runtime A-ci Area: Continuous Integration labels Jan 29, 2022
@Dengjianping Dengjianping added this to the v3.1.3 milestone Jan 29, 2022
@Dengjianping Dengjianping self-assigned this Jan 29, 2022
@Dengjianping Dengjianping marked this pull request as ready for review January 29, 2022 14:37
Copy link
Contributor

@ghzlatarev ghzlatarev left a comment

Choose a reason for hiding this comment

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

Please say why we're doing this change in the description.
We need to be able to easily realize what's happening in this PR if we open it after 6 months.

@Dengjianping
Copy link
Contributor Author

Please say why we're doing this change in the description. We need to be able to easily realize what's happening in this PR if we open it after 6 months.

Updated.

@Garandor
Copy link
Contributor

Garandor commented Feb 7, 2022

Description

30334 is a port for connecting relaychain by default, I think we should expose this port in case there's any connection issue between relaychain and parachain.

As relay- and parachain both run on the same device ( or in case of docker more specifically: in the same container ) since they are the same binary, they will be able to find each other even without exposed ports. Also I'm not sure why the parachain should talk on the relaychain p2p port, i would imagine they exchange messages on websocket or rpc.

The problem begins when external nodes want to reach the relaychain node on 30334 which won't be available unless exposed. See also the discussion in https://github.com/Manta-Network/docs/pull/15/files#r800349071

@Dengjianping
Copy link
Contributor Author

Dengjianping commented Feb 8, 2022

Description

30334 is a port for connecting relaychain by default, I think we should expose this port in case there's any connection issue between relaychain and parachain.

As relay- and parachain both run on the same device ( or in case of docker more specifically: in the same container ) since they are the same binary, they will be able to find each other even without exposed ports. Also I'm not sure why the parachain should talk on the relaychain p2p port, i would imagine they exchange messages on websocket or rpc.

The problem begins when external nodes want to reach the relaychain node on 30334 which won't be available unless exposed. See also the discussion in https://github.com/Manta-Network/docs/pull/15/files#r800349071

I think ws and rpc are for applications, but exchanging messages between parachain and relaychain is by p2p(libp2p).
This p2p port is open by default, https://github.com/Manta-Network/Manta/blob/manta/node/src/command.rs#L395

Parachain should have two peer sets, one saves parachain peer addresses, another one has relaychain peer addresses.
I don't know, just guess

@Garandor
Copy link
Contributor

Garandor commented Feb 8, 2022

I'm still digging around the code, but I'm positive they don't talk p2p or RPC or WS for that matter.
They are coupled tightly in code by the cumulus pallet -> https://github.com/paritytech/cumulus

There seems to be work to split the relaychain node out from the parachain in paritytech/cumulus#545
and the relaychain has a trait interface already merged in paritytech/cumulus#835
but it looks like having this running in separate processes and communicating via IPC is a work in progress: paritytech/cumulus#963

@stechu
Copy link
Contributor

stechu commented Feb 10, 2022

@Garandor do we have any conclusion on the port issue?

@Dengjianping Dengjianping modified the milestones: v3.1.3, v3.1.5 Feb 11, 2022
@stechu stechu merged commit 577da19 into manta Feb 23, 2022
@stechu stechu deleted the jamie/expose-ports branch February 23, 2022 19:57
dziabko pushed a commit that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-calamari Area: Issues and PRs related to the Calamari Runtime A-ci Area: Continuous Integration T-devops Team: Relevant for the DevOps Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose more ports in docker container
4 participants