Setheum-Labs / Setheum

Setheum: The Unified Web3 Base Layer - Globally Solving Web3’s Fragmentation Problems. Ready for hacking 🚀
https://setheum.xyz
GNU General Public License v3.0
24 stars 13 forks source link

`subcore` vs `subchain` #940

Closed balqaasem closed 10 months ago

balqaasem commented 1 year ago

Subcores are sharded cores of the mainchain that each function as a part of the mainchain and is run by curators in STEM enclaves just like subchains. They scale mainchain transactions by computing in STEM enclaves and pushing upcore to the maincore of the mainchain.

Each subcore performs specifically one narrow task or type of transaction or pallet. For example, there could a be a currency-subcore that only runs the currency protocol such as tokens, MultiCurrency, ERC20s, NFTs, transfers, minting, burning, etc., and a staking-subcore that specifically runs the staking protocol of the the network, there could also be a dex-subcore for the DEX, a ecdp-subcore for the ECDP stablecoin protocols, etc.

Subcores do not replace Subchains and they function differently from Subchains. A subcore is technically a system subchain that is run by the mainchain validators as an integral part of the mainchain, this is the metaphorical, however a subcore is an embedded part of the mainchain consensus that entirely runs in the STEM enclave for off-chain compute of transactions at the scalability and security level of subchains without having the need for external or independent validators.

Therefore we introduce a second type of validator to run subcores, these are called curators. The curators are operators selected from a rotating list of inactive-validators who run the subcores. One subcore could be run by 10-30 curators per ConclavePeriod, they are then rotated per ConclavePeriod.

A ConclavePeriod is the period when the hash of subcore or subchain transactions is pushed upcore to the maincore (or mainchain in terms of subchains).

We should also enable subchains to communicate with subcores directly, because the subchain stack should be built to leverage the Subcore system. SIAL should support Subcores to allow SIAL MultiLocations to communicate with subcores

balqaasem commented 1 year ago

Ref: https://github.com/Setheum-Labs/Setheum/issues/938