func NewWorkSpace(rootDir, filename string) (*WorkSpace, error) {
	mdb, err := massdb.OpenDB(typeMassDBChiaPoS, filename)
	if err != nil {
		return nil, err
	}
	ws := &WorkSpace{
		db:      mdb,
		state:   engine.Ready,
		id:      NewSpaceID(mdb.PlotInfo(), mdb.BitLength()),
		rootDir: rootDir,
	}
	return ws, nil
}
NewWorkSpace loads MassDB from given rootDir with PubKey&BitLength,
and set proper state for WorkSpace by its progress
To prevent accident, double check PubKey&BitLength on loaded MassDB
If MassDB does not exist, create new MassDB.
package skchia
import (
	"github.com/orcaman/concurrent-map"
	"massnet.org/mass/poc/engine.v2"
	"massnet.org/mass/poc/engine.v2/massdb"
)
type WorkSpace struct {
	id      *SpaceID
	db      massdb.MassDB
	state   engine.WorkSpaceState
	using   bool
	rootDir string
}