Skip to content

docs(IActivationRegistry): warn integrators not to use code presence as activation signal (BOP-322)#151

Closed
rayyan224 wants to merge 1 commit into
mainfrom
rayyanalam/bop-322-activation-bytecode-marker-doc
Closed

docs(IActivationRegistry): warn integrators not to use code presence as activation signal (BOP-322)#151
rayyan224 wants to merge 1 commit into
mainfrom
rayyanalam/bop-322-activation-bytecode-marker-doc

Conversation

@rayyan224

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an explicit NatSpec integration note to IActivationRegistry warning that EXTCODESIZE/EXTCODEHASH at the registry address are not reliable signals for feature activation state (BOP-322).
  • The precompile writes a bytecode marker to its storage account on first activate and does not clear it if features are later deactivated, so code presence only reflects initialisation, not live state.
  • Directs integrators to always use isActivated(feature) as the authoritative source.

Companion to base/base#3366 (ericliu/bop-322-fix-v2) which addresses the implementation side.

Test plan

  • No logic changes; NatSpec only — review the added comment in src/interfaces/IActivationRegistry.sol for accuracy and clarity.

@linear

linear Bot commented Jun 9, 2026

Copy link
Copy Markdown

BOP-322

…as activation signal (BOP-322)

The precompile writes a bytecode marker to its storage account on first
activate and does not clear it on deactivation, so EXTCODESIZE/EXTCODEHASH
at the registry address reflect initialisation state only. Add an explicit
NatSpec integration note directing consumers to isActivated() instead.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@rayyan224 rayyan224 force-pushed the rayyanalam/bop-322-activation-bytecode-marker-doc branch from 9be776a to 77090b2 Compare June 9, 2026 23:38
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Interface Coverage

✅ All interface functions have test coverage.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

📊 Forge Coverage (src/lib/)

🟢 ≥99% across all metrics.

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).

@ilikesymmetry

Copy link
Copy Markdown
Collaborator

I feel weird even having to declare this behavior given I don’t understand why we built it this way. Why are we doing anything other than storage updates? Also, why would an integrator not use our explicit view function. Feels like not our issue if someone uses an unspecified path for something with an obvious specified path. I prefer no-op to this comment.

@rayyan224 rayyan224 closed this Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

✅ Fork tests: all 608 passed

base/base is fully in sync with the base-std spec.

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