Skip to content

Commit

Permalink
chore(l1): set full sync as default. (#1905)
Browse files Browse the repository at this point in the history
**Motivation**
Before enabling snap sync as the default, we want to have everything
working smoothly with full sync.

**Description**
- Changes the default sync mode to full.
  • Loading branch information
mpaulucci authored Feb 11, 2025
1 parent a06b0ad commit d17fcba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ ethrex supports the following command line arguments:
- `--discovery.port <PORT>`: UDP port for P2P discovery. Default value: 30303.
- `--bootnodes <BOOTNODE_LIST>`: Comma separated enode URLs for P2P discovery bootstrap.
- `--log.level <LOG_LEVEL>`: The verbosity level used for logs. Default value: info. possible values: info, debug, trace, warn, error
- `--syncmode <SYNC_MODE>`: The way in which the node will sync its state. Can be either "full" or "snap" with "snap" as default value.
- `--syncmode <SYNC_MODE>`: The way in which the node will sync its state. Can be either "full" or "snap" with "full" as default value.
- `--evm <EVM_BACKEND>`: Has to be `levm` or `revm`. Default value: `revm`.

# ethrex L2
Expand Down
1 change: 1 addition & 0 deletions cmd/ethrex/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub fn cli() -> Command {
Arg::new("syncmode")
.long("syncmode")
.required(false)
.default_value("full")
.value_name("SYNC_MODE"),
)
.arg(
Expand Down
12 changes: 4 additions & 8 deletions cmd/ethrex/ethrex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,10 @@ fn parse_socket_addr(addr: &str, port: &str) -> io::Result<SocketAddr> {

fn sync_mode(matches: &clap::ArgMatches) -> SyncMode {
let syncmode = matches.get_one::<String>("syncmode");
if let Some(syncmode) = syncmode {
match &**syncmode {
"full" => SyncMode::Full,
"snap" => SyncMode::Snap,
other => panic!("Invalid syncmode {other} expected either snap or full"),
}
} else {
SyncMode::Snap
match syncmode {
Some(mode) if mode == "full" => SyncMode::Full,
Some(mode) if mode == "snap" => SyncMode::Snap,
other => panic!("Invalid syncmode {:?} expected either snap or full", other),
}
}

Expand Down

0 comments on commit d17fcba

Please sign in to comment.