Repository navigation
feat(chainspec): hardcode Longevity testnet hardfork timestamps - #843
Open
nekomoto911 wants to merge 4 commits into
Open
nekomoto911 wants to merge 4 commits into
nekomoto911 wants to merge 4 commits into
Conversation
The binary becomes the authoritative source of every testnet fork time, as it already is for mainnet. Values equal the on-chain activations: Prague, Osaka, Alpha, Beta, Gamma, TestnetOwnerFix, TestnetOwnerFixV2. The override table now also covers gammaTime, testnetOwnerFixTime and testnetOwnerFixV2Time; mainnet pins all three to absent, so a genesis gammaTime cannot activate Gamma on a single mainnet node.
Every timestamp in the HARDCODED table, including mainnet Prague, is now a named constant in fork_times.rs, documented with its date, activation block and observed effect. The table only references constants; pin tests keep literal values as the independent check.
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
7771625) hardfork timestamps become binary-authoritative, like mainnet already is. A testnet node now schedules Prague, Osaka, Alpha, Beta, Gamma, TestnetOwnerFix and TestnetOwnerFixV2 at the on-chain activation timestamps regardless of its genesis file.genesis/testnet/genesis.jsonlackstestnetOwnerFixV2Time, so a node started from it would never schedule TestnetOwnerFixV2 and would diverge replaying block32664162. Target release:v1.10.1(next testnet upgrade).Architecture and Key Decisions
HARDCODEDoverride table inbin/gravity_node/src/chainspec.rs; no new mechanism. The table now covers every Gravity key greth reads from genesis:alphaTime,betaTime,gammaTime,testnetOwnerFixTime,testnetOwnerFixV2Time(plus typedprague_time/osaka_time). The duplicated per-key blocks inapply_overridesare folded into one loop; event format and order are unchanged, new keys report afterbetaTime.bin/gravity_node/src/fork_times.rs, documented with its date, activation block and observed effect; theHARDCODEDtable only references constants. Pin tests keep literal values as the independent check.LONGEVITY_TESTNET_CHAIN_ID.gammaTimefrom activating Gamma on a single mainnet node before the mainnet time is pinned.Activation evidence (public testnet RPC, 2026-09-30): for each value, the first block with
timestamp >= valuehas its predecessor one second earlier, and the fork's state effect appears in that block.178090944210845641783328400107878231785812400178710840025666608NativeOracleruntime swapped (4602 → 3904 bytes)178849080030922944pendingOwnerset178894800032664162pendingOwnerset to cast-derived addressRisks and Remaining Work
v1.10.1binary remains a release gate.testnetOwnerFixV2Timelog oneWARN [GravityChainSpecParser] ... binary forces testnetOwnerFixV2Time = 1788948000; genesis says <unset>line at startup and run normally.cargo clippy -p gravity_nodewith dependencies fails oncrates/apiFailpointConfResponsedead code under-D warnings.Breaking Changes
None. Hardcoded values equal on-chain activations; live mainnet genesis (SDK and
gravity-mainnet-gitops) has none of the three new keys, so mainnet schedule and startup output are unchanged.Database Migrations
None.
Verification
RUSTFLAGS="--cfg tokio_unstable" cargo test -p gravity_node→ 57 passed (38 inchainspec), re-run after thefork_times.rsmove. The new testnet tests were observed failing before the testnet entry existed;repository_testnet_genesis_never_contradicts_tablefailed withTestnetOwnerFixV2: left Never, right Timestamp(1788948000).cargo +nightly-2026-09-05 fmt --all -- --check→ clean.RUSTFLAGS="--cfg tokio_unstable" cargo clippy -p gravity_node --no-deps --all-targets --all-features -- -D warnings→ clean.ChainSpectransform proven at the parser boundary with the real repository testnet genesis; the startup funnel is unchanged.Merge Order
None.
Related PRs
None.