Skip to content

Commit

Permalink
Update test-summarize workflow and opcode summary statuses
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Stevengre committed Feb 21, 2025
1 parent a709eb4 commit d6c6adc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,28 @@ jobs:
if: always()
run: |
docker stop --time=0 kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }}
test-summarize:
name: 'Test Summarize'
needs: kevm-pyk-code-quality-checks
runs-on: [self-hosted, linux, normal]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kevm-ci-haskell-test-summarize-${{ github.sha }}
- name: 'Build kevm-pyk'
run: docker exec -u github-user kevm-ci-haskell-test-summarize-${{ github.sha }} /bin/bash -c 'make poetry'
- name: 'Build distribution'
run: docker exec -u github-user kevm-ci-haskell-test-summarize-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.plugin evm-semantics.summary'
- name: 'Run summarize'
run: docker exec -u github-user kevm-ci-haskell-test-summarize-${{ github.sha }} /bin/bash -c 'make test-summarize'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kevm-ci-haskell-test-summarize-${{ github.sha }}
nix:
name: 'Nix'
Expand Down
8 changes: 4 additions & 4 deletions kevm-pyk/src/kevm_pyk/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
{
'STOP': 'PASSED, One rule? Several rules?',
'ADD': 'PASSED, No underflow check in KCFG',
'MUL': 'PASSED, No underflow check in KCFG',
'MUL': 'FAILED, No underflow check in KCFG',
'SUB': 'PASSED, No underflow check in KCFG',
'DIV': 'PASSED, No underflow check in KCFG',
'SDIV': 'PASSED, No underflow check in KCFG',
Expand Down Expand Up @@ -156,7 +156,7 @@
'BALANCE': 'PASSED, no underflow check, no gas usage',
'ORIGIN': 'PASSED, no underflow check, no .Account in origin cell',
'CALLER': 'PASSED, no underflow check, no gas usage',
'CALLVALUE': 'PASSED, No underflow check in KCFG',
'CALLVALUE': 'FAILED, No underflow check in KCFG',
'CALLDATALOAD': 'PASSED, No underflow check in KCFG',
'CALLDATASIZE': 'PASSED, No underflow check in KCFG',
'CALLDATACOPY': 'PASSED, No underflow check in KCFG',
Expand All @@ -177,7 +177,7 @@
'GASLIMIT': 'PASSED, No underflow check in KCFG',
'CHAINID': 'PASSED, No underflow check in KCFG',
'SELFBALANCE': 'PASSED, No underflow check in KCFG',
'BASEFEE': 'PASSED, No underflow check in KCFG',
'BASEFEE': 'FAILED, No underflow check in KCFG',
'POP': 'PASSED, No underflow check, no gas usage',
'MLOAD': 'PASSED, No underflow check, no gas usage',
'MSTORE': 'PASSED, No underflow check in KCFG',
Expand Down Expand Up @@ -590,7 +590,7 @@ def summarize(self, proof: APRProof, merge: bool = False) -> None:
ensure_dir_path(self.save_directory / proof.id)
with open(self.save_directory / proof.id / 'summary.md', 'w') as f:
_LOGGER.info(f'Writing summary to {self.save_directory / proof.id / "summary.md"}')
for res_line in proof_show.show(proof, to_module=False):
for res_line in proof_show.show(proof, to_module=True):
f.write(res_line)
f.write('\n')

Expand Down

0 comments on commit d6c6adc

Please sign in to comment.