paritytech / substrate

Substrate: The platform for blockchain innovators
Apache License 2.0
8.39k stars 2.65k forks source link

Bug Substrate tutorial --rpc-port <X> #14741

Closed Tidus91 closed 1 year ago

Tidus91 commented 1 year ago

Is there an existing issue?

Experiencing problems? Have you tried our Stack Exchange first?

Description of bug

Bug for the parameter --rpc-port at the first time that we are invited to do it here :

bugTutoSubstrate

i have this error message after trying this :

bugSubstrate2

So we need to use this parameter 2 times but we have an error message by doing so.

And i guess that this bug is blocking us for the rest of the tutorial right ?

Steps to reproduce

Just doing this tutorial part

Tidus91 commented 1 year ago

I think there is also a bug at the following of the tutorial with the command --SURI , it's not taking a string

Tidus91 commented 1 year ago

Also an other bug here : bugSubstrate3

got this error message : error[E0220]: associated typeBlockNumbernot found forT``

danisvice commented 1 year ago

RE: error: the argument '--rpc-port <PORT>' cannot be used multiple times

Add && after the primary --rpc-port options Run these commands & it should work:

Alice node:

./target/release/node-template \
--base-path /tmp/alice \
--chain local \
--alice \
--port 30333 \
--rpc-port 9945 && \
--rpc-port 9933 \
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator

Bob node:

./target/release/node-template \
--base-path /tmp/bob \
--chain local \
--bob \
--port 30334 \
--rpc-port 9946 && \
--rpc-port 9934 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--validator \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp
liamaharon commented 1 year ago

Thanks @Tidus91 for bringing this up!

The substrate.io docs are open source. I've added a mentor label to this issue, it would be great if someone was to open a PR to fix it :)

https://github.com/substrate-developer-hub/substrate-docs/blob/main/content/md/en/docs/tutorials/build-a-blockchain/simulate-network.md

Tidus91 commented 1 year ago

Also an other bug here : bugSubstrate3

got this error message : error[E0220]: associated typeBlockNumbernot found forT``

By any chances, do you have a fix for this bug ? because it is blocking the following of the tutorial

ggwpez commented 1 year ago

You can replace <T as Config>::BlockNumber with frame_system::pallet_prelude::BlockNumberFor<T>. It was changed here https://github.com/paritytech/substrate/pull/14437