Skip to content

Commit

Permalink
Remove outdated comment (vlayer-xyz#329)
Browse files Browse the repository at this point in the history
This comment was a leftover from a moment, when we didn't understand
what dynamic loop in Noir actually means.
Explanation: When using loop over data hardcoded somewhere else in
files, Noir can read the length of that data and that makes a loop not
dynamic.
  • Loading branch information
aajj999 authored Jun 7, 2024
2 parents 6ff38a3 + 79e1d21 commit 4bac877
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ethereum/circuits/lib/src/transaction.nr
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ impl<MAX_DATA_LEN> From<TxPartial> for ForeignCallTransaction<MAX_DATA_LEN> {
fn from(tx: TxPartial<MAX_DATA_LEN>) -> Self {
let mut data = [0; MAX_DATA_LEN];

// For some unclear reason (https://github.com/noir-lang/noir/issues/5011) - dynamic loop also works here, but we refrain from using it out of abundance of caution
for i in 0..MAX_DATA_LEN {
if (i < tx.data.len) {
data[i] = tx.data.storage[i];
Expand Down

0 comments on commit 4bac877

Please sign in to comment.