-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathstate.go
33 lines (28 loc) · 939 Bytes
/
state.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package types
import "github.com/ipfs/go-cid"
// StateTreeVersion is the version of the state tree itself, independent of the
// network version or the actors version.
type StateTreeVersion uint64
const (
// StateTreeVersion0 corresponds to actors < v2.
StateTreeVersion0 StateTreeVersion = iota
// StateTreeVersion1 corresponds to actors v2
StateTreeVersion1
// StateTreeVersion2 corresponds to actors v3.
StateTreeVersion2
// StateTreeVersion3 corresponds to actors v4.
StateTreeVersion3
// StateTreeVersion4 corresponds to actors v5 and above.
StateTreeVersion4
// StateTreeVersion5 corresponds to actors v10 and above.
StateTreeVersion5
)
type StateRoot struct {
// State tree version.
Version StateTreeVersion
// Actors tree. The structure depends on the state root version.
Actors cid.Cid
// Info. The structure depends on the state root version.
Info cid.Cid
}
type StateInfo0 struct{} // TODO: version this.