-
Notifications
You must be signed in to change notification settings - Fork 1
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: implement provably extract LIMIT/OFFSET circuits (Part1) #288
base: main
Are you sure you want to change the base?
Conversation
f34c61f
to
cc9b20a
Compare
9384db3
to
4377c28
Compare
4377c28
to
27f8fb3
Compare
27f8fb3
to
1ab5337
Compare
- replace accumulator input from final_tree_hash to tree_hash - add test for accumulator check
Add new method to properly initialize the circuit ensuring that indexed_items[1] == U256::ZERO if it is a dummy value. Also modify test code to use new method when constructing the circuit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a minor comment
@@ -244,10 +272,10 @@ mod tests { | |||
.clone() | |||
.into_iter() | |||
.chain(empty_hash_fields) | |||
.chain(indexed_items[1].to_fields()) | |||
.chain(indexed_items[1].to_fields()) | |||
.chain(second_indexed_item.unwrap_or(U256::ZERO).to_fields()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: we could replace this with test_circuit.second_indexed_item
so that we don't have to do this unwrap_or
everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 716e652.
d8cf76a
to
a9e2b59
Compare
Address issue #181
Intermediate and No-results circuits will be implemented on follow up PR because the size of this PR may be too large.
Refer to the results extraction circuits spec.