Skip to content

refactor(chainspec): rename jadeTime to jadeForkTime#80

Open
panos-xyz wants to merge 1 commit intomainfrom
refactor/rename-jade-time-to-jade-fork-time
Open

refactor(chainspec): rename jadeTime to jadeForkTime#80
panos-xyz wants to merge 1 commit intomainfrom
refactor/rename-jade-time-to-jade-fork-time

Conversation

@panos-xyz
Copy link
Copy Markdown
Contributor

@panos-xyz panos-xyz commented Apr 3, 2026

Summary

  • Rename jadeTime to jadeForkTime across all genesis JSON files and Rust source code
  • Aligns with go-ethereum's jadeForkTime field naming convention, ensuring genesis files are interchangeable between morph-reth and go-ethereum

Changes

  • crates/chainspec/src/genesis.rs: struct field jade_timejade_fork_time (serde auto-renames to jadeForkTime)
  • crates/chainspec/src/spec.rs: update field access
  • crates/chainspec/res/genesis/mainnet.json: JSON key rename
  • crates/chainspec/res/genesis/hoodi.json: JSON key rename
  • crates/node/tests/assets/test-genesis.json: JSON key rename
  • crates/engine-api/src/validator.rs: test helper JSON key
  • crates/node/src/test_utils.rs: string literals and doc comments

Test plan

  • cargo check -p morph-chainspec -p morph-engine-api -p morph-node passes
  • No remaining "jadeTime" references in crates/

Summary by CodeRabbit

  • Refactor
    • Updated Jade hardfork configuration field naming across the chainspec for consistency.

…compatibility

Align the Jade hardfork field name with go-ethereum's `jadeForkTime` convention,
ensuring genesis JSON files are interchangeable between morph-reth and go-ethereum.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c1540a92-a659-49bc-849e-12e9a16f9cf1

📥 Commits

Reviewing files that changed from the base of the PR and between 42d7ede and 38f2ba3.

📒 Files selected for processing (7)
  • crates/chainspec/res/genesis/hoodi.json
  • crates/chainspec/res/genesis/mainnet.json
  • crates/chainspec/src/genesis.rs
  • crates/chainspec/src/spec.rs
  • crates/engine-api/src/validator.rs
  • crates/node/src/test_utils.rs
  • crates/node/tests/assets/test-genesis.json
👮 Files not reviewed due to content moderation or server errors (2)
  • crates/chainspec/res/genesis/hoodi.json
  • crates/chainspec/res/genesis/mainnet.json

📝 Walkthrough

Walkthrough

The Jade hardfork timestamp field in MorphHardforkInfo struct is renamed from jade_time to jade_fork_time, with corresponding updates propagated across the codebase including usages, tests, and JSON configuration assets.

Changes

Cohort / File(s) Summary
Struct Definition
crates/chainspec/src/genesis.rs
Renamed public struct field jade_time to jade_fork_time in MorphHardforkInfo, with serde attribute applying camelCase transformation (jadeForkTime).
Field Usage
crates/chainspec/src/spec.rs
Updated hardfork activation mapping to reference jade_fork_time instead of jade_time when building ForkCondition::Timestamp for MorphHardfork::Jade.
Test Code
crates/engine-api/src/validator.rs, crates/node/src/test_utils.rs
Updated test Genesis configurations to use jadeForkTime config key instead of jadeTime in test setup and assertions.
Test Assets
crates/node/tests/assets/test-genesis.json
Renamed config field from jadeTime to jadeForkTime in test Genesis JSON file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • anylots
  • chengwenxi

Poem

🐰 A timestamp renamed with care,
From jade_time to jade_fork_time fair,
Through configs and tests it hops along,
Consistency strong, the refactor's song! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: renaming jadeTime to jadeForkTime across the codebase for consistency with go-ethereum naming conventions.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/rename-jade-time-to-jade-fork-time

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant