Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Conversation

@ascjones
Copy link
Contributor

@ascjones ascjones commented Mar 4, 2021

Closes #30

Converts the node from a solo chain to run as a parachain.

Initially we considered continuing to support running the node as a solo chain for local development and for the existing canvas testnet. However after some experimentation we concluded that the cost of introducing the extra code paths would increase the long term maintenance burden of the codebase.

So to keep things simple, running this node requires (for now) a running relay chain environment. The upside is that we are running it as a parachain all the way through the development and testing environments so we can test any parachain specific features e.g. cross-chain contract calls. The downside is that it increases the complexity of the local development setup. This should be made easier by using polkadot-launch, for which I have provided a configuration as part of this PR. We could also further make this easier by providing a docker container with prebuilt polkadot binaries for the relay chain.

todo

  • document in README for local development testnet
  • generate canvas testnet chainspecs

@ascjones ascjones marked this pull request as ready for review March 16, 2021 12:12
@riusricardo
Copy link
Contributor

I liked the idea of having a solo-chain and a parachain. I agree that it adds a little bit of maintenance burden but not so much in my opinion. I have done it and could take a peak on this after merging this PR.
An alternative would be to ask users to run this configuration and in case that they don't have enough power on their machines to handle several nodes, then we can point them to the add contracts pallet tutorial to create a standalone chain.

My main concern is people that is ramping up. What are the short and long term plans for this parachain? Rococo gets a reset quite often and it is WIP. Are we gonna add this friction to the users instead of a standalone testent?

@Robbepop
Copy link

Robbepop commented Mar 16, 2021

The plan is to have our own test net with a single relay chain and a single Canvas parachain. In the future we want to extend this to two Canvas parachains so that we can research with contract calling other contracts on other parachains etc. I wouldn't mind having support for Canvas being non-parachain as well if there only was some person who took over responsibility for its maintenance indefinitely. ;)

@riusricardo
Copy link
Contributor

Thanks for the explanation @Robbepop. Sounds as a good plan. Looking forward to see the next contracts development :)

@ascjones
Copy link
Contributor Author

I liked the idea of having a solo-chain and a parachain. I agree that it adds a little bit of maintenance burden but not so much in my opinion

Happy to add the solo chain mode back as a future PR if there's a need for it and we can make it nice and simple.

I have done it and could take a peak

Please do. Out of interest where have you done this already. I was looking at the moonbeam as an example, but theirs only allows a single node parachain locally (which might be enough even).

@riusricardo
Copy link
Contributor

Please do. Out of interest where have you done this already. I was looking at the moonbeam as an example, but theirs only allows a single node parachain locally (which might be enough even).

I did a template that was using features to hide the different dependencies. An interesting example to learn from is PolkaBTC https://github.com/interlay/btc-parachain they also used features and their code worked in the Rococo network.

Copy link
Contributor

@riusricardo riusricardo left a comment

Choose a reason for hiding this comment

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

Works pretty well.
Tested on Polkadot/Rococo commit 575a89e

@ascjones
Copy link
Contributor Author

Please do. Out of interest where have you done this already. I was looking at the moonbeam as an example, but theirs only allows a single node parachain locally (which might be enough even).

I did a template that was using features to hide the different dependencies. An interesting example to learn from is PolkaBTC https://github.com/interlay/btc-parachain they also used features and their code worked in the Rococo network.

I wish I had looked at this originally, I did try briefly something similar but it was taking too much effort. Even then it has lots of feature blocked code which does slightly increase complexity/maintainability. So decided to keep this as simple as possible for now to get parachains working.

@ascjones ascjones changed the base branch from master to rococo-v1 March 30, 2021 15:09
# Conflicts:
#	Cargo.lock
#	node/src/chain_spec.rs
#	node/src/service.rs
#	runtime/Cargo.toml
#	runtime/src/lib.rs
@ascjones
Copy link
Contributor Author

Parachain work will continue on the rococo-v1 branch, following the convention from cumulus/polakdot/substrate. This means that master will remain a solo chain (for now) for local dev chains and the existing testnet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parachain

4 participants