Expand description
Tempo-specific hardfork definitions, activation schedules, and protocol constants.
This crate is the lightweight source of truth for Tempo hardfork identifiers. It intentionally
does not depend on tempo-chainspec or Reth, so SDK crates can use TempoHardfork without
pulling in chain-spec/node integration.
§Adding a New Hardfork
When a new hardfork is needed (e.g., Vivace):
§In tempo-hardfork
- Append a
Vivacevariant totempo_hardfork!— automatically:- defines the enum variant via [
hardfork!] - adds the variant to
TempoHardfork::VARIANTS - generates the
is_vivace()inherent helper - exports the variant through
tempo_post_genesis_hardforks!for downstream generated APIs - adds tests for the generated hardfork helpers
- defines the enum variant via [
- Update activation schedule methods/constants for the new fork.
- Update
From<TempoHardfork> for SpecIdif the hardfork requires a different EthereumSpecId.
§In tempo-chainspec
- Add
vivace_time: Option<u64>field toTempoGenesisInfoif the fork is configurable in genesis.fork_time()is generated throughtempo_post_genesis_hardforks!, so missing fields for new hardfork variants fail at compile time.
§In genesis files and generator
- Add
"vivaceTime": 0togenesis/dev.json. - Add
vivace_time: Option<u64>arg toxtask/src/genesis_args.rs. - Add insertion of
"vivaceTime"tochain_config.extra_fields.
Modules§
- constants
- Tempo constants shared by both the published surface and the reth-backed spec implementation.
Macros§
- tempo_
hardfork 🔒 - Single-source hardfork definition macro. Append a new variant and everything else is generated:
- tempo_
post_ genesis_ hardforks - Invokes the given macro with all post-Genesis Tempo hardfork variants.
Enums§
- Tempo
Hardfork - Tempo-specific hardforks for network upgrades.