Skip to content

feat(forks): Implement transition_time method #1530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArunRawat404
Copy link
Contributor

🗒️ Description

• Added transition_time() in the Paris class to return the transition timestamp 15_000.
• Currently, it is only implemented in the Paris class, and I’d like to know if it should be moved to BaseFork or stay specific to Paris class. Seeking feedback on where to add this method in BaseFork for global usage across forks.

🔗 Related Issues

#1472

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.

@marioevz
Copy link
Member

marioevz commented May 5, 2025

Thanks! I think this method should instead live in the https://github.com/ethereum/execution-spec-tests/blob/main/src/ethereum_test_forks/transition_base_fork.py file and follow the same pattern as transitions_to/transitions_from:

@classmethod
def transitions_to(cls) -> Fork:
"""Return fork where the transition ends."""
raise Exception("Not implemented")
@classmethod
def transitions_from(cls) -> Fork:
"""Return fork where the transition starts."""
raise Exception("Not implemented")

NewTransitionClass.transitions_to = lambda: to_fork # type: ignore
NewTransitionClass.transitions_from = lambda: from_fork # type: ignore

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.

2 participants