lotus/chain/types/state.go

35 lines
939 B
Go
Raw Permalink 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
// StateTreeVersion4 corresponds to actors v5 and above.
2021-05-17 20:02:23 +00:00
StateTreeVersion4
// StateTreeVersion5 corresponds to actors v10 and above.
StateTreeVersion5
)
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{}