owned this note
owned this note
Published
Linked with GitHub
# Polkadot
- Chain of chains
- ERA IS NTG BUT EPOCH AND IS 24HRS ON POLKADOT AND 6 HOURS IN KUSAMA
- It can be used as a medium/channel to establish a communication link between different blockchains. These different blockchains can exchange info using polkadot.
- it is a layer 0 blockchain.
- The heart of the network is the relay chain. It has validators to validate the transactions, blocks validationa and block production and these validators stake some amount to stay as a validators. Nominator is the one who stake amount on the validators for rewards.
- Validators are assigned to specific parachains IG. So that they don't deal with the blocks validation of all the parachains, which would be hard.
- There are para chains in polkadot network. These chains provide different functionalities and they have their own nodes called as collators, these produce the blocks and these blocks are validated by the validators of the relaychain. The relay chain takes the blocks from all the parachains and puts them as a single block. So parachains are the shards of the polkadot.
- 100 PARACHAINS for a polkadot possible and to parachain slot auction takes place and amout must be payed for a slot.
- 10,000 para threads for a polkadot. Parathreads are the economical version of the parachain. Here the amount is paid based on a pay-as-you-go model. So for every block of parathread validated by validators of relay chain, parathread pays.
- There is a bridge concept in polkadot. Using bridges the external blockchains like Bitcoin, Eth etc can be connected to the polkadot network. These external blockchains also become parachains for this system then.
### Kusama
- Independent block chain and it has the exact same architecture of the polkadot
- We could say it is the staging environment and polkadot is the production.
- but kusama is NOT the TEST NET of polkadot. Here we can experiment stuff, test our DAPPS, run our validators but everything has a price. This chain also has a token called Kusama.
- Every parachain generally has a counter part here.
- Every DAPP would have been tested here first.
- The price to be paid for the functionalities in kusama will be less compared to polkadot.
## Substrate
- It is the tool box created by the polkadot development team.
- It is used for the creation of blockchains.
- Even polkadot and kusama are created using the substrate.
## Accounts
- Public and private key pairs OFC
- There are different types of balances.
1.Total is the total DOT in account
2.Reserved is the DOT frozen for on-chain participation in activities other than stacking
3.Bonded is the DOT frozen for on-chain staking
4.Redeemable is the DOT that can be unlocked and redeemed i.e transferable. This is the DOT went through the unbounding period.
5.Locked is the DOT = summation of Bonded and Redeemable. If Redeemable unlocked, Locked just equal to Bonded for that instant.
6.Transfereable is the DOT = Total DOT - Locked DOT
## DOT
- Least amount of dot an account can hold is 1 Plank
- 1 DOT = 10^10 Planck
- 1 kusama = 10^12 Planck
## DIdn't understand the vesting paragraph
- Vesting puts up a lock on the funds kept for vesting.
- They can be unlocked on a release schedule.
- The schedule can be created/modified by 2 ways, one is with modifications to genesis config.
- The other way is to create a release schedule using a function with certain params.
## Nominator
- Stake DOT over validators, if validators get slashed due to bad behaviour, even the staked DOT of nominators is also LOST. So they will have to stake for good validators only!
- Staked DOT is locked and cannot be used for any purposes.
- The staked DOT can be unstaked using un-nominate process, but the unbounding period / releasing the lock period is 28 days on Polkadot and 7 days on KUSAMA
- STAKING IS CALLED AS NOMINATING
- So if a nominator has nominated or staked amount on 5 validators. Then if 3 are elected in the active validation set (THIS SET VALIDATORS ONLY PRODUCE BLOCKS).
- STATUS OF 2 IS WAITING AND THE OTHER 3 WHICH ARE ELECTED WILL HAVE 1 ACTIVE AND 2 INACTIVE.
- Only 1 active per ERA i.e even if more than one node you staked on goes to the active set, only node node of the nodes went will assigned as active for the nominator for that specific era and the acitve node may change from era to era.
- Exception, if large staked amt, then may be more than 1
- Only from the active node, the user gets the staking rewards.
- The nominators are placed in bags, 16 in each bag. ONLY THE STAKE OF TOP 22500 nominators is considered for electing the active validator set. There are place in a specific order and bags are also ordered.. in the same order the 22500 nominators are selected.
## BAGS
### STAKING
- only the top 256 nominators of the validator will receive the rewards from the validator.
- This "solution set" is computed off-chain and submitted to the chain, which means it must fit in a single block. If there are a large number of nominators, this means that some nominators must be eliminated.
- This means that if you are staking with a small amount of DOT, you may not receive rewards.