Skip to content
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

leap-util should show number of blocks in blocks.log #1146

Closed
Rossco99 opened this issue May 9, 2023 · 5 comments · Fixed by #1155
Closed

leap-util should show number of blocks in blocks.log #1146

Rossco99 opened this issue May 9, 2023 · 5 comments · Fixed by #1155
Assignees
Labels
actionable bug Something isn't working 👍 lgtm

Comments

@Rossco99
Copy link

Rossco99 commented May 9, 2023

Previously the eosio-blocklog tool would show the number of blocks in a blocks.log when running a smoke-test.

This was useful for maintenance and visibility of a blocks.log contents.

The new leap-util does not show this detail when running a smoke-test and should be reintroduced.

@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog May 9, 2023
@heifner heifner added bug Something isn't working actionable and removed triage labels May 9, 2023
@matthewdarwin
Copy link

Output in a nice easy-to-parse format is welcome.

@vladtr
Copy link
Contributor

vladtr commented May 10, 2023

Do you know by any chance in which version of leap eosio-blocklog showed number of blocks in smoke-test? I am looking at the older code and I can see it is being reported only when there is a disagreement between log/index

void smoke_test(bfs::path block_dir) {

I tested leap-util and when disagreement happens it shows blocks num in error as well:
image

It is trivial to add it to successful check as well. Any suggestions on the reporting format?

@Rossco99
Copy link
Author

Rossco99 commented May 10, 2023

It used to be in eosio 2.0.x and leap v3.1.0


Smoke test of blocks.log and blocks.index in directory "/home/eosphere/datavolume2/telosblocks1/blocks"
info  2023-05-10T01:40:49.999 eosio-blo block_log.cpp:1321            trim_data            ] block log version= 2
info  2023-05-10T01:40:50.024 eosio-blo block_log.cpp:1375            trim_data            ] first block= 1
info  2023-05-10T01:40:50.024 eosio-blo block_log.cpp:1376            trim_data            ] last block= 277456401
blocks.log and blocks.index agree on number of blocks

no problems found

@matthewdarwin
Copy link

--format=json parameter to format as json is welcome, especially if generally applied to all (relevant) commands

@vladtr
Copy link
Contributor

vladtr commented May 10, 2023

--format=json parameter to format as json is welcome, especially if generally applied to all (relevant) commands

Thank you! I'll add a separate issue to have json output available where applicable to the commands in leap-util.

@vladtr vladtr self-assigned this May 10, 2023
vladtr added a commit that referenced this issue May 10, 2023
[4.0] Added block log version and num of blocks to output of leap-util block-log smoke-test
@vladtr vladtr moved this from Todo to Awaiting Review in Team Backlog May 10, 2023
vladtr added a commit that referenced this issue May 11, 2023
[4.0 -> main] Added block log version and num of blocks to output of leap-util block-log smoke-test
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Team Backlog May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment