Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LogvinovLeon committed May 24, 2024
1 parent 2afbd25 commit 0a0055a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ethereum/circuits/lib/src/misc/arrays.nr
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub(crate) fn memcpy_up_to_length<TItem, SRC_LEN, DEST_LEN>(dest: &mut [TItem; D
}
}

// Fills destination array with content of source array starting from the starting position.
// Fills destination array with content of source array starting from the offset in source array.
pub(crate) fn memcpy<TItem, SRC_LEN, DEST_LEN>(dest: &mut [TItem; DEST_LEN], src: [TItem; SRC_LEN], offset: u64) {
memcpy_up_to_length(dest, src, offset, DEST_LEN);
}
Expand Down
1 change: 0 additions & 1 deletion ethereum/circuits/lib/src/misc/bytes.nr
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ pub fn shift_right_by_one<N>(arr: &mut [u8; N]) {
}
}

// Left-shift the byte array
pub(crate) fn left_byte_shift<N>(input: [u8; N], n: u64) -> [u8; N] {
let mut out = [0; N];

Expand Down
2 changes: 1 addition & 1 deletion ethereum/circuits/lib/src/rlp/decode.nr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::rlp::types::{RlpList, RlpFragment, RlpHeader, STRING, LIST};
use crate::misc::fragment::Fragment;

// Maximum number of bytes required to represent entity length.
// This means that this library can only decode RLP entities with a length of up to 2^16 bytes.
// This means that this library can only decode RLP entities with a length of up to 2^16 - 1 bytes.
global MAX_LEN_IN_BYTES: u64 = 2;

pub fn extract_payload_len<N>(data: Fragment<N, u8>, lenlen: u64) -> u64 {
Expand Down

0 comments on commit 0a0055a

Please sign in to comment.