Skip to content

Always remove stale abi json file#88

Merged
re-gius merged 3 commits into
mainfrom
re-gius/bounty-78-stale-abi-cleanup
Jun 2, 2026
Merged

Always remove stale abi json file#88
re-gius merged 3 commits into
mainfrom
re-gius/bounty-78-stale-abi-cleanup

Conversation

@re-gius
Copy link
Copy Markdown
Contributor

@re-gius re-gius commented Jun 1, 2026

This closes https://github.com/paritytech/bugbounty_reports/issues/78

process_elf_binaries now removes any previous .abi.json immediately after writing the new .polkavm, so a .polkavm overwrite never leaves a stale ABI behind.
Adds two regression tests covering the macro-stripped rebuild and a no-op rebuild byte-stability check. See paritytech/bugbounty_reports#78 for full context.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Benchmark Size Comparison (vs main)

Artifact Baseline Current Delta Status
fibonacci_builder-dsl.debug.polkavm 37324 37324 +0.00% OK
fibonacci_builder-dsl.release.polkavm 638 638 +0.00% OK
fibonacci_no-alloc.debug.polkavm 35943 35943 +0.00% OK
fibonacci_no-alloc.release.polkavm 595 595 +0.00% OK
fibonacci_with-alloc.debug.polkavm 46507 46507 +0.00% OK
fibonacci_with-alloc.release.polkavm 600 600 +0.00% OK
multi_builder-dsl.debug.polkavm 58600 58608 +0.01% OK
multi_builder-dsl.release.polkavm 3024 3024 +0.00% OK
multi_no-alloc.debug.polkavm 60407 60408 +0.00% OK
multi_no-alloc.release.polkavm 2919 2919 +0.00% OK
multi_with-alloc.debug.polkavm 72173 72173 +0.00% OK
multi_with-alloc.release.polkavm 3076 3076 +0.00% OK
mytoken_builder-dsl.debug.polkavm 56262 56262 +0.00% OK
mytoken_builder-dsl.release.polkavm 3683 3683 +0.00% OK
mytoken_no-alloc.debug.polkavm 59441 59440 -0.00% OK
mytoken_no-alloc.release.polkavm 2922 2922 +0.00% OK
mytoken_storage.debug.polkavm 63611 63619 +0.01% OK
mytoken_storage.release.polkavm 3017 3017 +0.00% OK
mytoken_with-alloc.debug.polkavm 73649 73657 +0.01% OK
mytoken_with-alloc.release.polkavm 3940 3940 +0.00% OK
---------------------------------------------------- ------------ ------------ ---------- --------
Total 588331 588355 +0.00%

OK: All artifacts within 5% regression threshold

Run 26757614686 | d7b18e3 | 2026-06-01 13:33 UTC

Comment thread crates/cargo-pvm-contract-builder/src/lib.rs Outdated
Copy link
Copy Markdown
Collaborator

@smiasojed smiasojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@re-gius re-gius merged commit 18942d6 into main Jun 2, 2026
6 checks passed
@re-gius re-gius deleted the re-gius/bounty-78-stale-abi-cleanup branch June 2, 2026 07:32
smiasojed pushed a commit that referenced this pull request Jun 2, 2026
* always remove stale abi json file

* nit + comments

* improve error handling
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.

2 participants