-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
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 = [bar, baz];
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);
Reactions are currently unavailable