lotus/chain/types/state.go

33 lines
855 B
Go
Raw Normal View History

2020-09-14 22:43:12 +00:00
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
2021-05-17 20:02:23 +00:00
// StateTreeVersion3 corresponds to actors v4.
StateTreeVersion3
2021-09-15 15:22:25 +00:00
// StateTreeVersion4 corresponds to actors v5, v6.
2021-05-17 20:02:23 +00:00
StateTreeVersion4
)
2020-09-14 22:43:12 +00:00
type StateRoot struct {
// State tree version.
Version StateTreeVersion
2020-09-14 22:43:12 +00:00
// 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
}
// TODO: version this.
type StateInfo0 struct{}