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

provide KEVMSummarizer to sammarize rules for all the instruction rules #2676

Merged
merged 105 commits into from
Mar 5, 2025

Conversation

Stevengre
Copy link
Contributor

@Stevengre Stevengre commented Jan 7, 2025

This PR provides KEVMSummarizer to summarize the application of opcodes into one rewrite step.

Currently,

  1. some opcodes cannot be summarized without USEGAS.
  2. some complex opcodes like CALL cannot be summarized.

@Stevengre Stevengre self-assigned this Jan 7, 2025
@Stevengre Stevengre marked this pull request as draft January 7, 2025 07:02
@Stevengre Stevengre marked this pull request as ready for review January 23, 2025 13:53
@anvacaru
Copy link
Contributor

Please provide a description of the changes.

@Stevengre Stevengre force-pushed the jh/instruction-summary branch 2 times, most recently from 4d35b3e to 3005ef4 Compare January 24, 2025 07:21
@Stevengre Stevengre force-pushed the jh/instruction-summary branch from f898a19 to d5a7ae7 Compare February 10, 2025 01:13
@Stevengre Stevengre force-pushed the jh/instruction-summary branch from 1627db5 to 6d07ba8 Compare February 11, 2025 03:45
@Stevengre Stevengre requested a review from anvacaru February 12, 2025 08:29
@Stevengre
Copy link
Contributor Author

description:
#2705

@Stevengre Stevengre requested a review from anvacaru February 14, 2025 08:38
@Stevengre Stevengre force-pushed the jh/instruction-summary branch from b943a5e to 97bda5b Compare February 18, 2025 09:25
@Stevengre Stevengre requested a review from ehildenb February 21, 2025 14:30
@ehildenb
Copy link
Member

ehildenb commented Mar 4, 2025

Disable these ones, the slowest ones:
image

Stevengre and others added 26 commits March 5, 2025 15:00
- Update method name from `word_stack` to `wordstack`
- Rename internal helper functions accordingly
- Update method call in summarizer to use new method name
- Update poetry.lock and pyproject.toml to include frozendict package
- Modify summarizer.py to use frozendict for OPCODES, OPCODES_SUMMARY_STATUS, NOT_USEGAS_OPCODES, ACCOUNT_QUERIES_OPCODES, and ACCOUNT_STORAGE_OPCODES
- Use Final type hint to indicate these are constant dictionaries/sets
- Improve type safety and performance by using immutable data structures
- Clean up unnecessary commented-out dictionary entry in summarizer.py
- Simplify the OPCODES_SUMMARY_STATUS dictionary by removing the verbose comment
- Improve docstring for accounts_cell function in summarizer.py
- Add detailed explanation of function arguments, return values, and behavior
- Clarify the purpose and mechanism of creating account cell maps with constraints
- Replace TODO comment with ellipsis (...) in build_stack_underflow_spec method
- Indicate method is a placeholder for future symbolic stack underflow specification
- Enhance docstring for build_spec method with comprehensive description
- Add detailed explanation of method arguments and return value
- Clarify the purpose of symbolically executing an Ethereum opcode
- Refactor default argument initialization using Python's or-assignment
- Replace multiple if-checks with concise default value assignments
- Improve code readability and reduce redundancy in method arguments
- Add static methods in KEVM class for account cell and opcode operations
- Simplify accounts_cell function by leveraging new KEVM static methods
- Improve code reusability and readability by extracting common operations
- Update method calls in summarizer to use new KEVM helper methods
- Clean up unnecessary whitespace in kevm.py and summarizer.py
- Improve code consistency by removing extra blank lines
- Maintain clean code formatting across modules
- Create a new Makefile target for running summarize-related tests
- Use PYTEST_ARGS to filter and run specific summarization tests
- Integrate with existing poetry and kevm-pyk build process
…o summarize multiple opcodes successfully.

- Introduce `verifyKZGProofWrapper` and `Sha256rawWrapper` in serialization.md
- Replace direct calls to `verifyKZGProof` and `Sha256raw` with new wrapper functions in evm.md
- Maintain existing functionality while providing a flexible interface for future modifications
- Add new 'Test Summarize' job to GitHub Actions workflow
- Change summary status for MUL, CALLVALUE, and BASEFEE opcodes from PASSED to FAILED
- Modify proof_show method to use to_module=True when writing summary files
- Downgrade Poetry version from 2.1.1 to 2.0.1
- Simplify dependency constraints for various packages
- Remove platform-specific and version-specific conditionals
- Update content hash to reflect changes
- Add step to selectively check out the kevm-pyk/src/kevm_pyk/kproj/plugin submodule
- Use git submodule update with --init and --recursive flags
- Ensure precise submodule initialization in GitHub Actions workflow
- Create new summarization-simplification.k module with log2Int and newAddr simplification rules
- Update edsl.md to import the new summarization-simplification module
- Move log2Int simplification rule from int-simplification.k to new module
- Delete the 'Test Summarize' job from the test-pr.yml workflow
- Simplify CI configuration by removing redundant test job
- Introduce new 'Summarization' test job in test-pr.yml
- Set test suite timeout to 360 seconds
- Configure parallel test execution with 2 parallel processes
- Update distribution build to include evm-semantics.summary target
- Extend timeout for Summarization test job from 360 to 720 seconds
- Maintain parallel test execution configuration
- Reduce timeout from 720 to 150 seconds
- Increase parallel test execution from 2 to 6 processes
- Extend timeout for Summarization test job from 150 to 240 seconds
- Maintain parallel test execution configuration at 6 processes
- Extend timeout for Summarization test job from 240 to 360 seconds
- Maintain parallel test execution configuration at 6 processes
- Add pytest skip conditions for specific opcodes known to be time-consuming
- Improve test suite efficiency by bypassing lengthy summarization tests
- Add new `show_proof` method to centralize proof display logic
- Remove repeated node printer and proof show initialization in multiple methods
- Simplify code by using the new centralized method in `summarize`, `print_node`, and proof generation
@Stevengre Stevengre force-pushed the jh/instruction-summary branch from 8785950 to 3745fb7 Compare March 5, 2025 15:00
- Remove 'watchdog' from extras
- Adjust hypothesis-crosshair version in crosshair extras
- Simplify 'all' extras by removing 'watchdog'
@Stevengre Stevengre merged commit a4d59d3 into master Mar 5, 2025
13 of 15 checks passed
@Stevengre Stevengre deleted the jh/instruction-summary branch March 5, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants