Skip to content

feat(interfaces): sync IActivationRegistry to precompile implementation#23

Draft
eric-ships wants to merge 1 commit into
mainfrom
rf/sync-activation-registry-interface
Draft

feat(interfaces): sync IActivationRegistry to precompile implementation#23
eric-ships wants to merge 1 commit into
mainfrom
rf/sync-activation-registry-interface

Conversation

@eric-ships
Copy link
Copy Markdown
Collaborator

Summary

The interface committed in #18 used isActivated / admin / activate (one-way semantics) but the underlying precompile implementation in base/base#2733 uses isEnabled / activationAdmin / enable / disable (bidirectional). This PR aligns the Solidity surface to the actual ABI so generated selectors and error signatures match what the node dispatches.

Changes to IActivationRegistry.sol:

Old New
isActivated(bytes32) isEnabled(bytes32)
admin() activationAdmin()
activate(bytes32) enable(bytes32)
(missing) disable(bytes32)
AlreadyActivated AlreadyEnabled
(missing) AlreadyDisabled
FeatureNotActivated FeatureNotEnabled
FeatureActivated event FeatureEnabled event
(missing) FeatureDisabled event

Also adds IActivationRegistry.sol to the README file tree (it was missing from the listing added in #18).

Open design question

base/base#2733's PR description says "enforces a one-way enable path" but the implementation ships disable(bytes32). This interface mirrors the implementation. If the spec wins and disable is dropped from the precompile, this interface will need a follow-up that removes disable, AlreadyDisabled, and FeatureDisabled in the same hardfork PR. Flagging here so the decision lands before Beryl ships.

Test plan

  • forge build passes cleanly
  • StdPrecompiles.ACTIVATION_REGISTRY.isEnabled(...) resolves to the correct 4-byte selector matching the precompile's dispatch table

The interface committed in #18 used isActivated/admin/activate (one-way)
but the underlying precompile in base/base#2733 implements isEnabled/
activationAdmin/enable/disable (bidirectional). Align the Solidity surface
to the actual ABI so generated selectors and error signatures match what
the node will dispatch.

Changes:
- isActivated -> isEnabled
- admin -> activationAdmin
- activate -> enable
- add disable(bytes32)
- AlreadyActivated -> AlreadyEnabled, add AlreadyDisabled
- FeatureNotActivated -> FeatureNotEnabled
- FeatureActivated -> FeatureEnabled, add FeatureDisabled event
- Update NatSpec throughout; note open design question (base/base#2733
  describes "one-way enable" but ships disable; this interface mirrors
  the implementation and will need a follow-up if disable is removed)

Also adds IActivationRegistry.sol to the README file tree (it was
missing from the listing added in #18).
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.

1 participant