Expand description
Tempo-specific hardfork definitions and traits.
This module provides the infrastructure for managing hardfork transitions in Tempo.
§Adding a New Hardfork
When a new hardfork is needed (e.g., Vivace):
§In hardfork.rs:
- Add a new variant to
TempoHardforkenum - Add
is_vivace()method toTempoHardforkimpl - Add
is_vivace_active_at_timestamp()toTempoHardforkstrait - Update
tempo_hardfork_at()to check for the new hardfork first (latest hardfork is checked first) - Add
TempoHardfork::Vivace => Self::OSAKA(or appropriate SpecId) inFrom<TempoHardfork> for SpecId - Update
From<SpecId> for TempoHardforkto check for the new hardfork first - Add test
test_is_vivaceand update existingis_*tests to include the new variant
§In spec.rs:
- Add
vivace_time: Option<u64>field toTempoGenesisInfo - Extract
vivace_timeinTempoChainSpec::from_genesis - Add
(TempoHardfork::Vivace, vivace_time)totempo_forksvec - Update tests to include
"vivaceTime": <timestamp>in genesis JSON
§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"to chain_config.extra_fields
§Current State
The Adagio variant is a placeholder representing the pre-hardfork baseline.
Enums§
- Tempo
Hardfork - Tempo-specific hardforks for network upgrades.
Traits§
- Tempo
Hardforks - Trait for querying Tempo-specific hardfork activations.