Skip to content

Commit

Permalink
fix(content): update FIL VM Runtime Interface content (#1064)
Browse files Browse the repository at this point in the history
* fil vm runtime update

* vm gas cost update

* addressing anorth's comments and restructuring for dashboard and toc purposes

* adding links to repos

Co-authored-by: Hugo Dias <[email protected]>
  • Loading branch information
yiannisbot and hugomrdias authored Sep 16, 2020
1 parent 928e637 commit e07b11c
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions content/systems/filecoin_vm/runtime/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Runtime
weight: 5
bookCollapseSection: true
dashboardWeight: 1
dashboardState: wip
dashboardState: reliable
dashboardAudit: missing
dashboardTests: 0
---
Expand All @@ -12,22 +12,34 @@ dashboardTests: 0

## Receipts

A `MessageReceipt` contains the result of a top-level message execution.
A `MessageReceipt` contains the result of a top-level message execution. Every syntactically valid and correctly signed message can be included in a block and will produce a receipt from execution.

A syntactically valid receipt has:

- a non-negative `ExitCode`,
- a non empty `ReturnValue` only if the exit code is zero,
- a non empty `Return` value only if the exit code is zero, and
- a non-negative `GasUsed`.

## `vm/runtime` interface
```go
type MessageReceipt struct {
ExitCode exitcode.ExitCode
Return []byte
GasUsed int64
}
```

## `vm/runtime` Actors Interface

## `vm/runtime` implementation
The Actors Interface implementation can be found [here](https://github.com/filecoin-project/specs-actors/blob/master/actors/runtime/runtime.go)

## `vm/runtime` VM Implementation

## Code Loading
The Lotus implementation of the Filecoin Virtual Machine runtime can be found [here](https://github.com/filecoin-project/lotus/blob/master/chain/vm/runtime.go)

## Exit Codes

## Exit codes
There are some common runtime exit codes that are shared by different actors. Their definition can be found [here](https://github.com/filecoin-project/go-state-types/blob/master/exitcode/common.go).

## VM Gas Cost Constants

The Gas Cost Constants as implemented in Lotus can be found [here](https://github.com/filecoin-project/lotus/blob/master/chain/vm/gas.go)

0 comments on commit e07b11c

Please sign in to comment.