You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FNs/BNs keep an EDSStore to manage every EDS on the disk. The EDSStore type is introduced in the share pkg. Each EDS, together with its Merkle Proofs, serializes into a CARv1 file. All the serialized CARv1 file blobs are mounted on DAGStore via Local FS Mounts and registered as Shards.
The introduced EDSStore also maintains (via DAGStore) a top-level index enabling granular and efficient random access to every share and/or Merkle proof over every registered CARv1 file. The EDSStore provides a custom Blockstore interface implementation to achieve access. The main use-case is randomized sampling over the whole chain of EDS block data and getting data by namespace.
Implementation Details
NOTES:
EDSStore should have lifecycle methods(Start/Stop).
The approximate definition is given below and may change in the actual implementation.
typeEDSStorestruct {
basepathstringdgstr dagstore.DAGStoretopIdx index.InvertedcarIdx index.FullIndexRepomounts*mount.Registry...
}
// NewEDSStore constructs EDStore over OS directory to store CARv1 files of EDSes and indices for them.// Datastore is used to keep the inverted/top-level index.funcNewEDSStore(basepathstring, ds datastore.Batching) *EDSStore {
topIdx:=index.NewInverted(datastore)
carIdx:=index.NewFSRepo(basepath+"/index")
mounts:=mount.NewRegistry()
r:=mount.NewRegistry()
err=r.Register("fs", &mount.FSMount{FS: os.DirFS(basePath+"/eds/")}) // registration is a must iferr!=nil {
panic(err)
}
return&EDSStore{
basepath: basepath,
dgst: dagstore.New(dagstore.Config{...}),
topIdx: index.NewInverted(datastore),
carIdx: index.NewFSRepo(basepath+"/index")
mounts: mounts,
}
}
Context
FNs/BNs keep an
EDSStore
to manage every EDS on the disk. TheEDSStore
type is introduced in theshare
pkg. Each EDS, together with its Merkle Proofs, serializes into a CARv1 file. All the serialized CARv1 file blobs are mounted on DAGStore via Local FS Mounts and registered as Shards.The introduced
EDSStore
also maintains (via DAGStore) a top-level index enabling granular and efficient random access to every share and/or Merkle proof over every registered CARv1 file. TheEDSStore
provides a customBlockstore
interface implementation to achieve access. The main use-case is randomized sampling over the whole chain of EDS block data and getting data by namespace.Implementation Details
NOTES:
Refs
Depends on #878
The text was updated successfully, but these errors were encountered: