diff --git a/.github/workflows/nightly-canary.yml b/.github/workflows/nightly-canary.yml index ddacb4d..fb614ee 100644 --- a/.github/workflows/nightly-canary.yml +++ b/.github/workflows/nightly-canary.yml @@ -8,6 +8,9 @@ on: env: CARGO_TERM_COLOR: always +permissions: + issues: write + jobs: test: name: Test on Nargo ${{matrix.toolchain}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ffba86..d8ab990 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - toolchain: [nightly, 0.32.0] + toolchain: [nightly, 0.34.0] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -38,7 +38,7 @@ jobs: - name: Install Nargo uses: noir-lang/noirup@v0.1.3 with: - toolchain: 0.32.0 + toolchain: 0.34.0 - name: Run formatter run: nargo fmt --check diff --git a/Nargo.toml b/Nargo.toml index 25c86a9..2a6039d 100644 --- a/Nargo.toml +++ b/Nargo.toml @@ -2,6 +2,6 @@ name = "noir_base64" type = "lib" authors = [""] -compiler_version = ">=0.31.0" +compiler_version = ">=0.34.0" -[dependencies] \ No newline at end of file +[dependencies] diff --git a/src/lib.nr b/src/lib.nr index 3972e5c..0842356 100644 --- a/src/lib.nr +++ b/src/lib.nr @@ -107,7 +107,7 @@ pub fn base64_encode(input: [u8; I slice *= 64; slice += encoded[i * BASE64_ELEMENTS_PER_CHUNK + j] as Field; } - let slice_bytes: [u8; 30] = slice.to_be_bytes(30).as_array(); + let slice_bytes: [u8; 30] = slice.to_be_bytes(); for j in 0..BYTES_PER_CHUNK { result[i * BYTES_PER_CHUNK + j] = slice_bytes[j]; } @@ -124,7 +124,7 @@ pub fn base64_encode(input: [u8; I slice *= 64; } // TODO: check is it cheaper to use a constant value in `to_be_bytes` or can we use `bytes_in_final_chunk`? - let slice_bytes: [u8; 30] = slice.to_be_bytes(30).as_array(); + let slice_bytes: [u8; 30] = slice.to_be_bytes(); let num_bytes_in_final_chunk = OutputBytes - ((num_chunks - 1) * BYTES_PER_CHUNK); for i in 0..num_bytes_in_final_chunk { result[(num_chunks - 1) * BYTES_PER_CHUNK + i] = slice_bytes[i]; @@ -152,7 +152,7 @@ pub fn base64_decode(input: [u8; I slice += input[i * BYTES_PER_CHUNK + j] as Field; } - let slice_base64_chunks: [u8; 40] = slice.to_be_radix(64, 40).as_array(); + let slice_base64_chunks: [u8; 40] = slice.to_be_radix(64); for j in 0..BASE64_ELEMENTS_PER_CHUNK { result[i * BASE64_ELEMENTS_PER_CHUNK + j] = slice_base64_chunks[j]; } @@ -170,7 +170,7 @@ pub fn base64_decode(input: [u8; I } // TODO: check is it cheaper to use a constant value in `to_be_bytes` or can we use `bytes_in_final_chunk`? - let slice_base64_chunks: [u8; 40] = slice.to_be_radix(64, 40).as_array(); + let slice_base64_chunks: [u8; 40] = slice.to_be_radix(64); let num_elements_in_final_chunk = OutputElements - ((num_chunks - 1) * BASE64_ELEMENTS_PER_CHUNK); for i in 0..num_elements_in_final_chunk {