Skip to content

feat: add polkadot-launch config#43

Merged
mattsse merged 8 commits intomainfrom
matt/add-polkadot-launch-config
Apr 23, 2021
Merged

feat: add polkadot-launch config#43
mattsse merged 8 commits intomainfrom
matt/add-polkadot-launch-config

Conversation

@mattsse
Copy link
Contributor

@mattsse mattsse commented Apr 23, 2021

Changes

  • Uses pint naming within the cli and chain-spec
  • Add polkadot-launch config file

Tests

At least on my machine the master branch version of polkadot-launch failed to wait until the nodes are spawned. I used the polkadot-launch/wait-for-port branch with a hotfix that waits until the websocket port of the node is available

git clone -b wait-for-port https://github.com/mattsse/polkadot-launch
cd polkadot-launch
yarn install
yarn run start <path to PINT>/config.json 

Issues

@mattsse mattsse marked this pull request as ready for review April 23, 2021 12:00
@mattsse mattsse requested a review from clearloop April 23, 2021 12:01
Copy link
Contributor

@clearloop clearloop left a comment

Choose a reason for hiding this comment

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

Follow the tests above, I'm stuck at

 𝝺 yarn run start ../PINT/config.json
yarn run v1.22.10
$ yarn build && node dist/index.js ../PINT/config.json
$ tsc
2021-04-23 20:48:07  Building chain spec    
Starting with a fresh authority set:
Added Authority alice
Added Authority bob
Added Authority charlie
2021-04-23 20:48:08  Building chain spec    
2021-04-23 20:48:09  Took active validators from set with wrong size    
2021-04-23 20:48:09  Took active validators from set with wrong size    
Starting alice...
Starting bob...
Starting charlie...
Waiting for localhost:9944........
Connected!
2021-04-23 20:48:17        REGISTRY: Unable to resolve type Outcome, it will fail on construction
2021-04-23 20:48:17        API/INIT: RPC methods not decorated: beefy_subscribeJustifications, beefy_unsubscribeJustifications
Starting a Collator for parachain 1: 5Ec4AhNmTPsRSiBHeyHEMojCJFbKn7aoT3KNKnQEc3gV3ocB, Collator port : 31200 wsPort : 9988
Added --chain=pint-dev
Added  to parachain
Added --execution=wasm to collator

And checking the served :9944 polkadot.app UI

Screen Shot 2021-04-23 at 8 52 49 PM

PINT hasn't been registered as a parachain, and the issue #42 mentioned is that after PINT has been registered as a parachin, it doesn't produce blocks, can your paste the logs or screenshot PINT produces blocks on your machine @mattsse , and I will try to find out the problem my machine has

Just saw the logs on slack

@mattsse
Copy link
Contributor Author

mattsse commented Apr 23, 2021

Did you build the correct polkadot branch rococo-v1 and put it into bin as described here? (you only need polkadot)

@mattsse mattsse added the needs review PR needs reviewing label Apr 23, 2021
@clearloop
Copy link
Contributor

Did you build the correct polkadot branch rococo-v1 and put it into bin as described here? (you only need polkadot)

 𝝺 git branch
  master
  rococo-branch
* rococo-v1
 𝝺 cargo build --release --features=real-overseer
error: Package `polkadot v0.8.30 (/Users/clearloop/code/polkadot)` does not have the feature `real-overseer`

I tested the integration with a binary built by cargo build --release on rococo-v1 branch yesterday...And it seems I can't cargo build --release --features=real-overseer following the #binary-files LOL

@clearloop
Copy link
Contributor

Just dismissed the 9988.log on my last review,

 𝝺 tail -f 9988.log 
Error: Input("Error opening spec file: No such file or directory (os error 2)")

Let me test it again

@mattsse
Copy link
Contributor Author

mattsse commented Apr 23, 2021

I think the real-overseer feature was removed recently and isn't required anymore. I've built it with cargo build --release

Copy link
Contributor

@clearloop clearloop left a comment

Choose a reason for hiding this comment

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

2021-04-23 21:43:33 [Parachain] 💤 Idle (0 peers), best: #1 (0xd4ef…2af9), finalized #0 (0xb329…fd7c), ⬇ 57 B/s ⬆ 55 B/s    
2021-04-23 21:43:33 [Relaychain] 💤 Idle (4 peers), best: #24 (0x665a…e7f9), finalized #21 (0xa6b1…c98c), ⬇ 1.3kiB/s ⬆ 1.0kiB/s    
2021-04-23 21:43:36 [Relaychain] ✨ Imported #25 (0xf729…d9f4)    
2021-04-23 21:43:38 [Parachain] 💤 Idle (0 peers), best: #1 (0xd4ef…2af9), finalized #1 (0xd4ef…2af9), ⬇ 0 ⬆ 0    
2021-04-23 21:43:38 [Relaychain] 💤 Idle (4 peers), best: #25 (0xf729…d9f4), finalized #23 (0x6c72…d4c3), ⬇ 1.7kiB/s ⬆ 1.0kiB/s    
2021-04-23 21:43:42 [Relaychain] ✨ Imported #26 (0xd932…c568)  

It works on my machine now! Even I am confused about how this wait-for-port can solve this problem but this is really amazing!!!

BTW, it would be nice renaming PINT/config.json to PINT/polkadot-launch.json.

@mattsse
Copy link
Contributor Author

mattsse commented Apr 23, 2021

BTW, it would be nice renaming PINT/config.json to PINT/polkadot-launch.json.

The polkadot-launch always refers to it as the configuration file and uses config.json consistently, so I think we should also stick to config.json

@mattsse mattsse added approved PR approved to merge and removed needs review PR needs reviewing labels Apr 23, 2021
@mattsse mattsse merged commit 074bd18 into main Apr 23, 2021
@mattsse mattsse deleted the matt/add-polkadot-launch-config branch April 23, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR approved to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to produce block on local rococo testnet

2 participants