feat(interfaces): sync IActivationRegistry to precompile implementation#23
Draft
eric-ships wants to merge 1 commit into
Draft
feat(interfaces): sync IActivationRegistry to precompile implementation#23eric-ships wants to merge 1 commit into
eric-ships wants to merge 1 commit into
Conversation
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).
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.
Summary
The interface committed in #18 used
isActivated/admin/activate(one-way semantics) but the underlying precompile implementation in base/base#2733 usesisEnabled/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:isActivated(bytes32)isEnabled(bytes32)admin()activationAdmin()activate(bytes32)enable(bytes32)disable(bytes32)AlreadyActivatedAlreadyEnabledAlreadyDisabledFeatureNotActivatedFeatureNotEnabledFeatureActivatedeventFeatureEnabledeventFeatureDisabledeventAlso adds
IActivationRegistry.solto 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 anddisableis dropped from the precompile, this interface will need a follow-up that removesdisable,AlreadyDisabled, andFeatureDisabledin the same hardfork PR. Flagging here so the decision lands before Beryl ships.Test plan
forge buildpasses cleanlyStdPrecompiles.ACTIVATION_REGISTRY.isEnabled(...)resolves to the correct 4-byte selector matching the precompile's dispatch table