Skip to content

Commit

Permalink
Merge pull request #36 from zkemail/saleel/nightly-fix
Browse files Browse the repository at this point in the history
chore: remove unnecessary unconstrained
  • Loading branch information
jp4g authored Jan 30, 2025
2 parents 499dba8 + af2c5e2 commit 10cb8f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/tests/test_inputs.nr
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,24 @@ pub(crate) mod EmailLarge {

// mutate inputs

pub unconstrained fn tampered_header() -> BoundedVec<u8, EMAIL_LARGE_MAX_HEADER_LENGTH> {
pub fn tampered_header() -> BoundedVec<u8, EMAIL_LARGE_MAX_HEADER_LENGTH> {
let mut header = HEADER;
header.set(140, header.get_unchecked(140) + 1);
header
}

pub unconstrained fn tampered_body() -> BoundedVec<u8, EMAIL_LARGE_MAX_BODY_LENGTH> {
pub fn tampered_body() -> BoundedVec<u8, EMAIL_LARGE_MAX_BODY_LENGTH> {
let mut body = BODY;
body.set(140, body.get_unchecked(140) + 1);
body
}

pub unconstrained fn body_hash_outside_sequence() -> u32 {
pub fn body_hash_outside_sequence() -> u32 {
let dkim_sequence_start = DKIM_HEADER_SEQUENCE.index;
dkim_sequence_start - 40
}

pub unconstrained fn tampered_dkim_field() -> (BoundedVec<u8, 338>, u32) {
pub fn tampered_dkim_field() -> (BoundedVec<u8, 338>, u32) {
let header: BoundedVec<u8, 338> = BoundedVec::from_array([
100, 107, 105, 109, 45, 115, 105, 103, 110, 97, 116, 117, 114, 101, 58, 32, 118, 61, 49,
59, 32, 97, 61, 114, 115, 97, 45, 115, 104, 97, 50, 53, 54, 59, 32, 100, 61, 101, 120,
Expand Down

0 comments on commit 10cb8f9

Please sign in to comment.