From my perspective, there are two major features of a child-trie which would make it a good choice over the standard storage options:
- You get a dedicated merkle root for the contents of just the child trie.
- You want to use an alternative trie format than the standard base-16 patricia merkle trie that Substrate uses. For example, a binary trie.
There are two main places that child tries are used in Substrate pallets today:
- Smart Contracts
- Parachain Crowdloans
In both of these cases, these applications take advantage of the dedicated merkle root to provide small and concise proofs of the data inside the trie.
For Parachain Crowdloans, you can use the merkle root of all the crowdloan contributions to easily upload potentially millions of user contributions via a single hash, and users can then provide proofs of their contributions against the merkle root.
For Contracts, the merkle root is used to be able to kill a contracts data (forming a tombstone), and at a later point re-instate the data if the contract were to become active again.
We have not really played with using alternative trie formats, but I believe that binary tries and other formats may provide major benefits to certain kinds of blockchain applications.