Access Restriction Network Upgrade: Deactivation Lesson 1 of 7
Introduction
Use a network upgrade (upgrade.json) to disable allowlist precompiles after genesis.
Overview
So far, you enabled Transaction AllowList and Contract Deployer AllowList in genesis using a BuilderHub hosted node. In a real network, you won't always get the genesis config "perfect" on day one, and you may need to turn precompiles on/off (or change their parameters) later.
Subnet-EVM supports doing this via network upgrades using an upgrade.json file. In this section, you'll:
- Set up a Docker validator (required to access config files)
- Disable both allowlist precompiles via
upgrade.json - Restart the node and verify the precompiles are no longer available
Why Docker? BuilderHub hosted nodes don't allow direct access to configuration files. To perform network upgrades, you need to run your own validator with full filesystem access.
Key Concepts
- Network upgrades change how blocks are processed. All validators must upgrade consistently, or the chain can halt or fall out of sync.
- Upgrade file location:
{chain-config-dir}/{blockchainID}/upgrade.json - Timestamps must be in the future (relative to the chain head). Past timestamps will cause the node to fail on startup.
- Activated upgrades cannot change: after an upgrade activates, you cannot modify or remove its entry. You can still change or remove an entry that has not activated, and you can add new entries with future timestamps.
- Disabling a precompile prevents all calls and clears its storage, allowing it to be re-enabled later with fresh configuration.
Loading...
Is this guide helpful?
