Disposable Parachains (for Airdrops and other ideas)

@metricaez

I think using a merkle trie is the efficient way of putting all this data into storage.

A merkle trie allows all airdrop data to be represented on chain with just a single hash. If you want to allow other users to initiate airdrops on a disposable parachain, this has to be the best way forward, otherwise, an airdrop for 1M accounts, would require 1M accounts worth of data being sent to the chain.

Of course there are some minor ways you can optimize that, for example uploading airdrop data in chunks:

fn insert_airdrop_data(input: Vec<(T::AccountId, BalanceOf<T>)>) { ... }

But this doesn’t solve the problem of making thousands of transactions for the airdropper. You could do this option as a quick proof of concept of the ideas, but i doubt that this approach will last long.

I have some code on a proving trie here: Create a Generic Proving Trie by shawntabrizi · Pull Request #3881 · paritytech/polkadot-sdk · GitHub

I am def changing my stance on this chain needing to be “explicitly” killed.

I have more thoughts on lifetime here: Lifetime | DropIt

I think the best thing is to let the chain have an open collator set, where anyone could produce a block. Then the chain “dies” once everyone in the world chooses to stop producing blocks. And even in that case, as long as someone has the latest block state, they could come back and produce a new block. At that point, the whole lifetime of a disposable parachain is left to economics of the value it brings vs the cost it takes to maintain.

I think with agile coretime, the whole concept of a chain spinning up and down becomes a reality, and I think that is really what I am trying to capture in this experiment.

2 Likes