parallel-finance / parallel

A decentralized lending & staking protocol built on top of the Polkadot ecosystem.
https://parallel.fi
GNU General Public License v3.0
120 stars 35 forks source link

Launching local parallel nodes with launch instructions fails with latest parachain-launch version #1934

Closed ivanst closed 1 year ago

ivanst commented 1 year ago

Steps to Reproduce

  1. Follow the instructions found here https://github.com/parallel-finance/parallel/blob/master/docs/LAUNCH.md with version 1.3.0 of parachain-launch. You will get the error below.
  2. Remove parachain-launch and reinstall with version 1.2.2. Try instructions above again.

Expected vs. Actual Behavior

Expect a working launch.

Instead get this error:

$ docker run --rm parallelfinance/polkadot:v0.9.28 build-spec --chain=polkadot-local --disable-default-bootnode
Trace: Error: TypeError: Cannot read properties of undefined (reading 'session')
    at generateRelaychainGenesisFile (/Users/ivan/.config/yarn/global/node_modules/@open-web3/parachain-launch/lib/index.js:139:56)
    at generate (/Users/ivan/.config/yarn/global/node_modules/@open-web3/parachain-launch/lib/index.js:377:5)
    at fatal (/Users/ivan/.config/yarn/global/node_modules/@open-web3/parachain-launch/lib/index.js:56:13)
make: *** [launch] Error 1

Environment

mclyk commented 1 year ago

@ivanst thanks for your issue, we will check it.

mclyk commented 1 year ago

@ivanst have you made any changes to this config file? https://github.com/parallel-finance/parallel/blob/46c6827cdc08f726905cf3eca2b901ddea22856c/config.yml

The log here maybe means that undefined item in the config file.

Trace: Error: TypeError: Cannot read properties of undefined (reading 'session')

ivanst commented 1 year ago

I haven't made any changes in the config file from the source code. If you take the source and run it against 1.3.0 it fails and the same exact thing works with the previous version.

mclyk commented 1 year ago

you're right, I reproduced this problem, I think this is the bug of https://github.com/open-web3-stack/parachain-launch

when the version is 1.3.0, if you change the 'relaychain.chain' items in config.yml to 'rococo-local', there is no error. but when it is 'polkadot-local', there is an error. https://github.com/parallel-finance/parallel/blob/46c6827cdc08f726905cf3eca2b901ddea22856c/config.yml#L3

however when using parachain-launch:1.2.2 version, both 'rococo-local' and 'polkadot-local' works.