1. To allow seamless experience for new node joining the shard.
Casper protocol has variables that all nodes in a shard have to obey, otherwise peers can slash each other. At the moment some of them are defined on node startup with CLI option/config file. The most obvious one is --max-number-if-parents.
These parameters should be on chain, so node operator has no option aside from following on-chain configuration.
2. To increase decentralisation by extracting shard level variables from the scope of the core protocol.
Core protocol for RChain network is a set of rules all nodes in the network have to obey and is governed by RChain Cooperative. But there are variables that each shard free/can/have-to to decide on. Core protocol contracts (e.g. PoS) should only reference shard configuration.
3. To give ability for shard variables to be changed with multisig.
Each shard can have its own governance process for shard level variables, from social consensus to on-chain stake weighted voting. Multisig covers all cases.
4. To prepare for future sharding implementation.
All shard level logic have to be abstracted from the core protocol.
Subject of this RCHIP
Concrete implementation of on-chan shard configuration
Modification of PoS contract (core protocol) to support on-chain shard configuration
Procedure for deploying shard configuration to shard root on mainnet
Finalization will be triggered when (block-height % finalizationRate) = 0
synchronyConstraintThreshold
Node is allowed to create block only when % of stake in justification blocks is more then this percent of total stake in the shard
heightConstraintThreshold
(experimental) Node is allowed to create block only if last finalised block is behind tip no more then this value
deployLifespan
Validators will try to put deploy in a block only for next deployLifespan blocks. Enable protection from re-submitting duplicate deploys
casperVersion
Version of Casper that shard is running
configVersion
Version of this config
bondMaximum
Max bond amount allowed in the shard
bondMinimum
Min bond amount allowed in the shard
epochLength
Epoch length. On epoch change the following events happen: new validators bonding, validator rotation, rewards distribution. TBD, clarification is needed
quarantineLength
Quarantine length. TBD, clarification is needed
Shard configuration should be a rholang Map with the following keys and datatypes
Motivation
1. To allow seamless experience for new node joining the shard. Casper protocol has variables that all nodes in a shard have to obey, otherwise peers can slash each other. At the moment some of them are defined on node startup with CLI option/config file. The most obvious one is
--max-number-if-parents
. These parameters should be on chain, so node operator has no option aside from following on-chain configuration.2. To increase decentralisation by extracting shard level variables from the scope of the core protocol. Core protocol for RChain network is a set of rules all nodes in the network have to obey and is governed by RChain Cooperative. But there are variables that each shard free/can/have-to to decide on. Core protocol contracts (e.g.
PoS
) should only reference shard configuration.3. To give ability for shard variables to be changed with multisig. Each shard can have its own governance process for shard level variables, from social consensus to on-chain stake weighted voting. Multisig covers all cases.
4. To prepare for future sharding implementation. All shard level logic have to be abstracted from the core protocol.
Subject of this RCHIP
root
on mainnetDesign
Current definition of core protocol: PoS contract
The following variables have to be extracted into shard configuration
deployLifespan
blocks. Enable protection from re-submitting duplicate deploysImplementation
Shard config storage in rholang
Rholang template (.rhox) example to get shard configuration.
$$shardConfigContractAddress$$
is address of config map deployed to shard's RegistryDescription of the process of updating shard config. TBD