Skip to content

Comments

feat: write pruning config if --full is present#7938

Merged
mattsse merged 4 commits intoparadigmxyz:mainfrom
lakshya-sky:write-pruning-config
May 2, 2024
Merged

feat: write pruning config if --full is present#7938
mattsse merged 4 commits intoparadigmxyz:mainfrom
lakshya-sky:write-pruning-config

Conversation

@lakshya-sky
Copy link
Contributor

Closes #7923

  • Save prune config to reth.toml.
  • warn if prune config present but run with --full.

@lakshya-sky lakshya-sky marked this pull request as ready for review April 28, 2024 02:01
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I believe this should do it

can we add a simple test case for this using the LaunchContext struct

similar test setup as these

https://github.com/paradigmxyz/reth/blob/7b2dbd5daed9cda1a11f1b6ff599d2d7e93fa0e2/crates/config/src/config.rs#L342-L348

@mattsse mattsse added C-enhancement New feature or request A-cli Related to the reth CLI labels Apr 28, 2024
@lakshya-sky lakshya-sky requested a review from gakonst as a code owner April 29, 2024 15:38
@lakshya-sky
Copy link
Contributor Author

Changed code structure from previous commit.

  • added method to save config for reth_config::Config.
  • moved concerned logic to a new static method in LaunchContext.
  • added tests.

@lakshya-sky lakshya-sky requested a review from mattsse April 29, 2024 15:57
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

this makes sense to me, iirc we want to replace confy eventually but this works for now

@Rjected Rjected changed the title Write prunning configs if --full is present. Write pruning config if --full is present. Apr 29, 2024
@Rjected Rjected changed the title Write pruning config if --full is present. feat: write pruning config if --full is present. Apr 29, 2024
@Rjected Rjected changed the title feat: write pruning config if --full is present. feat: write pruning config if --full is present Apr 29, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm, ty

@mattsse mattsse added this pull request to the merge queue May 2, 2024
Merged via the queue into paradigmxyz:main with commit bb7f113 May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Related to the reth CLI C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write pruning config to reth.toml when --full is specified

3 participants