Conversation
|
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #2495 +/- ##
==========================================
- Coverage 71.68% 71.61% -0.07%
==========================================
Files 488 489 +1
Lines 60828 61100 +272
==========================================
+ Hits 43603 43758 +155
- Misses 17225 17342 +117
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
|
gakonst
left a comment
There was a problem hiding this comment.
some ideas to simplify further per my comment in the original issue. also we want reth.toml to also follow the datadir, vs being left hanging outside of it. NO file should be outside of the datadir.
|
Ok, now: With custom dir: |
|
removing the extra dirs next |
|
New structure: |
| /// The path to the database folder. If not specified, it will be set in the data dir for the | ||
| /// chain being used. | ||
| #[arg(long, value_name = "PATH", verbatim_doc_comment)] | ||
| db: Option<PathBuf>, |
There was a problem hiding this comment.
let's remove in follow-up, open issue and we can have 3rd party close it
| /// The path to the database folder. If not specified, it will be set in the data dir for the | ||
| /// chain being used. | ||
| #[arg(long, value_name = "PATH", verbatim_doc_comment)] | ||
| db: Option<PathBuf>, | ||
|
|
|
|
||
| /// Returns the path to the db directory for this chain. | ||
| pub fn db_path(&self) -> PathBuf { | ||
| self.0.join("db").into() | ||
| } | ||
|
|
||
| /// Returns the path to the reth p2p secret key for this chain. | ||
| pub fn p2p_secret_path(&self) -> PathBuf { | ||
| self.0.join("discovery-secret").into() | ||
| } | ||
|
|
||
| /// Returns the path to the known peers file for this chain. | ||
| pub fn known_peers_path(&self) -> PathBuf { | ||
| self.0.join("known-peers.json").into() | ||
| } | ||
|
|
||
| /// Returns the path to the config file for this chain. | ||
| pub fn config_path(&self) -> PathBuf { | ||
| self.0.join("reth.toml").into() | ||
| } | ||
|
|
||
| /// Returns the path to the jwtsecret file for this chain. | ||
| pub fn jwt_path(&self) -> PathBuf { | ||
| self.0.join("jwt.hex").into() | ||
| } | ||
| } |
WIP attempt at changing the reth directory structure to revolve around a data directory with chain-specific directories for all other node data.
The new structure will revolve around the
--datadircommand line argument, which will set up folders for chains by either their chain ID, or name (e.g. mainnet), depending on whether or not we have specific names for the chain being run.Fixes #2179
TODO:
--data-dir/--datadir