Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking PR for v0.8.0 release #1104

Merged
merged 146 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
22c6d5e
chore: update crate versions to v0.8.0
bobbinth Oct 12, 2023
07310bf
feat(assembly): allow creation of masl libraries via api
bitwalker Oct 16, 2023
000436a
docs(mdbook): minor change in the bitwise chiplet
MaxMustermann2 Oct 17, 2023
4e44645
feat: introduce std::utils asm module
frisitano Oct 16, 2023
775209f
Merge pull request #1107 from 0xPolygonMiden/frisitano-std-asm-utils
frisitano Oct 18, 2023
5a2169e
refactor(assembly): improve ergonomics of and access to module import…
bitwalker Oct 18, 2023
1252174
feat(assembly): add accessors for common procedure metadata to module…
bitwalker Oct 18, 2023
bd65e6f
Merge pull request #1109 from MaxMustermann2/bitwise-doc-fix
Al-Kindi-0 Oct 19, 2023
a672a52
feat: expand capabiliies of the debug instruction
Fumuran Oct 11, 2023
51e238e
Merge pull request #1103 from 0xPolygonMiden/andrew-expand-debug
Fumuran Oct 19, 2023
8f5c793
doc: minor typos and nit fixes
Al-Kindi-0 Oct 19, 2023
7af0b82
config: add .editorconfig
hackaugusto Oct 19, 2023
299000e
doc: fix typos
Al-Kindi-0 Oct 20, 2023
16d4d2c
Merge pull request #1112 from 0xPolygonMiden/hacka-editorconfig
bobbinth Oct 20, 2023
fb6f69d
Merge pull request #1111 from 0xPolygonMiden/al-minor-doc-fix
bobbinth Oct 20, 2023
7c3f394
chore: pacify rustfmt
bobbinth Oct 23, 2023
24a8aef
Merge pull request #1114 from 0xPolygonMiden/al-minor-doc-fix-logup
bobbinth Oct 23, 2023
6a12d6d
fix: clippy issues and gpu tests
bobbinth Oct 24, 2023
18fdeda
feat: add host event handler
frisitano Oct 23, 2023
ef9a121
Merge pull request #1119 from 0xPolygonMiden/frisitano/host-event-han…
frisitano Oct 24, 2023
b6ce96e
chore: run pre-comimt run --all-files
frisitano Oct 24, 2023
d9c4eb5
feat: implement frocref instruction
Fumuran Oct 17, 2023
05834ca
refactor: fix bug, add tests
Fumuran Oct 24, 2023
15f63e7
docs: add documentation, update changelog
Fumuran Oct 24, 2023
10ed3e3
Merge pull request #1120 from 0xPolygonMiden/frisitano-precommit-sync
bobbinth Oct 24, 2023
321bc2e
refactor: improve test
Fumuran Oct 25, 2023
c52f813
Memory: Create newtype `ContextId` (#1117)
plafer Oct 25, 2023
07c4a81
refactor: make useless procref test usefull
Fumuran Oct 25, 2023
e7ed3e7
feat: add method to Library
Fumuran Oct 25, 2023
0220290
refactor: use module compilation to obtain roots
Fumuran Oct 26, 2023
d77838b
refactor: add default impl
Fumuran Oct 26, 2023
6fd3cf6
Merge pull request #1113 from 0xPolygonMiden/andrew-implement-procref
bobbinth Oct 26, 2023
702fdf0
Merge pull request #1123 from 0xPolygonMiden/andrew-add-get-module-to…
bobbinth Oct 27, 2023
b651b9d
chore: update miden-crypto dependency to next branch
bobbinth Oct 27, 2023
ee3e5e4
feat: support constants as counters in loop
Fumuran Oct 28, 2023
da70f51
chore: use Winterfell 0.7
Al-Kindi-0 Oct 24, 2023
40229e3
Merge pull request #1121 from 0xPolygonMiden/al-migrate-winterfell
bobbinth Oct 29, 2023
c9bf522
feat: introduce event error
frisitano Oct 30, 2023
4cc5b6a
refactor: improve parsing and testing
Fumuran Oct 30, 2023
7ca450e
docs: improve documentation, update changelog
Fumuran Oct 30, 2023
20054cb
Merge pull request #1125 from 0xPolygonMiden/frisitano-event-vault-delta
bobbinth Oct 30, 2023
d76da5d
Merge pull request #1124 from 0xPolygonMiden/andrew-support-constants…
bobbinth Oct 30, 2023
770e1c5
fix: gpu (metal) tests
bobbinth Oct 31, 2023
b9eeb1b
refactor: rename unchecked instructions
Fumuran Oct 27, 2023
4bbbd83
refactor: remove checked instructions
Fumuran Oct 27, 2023
bba6612
docs: update docs and changelog
Fumuran Oct 27, 2023
65a9e58
refactor: fix formatting
Fumuran Oct 27, 2023
7c40354
refactor: improve ops compilation, testing
Fumuran Nov 1, 2023
b421b60
crypto: update api
hackaugusto Nov 1, 2023
ab96617
Merge pull request #1132 from 0xPolygonMiden/hacka-update-crypto-api
bobbinth Nov 1, 2023
dfa3ac4
refactor: improve prepare_bitwise() func
Fumuran Nov 1, 2023
01ee16a
Merge pull request #1115 from 0xPolygonMiden/andrew-remove-checked-ops
bobbinth Nov 2, 2023
ed0e870
Derive `PartialEq, Eq` for `ExecutionError` (#1145)
plafer Nov 9, 2023
5734a82
feat: add extend method to AdviceInputs
frisitano Nov 15, 2023
57d7ddc
fix assert_with_code test
plafer Nov 21, 2023
a032ab4
Merge pull request #1156 from 0xPolygonMiden/plafer-fix-test
bobbinth Nov 22, 2023
68e1681
Merge pull request #1149 from 0xPolygonMiden/frisitano-advice-inputs-…
bobbinth Nov 23, 2023
bd8f84e
docs: update u32 shift and rotate instructions' docs
Fumuran Nov 9, 2023
55ba352
Merge pull request #1144 from 0xPolygonMiden/andrew-update-u32-docs
Fumuran Nov 23, 2023
c979f8a
Update `std::math::u64` according to the new u32 refactoring (#1142)
Fumuran Nov 23, 2023
fc81592
`StackOutputs`: `get_stack_{item, word}()` methods (#1155)
plafer Nov 27, 2023
bd0edfa
test: fix the stdlib tests
Fumuran Nov 28, 2023
350904d
Merge pull request #1164 from 0xPolygonMiden/andrew-stdlib-tests-hotfix
Fumuran Nov 29, 2023
ecb1699
feat: support libraries in REPL
Fumuran Nov 28, 2023
f6bc75f
Merge pull request #1162 from 0xPolygonMiden/andrew-support-stdlib-in…
Fumuran Nov 29, 2023
cf3ae33
fix: allow to use dyn instructions afrer procref
Fumuran Nov 23, 2023
4582326
Merge pull request #1160 from 0xPolygonMiden/andrew-add-procrefed-fun…
Fumuran Nov 29, 2023
ef33131
chore: add hashing example
Fumuran Nov 21, 2023
9d85c41
Merge pull request #1154 from 0xPolygonMiden/andrew-hashing-examples
Fumuran Nov 30, 2023
15fafb7
ExecutionProof: impl Serializable & Deserializable
hackaugusto Dec 1, 2023
4b8b03f
Merge pull request #1166 from 0xPolygonMiden/hacka-executaion-proof-s…
hackaugusto Dec 1, 2023
27c65ee
stackoutputs: add deserializer and size validation
hackaugusto Dec 1, 2023
3d3f01d
Merge pull request #1169 from 0xPolygonMiden/hacka-stack-outputs-serde
hackaugusto Dec 2, 2023
51aa5c2
chore: made AstSerdeOptions constructor const fn
bobbinth Dec 3, 2023
9c3f340
kernel,program: simplify api
hackaugusto Dec 1, 2023
eccf896
assembly: split mod into smaller files
hackaugusto Dec 4, 2023
f7b5093
Merge pull request #1167 from 0xPolygonMiden/hacka-kernel-serde
hackaugusto Dec 4, 2023
ca7de61
Merge pull request #1172 from 0xPolygonMiden/hacka-split-ast-mod
hackaugusto Dec 4, 2023
381329c
CodeBlock,ProgramAst: implement Serialize/Deserialize
hackaugusto Dec 4, 2023
264c6e1
refactor: move serialization methods into ProgramAst struct
bobbinth Dec 7, 2023
777fae9
Merge pull request #1173 from 0xPolygonMiden/hacka-codeblock-programa…
bobbinth Dec 7, 2023
d58122b
chore: update rustyline dependency to latest
bobbinth Dec 13, 2023
7be367d
feat: impl blake3 example
Fumuran Dec 12, 2023
e16f8f1
Merge pull request #1181 from 0xPolygonMiden/andrew-blake3-internal-e…
Fumuran Dec 14, 2023
685fa69
chore: fix typo in ci.yml
bobbinth Dec 24, 2023
e1dfdd9
fix: remove .append(true) in stdlib/md_renderer.rs
bobbinth Dec 24, 2023
b051580
chore: change dependency to crypto crate for RpoRandomCoin
Al-Kindi-0 Dec 20, 2023
9e61e2a
chore: remove dependency on Winter-crypto
Al-Kindi-0 Dec 22, 2023
0e6f9c1
Merge pull request #1183 from 0xPolygonMiden/al-rm-rporandomcoin
bobbinth Jan 5, 2024
8c17205
chore: remove winter-crypto dependency from core/Cargo.toml
bobbinth Jan 5, 2024
ad4481a
chore: remove explicit sve feature flag
bobbinth Jan 6, 2024
8d7b504
docs: fix comments
bobbinth Jan 7, 2024
124e026
feat: add Tracing logger to the VM
Fumuran Nov 1, 2023
78608e5
Merge pull request #1139 from 0xPolygonMiden/andrew-assembler-logging
Fumuran Jan 10, 2024
88779a1
docs: add explanation of field arithmetic
bobbinth Jan 11, 2024
b0e8450
Merge pull request #1192 from 0xPolygonMiden/bobbin-field-docs
bobbinth Jan 11, 2024
d30d508
Fix: typos (#1196)
GoodDaisy Jan 15, 2024
5bf3cc2
feat: add on_assert_failed method to the Host trait
Fumuran Jan 15, 2024
2662639
Merge pull request #1197 from 0xPolygonMiden/andrew-on-assert-failed
bobbinth Jan 15, 2024
01d8984
feat: implement trace instruction
Fumuran Jan 15, 2024
a24f896
feat: add tracing availability check, update docs
Fumuran Jan 17, 2024
a9a1c6a
Merge pull request #1198 from 0xPolygonMiden/andrew-add-tracing-to-host
bobbinth Jan 17, 2024
067d051
feat: add support for hexes in constants
Fumuran Jan 17, 2024
ee45c70
Merge pull request #1199 from 0xPolygonMiden/andrew-support-hex-in-co…
Fumuran Jan 17, 2024
0752ec6
Fix build after `SimpleSmt` change in miden-crypto (#1200)
plafer Jan 18, 2024
211152c
test: Test errors comparing error types instead of string comparision…
scottdieringer Jan 19, 2024
cfccfcc
stdlib: remove out folder contents only
hackaugusto Jan 23, 2024
4b46f73
Merge pull request #1209 from 0xPolygonMiden/hacka-stdlib-build
hackaugusto Jan 25, 2024
bd10b8c
Implement more optimized version of `u32lt` (#1193)
Fumuran Jan 26, 2024
afdc3f0
chore: fix clippy
bobbinth Jan 29, 2024
f43ec5e
feat: add the RCOMB1 instruction (#1216)
Al-Kindi-0 Feb 1, 2024
6e709a3
fix: bug due to not copying prev stack state (#1227)
Al-Kindi-0 Feb 1, 2024
0a4fa7a
`mpverify`: don't panic when verification fails (#1230)
plafer Feb 1, 2024
9ca7ab3
`stdlib` `smt` replacement (single key-value leaf only) (#1215)
plafer Feb 7, 2024
a610832
Removes any remnants of `TieredSmt` (#1237)
plafer Feb 8, 2024
86df182
feat: add simplified chiplet bus column builder
Al-Kindi-0 Nov 7, 2023
65d6f1d
feat: simplify build of chiplet vtable column
Al-Kindi-0 Nov 27, 2023
7798087
feat: simplify the 3 decoder auxiliary columns
Al-Kindi-0 Dec 2, 2023
95a0951
feat: simplify the 3 decoder auxiliary columns
Al-Kindi-0 Dec 2, 2023
28d1921
feat: simplify stack overflow auxiliary column build
Al-Kindi-0 Dec 5, 2023
6874706
chore: remove decoder aux-hints code
Al-Kindi-0 Dec 6, 2023
85c4e26
refactor: decoder auxiliary builder and uniformize the aux builder pa…
Al-Kindi-0 Dec 6, 2023
f153ecf
feat: simplify auxiliary trace building logic
Al-Kindi-0 Dec 7, 2023
9d8259d
feat: consolidate MainTrace and optimize column build
Al-Kindi-0 Dec 21, 2023
3b45caa
feat: consolidate MainTrace and optimize column build
Al-Kindi-0 Dec 21, 2023
05b6855
Trait for auxiliary column build (#1195)
Al-Kindi-0 Jan 19, 2024
38f1d8e
refactor: clean up aux column generator for stack overflow table (#1213)
bobbinth Jan 24, 2024
8b43742
refactor: Deref `MainTrace` type to `ColMatrix` (#1214)
iammadab Jan 29, 2024
bb46153
fix: metal prover compilation
bobbinth Feb 6, 2024
6713175
chore: split up decoder aux column builders into separate files (#1233)
bobbinth Feb 7, 2024
df6d850
Handle additional memory requests made by `RCOMBBASE` (#1229)
Al-Kindi-0 Feb 8, 2024
d1aa43c
Adds Kernel procedure responses (#1246)
Al-Kindi-0 Feb 13, 2024
a11888e
refactor: update to be compatible with Winterfell 0.8 (#1234)
Fumuran Feb 14, 2024
85e33d6
chore: update miden-crypto to v0.8 (#1248)
Fumuran Feb 14, 2024
19565fb
chore: minor clippy fixes
bobbinth Feb 14, 2024
0561bff
refactor: update logging messages in the VM (#1235)
Fumuran Feb 14, 2024
f4e3545
test: rcomb_base and falcon test prove-verify (#1232)
Al-Kindi-0 Feb 14, 2024
ae6a264
refactor: add AdviceMap wrapper (#1207)
ginika-chinonso Feb 15, 2024
1cee2c5
feat: add From BTreeMap conversion for AdviceMap
bobbinth Feb 15, 2024
38ac175
feat: export AdviceMap publicly
bobbinth Feb 15, 2024
072e945
Remove `smt64` (#1249)
plafer Feb 20, 2024
b3e0727
clippy: fix TryFrom/TryInto warnings
hackaugusto Feb 21, 2024
894aff6
Merge pull request #1254 from 0xPolygonMiden/hacka-fix-tryfrom-tryint…
hackaugusto Feb 21, 2024
c718a0a
fix: clippy errors for redundant imports (#1255)
hackaugusto Feb 23, 2024
43352cb
feat: implement u32clz, u32ctz, u32clo, u32cto and ilog2 instrs (#1176)
Fumuran Feb 26, 2024
6302b23
feat: implement bitwise counters for u64 (#1179)
Fumuran Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Documentation available at editorconfig.org

root=true

[*]
ident_style = space
ident_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.rs]
max_line_length = 100

[*.md]
trim_trailing_whitespace = false

[*.yml]
ident_size = 2
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
pull_request:
types: [opened, repoened, synchronize]
types: [opened, reopened, synchronize]

jobs:
check:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ stdlib/assets/std.masl

# These are files generated by MacOS
**/.DS_Store

# File present in Intellij IDE's.
.idea/

# VS Code
.vscode/
37 changes: 34 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 0.8.0 (TBD)

#### Assembly
- Expanded capabilities of the `debug` decorator. Added `debug.mem` and `debug.local` variations (#1103).
- Introduced the `emit.<event_id>` assembly instruction (#1119).
- Introduced the `procref.<proc_name>` assembly instruction (#1113).
- Added the ability to use constants as counters in `repeat` loops (#1124).
- All `checked` versions of the u32 instructions were removed. All `unchecked` versions were renamed: this mode specification was removed from their titles (#1115).
- Introduced the `u32clz`, `u32ctz`, `u32clo`, `u32cto` and `ilog2` assembly instructions (#1176).
- Added support for hexadecimal values in constants (#1199).
- Added the `RCombBase` instruction (#1216).

#### Stdlib
- Introduced `std::utils` module with `is_empty_word` procedure. Refactored `std::collections::smt`
and `std::collections::smt64` to use the procedure (#1107).
- Removed `checked` versions of the instructions in the `std::math::u64` module (#1142).
- Introduced `clz`, `ctz`, `clo` and `cto` instructions in the `std::math::u64` module (#1179).
- Removed `std::collections::smt64` (#1249)

#### VM Internals
- Introduced the `Event` decorator and an associated `on_event` handler on the `Host` trait (#1119).
- Updated Winterfell dependency to v0.7 (#1121).
- Added methods `StackOutputs::get_stack_item()` and `StackOutputs::get_stack_word()` (#1155).
- Added [Tracing](https://crates.io/crates/tracing) logger to the VM (#1139).
- Added `on_assert_failed()` method to the Host trait (#1197).
- Added support for handling `trace` instruction in the `Host` interface (#1198).

#### CLI
- Introduced the `!use` command for the Miden REPL (#1162).
- Introduced a `BLAKE3` hashing example (#1180).

## 0.7.0 (2023-10-11)

#### Assembly
Expand All @@ -17,16 +48,16 @@

#### VM Internals
- Simplified range checker and removed 1 main and 1 auxiliary trace column (#949).
- Migrated range checker lookups to use LogUp and reduced the number of trace columns to 2 main and
- Migrated range checker lookups to use LogUp and reduced the number of trace columns to 2 main and
1 auxiliary (#1027).
- Added `get_mapped_values()` and `get_store_subset()` methods to the `AdviceProvider` trait (#987).
- [BREAKING] Added options to specify maximum number of cycles and expected number of cycles for a program (#998).
- Improved handling of invalid/incomplete parameters in `StackOutputs` constructors (#1010).
- Allowed the assembler to produce programs with "phantom" calls (#1019).
- Added `TraceLenSummary` struct which holds information about traces lengths to the `ExecutionTrace` (#1029).
- Imposed the 2^32 limit for the memory addresses used in the memory chiplet (#1049).
- Imposed the 2^32 limit for the memory addresses used in the memory chiplet (#1049).
- Supported `PartialMerkleTree` as a secret input in `.input` file (#1072).
- [BREAKING] Refactored `AdviceProvider` interface into [Host] interface (#1082).
- [BREAKING] Refactored `AdviceProvider` interface into `Host` interface (#1082).

#### Stdlib
- Completed `std::collections::smt` module by implementing `insert` and `set` procedures (#1036, #1038, #1046).
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FEATURES_INTERNALS=--features internals
FEATURES_CONCURRENT_EXEC=--features concurrent,executable
FEATURES_GRAVITON_EXEC=--features concurrent,executable,sve
FEATURES_LOG_TREE=--features concurrent,executable,tracing-forest
FEATURES_METAL_EXEC=--features concurrent,executable,metal
PROFILE_OPTIMIZED=--profile optimized
PROFILE_TEST=--profile test-release
Expand All @@ -14,8 +14,14 @@ exec:
exec-metal:
cargo build $(PROFILE_OPTIMIZED) $(FEATURES_METAL_EXEC)

exec-graviton:
RUSTFLAGS="-C target-cpu=native" cargo build $(PROFILE_OPTIMIZED) $(FEATURES_GRAVITON_EXEC)
exec-avx2:
RUSTFLAGS="-C target-feature=+avx2" cargo build $(PROFILE_OPTIMIZED) $(FEATURES_CONCURRENT_EXEC)

exec-sve:
RUSTFLAGS="-C target-feature=+sve" cargo build $(PROFILE_OPTIMIZED) $(FEATURES_CONCURRENT_EXEC)

exec-info:
cargo build $(PROFILE_OPTIMIZED) $(FEATURES_LOG_TREE)

test:
cargo test $(PROFILE_TEST) $(FEATURES_INTERNALS)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Miden VM is a zero-knowledge virtual machine written in Rust. For any program ex
* If you'd like to learn more about STARKs, check out the [references](#references) section.

### Status and features
Miden VM is currently on release v0.7. In this release, most of the core features of the VM have been stabilized, and most of the STARK proof generation has been implemented. While we expect to keep making changes to the VM internals, the external interfaces should remain relatively stable, and we will do our best to minimize the amount of breaking changes going forward.
Miden VM is currently on release v0.8. In this release, most of the core features of the VM have been stabilized, and most of the STARK proof generation has been implemented. While we expect to keep making changes to the VM internals, the external interfaces should remain relatively stable, and we will do our best to minimize the amount of breaking changes going forward.

The next version of the VM is being developed in the [next](https://github.com/0xPolygonMiden/miden-vm/tree/next) branch. There is also a documentation for the latest features and changes in the next branch [documentation next branch](https://0xpolygonmiden.github.io/miden-vm/intro/main.html).

Expand Down
11 changes: 7 additions & 4 deletions air/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "miden-air"
version = "0.7.0"
version = "0.8.0"
description = "Algebraic intermediate representation of Miden VM processor"
authors = ["miden contributors"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/0xPolygonMiden/miden-vm"
documentation = "https://docs.rs/miden-air/0.8.0"
categories = ["cryptography", "no-std"]
keywords = ["air", "arithmetization", "crypto", "miden"]
edition = "2021"
Expand All @@ -26,12 +27,14 @@ harness = false
[features]
default = ["std"]
std = ["vm-core/std", "winter-air/std"]
internals = []

[dependencies]
vm-core = { package = "miden-core", path = "../core", version = "0.7", default-features = false }
winter-air = { package = "winter-air", version = "0.6", default-features = false }
vm-core = { package = "miden-core", path = "../core", version = "0.8", default-features = false }
winter-air = { package = "winter-air", version = "0.8", default-features = false }
winter-prover = { package = "winter-prover", version = "0.8", default-features = false }

[dev-dependencies]
criterion = "0.5"
proptest = "1.3"
rand-utils = { package = "winter-rand-utils", version = "0.6" }
rand-utils = { package = "winter-rand-utils", version = "0.8" }
10 changes: 5 additions & 5 deletions air/src/constraints/chiplets/bitwise/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use super::{EvaluationFrame, Felt, FieldElement, Vec};
use super::{EvaluationFrame, Felt, FieldElement};
use crate::{
trace::chiplets::{
bitwise::{NUM_DECOMP_BITS, NUM_SELECTORS, OP_CYCLE_LEN},
BITWISE_A_COL_IDX, BITWISE_A_COL_RANGE, BITWISE_B_COL_IDX, BITWISE_B_COL_RANGE,
BITWISE_OUTPUT_COL_IDX, BITWISE_PREV_OUTPUT_COL_IDX, BITWISE_SELECTOR_COL_IDX,
},
utils::{are_equal, binary_not, is_binary, is_zero, EvaluationResult},
utils::{are_equal, binary_not, collections::*, is_binary, is_zero, EvaluationResult},
ONE, ZERO,
};
use winter_air::TransitionConstraintDegree;
Expand Down Expand Up @@ -232,7 +232,7 @@ pub fn bitwise_and<E: FieldElement>(decomposed_values: &[E]) -> E {
for idx in 0..NUM_DECOMP_BITS {
let a = decomposed_values[idx];
let b = decomposed_values[idx + NUM_DECOMP_BITS];
result += E::from(2_u64.pow(idx as u32)) * a * b
result += E::from(2_u32.pow(idx as u32)) * a * b
}
result
}
Expand All @@ -245,7 +245,7 @@ pub fn bitwise_xor<E: FieldElement>(decomposed_values: &[E]) -> E {
for idx in 0..NUM_DECOMP_BITS {
let a = decomposed_values[idx];
let b = decomposed_values[idx + NUM_DECOMP_BITS];
result += E::from(2_u64.pow(idx as u32)) * (a + b - E::from(2_u8) * a * b)
result += E::from(2_u32.pow(idx as u32)) * (a + b - E::from(2_u8) * a * b)
}
result
}
Expand Down Expand Up @@ -407,7 +407,7 @@ pub fn agg_bits<E: FieldElement>(row: &[E], start_idx: usize) -> E {
// thus, in theory, we could just aggregate results in a 128-bit integer and perform only a
// single reduction in the end. This works only when we are in the base field."
for bit_idx in 0..NUM_DECOMP_BITS {
result += E::from(2_u64.pow(bit_idx as u32)) * row[start_idx + bit_idx];
result += E::from(2_u32.pow(bit_idx as u32)) * row[start_idx + bit_idx];
}
result
}
Expand Down
21 changes: 13 additions & 8 deletions air/src/constraints/chiplets/hasher/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use super::{EvaluationFrame, Felt, FieldElement, TransitionConstraintDegree, Vec};
use crate::trace::chiplets::{
hasher::{
Hasher, CAPACITY_LEN, DIGEST_LEN, DIGEST_RANGE, HASH_CYCLE_LEN, NUM_SELECTORS, STATE_WIDTH,
},
HASHER_NODE_INDEX_COL_IDX, HASHER_SELECTOR_COL_RANGE, HASHER_STATE_COL_RANGE,
};
use super::{EvaluationFrame, Felt, FieldElement, TransitionConstraintDegree};
use crate::{
utils::{are_equal, binary_not, is_binary, EvaluationResult},
trace::chiplets::{
hasher::{
Hasher, CAPACITY_LEN, DIGEST_LEN, DIGEST_RANGE, HASH_CYCLE_LEN, NUM_SELECTORS,
STATE_WIDTH,
},
HASHER_NODE_INDEX_COL_IDX, HASHER_SELECTOR_COL_RANGE, HASHER_STATE_COL_RANGE,
},
utils::{are_equal, binary_not, collections::*, is_binary, EvaluationResult},
ONE, ZERO,
};

Expand Down Expand Up @@ -344,9 +345,11 @@ trait EvaluationFrameExt<E: FieldElement> {
// --- Flags ----------------------------------------------------------------------------------

/// Set to 1 on the first 7 steps of every 8-step cycle. This flag is degree 1.
#[allow(dead_code)]
fn f_rpr(&self, k: &[E]) -> E;
/// Set to 1 when selector flags are (1,0,0) on rows which are multiples of 8. This flag is
/// degree 4.
#[allow(dead_code)]
fn f_bp(&self, k: &[E]) -> E;
/// Set to 1 when selector flags are (1,0,1) on rows which are multiples of 8. This flag is
/// degree 4.
Expand All @@ -359,9 +362,11 @@ trait EvaluationFrameExt<E: FieldElement> {
fn f_mu(&self, k: &[E]) -> E;
/// Set to 1 when selector flags are (0,0,0) on rows which are 1 less than a multiple of 8. This
/// flag is degree 4.
#[allow(dead_code)]
fn f_hout(&self, k: &[E]) -> E;
/// Set to 1 when selector flags are (0,0,1) on rows which are 1 less than a multiple of 8. This
/// flag is degree 4.
#[allow(dead_code)]
fn f_sout(&self, k: &[E]) -> E;
/// This flag will be set to 1 when either f_hout=1 or f_sout=1 in the current row. This flag is
/// degree 3.
Expand Down
3 changes: 2 additions & 1 deletion air/src/constraints/chiplets/hasher/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use super::{
};
use crate::{
trace::chiplets::hasher::{Selectors, LINEAR_HASH, STATE_WIDTH},
utils::collections::*,
Felt, TRACE_WIDTH,
};
use rand_utils::rand_array;
use vm_core::{chiplets::hasher::apply_round, utils::collections::Vec};
use vm_core::chiplets::hasher::apply_round;
use winter_air::EvaluationFrame;

// UNIT TESTS
Expand Down
18 changes: 12 additions & 6 deletions air/src/constraints/chiplets/memory/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use super::{EvaluationFrame, FieldElement, Vec};
use crate::trace::chiplets::{
memory::NUM_ELEMENTS, MEMORY_ADDR_COL_IDX, MEMORY_CLK_COL_IDX, MEMORY_CTX_COL_IDX,
MEMORY_D0_COL_IDX, MEMORY_D1_COL_IDX, MEMORY_D_INV_COL_IDX, MEMORY_TRACE_OFFSET,
MEMORY_V_COL_RANGE,
use super::{EvaluationFrame, FieldElement};
use crate::{
trace::chiplets::{
memory::NUM_ELEMENTS, MEMORY_ADDR_COL_IDX, MEMORY_CLK_COL_IDX, MEMORY_CTX_COL_IDX,
MEMORY_D0_COL_IDX, MEMORY_D1_COL_IDX, MEMORY_D_INV_COL_IDX, MEMORY_TRACE_OFFSET,
MEMORY_V_COL_RANGE,
},
utils::{binary_not, collections::*, is_binary, EvaluationResult},
};
use crate::utils::{binary_not, is_binary, EvaluationResult};
use winter_air::TransitionConstraintDegree;

#[cfg(test)]
Expand Down Expand Up @@ -174,12 +176,16 @@ trait EvaluationFrameExt<E: FieldElement> {
/// Gets the value of the specified selector column in the next row.
fn selector_next(&self, idx: usize) -> E;
/// The current context value.
#[allow(dead_code)]
fn ctx(&self) -> E;
/// The current address.
#[allow(dead_code)]
fn addr(&self) -> E;
/// The current clock cycle.
#[allow(dead_code)]
fn clk(&self) -> E;
/// The next clock cycle.
#[allow(dead_code)]
fn clk_next(&self) -> E;
/// The value from the specified index of the values (0, 1, 2, 3) in the current row.
fn v(&self, index: usize) -> E;
Expand Down
3 changes: 1 addition & 2 deletions air/src/constraints/chiplets/memory/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ use crate::trace::{
},
TRACE_WIDTH,
};
use crate::{chiplets::memory, Felt, FieldElement, ONE, ZERO};
use crate::{chiplets::memory, utils::collections::*, Felt, FieldElement, ONE, ZERO};
use rand_utils::rand_value;
use vm_core::utils::collections::Vec;

// UNIT TESTS
// ================================================================================================
Expand Down
4 changes: 2 additions & 2 deletions air/src/constraints/chiplets/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::super::{
EvaluationFrame, Felt, FieldElement, TransitionConstraintDegree, Vec, CHIPLETS_OFFSET,
EvaluationFrame, Felt, FieldElement, TransitionConstraintDegree, CHIPLETS_OFFSET,
};
use crate::utils::{are_equal, binary_not, is_binary};
use crate::utils::{are_equal, binary_not, collections::*, is_binary};

mod bitwise;
mod hasher;
Expand Down
4 changes: 2 additions & 2 deletions air/src/constraints/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use crate::{
chiplets::ChipletsFrameExt,
constraints::MainFrameExt,
trace::range::{B_RANGE_COL_IDX, M_COL_IDX, V_COL_IDX},
utils::are_equal,
utils::{are_equal, collections::*},
Assertion, EvaluationFrame, Felt, FieldElement, TransitionConstraintDegree,
};
use vm_core::{utils::collections::Vec, ExtensionOf, ZERO};
use vm_core::{ExtensionOf, ZERO};
use winter_air::AuxTraceRandElements;

// CONSTANTS
Expand Down
6 changes: 2 additions & 4 deletions air/src/constraints/stack/field_ops/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use super::{op_flags::OpFlags, EvaluationFrame, Vec};
use super::{op_flags::OpFlags, EvaluationFrame, FieldElement, TransitionConstraintDegree};
use crate::{
stack::EvaluationFrameExt,
utils::{are_equal, is_binary},
utils::{are_equal, collections::*, is_binary},
};
use vm_core::FieldElement;
use winter_air::TransitionConstraintDegree;

#[cfg(test)]
pub mod tests;
Expand Down
2 changes: 1 addition & 1 deletion air/src/constraints/stack/field_ops/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::stack::op_flags::{generate_evaluation_frame, OpFlags};
use crate::trace::decoder::USER_OP_HELPERS_OFFSET;
use core::ops::Neg;
use rand_utils::rand_value;
use vm_core::{Felt, FieldElement, Operation, StarkField, ONE, ZERO};
use vm_core::{Felt, FieldElement, Operation, ONE, ZERO};

use proptest::prelude::*;

Expand Down
9 changes: 5 additions & 4 deletions air/src/constraints/stack/io_ops/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use super::{op_flags::OpFlags, EvaluationFrame, Vec};
use crate::{stack::EvaluationFrameExt, utils::are_equal};
use vm_core::FieldElement;
use winter_air::TransitionConstraintDegree;
use super::{op_flags::OpFlags, EvaluationFrame, FieldElement, TransitionConstraintDegree};
use crate::{
stack::EvaluationFrameExt,
utils::{are_equal, collections::*},
};

#[cfg(test)]
pub mod tests;
Expand Down
Loading
Loading