Skip to content

chore: remove hardcoded fork reference osaka and fetch latest fork #1337

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 38 commits into
base: forks/osaka
Choose a base branch
from

Conversation

Dyslex7c
Copy link

What was wrong?

Related to Issue #1330
Hardcoded fork reference osaka was being used in tox.ini

How was it fixed?

Implemented a CLI command ethereum-spec-forks to fetch hardfork information. Used it in tox.ini to fetch the latest fork.

Closes #1330

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

SamWilsn and others added 30 commits June 25, 2025 20:02
* Update to latest EIP-7918

* EIP-7918 t8n tool update

---------

Co-authored-by: Sam Wilson <[email protected]>
Co-authored-by: Guruprasad Kamath <[email protected]>
* feat(vm): add eip-7939 count leading zeros opcode.

* Update src/ethereum/osaka/vm/instructions/bitwise.py

Co-authored-by: Guruprasad Kamath <[email protected]>

* code formatting

---------

Co-authored-by: Guruprasad Kamath <[email protected]>
Co-authored-by: Guruprasad Kamath <[email protected]>
…state management and interpreter. Updated comments for clarity on the implications of SELFDESTRUCT.
update exceptions for other forks

fix tests

use fork module

rename to NonceOverFlowError

revert load test catching specific exc

style: indent comment line
- ignore all pytest functions
- remove unused variables, functions, methods, and classes
- create vulture whitelist and mark some code that either implicitly
  gets called or only gets called during test runs for vulture to ignore
souradeep-das and others added 7 commits July 15, 2025 14:22
* update dependencies

* add fill to the entry points

* add eest tests

* run eest tests in py3

* create EELS TransitionTool subclass

* post review fix and latest eest

* remove pytest-eest.ini

* minor fix: fix tox config

* minor fix: add vulture exception

* run eest tests in pypy

* update optimized tox command
pyproject.toml Outdated
@@ -34,6 +34,7 @@ dependencies = [
package-dir = {"" = "src"}
packages = [
"ethereum_spec_tools",
"ethereum_spec_tools.cli",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other CLI tools exist directly under ethereum_spec_tools. For consistency, this tool should as well.

from hardfork import Hardfork


def get_fork_by_index(forks: List[Hardfork], index: int) -> Optional[Hardfork]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm partial to omitting get_.

Suggested change
def get_fork_by_index(forks: List[Hardfork], index: int) -> Optional[Hardfork]:
def fork_by_index(forks: List[Hardfork], index: int) -> Optional[Hardfork]:

Comment on lines 24 to 35
if index < 0:
# Negative indexing: -1 is last, -2 is second last, etc.
if abs(index) <= len(forks):
return forks[index]
else:
return None
else:
# Positive indexing: 0 is first (Frontier), 1 is second, etc.
if index < len(forks):
return forks[index]
else:
return None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python lists natively support negative indexing. Is there something that makes return forks[index] infeasible?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes if the index is out if bounds, it looks more verbose than a try-catch block which is slower in case an exception occurs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we care that much about performance in this tool 🤣

commands =
fill \
-m "not slow and not zkevm and not benchmark" \
-n auto --maxprocesses 6 \
--basetemp="{temp_dir}/pytest" \
--clean \
eest_tests/execution-spec-tests/tests
fill \
bash -c 'fill \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This'll break our CI on Windows... There's no other way to do a variable substitution from a command?

If not, I don't think this approach will work after all. We might have to do it as a pytest plugin (or something in conftest.py) that takes a --fork-number argument instead of a separate command line tool.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can create platform specific commands separately for windows, although I'm not sure if that will work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to avoid anything platform specific if we can.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't think of any other way to implement variable substitution that is platform agnostic. The only way that comes to my mind is probably running it as a python script

@Dyslex7c
Copy link
Author

@SamWilsn I've added all the changes you've mentioned, please do take a look

@Dyslex7c Dyslex7c requested a review from SamWilsn July 23, 2025 11:04
@SamWilsn SamWilsn force-pushed the forks/osaka branch 2 times, most recently from 301eb89 to 5a49b2f Compare July 25, 2025 19:55
@SamWilsn
Copy link
Contributor

I've rebased forks/osaka to pick up the last straggling commits from master. If you do something like this, should be easy enough to resolve the conflicts:

git checkout forks/osaka
git pull
git checkout tox/remove-hardcoded-fork-osaka
git reset --hard forks/osaka
git cherry-pick 6e993fca90bea968771bf6decebb2cc5e6cfed4d
git cherry-pick 52403548c40109a32b66316224ebb6141c580ea1

@Dyslex7c
Copy link
Author

I've rebased forks/osaka to pick up the last straggling commits from master. If you do something like this, should be easy enough to resolve the conflicts:

git checkout forks/osaka
git pull
git checkout tox/remove-hardcoded-fork-osaka
git reset --hard forks/osaka
git cherry-pick 6e993fca90bea968771bf6decebb2cc5e6cfed4d
git cherry-pick 52403548c40109a32b66316224ebb6141c580ea1

For some reason, it's showing my forks/osaka branch is 36 commits ahead of, 45 commits behind ethereum/execution-specs:forks/osaka. What to do now? I can't sync the latest changes

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.

Single source in-development fork name