Open mfornos opened 1 year ago
The value at the storage key :heappages
(0x3a686561707061676573) for Moonbeam is 0xed5c416273747261
(queried through a JSON-RPC server).
Well... seemingly it is really set to "7021802807942536429" pages. A "solution" could be to limit the max heap pages number to a reasonable one. Maybe 65536 as in the fix of the linked issue? I was checking other networks and didn't found other network specifying ':heappages' so 2048 is being used.
Btw, i'm not aware of the implications for smoldot and how the pages are actually allocated. Will take a look just out of curiosity :D
A "solution" could be to limit the max heap pages number to a reasonable one. Maybe 65536 as in the fix of the linked issue?
Smoldot needs to match the behavior of Substrate.
As far as I understand, Moonbeam made some modifications to their fork of Substrate so that it ignores the number of heap pages. It's unclear to me why they don't fix the on-chain value instead. If that's the case, then Moonbeam is incompatible with smoldot.
Seems that the ignore_onchain_heap_pages
flag was merged into Substrate.
References: https://github.com/paritytech/polkadot-sdk/blob/771c3fbde7ba3849298d6fc7df390fc6b5a04d2f/substrate/client/executor/src/executor.rs#L145 https://github.com/paritytech/polkadot-sdk/blob/771c3fbde7ba3849298d6fc7df390fc6b5a04d2f/substrate/client/executor/src/executor.rs#L657 https://github.com/paritytech/polkadot-sdk/blob/771c3fbde7ba3849298d6fc7df390fc6b5a04d2f/substrate/client/executor/src/executor.rs#L663
If you want to move this issue forward, please find someone from Moonbeam and ask them for an explanation about this.
The panic has been fixed in https://github.com/smol-dot/smoldot/pull/1570
We are trying to use the light client to connect to the Moonbeam network.
But it panics while compiling the runtime.
Context:
It there anything that we can do to make it work with Moonbeam?
Thank you very much!