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

feat: gas snapshots over arbitrary sections #8755

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
5f1b49b
snapshot -> snapshotState (breaking change)
zerosnacks Aug 6, 2024
43bb19c
specify snapshot as state_snapshot to make room for gas_snapshot logic
zerosnacks Aug 6, 2024
a868b43
further internal changes in preperation of snapshot_gas
zerosnacks Aug 6, 2024
91ff76d
start adding gas snapshot logic
zerosnacks Aug 6, 2024
c36d74d
add basic writing to file
zerosnacks Aug 6, 2024
124303c
remove snapshot post dump
zerosnacks Aug 6, 2024
267a244
simplify, gas_end inline
zerosnacks Aug 6, 2024
3daf782
add file
zerosnacks Aug 8, 2024
9455c63
update from master
zerosnacks Aug 26, 2024
4c87e1b
fix upstream
zerosnacks Aug 26, 2024
a20af2d
fix merge issues
zerosnacks Aug 28, 2024
1b522d6
fix Solidity compiler warnings and failing tests
zerosnacks Aug 28, 2024
c788ddd
remove snapshotData
zerosnacks Aug 28, 2024
86c5aab
add basic tests
zerosnacks Aug 28, 2024
610f255
add correct gas capturing
zerosnacks Aug 28, 2024
2dff964
basic tests
zerosnacks Aug 28, 2024
7eb0097
add basic group support
zerosnacks Aug 28, 2024
b83d22b
output in formatted json, add basic abstraction for grouping
zerosnacks Aug 28, 2024
07cd7f3
simplify and cleanup
zerosnacks Aug 28, 2024
fd83fe3
fix clippy
zerosnacks Aug 28, 2024
3d7013e
fix forge fmt
zerosnacks Aug 28, 2024
1180361
assert that alphabetic ordering is maintained
zerosnacks Aug 28, 2024
b8453db
prepare for context aware derived names
zerosnacks Aug 29, 2024
22f3af4
prepare for context aware group and name generation
zerosnacks Aug 29, 2024
963fed2
use contract name as group
zerosnacks Aug 29, 2024
d9c9e4f
refactor due to race condition issues, now moving to a write-once mod…
zerosnacks Aug 29, 2024
22adf65
rename generic Snapshots -> StateSnapshots
zerosnacks Aug 29, 2024
6145c3a
accumulate gas snapshots per test
zerosnacks Aug 29, 2024
f93be6c
write to disk once, at the end
zerosnacks Aug 29, 2024
58b5acf
fix ci issues
zerosnacks Aug 29, 2024
47baa40
only attempt remove if exists
zerosnacks Aug 30, 2024
2aa51e4
add snapshotGasLastCall shorthand
zerosnacks Aug 30, 2024
06121cd
add snapshotGasLastCall
zerosnacks Aug 30, 2024
f72fbca
snapshotGasLastCall -> snapshotGas
zerosnacks Aug 30, 2024
0dd8762
no need to add path to compilers
zerosnacks Sep 2, 2024
b580b44
merge in master, fix conflict
zerosnacks Sep 2, 2024
f70ec05
add FORGE_SNAPSHOT_CHECK
zerosnacks Sep 2, 2024
efac9f9
fix naming
zerosnacks Sep 2, 2024
71a8e8a
prepare for derived function name
zerosnacks Sep 2, 2024
279fb3f
fix clippy
zerosnacks Sep 2, 2024
a1d6629
gas not consistent, loosen assertion
zerosnacks Sep 2, 2024
f7be687
simplify tests
zerosnacks Sep 2, 2024
42c11f3
remove old fuzz function
zerosnacks Sep 2, 2024
20c6bbc
re-enable solc
zerosnacks Sep 2, 2024
d0a9794
add back deprecated cheatcodes with notes, use inner
zerosnacks Sep 4, 2024
1cacb51
add test for deprecated cheatcodes
zerosnacks Sep 4, 2024
4c87e31
apply fmt
zerosnacks Sep 4, 2024
0c48753
add stopSnapshotGas override to close last opened snapshot
zerosnacks Sep 5, 2024
f7cf91f
snapshotGas -> snapshotGasLastCall
zerosnacks Sep 6, 2024
190b12f
update from master
zerosnacks Sep 10, 2024
227834a
assert accurate gas measurement
zerosnacks Sep 10, 2024
ad1dfdc
clean up
zerosnacks Sep 10, 2024
d902a0d
only measure top-level calls, may be naive
zerosnacks Sep 10, 2024
ebc4efd
record internal calls
zerosnacks Sep 10, 2024
e966de1
experiment with tracking
zerosnacks Sep 16, 2024
87cedfd
fix merge conflict
zerosnacks Sep 20, 2024
a38f087
fix formatter
zerosnacks Sep 20, 2024
3b234ed
update cheats
zerosnacks Sep 20, 2024
222c5c7
start tracking depth
zerosnacks Sep 23, 2024
f9cecae
add measurement to create_end
zerosnacks Sep 23, 2024
7556786
process feedback
zerosnacks Sep 23, 2024
45db733
fix depth
zerosnacks Sep 23, 2024
7d8b793
fix frame recording, remove record_frames
zerosnacks Sep 23, 2024
f09dc7b
clean up
zerosnacks Sep 23, 2024
dc32333
make sure to clean up gas records after processing
zerosnacks Sep 23, 2024
29c78da
fix bug, allow to close snapshot that use custom group using shorthan…
zerosnacks Sep 23, 2024
1bc6e54
add additional tests and comparisons
zerosnacks Sep 23, 2024
98c8760
register overhead
zerosnacks Sep 23, 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
39 changes: 17 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ proptest = "1"
comfy-table = "7"

[patch.crates-io]
foundry-compilers = { git = "https://github.com/foundry-rs/compilers.git", rev = "ee116703c7f572289e1acc5f638e45c4a8c840f0" }
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "511ae98" }
alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "511ae98" }
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "511ae98" }
Expand Down
Loading
Loading