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

Removed the need to pad the state tree #73

Conversation

weijiekoh
Copy link
Contributor

Initially, the contract created the state tree with a zero value equal to the nothing-up-my-sleeve value. This created the problem of having to pad the state tree with blank empty leaves, as the batch update state tree circuit requires a complete batch of state leaves to compute each state root. Without the preimage of the nothing-up-my-sleeve value, the only way to supply valid inputs to the batch UST circuit was to pad the state tree, both on- and off-chain, with empty leaves.

This PR solves this problem by initialising the state tree with the hash of a blank state leaf as the zero value.

…value equal to the hash of a blank state leaf
@weijiekoh weijiekoh added the enhancement New feature or request label Mar 15, 2020
@weijiekoh weijiekoh self-assigned this Mar 15, 2020
@weijiekoh weijiekoh requested a review from kobigurk March 15, 2020 03:32
@weijiekoh weijiekoh closed this Mar 15, 2020
@weijiekoh weijiekoh reopened this Mar 15, 2020
@weijiekoh weijiekoh merged commit 6afd1f7 into privacy-scaling-explorations:master Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant