Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,10 @@ jobs:
docs/**/*.md
*.md

changelog:
name: "Validate Changelog Entries"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/setup-uv
- name: Run changelog validation
run: just changelog

check-should-publish:
name: "Check Should Publish"
runs-on: ubuntu-latest
needs: [lint-md, changelog]
needs: [lint-md]
outputs:
should_publish: ${{ steps.check.outputs.should_publish }}
branch: ${{ steps.check.outputs.branch }}
Expand Down
5 changes: 0 additions & 5 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,6 @@ docs-serve *args:
docs-serve-fast *args:
FAST_DOCS=True uv run mkdocs serve "$@"

# Validate docs/CHANGELOG.md entries
[group('docs')]
changelog:
uv run validate_changelog

# Lint markdown files (markdownlint)
[group('docs')]
lint-md:
Expand Down
1,130 changes: 0 additions & 1,130 deletions docs/CHANGELOG.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/changelog_section_template.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/dev/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Run all docs related checks:
just spellcheck
just lint-md
just docs
just changelog
```

### Local Deployment and Test
Expand Down
2 changes: 0 additions & 2 deletions packages/testing/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Homepage = "https://github.com/ethereum/execution-specs"
Documentation = "https://eest.ethereum.org"
Repository = "https://github.com/ethereum/execution-specs"
Issues = "https://github.com/ethereum/execution-specs/issues"
Changelog = "https://eest.ethereum.org/main/CHANGELOG/"

[dependency-groups]
test = [
Expand Down Expand Up @@ -99,7 +98,6 @@ groupstats = "execution_testing.cli.show_pre_alloc_group_stats:main"
extract_config = "execution_testing.cli.extract_config:extract_config"
compare_fixtures = "execution_testing.cli.compare_fixtures:main"
modify_static_test_gas_limits = "execution_testing.cli.modify_static_test_gas_limits:main"
validate_changelog = "execution_testing.cli.ci_helpers:validate_changelog"
benchmark_parser = "execution_testing.cli.benchmark_parser:main"

[tool.setuptools.packages.find]
Expand Down
52 changes: 1 addition & 51 deletions packages/testing/src/execution_testing/cli/ci_helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
CLI helper commands for CI static checks.

Contains wrappers to markdownlint-cli2 and changelog validation that fail
Contains a wrapper to markdownlint-cli2 validation which fails
silently if external tools are not available, to avoid disruption to
external contributors.
"""
Expand Down Expand Up @@ -96,53 +96,3 @@ def markdownlint(args: tuple[str, ...]) -> None:

command = ["node", markdownlint] + args_list
sys.exit(subprocess.run(command).returncode)


@click.command()
def validate_changelog() -> None:
"""
Validate changelog formatting to ensure bullet points end with proper
punctuation.

Check that all bullet points (including nested ones) end with either:
- A period (.) for regular entries
- A colon (:) for section headers that introduce lists
"""
project_root = find_project_root()
changelog_path = Path(project_root / "docs/CHANGELOG.md")

if not changelog_path.exists():
click.echo(f"❌ Changelog file not found: {changelog_path}")
sys.exit(1)

try:
with open(changelog_path, "r", encoding="utf-8") as f:
content = f.read()
except Exception as e:
click.echo(f"❌ Error reading changelog: {e}.")
sys.exit(1)

# Find bullet points that don't end with period or colon
invalid_lines = []
for line_num, line in enumerate(content.splitlines(), 1):
if re.match(r"^\s*-\s+", line) and re.search(
r"[^\.:]$", line.rstrip()
):
invalid_lines.append((line_num, line.strip()))

if invalid_lines:
click.echo(
f"❌ Found bullet points in {changelog_path} without proper "
"punctuation:"
)
click.echo()
for line_num, line in invalid_lines:
click.echo(f"Line {line_num}: {line}")
click.echo()
click.echo("💡 All bullet points should end with:")
click.echo(" - A period (.) for regular entries.")
click.echo(" - A colon (:) for paragraphs that introduce lists.")
sys.exit(1)
else:
click.echo("✅ All bullet points have proper punctuation!")
sys.exit(0)
29 changes: 15 additions & 14 deletions packages/testing/src/execution_testing/tools/utility/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ def gas_test(
if cold_gas is None:
cold_gas = subject_code.gas_cost(fork)

if cold_gas <= 0:
if cold_gas < 0:
raise ValueError(
f"Target gas allocations (cold_gas) must be > 0, got {cold_gas}"
f"Target gas allocations (cold_gas) must be >= 0, got {cold_gas}"
)
if warm_gas is None:
if subject_code_warm is not None:
Expand All @@ -503,18 +503,12 @@ def gas_test(
balance=subject_balance,
address=subject_address,
)
# 2 times GAS, POP, CALL, 6 times PUSH1 - instructions charged for at every
# gas run
gas_costs = fork.gas_costs()
opcode_gas_cost = gas_costs.BASE
opcode_pop_cost = gas_costs.BASE
opcode_push_cost = gas_costs.VERY_LOW

# Auxiliary instructions charged for at every gas run
gas_single_gas_run = (
2 * opcode_gas_cost
+ opcode_pop_cost
+ gas_costs.WARM_ACCESS
+ 6 * opcode_push_cost
)
Op.GAS + Op.CALL(gas=Op.GAS, address_warm=True) + Op.POP
).gas_cost(fork=fork)

address_legacy_harness = pre.deploy_contract(
code=(
# warm subject and baseline without executing
Expand Down Expand Up @@ -624,8 +618,15 @@ def gas_test(
LEGACY_CALL_SUCCESS
)

gas_sstore = Op.SSTORE(1, 1).gas_cost(fork=fork)
if tx_gas is None:
tx_gas = gas_single_gas_run + cold_gas + 500_000
tx_gas = (
5 * gas_single_gas_run
+ cold_gas
+ 4 * warm_gas
+ 5 * gas_sstore
+ 500_000
)
tx = Transaction(
to=address_legacy_harness, gas_limit=tx_gas, sender=sender
)
Expand Down
4 changes: 1 addition & 3 deletions tests/frontier/opcodes/test_all_opcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,6 @@ def constant_gas_opcodes(fork: Fork) -> Generator[ParameterSet, None, None]:
# delta used by gas_test. Excluded to keep the test meaningful.
if fork.is_eip_enabled(8037) and opcode in (Op.CREATE, Op.CREATE2):
continue
if opcode.gas_cost(fork) == 0:
# zero constant gas opcodes - untestable
continue
yield pytest.param(
opcode,
id=f"{opcode}",
Expand Down Expand Up @@ -267,4 +264,5 @@ def test_constant_gas(
subject_code=opcode,
subject_code_warm=warm_opcode,
tear_down_code=prepare_suffix(opcode),
out_of_gas_testing=opcode.gas_cost(fork) > 0,
)
5 changes: 0 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ commands =
printf '\n\033[1m execution-specs has migrated from tox to just.\033[0m\n Install just: https://just.systems/man/en/pre-built-binaries.html\n\n This tox env can be run using just via:\n \033[1mjust docs\033[0m\n\n'
false

[testenv:changelog]
commands =
printf '\n\033[1m execution-specs has migrated from tox to just.\033[0m\n Install just: https://just.systems/man/en/pre-built-binaries.html\n\n This tox env can be run using just via:\n \033[1mjust changelog\033[0m\n\n'
false

[testenv:markdownlint]
commands =
printf '\n\033[1m execution-specs has migrated from tox to just.\033[0m\n Install just: https://just.systems/man/en/pre-built-binaries.html\n\n This tox env can be run using just via:\n \033[1mjust lint-md\033[0m\n\n'
Expand Down
Loading