Skip to content

feat(cli): Add load_from_logs cli command to load blocks and transactions as they are found in a log dump#1034

Merged
msbrogli merged 1 commit intomasterfrom
feat/run_from_logs
May 28, 2024
Merged

feat(cli): Add load_from_logs cli command to load blocks and transactions as they are found in a log dump#1034
msbrogli merged 1 commit intomasterfrom
feat/run_from_logs

Conversation

@msbrogli
Copy link
Member

@msbrogli msbrogli commented May 10, 2024

Motivation

This new command makes it easier to replay logs generated using --log-vertex-bytes (#1033).

I initially thought that we could replay even the timestamp by using a custom reactor and getting a tighter control of the time. But it was not needed yet for my debugging so I decided to postpone it to another PR.

Acceptance Criteria

  1. Add command load_from_logs that loads blocks and transactions as they are found in a log dump generated using --log-vertex-bytes. All vertices are processed in the same order as they appear in the log file.
  2. The full node exits after the replay is complete.
  3. All arguments from run_node are available so one can configure the environment where the replay will take place. A new required argument --log-dump was added to get the path of the log file that will be replayed.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@msbrogli msbrogli requested a review from jansegre as a code owner May 10, 2024 16:20
@msbrogli msbrogli self-assigned this May 10, 2024
@msbrogli msbrogli force-pushed the feat/run_from_logs branch 2 times, most recently from 8b85724 to d318e5a Compare May 10, 2024 16:36
@codecov
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.90%. Comparing base (9b1c03e) to head (87caccd).

Current head 87caccd differs from pull request most recent head d862f01

Please upload reports for the commit d862f01 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1034      +/-   ##
==========================================
+ Coverage   84.89%   84.90%   +0.01%     
==========================================
  Files         297      297              
  Lines       22913    22910       -3     
  Branches     3465     3464       -1     
==========================================
  Hits        19451    19451              
- Misses       2773     2774       +1     
+ Partials      689      685       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msbrogli msbrogli requested a review from glevco May 13, 2024 18:38
glevco
glevco previously approved these changes May 15, 2024
jansegre
jansegre previously approved these changes May 23, 2024
@msbrogli msbrogli dismissed stale reviews from jansegre and glevco via d2e5c88 May 28, 2024 14:22
@msbrogli msbrogli force-pushed the feat/run_from_logs branch from d318e5a to d2e5c88 Compare May 28, 2024 14:22
@msbrogli msbrogli changed the title feat(cli): Add run_from_logs cli command to replay blocks and transactions from a log file feat(cli): Add load_from_logs cli command to load blocks and transactions as they are found in a log dump May 28, 2024
@msbrogli msbrogli force-pushed the feat/run_from_logs branch 2 times, most recently from 4fe2936 to 87caccd Compare May 28, 2024 15:07
@msbrogli msbrogli force-pushed the feat/run_from_logs branch from 87caccd to d862f01 Compare May 28, 2024 17:04
@msbrogli msbrogli merged commit d862f01 into master May 28, 2024
@msbrogli msbrogli deleted the feat/run_from_logs branch May 28, 2024 17:05
This was referenced May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants