Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage rent and tombstones #103

Closed
Swader opened this issue Oct 23, 2019 · 2 comments · Fixed by #655
Closed

Storage rent and tombstones #103

Swader opened this issue Oct 23, 2019 · 2 comments · Fixed by #655
Labels
P2 - Sometime Soon Update that isn't urgent or needed immediately.

Comments

@Swader
Copy link
Contributor

Swader commented Oct 23, 2019

There are two implementations of this.

  1. In smart contracts, the system will function just like in Eth where you restore a contract for a price, from an archive node. This is documented in the substrate dev docs: https://substrate.dev/docs/en/ecosystem/contracts/ink#storage-rent\

  2. There exists also the tombstoning concept of parathreads (and possibly chains?). A dead chain / thread will have its last block registered on the relay chain it's attached to. If all collators die, then that block becomes a tombstone. In such a case, all that's needed to restore this thread/chain to life if there ever appears a need to do this again is by paying the restore fee (explain? To whom? How?) and continuing to build on it as a revived collator. For this to happen, archive nodes are necessary (archive of what - the parachain / thread? Isn't that every collator basically?).

Further explanation necessary on what happens with hierarchical chains / threads. Consider a relay parachain with parathreads and child chains. So, say their blocks are being stored on the relay chain, and then one such sub-chain or sub-thread dies (no collators). It can be restored via the mechanics outlined above, that's ok. But what if our relay parachain dies - the one keeping the last block of this thread/chain? How do you restore that? You would first need to somehow restore the relay parachain to get the last block of its children, and then restore those? Again, to whom are the restore fees paid?

Further reading:

@Swader
Copy link
Contributor Author

Swader commented Oct 23, 2019

Further clarifications:

  • restore fee is only with contracts. Not parathreads / chains.
  • a chain offboards like so, always: Parachain -> Parathread -> Dormant thread
  • wakeup is: Dormant thread -> Living thread -> Maybe parachain if you can get a slot from someone but likely you're stuck in thread mode for a while
  • nested parachains aren't even in the back of anyone's head for this. Quoting Shawn:

    relay parachains are completely speculative at the moment, as in, no mechanics have been built to support them. They are part of polkadot v2.0 afaik. General game theory mechanics would dictate that the parachains attached to a nested relaychain are incentivized to keep the relay chain running. If all of those die, and the nested relay chain dies, recovery of a nested parachain would first require recovery of the nested relay chain, and then recovery of the nested parachain

@Swader
Copy link
Contributor Author

Swader commented Oct 23, 2019

About parachains turning into threads when their lease expires, provided the chain hasn't prepared (whole team has died in a bus accident, but people are still using the chain). From Shawn:

It does not automatically turn into a thread. a Thread requires some deposit. As far as I remember though, the ParaId with the original genesis and all the historically finalized blocks say on the relay chain, so a chain could at any point return as a chain again or as a parathread and pick up where it left off

@lsaether lsaether added the P2 - Sometime Soon Update that isn't urgent or needed immediately. label Mar 19, 2020
Swader added a commit that referenced this issue Jul 3, 2020
laboon pushed a commit that referenced this issue Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 - Sometime Soon Update that isn't urgent or needed immediately.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants