paritytech / smoldot

Alternative client for Substrate-based chains.
GNU General Public License v3.0
306 stars 74 forks source link

Consider checking whether parachain has a slot at initialization #1431

Open tomaka opened 2 years ago

tomaka commented 2 years ago

When the user adds a parachain chain spec, this chain spec contains a relay chain and a para_id.

Right now, as long as the relay chain is valid, then the chain initialization succeeds. Instead, we should consider syncing the relay chain and calling ParachainHost_persisted_validation_data to check whether the parachain indeed has a slot.

tomaka commented 2 years ago

The difficulty in this issue is that add_chain is currently a synchronous method, and it would need to become asynchronous. This requires some refactoring of the FFI layer.