Skip to content

tools: Fold evmone-t8n into the evmone CLI as a subcommand#1551

Merged
chfast merged 1 commit into
masterfrom
tooling/t8n-subcommand
May 29, 2026
Merged

tools: Fold evmone-t8n into the evmone CLI as a subcommand#1551
chfast merged 1 commit into
masterfrom
tooling/t8n-subcommand

Conversation

@chfast

@chfast chfast commented May 27, 2026

Copy link
Copy Markdown
Member

Replace the standalone evmone-t8n binary with evmone t8n. The
standalone executable is removed.

The command line options are the same, but now parsed by CLI11,
which makes validation strict at parse time:

  • --state.reward range-checked via CLI::Range(-1, INT64_MAX); -1
    remains the "emit pre-state only" sentinel.
  • --input.alloc/env/txs/blobParams must exist (CLI::ExistingFile);
    previously the standalone binary would open and read an empty/
    failed stream.
  • Unknown options now error; previously the hand-rolled if-else
    chain silently ignored them.

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (5d3c673) to head (4bd40cc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1551      +/-   ##
==========================================
+ Coverage   96.97%   97.09%   +0.12%     
==========================================
  Files         163      162       -1     
  Lines       14455    14438      -17     
  Branches     3383     3371      -12     
==========================================
+ Hits        14018    14019       +1     
+ Misses        307      303       -4     
+ Partials      130      116      -14     
Flag Coverage Δ
eest-develop 91.93% <ø> (ø)
eest-develop-gmp 26.52% <0.00%> (+0.03%) ⬆️
eest-legacy 17.49% <0.00%> (-0.07%) ⬇️
eest-libsecp256k1 28.17% <0.00%> (+0.03%) ⬆️
eest-stable 91.86% <ø> (ø)
evmone-unittests 92.77% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 96.01% <ø> (ø)
tooling 87.63% <100.00%> (+0.80%) ⬆️
tests 99.79% <ø> (ø)
Files with missing lines Coverage Δ
tools/evmone/main.cpp 96.21% <100.00%> (+11.59%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR folds the standalone evmone-t8n tool into the existing evmone CLI by adding a t8n subcommand (using CLI11 subcommands), and updates integration tests/CI to use the new entry point.

Changes:

  • Add t8n as an evmone-cli subcommand, wiring options into evmone::tooling::t8n(...).
  • Switch --version handling to app.set_version_flag(...) to short-circuit parsing/callbacks.
  • Remove the evmone-t8n test binary/target and update integration tests + coverage config accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/evmone/main.cpp Adds t8n subcommand and moves t8n argument binding/dispatch into evmone-cli; updates version flag behavior.
test/t8n/t8n.cpp Removes the standalone evmone-t8n implementation.
test/t8n/CMakeLists.txt Removes the evmone-t8n build target.
test/integration/t8n/CMakeLists.txt Updates integration tests to run evmone-cli t8n and adds a chainid parsing test.
test/CMakeLists.txt Drops test/t8n from the test build and removes evmone-t8n from the target list.
circle.yml Removes evmone-t8n from the coverage binary collection list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/evmone/main.cpp
Comment thread tools/evmone/main.cpp
Comment thread tools/evmone/main.cpp
@chfast chfast force-pushed the tooling/t8n-subcommand branch from cfbbf5c to 4c340b3 Compare May 27, 2026 17:45
Comment thread test/integration/t8n/CMakeLists.txt Outdated
@chfast chfast force-pushed the tooling/t8n-subcommand branch 6 times, most recently from 1adb936 to 8945228 Compare May 28, 2026 19:55
@chfast chfast requested a review from Copilot May 28, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread tools/evmone/main.cpp
Comment on lines +77 to +80
cmd.add_option(
"--state.reward", opts.state_reward, "Block reward in wei (-1 to output pre-state only)")
->check(CLI::Range(int64_t{-1}, std::numeric_limits<int64_t>::max()));
cmd.add_option("--input.alloc", opts.alloc_file, "Pre-state alloc JSON")
Comment thread tools/evmone/main.cpp
Comment on lines +123 to +128
const auto bind_stream = [](auto& s, const fs::path& p) -> decltype(&s) {
if (p.empty())
return nullptr;
s.open(p);
return &s;
};
Comment thread tools/evmone/main.cpp
Replace the standalone evmone-t8n binary with `evmone t8n`. The
standalone executable is removed.

The command line options are the same, but now parsed by CLI11,
which makes validation strict at parse time:

- --state.reward range-checked via CLI::Range(-1, INT64_MAX); -1
  remains the "emit pre-state only" sentinel.
- --input.alloc/env/txs/blobParams must exist (CLI::ExistingFile);
  previously the standalone binary would open and read an empty/
  failed stream.
- Unknown options now error; previously the hand-rolled if-else
  chain silently ignored them.
@chfast chfast force-pushed the tooling/t8n-subcommand branch from 8945228 to 4bd40cc Compare May 28, 2026 22:11
@chfast chfast merged commit 0cd0dec into master May 29, 2026
23 checks passed
@chfast chfast deleted the tooling/t8n-subcommand branch May 29, 2026 06:01
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