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

Calculate Chunk Root Using Blob Serialization & Proof of Custody #112

Closed
rauljordan opened this issue May 12, 2018 · 0 comments
Closed

Calculate Chunk Root Using Blob Serialization & Proof of Custody #112

rauljordan opened this issue May 12, 2018 · 0 comments
Assignees
Milestone

Comments

@rauljordan
Copy link
Contributor

Hey all,

To continue with the work done on #100 and #92 with respect to creating a Shard struct and the blob serialization implementation done by @nisdas, we now need to calculate ChunkRoot according to the serialization algorithm on the body of a collation.

Context

In #100, I included a simple CalculateChunkRoot method on the Collation type. Given this was out of scope of my PR and blocked by #92 being merged, I chose to have the chunk root be a simple, sha3 hash of the collation body. We need to open a PR that uses the blob serialization to modify the following function created in #100:

// CalculateChunkRoot updates the collation header's chunk root based on the body.
func (c *Collation) CalculateChunkRoot() {
	// TODO: this needs to be based on blob serialization.
	// For proof of custody we need to split chunks (body) into chunk + salt and
	// take the merkle root of that.
	chunkRoot := common.BytesToHash(c.body)
	c.header.data.ChunkRoot = &chunkRoot
}

Additionally, for proof of custody (See that ETHResearch post for context), we will need to split the chunks of the body into chunk + salts and take the merkle root of those combined values. This proof of custody mechanism would add more skin-in-the-game for the notarization scheme, preventing them from being lazy when voting on collations.

@rauljordan rauljordan added Enhancement New feature or request Phase 1 labels May 12, 2018
@rauljordan rauljordan added this to the Ruby milestone May 12, 2018
@rauljordan rauljordan added this to To do in Collation Proposals via automation May 12, 2018
@rauljordan rauljordan removed the Enhancement New feature or request label May 12, 2018
Collation Proposals automation moved this from To do to Done Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants