|
|
# Contract interaction (register chain) - part 1
|
|
|
* Open [Lition sidechain manager](https://www.lition.io/sidechainmanager/#/) in your browser
|
|
|
* To create a new sidechain, creator must become also a validator
|
|
|
* For creating new sidechain please click on **Register new chain**
|
|
|
|
|
|
![register-new-chain](uploads/1d800aa509029b64fce2d8a175fde6da/register-new-chain.png)
|
|
|
|
|
|
* First of all, you need to have some small amount of ETH on your account. In case you are on testet, you can get ETH [here](https://faucet.metamask.io/)
|
|
|
* Please **skip steps** `Mint test tokens` and `Approve spender`. You can do it by leaving all input values empty and just click on buttons Mint test tokens and Approve spender. At the end you should get to the Register chain form.
|
|
|
* You need to fill information about your side chain. **Be aware that except of description and endpoint you can not change those information later!**
|
|
|
|
|
|
![register-sidechain-4](uploads/2534fe7aa69381ab596224843afd0433/register-sidechain-4.png)
|
|
|
|
|
|
`@param description` Description of the chain (e.g name, short purpose description, etc...). Cannot be empty. Max num of characters is 200
|
|
|
|
|
|
`@param initEndpoint` Chain endpoint, might be a website with chain description, condition to join
|
|
|
and nodes ip:port addresses that can be used fo joining. Cannot be empty. Max num of characters is 100
|
|
|
|
|
|
`@param chainValidator (advanced)` External validator contract, might imolement more sophisticated rules for joing the chain as validator or as user (e.g. accounts whitelisting, etc...). 0 means no external validator contract
|
|
|
|
|
|
`@param minRequiredDeposit` Min.required deposit to become transactor (user). It must be some reasonable number as user should never be able to run out of tokens during notaryPeriod considering max. tx fee is fixed to 0.1 LIT tokens E.g. there is private chain with whitelisted users and user creator know they will send max. 100 000 txs / notaryPeriod. Min. required deposit should be then 10 000 LIT tokens. It is something like prebought credit for transactions that is required to have on your account before each notary. In fact, users will have to deposit more than minRequiredDeposit as they will be automatically blacklisted during the notary even if they sent only 1 tx, because their deposit balance would be < minRequiredDeposit before the next notary. On top of this condition, chain creator might implement more sophisticated condition in external validator contract. 0 means default (1000 LIT), otherwise must be >= 1000 LIT tokens
|
|
|
|
|
|
`@param minRequiredVesting` Min.required deposit to become validator. On top of this condition, chain creator might implement more sophisticated condition in external validator contract. 0 means default (1000 LIT), otherwise must be >= 1000 LIT tokens
|
|
|
|
|
|
`@param rewardBonusRequiredVesting` Min. required vesting balance for bonus reward to be applied. 0 means that chain will not support rewards bonus
|
|
|
|
|
|
`@param rewardBonusPercentage` Reward bonus (percentage) to be applied if validator's vesting balance >= rewardBonusRequiredVesting. In case rewardBonusRequiredVesting > 0, rewardBonusPercentage must be > 0%, otherwise it is ignored
|
|
|
|
|
|
`@param notaryPeriod` Notary period in blocks (1 block every 5s), it is basically time interval notary periodic calls where users consumptions are processed and rewards distributed. Must be in range <1440 (2 hours), 34560 (48 hours)>
|
|
|
|
|
|
`@param maxNumOfValidators` Max. number of active validators (those who vested and started mining). As Lition is using BFT consensus alg., it is recommended to use max no more than 51 validators(21 recommended). On top of this condition, chain creator might implement more sophisticated condition in external validator contract. 0 means unlimited
|
|
|
|
|
|
`@param maxNumOfTransactors` Max. number of transactors/users (those who deposited. It is recommended to restrict this number as notary will not be able to process theoretically unlimited number of users. On top of this condition, chain creator might implement more sophisticated condition in external validator contract. 0 means unlimited
|
|
|
|
|
|
`@param involvedVestingNotaryCond (advanced)` Flag, if 50% invloved vesting condition should be checked during notary. It means that vesting balances sum of those validators, who signed statistics sent to the notary must be > 50% of the sum of all active validators vesting balances on chain. At least one of the involvedVestingNotaryCond or
|
|
|
participationNotaryCond must be specified
|
|
|
|
|
|
`@param participationNotaryCond (advanced)` Flag, 2/3 + 1 participation condition should be checked during notary. It means that more or equal to 2/3+1 of all active validators on chain must sign statistics sent to the notary for notary to be accepted. At least one of the involvedVestingNotaryCond or participationNotaryCond must be specified
|
|
|
|
|
|
|
|
|
* After the chain registration is confirmed on Ethereum, you can see nice summary of your freshly registered chain
|
|
|
|
|
|
![register-sidechain-5](uploads/769708f44c94c4c095dd63f2b1b7f176/register-sidechain-5.png)
|
|
|
|
|
|
* Please remember the `CHAIN ID` as you will need it later on
|
|
|
* **Now you need to become a validator to be able to start up your new sidechain** in part 2
|
|
|
* Please follow instructions in [Register-new-sidechain wiki](Register-new-sidechain)
|
|
|
|
|
|
# Contract interaction (become a validator) - part 2
|
|
|
**You must finish all the steps from part 1 before you can start with part 2**<br />
|
|
|
* To become a validator on your new chain, please follow instruction in [Join-Network-as-a-validator tutorial](Join-Network-as-a-validator) - **follow only instructions from Contract interaction - part 1 of this tutorial !!!**
|
|
|
* When you finish, come back here and start with part 3
|
|
|
* Now you need to vest in chain to be able to start up your new sidechain
|
|
|
* Please follow instructions in [Vest-in-chain wiki](Vest-in-chain)
|
|
|
|
|
|
# Node start-up - part 3
|
|
|
**You must finish all the steps from part 2 before you can start with part 3**<br />
|
... | ... | |