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

Simple SELECT Queries Without Aggregation Functions #373

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
cd191cd
feat: allow for either aggregation-only or tabular-only queries
delehef Sep 10, 2024
3794779
merge MPT extraction
nikkolasg Sep 12, 2024
3793aa1
is_multiplier
nikkolasg Sep 12, 2024
ebdd33a
multiplier for rows
nikkolasg Sep 12, 2024
071a2f0
and api
nikkolasg Sep 12, 2024
3b735cd
refactoring of cell logic
nikkolasg Sep 13, 2024
2b3c289
wip
nikkolasg Sep 13, 2024
d3ae335
row leaf passing
nikkolasg Sep 13, 2024
36673ef
partial fixed
nikkolasg Sep 13, 2024
6713f66
full node fixed
nikkolasg Sep 13, 2024
90f8d1c
row tree test passing
nikkolasg Sep 13, 2024
8dcdc05
testing merge circuit
nikkolasg Sep 13, 2024
0ea3f41
API for merge
nikkolasg Sep 13, 2024
2d7de6f
adding one more circuit set size
nikkolasg Sep 13, 2024
e9c3bcb
wip
nikkolasg Sep 15, 2024
b26ea94
fix: ORDER BY is not supported
delehef Sep 16, 2024
a36fd13
Merge pull request #355 from Lagrange-Labs/feat/drop-scalar-check
nikkolasg Sep 16, 2024
8fc299f
Merge branch 'main' into feat/tabular-queries
nicholas-mainardi Sep 16, 2024
76a4bdd
wip
nikkolasg Sep 17, 2024
4f7aec5
compiling
nikkolasg Sep 17, 2024
84fe37a
passing test
nikkolasg Sep 19, 2024
d8bc019
integrated test refactor #1
nikkolasg Sep 19, 2024
1fb227d
refactoring #2 compiling
nikkolasg Sep 20, 2024
735b415
correct size of circuit set
nikkolasg Sep 20, 2024
cebaf1c
full refactoring #3
nikkolasg Sep 20, 2024
a1274ae
multiplier columns
nikkolasg Sep 20, 2024
aee4872
test case for merge
nikkolasg Sep 20, 2024
2ea4e0d
add metadata from contract
nikkolasg Sep 20, 2024
99022b6
merge updates
nikkolasg Sep 21, 2024
1024dbe
default sec cell
nikkolasg Sep 21, 2024
abd9989
debug storage root
nikkolasg Sep 21, 2024
c7bea49
fixing block
nikkolasg Sep 21, 2024
12e083f
ordered cells
nikkolasg Sep 21, 2024
f6a5647
more debug
nikkolasg Sep 21, 2024
4368993
debug
nikkolasg Sep 21, 2024
1d4c10e
fixing vdb row digest
nikkolasg Sep 21, 2024
e0ad8d5
correct update depending on type
nikkolasg Sep 21, 2024
8407145
fixing update of mapping
nikkolasg Sep 21, 2024
6352db1
final test
nikkolasg Sep 21, 2024
84cd5cb
handle deletion for single
nikkolasg Sep 21, 2024
619c950
multiple rows
nikkolasg Sep 22, 2024
ab88009
Update verifiable-db/src/cells_tree/api.rs
nikkolasg Sep 23, 2024
c580c01
Update verifiable-db/src/cells_tree/api.rs
nikkolasg Sep 23, 2024
2c51871
reviews first pass
nikkolasg Sep 23, 2024
8184bd3
correct conditional scalar mul
nikkolasg Sep 23, 2024
8b30e6a
better API
nikkolasg Sep 23, 2024
3b83417
more debug
nikkolasg Sep 23, 2024
e5635d0
more debug
nikkolasg Sep 23, 2024
f877735
testing split digest
nikkolasg Sep 23, 2024
90e4d42
with correct name
nikkolasg Sep 23, 2024
5e057ed
more tests
nikkolasg Sep 23, 2024
9020e54
fixes
nikkolasg Sep 23, 2024
c90e821
query adaptable
nikkolasg Sep 23, 2024
edad5fa
putting back ignoring query
nikkolasg Sep 23, 2024
71c2ce7
Merge branch 'main' into feat/merge_table
nikkolasg Sep 23, 2024
8ce5ca1
Fix non-existence proven node selection
nicholas-mainardi Sep 25, 2024
185ff79
Comment to clarify non-existence node selection logic
nicholas-mainardi Sep 25, 2024
0f706cf
Fix: ensure we always use the appropriate merge flag in rows tre circ…
nicholas-mainardi Oct 1, 2024
0cd9487
Merge branch 'main' into feat/merge_table
nikkolasg Oct 10, 2024
5916860
Merge branch 'feat/merge_table' into feat/tabular-queries
nicholas-mainardi Oct 15, 2024
94dca85
fix: MemoryStorage::all_keys_at should not return dead keys
delehef Oct 17, 2024
e58faee
feat: add random_key_at
delehef Oct 17, 2024
85cdb54
Merge branch 'feat/merge_table' into feat/tabular-queries
nicholas-mainardi Oct 29, 2024
5e2df85
Simple Select Queries with Unchecked Offset (#365)
nicholas-mainardi Oct 29, 2024
5483d50
chore: clippy
delehef Oct 31, 2024
60d3f34
[parsil] correctly handle LIMIT/OFFSET
delehef Nov 5, 2024
35d9623
[mp2] use more explicit names
delehef Nov 5, 2024
5bb0490
fix: imports
delehef Nov 5, 2024
2e32687
Merge branch 'main' into feat/tabular-queries
nicholas-mainardi Nov 6, 2024
3644f30
Fix integration test + fmt
nicholas-mainardi Nov 6, 2024
6a27c73
use u32's for offset & limit
delehef Nov 6, 2024
ec32679
Fix test failing from time to time
nicholas-mainardi Nov 6, 2024
a65bf3b
merged with main
nikkolasg Nov 7, 2024
d23c0b7
add reset-db to devenv
delehef Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions groth16-framework/tests/common/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use verifiable_db::{
api::WrapCircuitParams,
revelation::api::Parameters as RevelationParameters,
test_utils::{
MAX_NUM_ITEMS_PER_OUTPUT, MAX_NUM_OUTPUTS, MAX_NUM_PLACEHOLDERS, MAX_NUM_PREDICATE_OPS,
MAX_NUM_RESULT_OPS,
INDEX_TREE_MAX_DEPTH, MAX_NUM_COLUMNS, MAX_NUM_ITEMS_PER_OUTPUT, MAX_NUM_OUTPUTS,
MAX_NUM_PLACEHOLDERS, MAX_NUM_PREDICATE_OPS, MAX_NUM_RESULT_OPS, ROW_TREE_MAX_DEPTH,
},
};

Expand All @@ -18,10 +18,14 @@ pub(crate) struct TestContext {
pub(crate) preprocessing_circuits: TestingRecursiveCircuits<F, C, D, NUM_PREPROCESSING_IO>,
pub(crate) query_circuits: TestingRecursiveCircuits<F, C, D, NUM_QUERY_IO>,
pub(crate) revelation_params: RevelationParameters<
ROW_TREE_MAX_DEPTH,
INDEX_TREE_MAX_DEPTH,
MAX_NUM_COLUMNS,
MAX_NUM_PREDICATE_OPS,
MAX_NUM_RESULT_OPS,
MAX_NUM_OUTPUTS,
MAX_NUM_ITEMS_PER_OUTPUT,
MAX_NUM_PLACEHOLDERS,
{ 2 * (MAX_NUM_PREDICATE_OPS + MAX_NUM_RESULT_OPS) },
>,
pub(crate) wrap_circuit:
WrapCircuitParams<MAX_NUM_OUTPUTS, MAX_NUM_ITEMS_PER_OUTPUT, MAX_NUM_PLACEHOLDERS>,
Expand All @@ -39,10 +43,14 @@ impl TestContext {

// Create the revelation parameters.
let revelation_params = RevelationParameters::<
ROW_TREE_MAX_DEPTH,
INDEX_TREE_MAX_DEPTH,
MAX_NUM_COLUMNS,
MAX_NUM_PREDICATE_OPS,
MAX_NUM_RESULT_OPS,
MAX_NUM_OUTPUTS,
MAX_NUM_ITEMS_PER_OUTPUT,
MAX_NUM_PLACEHOLDERS,
{ 2 * (MAX_NUM_PREDICATE_OPS + MAX_NUM_RESULT_OPS) },
>::build(
query_circuits.get_recursive_circuit_set(),
preprocessing_circuits.get_recursive_circuit_set(),
Expand Down
18 changes: 3 additions & 15 deletions groth16-framework/tests/common/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ impl TestContext {
let max_block_number = 76;
let test_data = TestRevelationData::sample(min_block_number, max_block_number);

let placeholder_hash_ids = QueryInput::<
MAX_NUM_COLUMNS,
MAX_NUM_PREDICATE_OPS,
MAX_NUM_RESULT_OPS,
MAX_NUM_ITEMS_PER_OUTPUT,
>::ids_for_placeholder_hash(
test_data.predicate_operations(),
test_data.results(),
test_data.placeholders(),
test_data.query_bounds(),
)
.unwrap();

// Generate the query proof.
let [query_proof] = self
.query_circuits
Expand All @@ -66,12 +53,13 @@ impl TestContext {
preprocessing_proof,
test_data.query_bounds(),
test_data.placeholders(),
placeholder_hash_ids,
test_data.predicate_operations(),
test_data.results(),
)
.unwrap();
let revelation_proof = self
.revelation_params
.generate_proof(input, self.query_circuits.get_recursive_circuit_set())
.generate_proof(input, self.query_circuits.get_recursive_circuit_set(), None)
.unwrap();
let revelation_proof = ProofWithVK::deserialize(&revelation_proof).unwrap();
let (revelation_proof_with_pi, _) = revelation_proof.clone().into();
Expand Down
Loading