-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Design Documents Feature Flags
All significant new features should have a feature flag of some sort that can disable the feature. Acceptable flags are genesis file configurations and CLI flags. A centralized feature flag file will be shared for command line flags.
Usually, major features added to the Ethereum chain are tied to various hard forks, such as Berlin, Phoenix, and Istanbul. There are other features that are not tied to hard forks that can impact system stability and usability, such as devp2p upgrades and use of native libraries. While a hard fork can be disabled via configuration, other major features cannot be. To keep the codebase stable, these new features should be disabled for at least one quarterly release: defaulting to off on their first release, on when deemed stable, and once it has been defaulted on between two quarterly releases the flag should be removed.
- We could feature flag too much stuff. We need to exercise judgement in what gets flagged.
- Testing all possible feature flag combinations. The current default set and individual features should still get coverage in acceptance and unit tests.
- Network hard forks where the fork is known and stable (these are already flagged by the genesis config).
- Features that are meant to be turned on and off via CLI. Example: GraphQL. The flag to turn it on is already a feature flag.
- Every little bug. What gets flagged needs to be big enough to be called a feature.
- New devp2p sub protocols such as ETH/64 and ETH/65.
- Changing existing code to non-Java implementations via JNI, such as secp256k1 encryption.
- Speculative EIPs, such as EIP-1559 or eWASM, that may show up in future forks.
To support this, a new feature flag file will be added into the :config project.
- Fields and methods will be static.
- Access will be via getters.
BesuCommand will be responsible for setting the values from CLI flags.
- Flag names will be of the form
--X<foo>-enabled. - Setting via
BesuCommandmay be enforced in future releases via error prone. - Future releases may make setting the flags only accessible to
BesuCommandvia the Java 9 module system.
besu-eth/wiki and edits made here are overwritten on the next publish. To change a page, open a pull request against the source repo instead. See Home for how.
Contributing
Development & Testing
Developing & Conventions
Project Process
Governance
Incident Reports
- 2024-01-06 Mainnet Halting Event
- 2022-11-11 Fork on Sepolia
- 2022-05-30 Phishing PRs
- 2021-08-04 Value Transfer Public Transactions Rejected
- 2021-04-23 ATs Failures
Performance & Stability
- Improvements Since the Merge
- Memory Usage Investigations (23.7.3-RC)
- Reduce Memory Usage
- Testing Taskforce Brainstorming
- Q4 2022 Stability and Improvements
- Permissioned Chain Testing
Design Documents
- Design Documents
- Modular Besu
- Refactor EVM into a Standalone Library
- Bonsai Tries Design Overview
- Bonsai Archive Feature
- Bonsai Archive State Proofs
- Switchable Consensus Parameters
- SECP256R1 Support
- RPC Endpoint Service
- Feature Proposal Template
- Feature Flags
- CI/CD Tooling and Process
Programs & Mentorship