Aggregate Tables and The Global Snapshot
Ebrahim Gomaa edited this page May 3, 2023
·
2 revisions
- Increased by
amount
on the event: TagAddMint whereamount = (event.Data as state.Mint).Amount
, which is emitted in the following situations- Minting service charge for a provider when a client claims their rewards:
amount = StakePool.Rewards
- Code Trace:
- StorageSC transaction collect_rewards
- StakePool.MintRewards
- StakePool.MintServiceCharge
- SC.AddMint
- Code Trace:
- Collecting Rewards on a MinerSC or StorageSC provider.
- Creating a free allocation:
amount = lockedForWritePool + lockedForReadPool = marker.FreeTokens * (1 - conf.FreeAllocationSettings.ReadPoolFraction) + marker.FreeTokens * conf.FreeAllocationSettings.ReadPoolFraction = marker.FreeTokens
- Transfer from a minter (smart contract) to a non-minter in the following situations
- TxnTypeData and TxnTypeSend in https://github.com/0chain/0chain/blob/cfed60cab5fda011e0b72a02d035bcab585273b3/code/go/0chain.net/chaincore/chain/state.go#L390-L401
- Pouring tokens using faucet
- Unlocking stake pool in MinerSC (miner/sharder).
- Unlocking stake pool in StorageSC (blobber)
- Unlocking stake pool in ZCNSC (authorizer)
- Unlocking Write pool
- Unlocking read pool
- Minting service charge for a provider when a client claims their rewards:
- Decreased by
amount
on the event: TagBurn whereamount = (event.Data as state.Mint).Amount
, which is emitted in the following situations- Transfer from non-minter to a minter (smart contract), which happens in the following situations:
- TxnTypeData and TxnTypeSend
- Burning Txn Fees
- Token Refill: FaucetSC.refill()
- Lock stake for miner/sharder
- Lock stake for blobber
- Lock stake for ZCNSC (authorizers)
- Lock read pool
- Lock write pool
- Creating new allocation with
--tokens
flag. The amount is the value of the flag. - Extending the allocation with
--tokens
flag. The amount is the value of the flag. - Reducing the allocation with
--tokens
flag. The amount is the value of the flag.
- Transfer from non-minter to a minter (smart contract), which happens in the following situations:
Locked data are no more circulating, thus removed from "ZCN Supply" and will return back when unlocked.
- Simply the count of active providers (i.e. not killed nor shutdown)
- Home
- Introduction
- Architecture
- 0Chain Smart Contracts
- Help