diff --git a/content/systems/filecoin_vm/sysactors/_index.md b/content/systems/filecoin_vm/sysactors/_index.md index 4ff8129b6..60c76a66c 100644 --- a/content/systems/filecoin_vm/sysactors/_index.md +++ b/content/systems/filecoin_vm/sysactors/_index.md @@ -3,16 +3,55 @@ title: System Actors weight: 6 bookCollapseSection: true dashboardWeight: 2 -dashboardState: wip +dashboardState: reliable dashboardAudit: wip dashboardTests: 0 --- # System Actors -- There are two system actors required for VM processing: - - [InitActor](init_actor.md) - initializes new actors, records the network name - - [CronActor](cron_actor.md) - runs critical functions at every epoch -- There are two more VM level actors: - - [AccountActor](account_actor.md) - for user accounts (non-singleton). - - [RewardActor](reward_actor.md) - for block reward and token vesting (singleton). +There are eleven (11) builtin System Actors in total, but not all of them interact with the VM. Each actor is identified by a _Code ID_ (or CID). + +There are two system actors required for VM processing: + - the [InitActor](init_actor.md), which initializes new actors and records the network name, and + - the [CronActor](cron_actor.md), a scheduler actor that runs critical functions at every epoch. +There are another two actors that interact with the VM: + - the [AccountActor](account_actor.md) responsible for user accounts (non-singleton), and + - the [RewardActor](reward_actor.md) for block reward and token vesting (singleton). + + +The remaining seven (7) builtin System Actors that do not interact directly with the VM are the following: + +- `StorageMarketActor`: responsible for managing storage and retrieval deals [[Market Actor Repo](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/market/market_actor.go)] +- `StorageMinerActor`: actor responsible to deal with storage mining operations and collect proofs [[Storage Miner Actor Repo](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/miner/miner_actor.go)] +- `MultisigActor` (or Multi-Signature Wallet Actor): responsible for dealing with operations involving the Filecoin wallet [[Multisig Actor Repo](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/multisig/multisig_actor.go)] +- `PaymentChannelActor`: responsible for setting up and settling funds related to payment channels [[Paych Actor Repo](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/paych/paych_actor.go)] +- `StoragePowerActor`: responsible for keeping track of the storage power allocated at each storage miner [[Storage Power Actor](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/power/power_actor.go)] +- `VerifiedRegistryActor`: responsible for managing verified clients [[Verifreg Actor Repo](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/verifreg/verified_registry_actor.go)] +- `SystemActor`: general system actor [[System Actor Repo](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/system/system_actor.go)] + +## CronActor + +Built in to the genesis state, the `CronActor`'s dispatch table invokes the `StoragePowerActor` and `StorageMarketActor` for them to maintain internal state and process deferred events. It could in principle invoke other actors after a network upgrade. + +{{}} + +## InitActor + +The `InitActor` has the power to create new actors, e.g., those that enter the system. It maintains a table resolving a public key and temporary actor addresses to their canonical ID-addresses. Invalid CIDs should not get committed to the state tree. + +Note that the canonical ID address does not persist in case of chain re-organization. The actor address or public key survives chain re-organization. + +{{}} + +## RewardActor + +The `RewardActor` is where unminted Filecoin tokens are kept. The actor distributes rewards directly to miner actors, where they are locked for vesting. The reward value used for the current epoch is updated at the end of an epoch through a cron tick. + +{{}} + +## AccountActor + +The `AccountActor` is responsible for user accounts. Account actors are not created by the `InitActor`, but their constructor is called by the system. Account actors are created by sending a message to a public-key style address. The address must be `BLS` or `SECP`, or otherwise there should be an exit error. The account actor is updating the state tree with the new actor address. + +{{}} \ No newline at end of file diff --git a/content/systems/filecoin_vm/sysactors/account_actor.md b/content/systems/filecoin_vm/sysactors/account_actor.md deleted file mode 100644 index ee42b0c4f..000000000 --- a/content/systems/filecoin_vm/sysactors/account_actor.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: AccountActor -weight: 3 -dashboardWeight: 2 -dashboardState: wip -dashboardAudit: wip -dashboardTests: 0 ---- - -# AccountActor - -{{}} diff --git a/content/systems/filecoin_vm/sysactors/cron_actor.md b/content/systems/filecoin_vm/sysactors/cron_actor.md deleted file mode 100644 index 02a61bbd6..000000000 --- a/content/systems/filecoin_vm/sysactors/cron_actor.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: CronActor -weight: 2 -dashboardWeight: 2 -dashboardState: wip -dashboardAudit: wip -dashboardTests: 0 ---- - -# CronActor - -{{}} diff --git a/content/systems/filecoin_vm/sysactors/init_actor.md b/content/systems/filecoin_vm/sysactors/init_actor.md deleted file mode 100644 index e263e4de0..000000000 --- a/content/systems/filecoin_vm/sysactors/init_actor.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: InitActor -weight: 1 -dashboardWeight: 2 -dashboardState: wip -dashboardAudit: wip -dashboardTests: 0 ---- - -# InitActor - -{{}} diff --git a/content/systems/filecoin_vm/sysactors/reward_actor.md b/content/systems/filecoin_vm/sysactors/reward_actor.md deleted file mode 100644 index b0b2302a9..000000000 --- a/content/systems/filecoin_vm/sysactors/reward_actor.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: RewardActor -dashboardWeight: 2 -dashboardState: wip -dashboardAudit: wip -dashboardTests: 0 ---- - -# RewardActor - -RewardActor is where unminted Filecoin tokens are kept. RewardActor contains a `RewardMap` which is a mapping from owner addresses to `Reward` structs. - -`Reward` struct is created to preserve the flexibility of introducing block reward vesting into the protocol. `MintReward` creates a new `Reward` struct and adds it to the `RewardMap`. - -A `Reward` struct contains a `StartEpoch` that keeps track of when this `Reward` is created, `Value` that represents the total number of tokens rewarded, and `EndEpoch` which is when the reward will be fully vested. `VestingFunction` is currently an enum to represent the flexibility of different vesting functions. `AmountWithdrawn` records how many tokens have been withdrawn from a `Reward` struct so far. Owner addresses can call `WithdrawReward` which will withdraw all vested tokens that the investor address has from the RewardMap so far. When `AmountWithdrawn` equals `Value` in a `Reward` struct, the `Reward` struct will be removed from the `RewardMap`. - -{{}}