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

[DNM] Execution trace dumping with contract support. #775

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
89789c6
Add stuff.
azteca1998 Aug 28, 2024
1aaaea8
Fix bug.
azteca1998 Aug 28, 2024
5347c55
Merge branch 'main' into add-trace-dump-contracts
azteca1998 Sep 10, 2024
12e3d8e
Fix stuff.
azteca1998 Sep 10, 2024
dd2258e
Add trace dump contracts 2 (#783)
JulianGCalderon Sep 10, 2024
52ef1d8
Fix second bug in tail recursion transformations.
azteca1998 Sep 10, 2024
10ecaa2
Merge branch 'main' into add-trace-dump-contracts
azteca1998 Sep 16, 2024
b2935f0
Merge branch 'main' into add-trace-dump-contracts
azteca1998 Sep 18, 2024
57b39dc
Fix error.
azteca1998 Sep 19, 2024
1361621
Merge branch 'main' into add-trace-dump-contracts
azteca1998 Oct 8, 2024
30d7a98
Fix compile error.
azteca1998 Oct 8, 2024
e1ba709
Fix more errors.
azteca1998 Oct 8, 2024
c989b31
Add trace dump contracts 2 (#838)
JulianGCalderon Oct 21, 2024
d5a0271
Merge branch 'main' of github.com:lambdaclass/cairo_native into add-t…
FrancoGiachetta Oct 24, 2024
11c3714
Cargo.lock
FrancoGiachetta Oct 24, 2024
339534f
enum 0 tag
FrancoGiachetta Oct 24, 2024
da47a0f
revert builtin costs
FrancoGiachetta Oct 25, 2024
567c7a1
fix seg fault felt dict
FrancoGiachetta Oct 30, 2024
99accfb
implement feltDictEntry and SquashedFeltDict
FrancoGiachetta Oct 31, 2024
7f37246
Merge branch 'main' into add-trace-dump-contracts
JulianGCalderon Nov 19, 2024
85ce88b
gas u64
FrancoGiachetta Nov 19, 2024
76663d2
Merge branch 'main' into add-trace-dump-contracts
FrancoGiachetta Nov 19, 2024
bb890c3
Merge branch 'main' into add-trace-dump-contracts
azteca1998 Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 262 additions & 18 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ with-cheatcode = []
with-debug-utils = []
with-mem-tracing = []
with-runtime = ["dep:cairo-native-runtime"]
with-trace-dump = ["cairo-native-runtime/with-trace-dump"]

# the aquamarine dep is only used in docs and cannot be detected as used by cargo udeps
[package.metadata.cargo-udeps.ignore]
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ build-dev: check-llvm
.PHONY: check
check: check-llvm
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo clippy --all-targets --features build-cli,with-cheatcode,with-runtime -- -D warnings

.PHONY: test
test: check-llvm needs-cairo2 build-alexandria runtime-ci
Expand Down Expand Up @@ -88,11 +88,11 @@ coverage: check-llvm needs-cairo2 build-alexandria runtime-ci

.PHONY: doc
doc: check-llvm
cargo doc --all-features --no-deps --workspace
cargo doc --features build-cli,with-cheatcode,with-runtime --no-deps --workspace

.PHONY: doc-open
doc-open: check-llvm
cargo doc --all-features --no-deps --workspace --open
cargo doc --features build-cli,with-cheatcode,with-runtime --no-deps --workspace --open

.PHONY: bench
bench: needs-cairo2 runtime
Expand Down Expand Up @@ -179,8 +179,11 @@ build-alexandria:

.PHONY: runtime
runtime:
cargo b --release --all-features -p cairo-native-runtime && cp target/release/libcairo_native_runtime.a .
cargo b --release -p cairo-native-runtime && cp target/release/libcairo_native_runtime.a .

runtime-with-trace-dump:
cargo b -p cairo-native-runtime --features=with-trace-dump && cp target/debug/libcairo_native_runtime.a .

.PHONY: runtime-ci
runtime-ci:
cargo b --profile ci --all-features -p cairo-native-runtime && cp target/ci/libcairo_native_runtime.a .
cargo b --profile ci -p cairo-native-runtime && cp target/ci/libcairo_native_runtime.a .
19 changes: 16 additions & 3 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,28 @@ keywords = ["starknet", "cairo", "runtime"]
[lib]
crate-type = ["rlib", "cdylib", "staticlib"]

[features]
with-trace-dump = [
"dep:cairo-lang-sierra",
"dep:cairo-lang-utils",
"dep:sierra-emu",
"dep:num-bigint",
]

[dependencies]
starknet-types-core = { version = "0.1.7", default-features = false, features = [
"std",
"serde",
"hash",
] }
cairo-lang-sierra-gas = "2.9.0-dev.0"
starknet-curve = "0.5.1"
itertools = "0.13.0"
lazy_static = "1.5.0"
rand = "0.8.5"
itertools = "0.13.0"
num-traits = "0.2"
starknet-curve = "0.5.1"

num-bigint = { version = "0.4.4", optional = true }
num-traits = { version = "0.2" }
cairo-lang-sierra = { version = "2.9.0-dev.0", optional = true }
cairo-lang-utils = { version = "2.9.0-dev.0", optional = true }
sierra-emu = { git = "https://github.com/lambdaclass/sierra-emu", optional = true }
Loading
Loading