2020-09-14 22:43:12 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import "github.com/ipfs/go-cid"
|
|
|
|
|
2020-10-06 22:22:54 +00:00
|
|
|
// 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
|
2021-01-19 00:06:16 +00:00
|
|
|
// StateTreeVersion1 corresponds to actors [v2, v3)
|
2020-10-06 22:22:54 +00:00
|
|
|
StateTreeVersion1
|
2021-01-19 00:06:16 +00:00
|
|
|
// StateTreeVersion2 corresponds to actors >= v3.
|
|
|
|
StateTreeVersion2
|
2020-10-06 22:22:54 +00:00
|
|
|
)
|
|
|
|
|
2020-09-14 22:43:12 +00:00
|
|
|
type StateRoot struct {
|
2020-10-06 22:22:54 +00:00
|
|
|
// 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.
|
2020-10-06 22:22:54 +00:00
|
|
|
type StateInfo0 struct{}
|