Skip to content

Commit 8c9d7fc

Browse files
authored
chore: fix inconsistent bit size for id field in JSONEntry (#78)
1 parent 69b1435 commit 8c9d7fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/json_entry.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl JSONEntry {
125125
// Safety: we check all the outputs are in the correct range and we can construct the input from the outputs of the decomposition
126126
let (id, parent_index, mid, entry_type) =
127127
unsafe { JSONEntry::__extract_entry_type_id_and_parent_index_from_field(f) };
128-
id.assert_max_bit_size::<8>(); // 1.25
128+
id.assert_max_bit_size::<16>(); // 1.5
129129
parent_index.assert_max_bit_size::<16>(); // 1.5
130130
entry_type.assert_max_bit_size::<16>(); // 1.5
131131
mid.assert_max_bit_size::<136>(); // 5.5
@@ -141,7 +141,7 @@ impl JSONEntry {
141141
}
142142
fn extract_entry_type_and_id_from_field(f: Field) -> (Field, Field) {
143143
let (id, mid, entry_type) = unsafe { JSONEntry::__extract_entry_type_and_id_from_field(f) };
144-
id.assert_max_bit_size::<8>(); // 1.25
144+
id.assert_max_bit_size::<16>(); // 1.5
145145
entry_type.assert_max_bit_size::<16>(); // 1.5
146146
mid.assert_max_bit_size::<136>(); // 5.5
147147
assert(id + mid * 0x10000 + entry_type * 0x100000000000000000000000000000000000000 == f);

0 commit comments

Comments
 (0)