Allow network-upgrade preamble marker - #171
Open
ritorhymes wants to merge 1 commit into
Open
Conversation
Allow network-upgrade in EIP preambles and keep the marker optional on Meta EIPs while rejecting marker use on Standards Track and Informational proposals. Reject empty network-upgrade values through the existing length lint and add the field to the default preamble order between category and created. Add a generic preamble lint for fields that are allowed only when another field has a configured value, and use it to enforce the network-upgrade Meta-only rule.
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
This PR adds lint support for the
network-upgradepreamble field so Meta EIPs can mark the hardfork/network upgrade they describe.The field is optional on Meta EIPs, rejected on non-Meta proposals, and rejected when present but empty.
This is part of the hardfork/network-upgrade rollout tracked in eips-wg/preprocessor#35. The eips-wg site preprocessor consumes this marker to generate a hardfork index and proposal-page membership metadata.
Example
A Meta EIP can now include:
Changes
network-upgradeto the default preamble order betweencategoryandcreated.network-upgradevalues through the existing length lint.AllowedOnlyIfEqpreamble lint for fields that are allowed only when another field has a configured value.network-upgradeto be allowed only whentype: Meta.network-upgradebehavior.Notes
AllowedOnlyIfEqmirrors the existingRequiredIfEqlint with inverted semantics: whereRequiredIfEqrequires a field when another equals a value,AllowedOnlyIfEqforbids a field unless another equals a value.This PR only teaches eipw to accept and validate the new marker. It does not add
network-upgrademarkers to EIPs or require the marker on all Meta EIPs.