support longer arrays in vec_ref (#367)

Support arrays up to 256 elements (hardcoded maximum just to avoid abuse) by combining multiple random_accesses.
The index is now split into low and high parts. It's a bit more inconvenient than using a single Target but this allows avoiding bit decomposition.
This commit is contained in:
Eduard S. 2025-07-30 16:07:25 -07:00 committed by GitHub
parent bde35369d3
commit 4fa285d9fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 175 additions and 61 deletions

View file

@ -18,8 +18,6 @@ pub const KEY_SIGNER: &str = "_signer";
// hash(KEY_TYPE) = [17948789436443445142, 12513915140657440811, 15878361618879468769, 938231894693848619]
pub const KEY_TYPE: &str = "_type";
pub const STATEMENT_ARG_F_LEN: usize = 8;
pub const OPERATION_ARG_F_LEN: usize = 1;
pub const OPERATION_AUX_F_LEN: usize = 2;
#[derive(Clone, Copy, Debug, FromRepr, PartialEq, Eq, Hash, Serialize, Deserialize, JsonSchema)]
pub enum NativePredicate {