Skip to content

Commit 56863b1

Browse files
Stebalienlanzafamejsoares
authored
Update F(E)VM FIP Status (#1067)
* Move FIP-0030 to Final This has since been shipped in the network, but the FIP language makes it sound like native Wasm smart contracts are supported. This patch updates the FIP to make it clear that native Wasm smart contracts were not implemented. * Move FIP-0031 to Final * Move FIP-0032 to Final * Withdraw FIP-0037 This FIP was replaced by FIP-0054 and FIP-0057. * Move FIP-0054 and FIP-0057 to Final These were both implemented as a part of FEVM * fix url Co-authored-by: Adrian Lanzafame <[email protected]> * Apply suggestions from code review Co-authored-by: Jorge M. Soares <[email protected]> --------- Co-authored-by: Adrian Lanzafame <[email protected]> Co-authored-by: Jorge M. Soares <[email protected]>
1 parent a38b5f5 commit 56863b1

File tree

7 files changed

+15
-48
lines changed

7 files changed

+15
-48
lines changed

FIPS/fip-0030.md

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fip: "0030"
33
title: Introducing the Filecoin Virtual Machine (FVM)
44
authors: Raúl Kripalani (@raulk), Steven Allen (@stebalien)
55
discussions-to: https://github.com/filecoin-project/FIPs/discussions/287
6-
status: Draft
6+
status: Final
77
type: Technical Core
88
category: Core
99
created: 2022-01-26
@@ -94,7 +94,7 @@ FIP, and will be addressed by subsequent proposals.
9494
## Abstract
9595

9696
We specify the Filecoin Virtual Machine (FVM), an IPLD-ready Wasm-based
97-
execution layer capable of running arbitrary user-provided code. The FVM
97+
execution layer capable of running arbitrary code. The FVM
9898
replaces the [existing non-programmable execution layer][Specs/Legacy-VM], now
9999
termed _Legacy VM_.
100100

@@ -284,10 +284,6 @@ The contract consists of:
284284
through some governance process, in order to reduce actor bytecode size (e.g.
285285
FVM SDKs, IPLD codecs, etc).
286286

287-
Because this contract may change over time, user-deployed actors may specify an
288-
IC version at [`InitActor#InstallActor` time](#actor-deployment). The strategy
289-
for deprecating IC versions over time has not been yet determined.
290-
291287
#### Syscalls
292288

293289
Syscalls are functions made available to the actor as Wasm imports, allowing it
@@ -354,6 +350,8 @@ This approach has a few practical implications:
354350
##### Native user-defined actors
355351

356352
Native user-defined actors are actors written specifically for the FVM runtime.
353+
Such actors will not be deployable for the time-being due to unresolved security
354+
considerations.
357355

358356
Users can _technically_ write native user-defined actors in any programming
359357
language that compiles to Wasm. However, language-specific overheads (e.g.
@@ -438,42 +436,11 @@ pub struct ActorState {
438436

439437
#### Actor deployment
440438

441-
The current `InitActor` (`f00`) will be extended with a (`InstallActor`) method
442-
taking a single input parameter: the actor's Wasm bytecode. As mentioned above,
443-
DAG representation format is to be defined. The actor's Wasm bytecode must
444-
specify the version of the Invocation Container the bytecode requires, inside a
445-
reserved exported global.
446-
447-
The state object of the `InitActor` will be extended with an `ActorRegistry`
448-
HAMT of `CID => ActorSpec`, where `ActorSpec` is:
449-
450-
```rust
451-
/// A simple actor specification/metadata structure, to be extended with
452-
/// additional metadata in the future.
453-
struct ActorSpec {
454-
/// The version of the invocation container.
455-
version: int,
456-
}
457-
```
439+
For the time-being, all Wasm-based actors are built-in and users cannot deploy custom
440+
Wasm actors to Filecoin mainnet. New Wasm-based actors are deployed during network
441+
upgrades.
458442

459-
The logic of `InitActor#LoadActor` is as follows.
460-
461-
1. Validate the Wasm bytecode.
462-
- Perform syntax validation and structural validation, [as per standard](https://webassembly.github.io/spec/core/valid/index.html).
463-
- No floating point instructions.
464-
2. Multihash the bytecode and calculate the code CID.
465-
3. Check if the code CID is already registered in the `ActorRegistry`.
466-
4. If yes, charge gas for the above operations and return the existing CID.
467-
5. Insert an entry in the `ActorRegistry`, binding the bytecode CID with the
468-
actor spec.
469-
6. Return the CID, and charge the cost of the above operations, and potentially
470-
a price for rent/storage.
471-
472-
At this point, the actor can be instantiated many times through the standard
473-
`InitActor#Exec` method. Parameters provided will be passed through to the
474-
actor's constructor (currently identified by `method_number=1`). This includes
475-
byte streams corresponding to deployables for foreign actors (e.g. EVM
476-
bytecode).
443+
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)).
477444

478445
#### Actor message dispatch
479446

FIPS/fip-0031.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fip: "0031"
33
title: Atomic switch to non-programmable FVM
44
authors: Raúl Kripalani (@raulk), Steven Allen (@stebalien)
55
discussions-to: https://github.com/filecoin-project/FIPs/discussions/296
6-
status: Draft
6+
status: Final
77
type: Technical Core
88
category: Core
99
created: 2022-02-03

FIPS/fip-0032.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fip: "0032"
33
title: Gas accounting model adjustment for non-programmable FVM
44
author: Raúl Kripalani (@raulkr), Steven Allen (@stebalien), Jakub Sztandera (@Kubuxu)
55
discussions-to: https://github.com/filecoin-project/FIPs/discussions/316
6-
status: Draft
6+
status: Final
77
type: Technical
88
category: Core
99
created: 2022-03-08
@@ -626,4 +626,4 @@ Copyright and related rights waived via
626626
[FIP-0008]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0008.md
627627
[FIP-0013]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0013.md
628628
[FIP-0030]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0030.md
629-
[FIP-0031]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0031.md
629+
[FIP-0031]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0031.md

FIPS/fip-0037.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fip: "0037"
33
title: Gas model adjustment for for user programmability
44
author: Raúl Kripalani (@raulk), Steven Allen (@stebalien)
55
discussions-to: https://github.com/filecoin-project/FIPs/discussions/316
6-
status: Draft
6+
status: Withdrawn
77
type: Technical
88
category: Core
99
created: 2022-03-09

FIPS/fip-0054.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fip: "0054"
33
title: Filecoin EVM runtime (FEVM)
44
author: Raúl Kripalani (@raulk), Steven Allen (@stebalien)
55
discussions-to: https://github.com/filecoin-project/FIPs/discussions/592
6-
status: Accepted
6+
status: Final
77
type: Technical Core
88
category: Core
99
created: 2022-12-02

FIPS/fip-0057.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fip: "0057"
33
title: Update gas charging schedule and system limits for FEVM
44
author: Steven Allen (@stebalien), Raúl Kripalani (@raulk), Akosh Farkash (@aakoshh), Jakub Sztandera (@Kubuxu)
55
discussions-to: https://github.com/filecoin-project/FIPs/discussions/588
6-
status: Accepted
6+
status: Final
77
type: Technical Core
88
category (*only required for Standard Track): Core
99
created: 2022-12-12

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ This improvement protocol helps achieve that objective for all members of the Fi
7676
| [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 |
7777
| [0035](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0035.md) | Support actors as built-in storage market clients | FIP | @anorth | Withdrawn |
7878
| [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 |
79-
| [0037](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0037.md) | Gas model adjustment for user programmability | FIP | @raulk, @stebalien | Draft |
79+
| [0037](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0037.md) | Gas model adjustment for user programmability | FIP | @raulk, @stebalien | Withdrawn |
8080
| [0038](https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0038.md) | Indexer Protocol for Filecoin Content Discovery | FRC | @willscott, @gammazero, @honghaoq | Draft |
8181
| [0039](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0039.md) | Filecoin Message Replay Protection | FIP | @q9f | Draft |
8282
| [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 |

0 commit comments

Comments
 (0)