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

FullSync instead of FastSync #3980

Merged
merged 1 commit into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ make erigon
./build/bin/erigon
```

Default `--syncmode=snap` for `mainnet`, `goerli`, `bsc`. Other networks now have default `--syncmode=fast`. Increase download speed by flag `--torrent.download.rate=20mb`. <code>🔬 See [Downloader docs](./cmd/downloader/readme.md)</code>
Default `--syncmode=snap` for `mainnet`, `goerli`, `bsc`. Other networks now have default `--syncmode=full`. Increase download speed by flag `--torrent.download.rate=20mb`. <code>🔬 See [Downloader docs](./cmd/downloader/readme.md)</code>

Use `--datadir` to choose where to store data.

Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ var (
}
SyncModeFlag = cli.StringFlag{
Name: "syncmode",
Usage: `Default: "snap" for BSC, Mainnet and Goerli. "fast" in all other cases`,
Usage: `Default: "snap" for BSC, Mainnet and Goerli. "full" in all other cases`,
}
// Transaction pool settings
TxPoolDisableFlag = cli.BoolFlag{
Expand Down
10 changes: 5 additions & 5 deletions eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var LightClientGPO = gasprice.Config{

// Defaults contains default settings for use on the Ethereum main net.
var Defaults = Config{
SyncMode: FastSync,
SyncMode: FullSync,
Ethash: ethash.Config{
CachesInMem: 2,
CachesLockMmap: false,
Expand Down Expand Up @@ -290,20 +290,20 @@ func CreateConsensusEngine(chainConfig *params.ChainConfig, logger log.Logger, c
type SyncMode string

const (
FastSync SyncMode = "fast"
FullSync SyncMode = "full"
SnapSync SyncMode = "snap"
)

func SyncModeByChainName(chain, syncCliFlag string) SyncMode {
if syncCliFlag == "fast" {
return FastSync
if syncCliFlag == "full" {
return FullSync
} else if syncCliFlag == "snap" {
return SnapSync
}
switch chain {
case networkname.MainnetChainName, networkname.BSCChainName, networkname.GoerliChainName:
return SnapSync
default:
return FastSync
return FullSync
}
}
2 changes: 1 addition & 1 deletion turbo/snapshotsync/snapshotsynccli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func EnsureNotChanged(tx kv.GetPut, cfg ethconfig.Snapshot) error {
if v {
return fmt.Errorf("we recently changed default of --syncmode flag, please add flag --syncmode=snap")
} else {
return fmt.Errorf("we recently changed default of --syncmode flag, please add flag --syncmode=fast")
return fmt.Errorf("we recently changed default of --syncmode flag, please add flag --syncmode=full")
}
}
return nil
Expand Down