-
Notifications
You must be signed in to change notification settings - Fork 11
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
proof-producer: add trace collector tool #375
base: feature/mem_expand_tests
Are you sure you want to change the base?
Conversation
549d042
to
c744a4d
Compare
c744a4d
to
256443b
Compare
- "contracts/tracer_data.sol" | ||
|
||
invocations: | ||
- name: "simple-increment" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how data preparation for the concrete test case looks like. Can be used for filtering
- name: "simple-increment" | ||
description: "Single increment call test" | ||
contract_name: SimpleStorage | ||
traces_output_path: "simple/simple_inc_and_keccak" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relative path for writing output
description: "Single increment call test" | ||
contract_name: SimpleStorage | ||
traces_output_path: "simple/simple_inc_and_keccak" | ||
calls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguments for nil_block_generator call-contract
call
256443b
to
e6d1ac5
Compare
proof-producer/tests/bin/proof-producer/resources/traces/readme.md
Outdated
Show resolved
Hide resolved
- Define all Solitidy files you want to compile | ||
- Prepare subdirectory for traces to be put (e.g. `my_test_case/trace_files`) | ||
- Add invocations you want to test (contract name, method call sequence, directory for traces to be stored) | ||
- Run `collector.py --config=collector_config.yaml --invocation=<your_invocation_name>[omit argument to recollect traces]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be make sense add set of full command lines for update traces, or simple bash script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually will consist only of mkdir + invocation of the script :) (editing of the YAML from bash does not seem reasonable to me)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems not make sense. As far i see collector.py --config=collector_config.yaml
generate tracess for all cases.
But it's not clear from readme.
Let's replace section Trace validity test cases
to Update traces
with single command, and sub sections which describe how prepare data for hash miss match broken index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried to highlight this case but it obviously was not clear enough
Restructured readme, now it has sections Update traces
and How to add new test case
|
||
# path to the directory with built nil (https://github.com/NilFoundation/nil) binaries | ||
# set it to your local path | ||
root: "/path/to/your/nil/directory" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What difference vs NIL_ROOT
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIL_ROOT inside the script obtains its value from this variable, it is not an actual env var, just a placeholder for an another yaml key. Did not come with more convenient way to do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also highlighted inside the config.yaml content btw
- Define all Solitidy files you want to compile | ||
- Prepare subdirectory for traces to be put (e.g. `my_test_case/trace_files`) | ||
- Add invocations you want to test (contract name, method call sequence, directory for traces to be stored) | ||
- Run `collector.py --config=collector_config.yaml --invocation=<your_invocation_name>[omit argument to recollect traces]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems not make sense. As far i see collector.py --config=collector_config.yaml
generate tracess for all cases.
But it's not clear from readme.
Let's replace section Trace validity test cases
to Update traces
with single command, and sub sections which describe how prepare data for hash miss match broken index
Added python script that is able to collect all the traces that are used in current circuit test set
Traces are not changed from the business logic perspective but were recollected via this new pipeline as the PoC