diff --git a/FIPS/fip-0030.md b/FIPS/fip-0030.md index 8706000f..89ecd5bc 100644 --- a/FIPS/fip-0030.md +++ b/FIPS/fip-0030.md @@ -3,7 +3,7 @@ fip: "0030" title: Introducing the Filecoin Virtual Machine (FVM) authors: Raúl Kripalani (@raulk), Steven Allen (@stebalien) discussions-to: https://github.com/filecoin-project/FIPs/discussions/287 -status: Draft +status: Final type: Technical Core category: Core created: 2022-01-26 @@ -94,7 +94,7 @@ FIP, and will be addressed by subsequent proposals. ## Abstract We specify the Filecoin Virtual Machine (FVM), an IPLD-ready Wasm-based -execution layer capable of running arbitrary user-provided code. The FVM +execution layer capable of running arbitrary code. The FVM replaces the [existing non-programmable execution layer][Specs/Legacy-VM], now termed _Legacy VM_. @@ -284,10 +284,6 @@ The contract consists of: through some governance process, in order to reduce actor bytecode size (e.g. FVM SDKs, IPLD codecs, etc). -Because this contract may change over time, user-deployed actors may specify an -IC version at [`InitActor#InstallActor` time](#actor-deployment). The strategy -for deprecating IC versions over time has not been yet determined. - #### Syscalls Syscalls are functions made available to the actor as Wasm imports, allowing it @@ -354,6 +350,8 @@ This approach has a few practical implications: ##### Native user-defined actors Native user-defined actors are actors written specifically for the FVM runtime. +Such actors will not be deployable for the time-being due to unresolved security +considerations. Users can _technically_ write native user-defined actors in any programming language that compiles to Wasm. However, language-specific overheads (e.g. @@ -438,42 +436,11 @@ pub struct ActorState { #### Actor deployment -The current `InitActor` (`f00`) will be extended with a (`InstallActor`) method -taking a single input parameter: the actor's Wasm bytecode. As mentioned above, -DAG representation format is to be defined. The actor's Wasm bytecode must -specify the version of the Invocation Container the bytecode requires, inside a -reserved exported global. - -The state object of the `InitActor` will be extended with an `ActorRegistry` -HAMT of `CID => ActorSpec`, where `ActorSpec` is: - -```rust -/// A simple actor specification/metadata structure, to be extended with -/// additional metadata in the future. -struct ActorSpec { - /// The version of the invocation container. - version: int, -} -``` +For the time-being, all Wasm-based actors are built-in and users cannot deploy custom +Wasm actors to Filecoin mainnet. New Wasm-based actors are deployed during network +upgrades. -The logic of `InitActor#LoadActor` is as follows. - -1. Validate the Wasm bytecode. - - Perform syntax validation and structural validation, [as per standard](https://webassembly.github.io/spec/core/valid/index.html). - - No floating point instructions. -2. Multihash the bytecode and calculate the code CID. -3. Check if the code CID is already registered in the `ActorRegistry`. -4. If yes, charge gas for the above operations and return the existing CID. -5. Insert an entry in the `ActorRegistry`, binding the bytecode CID with the - actor spec. -6. Return the CID, and charge the cost of the above operations, and potentially - a price for rent/storage. - -At this point, the actor can be instantiated many times through the standard -`InitActor#Exec` method. Parameters provided will be passed through to the -actor's constructor (currently identified by `method_number=1`). This includes -byte streams corresponding to deployables for foreign actors (e.g. EVM -bytecode). +Users can deploy custom EVM-based smart contracts using FEVM (see [FIP-0054](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0054.md)). #### Actor message dispatch diff --git a/FIPS/fip-0031.md b/FIPS/fip-0031.md index 1bf4a45f..074521c9 100644 --- a/FIPS/fip-0031.md +++ b/FIPS/fip-0031.md @@ -3,7 +3,7 @@ fip: "0031" title: Atomic switch to non-programmable FVM authors: Raúl Kripalani (@raulk), Steven Allen (@stebalien) discussions-to: https://github.com/filecoin-project/FIPs/discussions/296 -status: Draft +status: Final type: Technical Core category: Core created: 2022-02-03 diff --git a/FIPS/fip-0032.md b/FIPS/fip-0032.md index dc2a6388..cb69bf2e 100644 --- a/FIPS/fip-0032.md +++ b/FIPS/fip-0032.md @@ -3,7 +3,7 @@ fip: "0032" title: Gas accounting model adjustment for non-programmable FVM author: Raúl Kripalani (@raulkr), Steven Allen (@stebalien), Jakub Sztandera (@Kubuxu) discussions-to: https://github.com/filecoin-project/FIPs/discussions/316 -status: Draft +status: Final type: Technical category: Core created: 2022-03-08 @@ -626,4 +626,4 @@ Copyright and related rights waived via [FIP-0008]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0008.md [FIP-0013]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0013.md [FIP-0030]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0030.md -[FIP-0031]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0031.md \ No newline at end of file +[FIP-0031]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0031.md diff --git a/FIPS/fip-0037.md b/FIPS/fip-0037.md index 737eed1f..042643ce 100644 --- a/FIPS/fip-0037.md +++ b/FIPS/fip-0037.md @@ -3,7 +3,7 @@ fip: "0037" title: Gas model adjustment for for user programmability author: Raúl Kripalani (@raulk), Steven Allen (@stebalien) discussions-to: https://github.com/filecoin-project/FIPs/discussions/316 -status: Draft +status: Withdrawn type: Technical category: Core created: 2022-03-09 diff --git a/FIPS/fip-0054.md b/FIPS/fip-0054.md index 91fe1c1f..5fd8a7be 100644 --- a/FIPS/fip-0054.md +++ b/FIPS/fip-0054.md @@ -3,7 +3,7 @@ fip: "0054" title: Filecoin EVM runtime (FEVM) author: Raúl Kripalani (@raulk), Steven Allen (@stebalien) discussions-to: https://github.com/filecoin-project/FIPs/discussions/592 -status: Accepted +status: Final type: Technical Core category: Core created: 2022-12-02 diff --git a/FIPS/fip-0057.md b/FIPS/fip-0057.md index 9234cf1c..0536e444 100644 --- a/FIPS/fip-0057.md +++ b/FIPS/fip-0057.md @@ -3,7 +3,7 @@ fip: "0057" title: Update gas charging schedule and system limits for FEVM author: Steven Allen (@stebalien), Raúl Kripalani (@raulk), Akosh Farkash (@aakoshh), Jakub Sztandera (@Kubuxu) discussions-to: https://github.com/filecoin-project/FIPs/discussions/588 -status: Accepted +status: Final type: Technical Core category (*only required for Standard Track): Core created: 2022-12-12 diff --git a/README.md b/README.md index 899e8c22..2a113bf4 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ This improvement protocol helps achieve that objective for all members of the Fi | [0034](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0034.md) | Fix pre-commit deposit independent of sector content | FIP | @anorth, @Kubuxu | Final | | [0035](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0035.md) | Support actors as built-in storage market clients | FIP | @anorth | Withdrawn | | [0036](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0036.md) | Introducing a Sector Duration Multiple for Longer Term Sector Commitment | FIP | @AxCortesCubero, @jbenet, @misilva73, @momack2, @tmellan, @vkalghatgi, @zixuanzh | Rejected | -| [0037](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0037.md) | Gas model adjustment for user programmability | FIP | @raulk, @stebalien | Draft | +| [0037](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0037.md) | Gas model adjustment for user programmability | FIP | @raulk, @stebalien | Withdrawn | | [0038](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0038.md) | Indexer Protocol for Filecoin Content Discovery | FRC | @willscott, @gammazero, @honghaoq | Draft | | [0039](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0039.md) | Filecoin Message Replay Protection | FIP | @q9f | Draft | | [0040](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0040.md) | Boost - Filecoin Storage Deals Market Protocol | FRC | @dirkmc, @nonsense, @jacobheun, @brendalee | Draft |