2

I am currently working on trying to add a token to Karura. In order to ensure I am doing it correctly I need to run Karura and my chain on a local relay chain. To do this I am using following the instructions in the Acala README for parachain-launch. I am doing this off the latest master. The only change I have made is updating the launch config to only use two validators and one collator. When following the instructions I end up the Karura chain not producing blocks. I see that is correctly registered to the local relay chain both in the relay chain's UI and the logs for the Karura node. Unfortunately the Karura node keeps attempting to build blocks but it always seems to fail. See below for logs.

Collator Logs Start

2022-05-04 23:33:47.728  INFO main sc_cli:🏃 ✌️  version 2.5.0-2.5.0-x86_64-linux-gnu
2022-05-04 23:33:47.728  INFO main sc_cli:🏃 ❤️  by Acala Developers, 2019-2022
2022-05-04 23:33:47.728  INFO main sc_cli:🏃 📋 Chain specification: Acala Karura Dev
2022-05-04 23:33:47.728  INFO main sc_cli:🏃 🏷️  Node name: parachain-2000-0
2022-05-04 23:33:47.729  INFO main sc_cli:🏃 👤 Role: AUTHORITY
2022-05-04 23:33:47.729  INFO main sc_cli:🏃 💾 Database: RocksDb at /acala/data/chains/karura-dev/db/full
2022-05-04 23:33:47.729  INFO main sc_cli:🏃 ⛓️  Native runtime: karura-2050 (karura-0.tx1.au1)
2022-05-04 23:33:47.808  INFO main acala_cli::command: Parachain id: Id(2000)
2022-05-04 23:33:47.809  INFO main acala_cli::command: Is collating: yes
2022-05-04 23:34:30.443  INFO main sc_service::client::client: [Parachain] 🔨 Initializing Genesis block/state (state: 0x3d44…df34, header-hash: 0x8e83…f947)
2022-05-04 23:35:10.662  INFO main sc_service::client::client: [Relaychain] 🔨 Initializing Genesis block/state (state: 0x24c2…a60d, header-hash: 0x4736…c070)
2022-05-04 23:35:10.719  INFO main afg: [Relaychain] 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2022-05-04 23:35:20.855  INFO main babe: [Relaychain] 👶 Creating empty BABE epoch changes on what appears to be first startup.
2022-05-04 23:35:20.871  INFO main sub-libp2p: [Relaychain] 🏷️  Local node identity is: 12D3KooWK1NUo4T9a8VwnjCG1ZwsHRJepNs9gkrzXtKDXs3Qukrn
2022-05-04 23:35:21.056  INFO main sc_service::builder: [Relaychain] 📦 Highest known block at #0
2022-05-04 23:35:21.066  INFO tokio-runtime-worker substrate_prometheus_endpoint: [Relaychain] 〽️ Prometheus exporter started at 127.0.0.1:9616
2022-05-04 23:35:21.105  INFO                 main parity_ws: [Relaychain] Listening for new connections on 127.0.0.1:9945.
2022-05-04 23:35:21.216  WARN                 main sc_service::config: [Parachain] Using default protocol ID "sup" because none is configured in the chain specs
2022-05-04 23:35:21.233  INFO                 main sub-libp2p: [Parachain] 🏷️  Local node identity is: 12D3KooWKesAVJR1yFzYACPhF2F4QfUirGcdxqAerbVvKiv91QaW
2022-05-04 23:35:21.618  INFO                 main sc_service::builder: [Parachain] 📦 Highest known block at #0
2022-05-04 23:35:21.624  INFO tokio-runtime-worker substrate_prometheus_endpoint: [Parachain] 〽️ Prometheus exporter started at 127.0.0.1:9615
2022-05-04 23:35:21.686  INFO                 main parity_ws: [Parachain] Listening for new connections on 0.0.0.0:9944.
2022-05-04 23:35:24.096 DEBUG tokio-runtime-worker cumulus-consensus: [Parachain] Skipping set new best block, because block is already the best. block_hash=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947

Collator attempted block production

2022-05-04 23:36:12.076 DEBUG tokio-runtime-worker cumulus-consensus: [Parachain] Skipping set new best block, because block is already the best. block_hash=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947
2022-05-04 23:36:12.083 TRACE tokio-runtime-worker cumulus-collator: [Parachain] Producing candidate relay_parent=0x6e83886256679d86001d616ca794d15b0c4d546133624413bf0e9d9580a63627
2022-05-04 23:36:12.083  INFO tokio-runtime-worker cumulus-collator: [Parachain] Starting collation. relay_parent=0x6e83886256679d86001d616ca794d15b0c4d546133624413bf0e9d9580a63627 at=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947
2022-05-04 23:36:12.152 DEBUG tokio-runtime-worker aura: [Parachain] Starting authorship at slot 137642281; timestamp = 1651707372084
2022-05-04 23:36:12.152  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] 🙌 Starting consensus session on top of parent 0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947
2022-05-04 23:36:12.419 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] Attempting to push transactions from the pool.
2022-05-04 23:36:12.419 DEBUG tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] Pool status: PoolStatus { ready: 0, ready_bytes: 0, future: 0, future_bytes: 0 }
2022-05-04 23:36:12.509  INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: [Parachain] 🎁 Prepared block for proposing at 1 (89 ms) [hash: 0x1a5af63eb88df3727df391be8306ada1d2e97d0cb20e983c85aca7019b80edcc; parent_hash: 0x8e83…f947; extrinsics (2): [0xe0eb…6719, 0x6eab…96d4]]
2022-05-04 23:36:12.516  INFO tokio-runtime-worker aura: [Parachain] 🔖 Pre-sealed block for proposal at 1. Hash now 0x205101cb85700eb10f63873a801f471baca0afeb1a45991928efd57da510c472, previously 0x1a5af63eb88df3727df391be8306ada1d2e97d0cb20e983c85aca7019b80edcc.
2022-05-04 23:36:12.518  INFO tokio-runtime-worker substrate: [Parachain] ✨ Imported #1 (0x2051…c472)
2022-05-04 23:36:12.519  INFO tokio-runtime-worker cumulus-collator: [Parachain] PoV size { header: 0.1787109375kb, extrinsics: 2.27734375kb, storage_proof: 3.21484375kb }
2022-05-04 23:36:12.521  INFO tokio-runtime-worker cumulus-collator: [Parachain] Compressed PoV size: 4.8154296875kb
2022-05-04 23:36:12.607  INFO tokio-runtime-worker cumulus-collator: [Parachain] Produced proof-of-validity candidate. block_hash=0x205101cb85700eb10f63873a801f471baca0afeb1a45991928efd57da510c472
2022-05-04 23:36:16.162  INFO tokio-runtime-worker substrate: [Relaychain] 💤 Idle (2 peers), best: #15 (0x6e83…3627), finalized #12 (0xb990…4b21), ⬇️ 0.7kiB/s ⬆️ 1.5kiB/s
2022-05-04 23:36:16.751  INFO tokio-runtime-worker substrate: [Parachain] 💤 Idle (0 peers), best: #0 (0x8e83…f947), finalized #0 (0x8e83…f947), ⬇️ 0 ⬆️ 0
2022-05-04 23:36:18.065  INFO tokio-runtime-worker substrate: [Relaychain] ✨ Imported #16 (0xb8c5…122f)
2022-05-04 23:36:18.066 DEBUG tokio-runtime-worker cumulus-consensus: [Parachain] Skipping set new best block, because block is already the best. block_hash=0x8e83e7653b902aefbc21b0694d07e2a19307a5990068b26c73af58887f63f947

1
  • 1
    You need to provide more logs on validator side. And try 3 validators instead 2.
    – Bryan Chen
    May 5, 2022 at 0:01

1 Answer 1

1

So we can replicate this issue locally with a brand new mac m1. The docker-compose i use works 100% of the time when on Linux, but fails to produce blocks when running on mac (tested on two different machines)

We suspect it is performance related due to running x86 image on m1. It does seem throttled in some way. It is known qemu x86 docker is slow.

We could build arm docker images but it is almost always easier to ask people to use linux server for testing.

A lot of devs use MBPs, but I suppose the official advice we can give is don't run networks with relay nodes if you're doing dApp development.

People can always build it locally and run without issue, it is just docker simply don’t play nicely with m1 yet.

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 8, 2022 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.