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

Bug: Command line flag for using remote relay chain on Altair/Centrifuge node doesn't work #1365

Closed
Curu24 opened this issue May 25, 2023 · 11 comments
Labels
I10-support Support for understanding/using centrifuge-chain.

Comments

@Curu24
Copy link

Curu24 commented May 25, 2023

Hello,

I tried to run Altair/Centrifuge collator with relay-chain-rpc-url flag to specify a remote relay chain RPC to be used instead of the embedded one but the node process ignores it and starts syncing relay chain locally. When provided with 2 relay-chain-rpc-url flags it crashes with this error:

Started centrifuge node.
error: The argument '--relay-chain-rpc-url <RELAY_CHAIN_RPC_URL>' was provided more than once, but cannot be used multiple times
Usage: centrifuge [OPTIONS] [-- <RELAYCHAIN_ARGS>...]
        centrifuge <COMMAND>
For more information try '--help'
centrifuge.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
centrifuge.service: Failed with result 'exit-code'.

Here is the full config

ExecStart=/usr/local/bin/centrifuge \
  --name Polkadotters \
  --base-path '/var/lib/centrifuge' \
  --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
  --execution wasm \
  --wasm-execution Compiled \
  --collator \
  --chain centrifuge \
  --parachain-id 2031 \
  --rpc-port=9933 \
  --ws-port=9944 \
  --bootnodes /ip4/34.159.117.205/tcp/30333/ws/p2p/12D3KooWMspZo4aMEXWBH4UXm3gfiVkeu1AE68Y2JDdVzU723QPc \
  --public-addr /ip4/146.59.70.153/tcp/30333 \
  --listen-addr /ip4/0.0.0.0/tcp/30333 \
  --state-cache-size 0 \
  --log main,info \
  --relay-chain-rpc-url ws://57.129.1.46:9944 \
  --relay-chain-rpc-url ws://194.163.154.254:9944 \
@lemunozm
Copy link
Contributor

Hi @Curu24,

It seems like you only can specify one URL as the relay chain. If you want to use ws://194.163.154.254:9944 then you can not use the previous one ws://57.129.1.46:9944

@mustermeiszer mustermeiszer added the I10-support Support for understanding/using centrifuge-chain. label May 26, 2023
@Curu24
Copy link
Author

Curu24 commented May 26, 2023

Hi @Curu24,

It seems like you only can specify one URL as the relay chain. If you want to use ws://194.163.154.254:9944 then you can not use the previous one ws://57.129.1.46:9944

Not really. As I mentioned with one url it ignores that flag completely. Plus on parachains where this feature works, there are no problems with providing multiple urls - which makes sense, because you don't want to rely on single relay node especially with more parachains connected to it.

@lemunozm
Copy link
Contributor

Have you tried to specify only one flag but several values?
Something like:

--relay-chain-rpc-url ws://57.129.1.46:9944,ws://194.163.154.254:9944

The doc for this flag found in Cumulus can expect several arguments

@Curu24
Copy link
Author

Curu24 commented May 29, 2023

Have you tried to specify only one flag but several values? Something like:

--relay-chain-rpc-url ws://57.129.1.46:9944,ws://194.163.154.254:9944

The doc for this flag found in Cumulus can expect several arguments

for this setup I got following error:
error: Invalid value 'ws://57.129.1.46:9944,ws://194.163.154.254:9944' for '--relay-chain-rpc-url <RELAY_CHAIN_RPC_URL>': invalid port number

@lemunozm
Copy link
Contributor

Not sure what the delimiter is, and now I can not test it. By default, it is , but it seems it has been overwritten, maybe a simple space works?

@Curu24
Copy link
Author

Curu24 commented May 29, 2023

But it doesn't work even with single argument.

@lemunozm
Copy link
Contributor

lemunozm commented May 29, 2023

From the cumulus readme, maybe what you're looking for is --relay-chain-rpc-urls, that is used as follows:

--relay-chain-rpc-urls \
    "ws://relaychain-rpc-endpoint:9944" \
    "ws://relaychain-rpc-endpoint-backup:9944" \

Does this work for you?

@Curu24
Copy link
Author

Curu24 commented Jun 1, 2023

this gives following error:
error: Found argument '--relay-chain-rpc-urls' which wasn't expected, or isn't valid in this context

But please note, it's not my point to make it work with 2 urls.
This issue is about this argument not working at all with altair/centrifuge binary

@lemunozm
Copy link
Contributor

lemunozm commented Jun 1, 2023

Ok, I see. What version are you using o the centrifuge node? Probably is not a recent one.

You can know it with the following command:

 /usr/local/bin/centrifuge --version

@Curu24
Copy link
Author

Curu24 commented Jun 1, 2023

it's 0.10.26, so up until today it was the recent one

@wischli
Copy link
Contributor

wischli commented Jun 5, 2023

Unfortunately, v0.10.27 will be the first version which supports this command together with collation. We added support in #1241, see here, which is not part of 0.10.26.

Due to the addition of EVM support in v0.10.27, you probably have to wait with updating your client until the runtime code is updated on Altair to 1027 and Centrifuge to 1019.

And just for clarification, for now, relay-chain-rpc-url seems to be the correct CLI command even though the manual states relay-chain-rpc-urls but this throws. This is an inherited error from the Parity Cumulus repository, e.g. default parachain client code. Will check if this is the case on Cumulus master and if so open an issue for the inconsistency.

@wischli wischli closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I10-support Support for understanding/using centrifuge-chain.
Projects
None yet
Development

No branches or pull requests

4 participants