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

feat: update DB creation circuits for generic extraction (Part 2) #393

Open
wants to merge 21 commits into
base: generic-mpt-extraction
Choose a base branch
from

Conversation

silathdiir
Copy link
Contributor

@silathdiir silathdiir commented Oct 21, 2024

Related section Merkle Tree Creation in Generic Extraction document

@silathdiir silathdiir marked this pull request as draft October 21, 2024 10:29
@silathdiir silathdiir force-pushed the generic-extraction-tree-creation branch from b5a75ac to 8515c8e Compare October 21, 2024 10:35
@silathdiir silathdiir force-pushed the generic-extraction-tree-creation branch from 0257177 to 7f9cb61 Compare October 22, 2024 03:47
@silathdiir silathdiir changed the title [WIP] feat: update DB creation circuits for generic extraction feat: update DB creation circuits for generic extraction Oct 23, 2024
@silathdiir silathdiir changed the title feat: update DB creation circuits for generic extraction feat: update DB creation circuits for generic extraction (Part 2) Oct 23, 2024
@silathdiir silathdiir marked this pull request as ready for review October 23, 2024 05:50
verifiable-db/src/block_tree/mod.rs Outdated Show resolved Hide resolved

let cell = CellWire::new(b);
let values_digest = cell.split_values_digest(b);
let metadata_digest = cell.split_metadata_digest(b);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using directly split_and_accumulate methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit ca0a971.

.chain(empty_hash.elements)
.chain(iter::once(cell.identifier))
let metadata_digests = cell.split_metadata_digest(b);
let values_digests = cell.split_values_digest(b);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: why not using split_and_accumulate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit ca0a971.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me that on this file there were no changes in that commit? Only the other related comments seems to be addressed, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed this fix, just commit in e37e98e.

verifiable-db/src/cells_tree/partial_node.rs Outdated Show resolved Hide resolved
verifiable-db/src/cells_tree/full_node.rs Outdated Show resolved Hide resolved
verifiable-db/src/row_tree/full_node.rs Outdated Show resolved Hide resolved
verifiable-db/src/row_tree/partial_node.rs Outdated Show resolved Hide resolved
verifiable-db/src/row_tree/api.rs Outdated Show resolved Hide resolved
verifiable-db/src/row_tree/api.rs Outdated Show resolved Hide resolved
parsil/src/tests.rs Outdated Show resolved Hide resolved
PublicInputs::new(
&hash.to_targets(),
&final_digest.to_targets(),
&digest.individual_vd.to_targets(),
Copy link
Contributor Author

@silathdiir silathdiir Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to accumulate with child digests, fixed as this in the PR #397.

PublicInputs::new(
&node_hash,
&final_digest.to_targets(),
&digest.individual_vd.to_targets(),
Copy link
Contributor Author

@silathdiir silathdiir Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to accumulate with the child digest, fixed as this in PR #397.

@@ -69,6 +69,8 @@ impl TestContext {
cell.identifier(),
cell.value(),
column.multiplier,
// TODO: Check mpt_metadata = cell.hash?
HashOut::rand(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to check it now because it will be invalid otherwise ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's wrong comment, the mpt_metadata parameter is deleted in PR #399.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants