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 22:54:06 +00:00
|
|
|
// StateTreeVersion1 corresponds to actors v2
|
2020-10-06 22:22:54 +00:00
|
|
|
StateTreeVersion1
|
2021-04-23 12:29:46 +00:00
|
|
|
// StateTreeVersion2 corresponds to actors v3.
|
2021-01-19 00:06:16 +00:00
|
|
|
StateTreeVersion2
|
2021-05-17 20:02:23 +00:00
|
|
|
// StateTreeVersion3 corresponds to actors v4.
|
2021-04-23 12:29:46 +00:00
|
|
|
StateTreeVersion3
|
2022-06-29 21:37:35 +00:00
|
|
|
// StateTreeVersion4 corresponds to actors v5 and above.
|
2021-05-17 20:02:23 +00:00
|
|
|
StateTreeVersion4
|
2022-11-09 06:30:42 +00:00
|
|
|
// StateTreeVersion5 corresponds to actors v10 and above.
|
|
|
|
StateTreeVersion5
|
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{}
|