Skip to content

Commit

Permalink
purge most PragueEIP7692 and Cancun7692 references
Browse files Browse the repository at this point in the history
Signed-off-by: Danno Ferrin <[email protected]>
  • Loading branch information
shemnon committed Oct 3, 2024
1 parent 855c0c0 commit 9366616
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .github/configs/evm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ eip7692:
impl: evmone
repo: ethereum/evmone
ref: master
eip7692-prague:
osaka-devnet-0:
impl: besu
repo: hyperledger/besu
ref: main
Expand Down
10 changes: 3 additions & 7 deletions .github/configs/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ develop:
evm-type: develop
fill-params: --from=Cancun --until=Prague
solc: 0.8.21
eip7692:
evm-type: eip7692
fill-params: --fork=CancunEIP7692 ./tests/prague
solc: 0.8.21
eip7692-prague:
evm-type: eip7692-prague
fill-params: --fork=PragueEIP7692 ./tests/prague -k "not slow"
osaka-devnet-0:
evm-type: osaka-devnet-0
fill-params: --fork=Osaka ./tests/osaka -k "not slow"
solc: 0.8.21
pectra-devnet-3:
evm-type: pectra-devnet-3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
echo "$files" | while read line; do
file=$(echo "$line" | cut -c 3-)
uv run fill $file --until=Cancun --evm-bin evmone-t8n --solc-version=0.8.25 || true >> filloutput.log 2>&1
(uv run fill $file --fork=CancunEIP7692 --evm-bin evmone-t8n --solc-version=0.8.25 -k eof_test || true) > >(tee -a filloutput.log filloutputEOF.log) 2>&1
(uv run fill $file --fork=Osaka --evm-bin evmone-t8n --solc-version=0.8.25 -k eof_test || true) > >(tee -a filloutput.log filloutputEOF.log) 2>&1
done
if grep -q "FAILURES" filloutput.log; then
Expand Down
116 changes: 0 additions & 116 deletions src/ethereum_test_forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,122 +936,6 @@ def engine_forkchoice_updated_version(
return 3


class CancunEIP7692( # noqa: SC200
Cancun,
transition_tool_name="Prague", # Evmone enables (only) EOF at Prague
blockchain_test_network_name="Prague", # Evmone enables (only) EOF at Prague
solc_name="cancun",
):
"""
Cancun + EIP-7692 (EOF) fork
"""

@classmethod
def evm_code_types(cls, block_number: int = 0, timestamp: int = 0) -> List[EVMCodeType]:
"""
EOF V1 is supported starting from this fork.
"""
return super(CancunEIP7692, cls,).evm_code_types( # noqa: SC200
block_number,
timestamp,
) + [EVMCodeType.EOF_V1]

@classmethod
def call_opcodes(
cls, block_number: int = 0, timestamp: int = 0
) -> List[Tuple[Opcodes, EVMCodeType]]:
"""
EOF V1 introduces EXTCALL, EXTSTATICCALL, EXTDELEGATECALL.
"""
return [
(Opcodes.EXTCALL, EVMCodeType.EOF_V1),
(Opcodes.EXTSTATICCALL, EVMCodeType.EOF_V1),
(Opcodes.EXTDELEGATECALL, EVMCodeType.EOF_V1),
] + super(
CancunEIP7692, cls # noqa: SC200
).call_opcodes(
block_number, timestamp
)

@classmethod
def create_opcodes(
cls, block_number: int = 0, timestamp: int = 0
) -> List[Tuple[Opcodes, EVMCodeType]]:
"""
EOF V1 introduces `EOFCREATE`.
"""
return [(Opcodes.EOFCREATE, EVMCodeType.EOF_V1),] + super(
CancunEIP7692, cls # noqa: SC200
).create_opcodes(block_number, timestamp)

@classmethod
def is_deployed(cls) -> bool:
"""
Flags that the fork has not been deployed to mainnet; it is under active
development.
"""
return False

@classmethod
def solc_min_version(cls) -> Version:
"""
Returns the minimum version of solc that supports this fork.
"""
return Version.parse("1.0.0") # set a high version; currently unknown


class PragueEIP7692( # noqa: SC200
Prague,
transition_tool_name="Prague", # Besu enables EOF at Prague
blockchain_test_network_name="Prague", # Besu enables EOF at Prague
solc_name="cancun",
):
"""
Prague + EIP-7692 (EOF) fork
"""

@classmethod
def evm_code_types(cls, block_number: int = 0, timestamp: int = 0) -> List[EVMCodeType]:
"""
EOF V1 is supported starting from this fork.
"""
return super(PragueEIP7692, cls,).evm_code_types( # noqa: SC200
block_number,
timestamp,
) + [EVMCodeType.EOF_V1]

@classmethod
def call_opcodes(
cls, block_number: int = 0, timestamp: int = 0
) -> List[Tuple[Opcodes, EVMCodeType]]:
"""
EOF V1 introduces EXTCALL, EXTSTATICCALL, EXTDELEGATECALL.
"""
return [
(Opcodes.EXTCALL, EVMCodeType.EOF_V1),
(Opcodes.EXTSTATICCALL, EVMCodeType.EOF_V1),
(Opcodes.EXTDELEGATECALL, EVMCodeType.EOF_V1),
] + super(
PragueEIP7692, cls # noqa: SC200
).call_opcodes(
block_number, timestamp
)

@classmethod
def is_deployed(cls) -> bool:
"""
Flags that the fork has not been deployed to mainnet; it is under active
development.
"""
return False

@classmethod
def solc_min_version(cls) -> Version:
"""
Returns the minimum version of solc that supports this fork.
"""
return Version.parse("1.0.0") # set a high version; currently unknown

class Osaka( # noqa: SC200
Prague,
transition_tool_name="Osaka", # Besu enables EOF at Prague
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_plugins/filler/gen_test_doc/page_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def apply_name_filters(input_string: str):
"""
Apply a list of capitalizations/regexes to names used in titles & nav menus.
Note: As of PragueEIP7692 With 634 doc pages, this function constitutes ~2.0s
Note: As of Osaka With 634 doc pages, this function constitutes ~2.0s
of the total runtime (~5.5s). This seems to be insignificant with the time
taken by mkdocstrings to include the docstrings in the final output (which)
is a separate mkdocs "build-step" occurs outside the scope of this plugin.
Expand Down
10 changes: 5 additions & 5 deletions tests/osaka/eip7692_eof_v1/eof_tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
- [x] Container without type section ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_section_order.py::test_section_order`](./eip3540_eof_v1/test_section_order/index.md) `-k 'SectionTest.MISSING-section_kind_TYPE'`)
- [x] Container without code sections ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_section_order.py::test_section_order`](./eip3540_eof_v1/test_section_order/index.md) `-k 'SectionTest.MISSING-section_kind_CODE'`)
- [x] Container without data section ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_section_order.py::test_section_order`](./eip3540_eof_v1/test_section_order/index.md) `-k 'SectionTest.MISSING-section_kind_DATA'`)
- [x] Valid containers without data section and with subcontainers ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_CancunEIP7692-eof_test-single_subcontainer_without_data]`)
- [x] Valid containers with data section and with subcontainers ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_CancunEIP7692-eof_test-single_subcontainer_with_data]`)
- [x] Valid container with maximum number of subcontainers ([`tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_wide_container`](./eip7620_eof_create/test_subcontainer_validation/test_wide_container.md)`[fork_CancunEIP7692-eof_test-256]`)
- [x] Container with number of subcontainers above the limit ([`tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_wide_container`](./eip7620_eof_create/test_subcontainer_validation/test_wide_container.md)`[fork_CancunEIP7692-eof_test-257]`)
- [x] Valid containers without data section and with subcontainers ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_Osaka-eof_test-single_subcontainer_without_data]`)
- [x] Valid containers with data section and with subcontainers ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_Osaka-eof_test-single_subcontainer_with_data]`)
- [x] Valid container with maximum number of subcontainers ([`tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_wide_container`](./eip7620_eof_create/test_subcontainer_validation/test_wide_container.md)`[fork_Osaka-eof_test-256]`)
- [x] Container with number of subcontainers above the limit ([`tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_wide_container`](./eip7620_eof_create/test_subcontainer_validation/test_wide_container.md)`[fork_Osaka-eof_test-257]`)
- [x] Subcontainer section header truncated before subcontainer number ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k no_container_section_count`)
- [x] Subcontainer section header truncated before subcontainer size ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k incomplete_container_section_count`)
- [x] Truncated subcontainer size ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k no_container_section_size`, [`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k incomplete_container_section_size`)
Expand All @@ -76,7 +76,7 @@
- [x] Multiple container section headers ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k multiple_container_headers`)
- [x] Invalid subcontainer ([`tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py`](./eip7620_eof_create/test_subcontainer_validation/index.md)`-k invalid`)
- [x] Invalid subcontainer on a deep nesting level ([`tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_deep_container`](./eip7620_eof_create/test_subcontainer_validation/test_deep_container.md))
- [x] Max number of inputs/outputs in a section ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_CancunEIP7692-eof_test-code_section_input_maximum]`, [`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_CancunEIP7692-eof_test-code_section_output_maximum]`)
- [x] Max number of inputs/outputs in a section ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_Osaka-eof_test-code_section_input_maximum]`, [`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py::test_valid_containers`](./eip3540_eof_v1/test_container_validation/test_valid_containers.md)`[fork_Osaka-eof_test-code_section_output_maximum]`)
- [x] Number of inputs/outputs in a section above the limit ([`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k code_section_input_too_large`, [`tests/osaka/eip7692_eof_v1/eip3540_eof_v1/test_container_validation.py`](./eip3540_eof_v1/test_container_validation/index.md)`-k code_section_output_too_large`)

### Execution
Expand Down

0 comments on commit 9366616

Please sign in to comment.