Improvements that should be made to the language.
Witnessing arrays
The witness section should be able to take BaseArray:
witness "MyProof" {
BaseArray some_array,
}
Arrays in the circuit, part 1
In the circuit section, we should be able to construct BaseArray and ScalarArray with the syntax:
foo should automatically be typed based on bar and baz (resulting in either BaseArray or ScalarArray)
Arrays in the circuit, part 2
When we have a BaseArray, we should be able to use it in a way that the array explodes.
Example 1
# This should result in constraining both `bar` and `baz` as public inputs
foo = [bar, baz];
constrain_instance(foo);
Example 2
# These two poseidon_hash calls should be equivalent
one = witness_base(1);
foo = [bar, baz];
hash1 = poseidon_hash(one, foo);
hash2 = poseidon_hash(one, bar, baz);
constrain_equal_base(hash1, hash2);
Improvements that should be made to the language.
Witnessing arrays
The
witnesssection should be able to takeBaseArray:Arrays in the circuit, part 1
In the
circuitsection, we should be able to constructBaseArrayandScalarArraywith the syntax:fooshould automatically be typed based onbarandbaz(resulting in eitherBaseArrayorScalarArray)Arrays in the circuit, part 2
When we have a
BaseArray, we should be able to use it in a way that the array explodes.Example 1
Example 2