Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

share: EDSStore.Put #1108

Closed
Tracked by #1099
Wondertan opened this issue Sep 15, 2022 · 0 comments · Fixed by #1232
Closed
Tracked by #1099

share: EDSStore.Put #1108

Wondertan opened this issue Sep 15, 2022 · 0 comments · Fixed by #1232
Assignees
Labels
area:shares Shares and samples

Comments

@Wondertan
Copy link
Member

Wondertan commented Sep 15, 2022

Context

To write an entire EDS Put method is introduced on the EDSStore

Implementation Details

Internally it:

  • Opens a file under Store.Path/DataRoot.Hash path
  • Serializes the EDS into the file via share.WriteEDS
  • Wraps it with DAGStore's FileMount
  • Converts DataRoot's hash into the shard.Key
  • Registers the Mount as a Shard on the DAGStore

NOTE: Registering on the DAGStore populates the top-level index with shares/proofs accessible from stored EDS, which is
out of the scope of the document.

// Put stores the given data square with DataRoot's hash as a key.
//
// The square is verified on the Exchange level, and Put only stores the square trusting it.
// The resulting file stores all the shares and NMT Merkle Proofs of the EDS.
// Additionally, the file gets indexed s.t. Store.Blockstore can access them. 
func (s *EDSStore) Put(context.Context, DataRoot, *rsmt2d.ExtendedDataSquare) error

Refs

Depends on #1105
Depends on #1107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shares Shares and samples
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants