feat(fork-tests): consume prebuilt base-anvil image via BASE_ANVIL_IMAGE#147
Draft
amiecorso wants to merge 1 commit into
Draft
feat(fork-tests): consume prebuilt base-anvil image via BASE_ANVIL_IMAGE#147amiecorso wants to merge 1 commit into
amiecorso wants to merge 1 commit into
Conversation
base/base publishes a smoke-tested base-anvil package image to ghcr.io/base/base-anvil on every merge to main. Add a BASE_ANVIL_IMAGE path to run-fork-tests.sh that pulls the image and extracts its anvil + forge binaries, skipping the ~30-min local base-anvil build. - Precedence: explicit ANVIL_BIN/FORGE_BIN > BASE_ANVIL_IMAGE > local ../base-anvil build (default path unchanged). - Linux-only (the image ships linux binaries); guarded with a clear error on non-Linux hosts rather than extracting binaries that can't exec. - Prints the base/base SHA the image was built against (from the image MANIFEST) so a green run is never mistaken for "current main". - Documented in FORK_TESTING.md. This is the path base-std's own fork-test CI can adopt to stop rebuilding base-anvil on every PR.
Interface Coverage✅ All interface functions have test coverage. |
📊 Forge Coverage (
|
| File | Lines | Stmts | Branches | Funcs |
|---|---|---|---|---|
| 🟢 B20FactoryLib.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockActivationRegistry.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockActivationRegistryStorage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockB20.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockB20Asset.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟡 MockB20Factory.sol | 98.95% | 99.08% | 100.00% | 100.00% |
| 🟢 MockB20Stablecoin.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockB20Storage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockPolicyRegistry.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| 🟢 MockPolicyRegistryStorage.sol | 100.00% | 100.00% | 100.00% | 100.00% |
| Total | 99.86% | 99.88% | 100.00% | 100.00% |
Full report: download artifact. To browse locally: make coverage (runs forge coverage + genhtml + opens the HTML report).
✅ Fork tests: all 602 passedbase/base is fully in sync with the base-std spec. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
base/base's
base-anvil-package.ymlbuildsanvil+forgeagainst base/baseon every merge to
main, smoke-tests them with this fork suite, and pushes amulti-arch image to
ghcr.io/base/base-anvil(with aMANIFEST.jsonrecordingthe base/base, base-anvil, and base-std SHAs).
This adds a
BASE_ANVIL_IMAGEpath torun-fork-tests.shthat pulls that imageand extracts its binaries, so you can skip the ~30-minute local base-anvil build:
Behavior
ANVIL_BIN/FORGE_BIN>BASE_ANVIL_IMAGE> local../base-anvilbuild. The default local-dev path is unchanged.image
MANIFEST.json), so a green run is never mistaken for "current main".On a non-Linux host the script errors with guidance instead of extracting
binaries that can't exec. Requires
docker;docker login ghcr.ioif private.FORK_TESTING.mddocuments the path and its caveats.Why
Removes the per-run base-anvil rebuild for anyone on Linux — most importantly,
base-std's own fork-test CI can adopt
BASE_ANVIL_IMAGEto stop rebuildingbase-anvil on every PR. (Wiring that into
base-std-fork-tests.ymlis a naturalfollow-up, intentionally left out of this PR to keep it reviewable.)
Validation
bash -nclean; default path untouched (purely additive branch).extraction paths + manifest schema match
base-anvil-package.yml's Dockerfileexactly.