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

reduce/deprecate the usage of the ambiguous term "testnet" #20852

Merged
merged 26 commits into from
Apr 9, 2020
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
61ad875
cmd/utils: make goerli the default testnet
q9f Apr 1, 2020
287608f
cmd/geth: explicitly rename testnet to ropsten
q9f Apr 1, 2020
112edf1
core: explicitly rename testnet to ropsten
q9f Apr 1, 2020
86c0101
params: explicitly rename testnet to ropsten
q9f Apr 1, 2020
8e70856
cmd: explicitly rename testnet to ropsten
q9f Apr 1, 2020
e0c35d7
miner: explicitly rename testnet to ropsten
q9f Apr 1, 2020
b482beb
mobile: allow for returning the goerli spec
q9f Apr 1, 2020
637e57c
tests: explicitly rename testnet to ropsten
q9f Apr 1, 2020
82ece4d
docs: update readme to reflect changes to the default testnet
q9f Apr 1, 2020
1194893
mobile: allow for configuring goerli and rinkeby nodes
q9f Apr 1, 2020
2329902
cmd/geth: revert --testnet back to ropsten and mark as legacy
q9f Apr 1, 2020
89a3002
cmd/util: mark --testnet flag as deprecated
q9f Apr 1, 2020
1e3a1fa
docs: update readme to properly reflect the 3 testnets
q9f Apr 1, 2020
ebbd2b5
cmd/utils: add an explicit deprecation warning on startup
q9f Apr 1, 2020
3996f77
cmd/utils: swap goerli and ropsten in usage
q9f Apr 1, 2020
63deca6
cmd/geth: swap goerli and ropsten in usage
q9f Apr 1, 2020
799499b
cmd/geth: if running a known preset, log it for convenience
q9f Apr 1, 2020
a3da2d4
docs: improve readme on usage of ropsten's testnet datadir
q9f Apr 2, 2020
36be102
cmd/utils: check if legacy `testnet` datadir exists for ropsten
q9f Apr 2, 2020
4bba9f7
cmd/geth: check for legacy testnet path in console command
q9f Apr 2, 2020
aa27cf2
cmd/geth: use switch statement for complex conditions in main
q9f Apr 2, 2020
fbb994c
cmd/geth: move known preset log statement to the very top
q9f Apr 2, 2020
e81738a
cmd/utils: create new ropsten configurations in the ropsten datadir
q9f Apr 2, 2020
5e0f03a
cmd/utils: makedatadir should check for existing testnet dir
q9f Apr 6, 2020
7246651
cmd/geth: add legacy testnet flag to the copy db command
q9f Apr 9, 2020
779cf5d
cmd/geth: add legacy testnet flag to the inspect command
q9f Apr 9, 2020
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
Prev Previous commit
Next Next commit
cmd/geth: move known preset log statement to the very top
  • Loading branch information
q9f committed Apr 2, 2020
commit fbb994cf7790a4d8bea15126fb8ab0888abec899
18 changes: 9 additions & 9 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,6 @@ func main() {
// prepare manipulates memory cache allowance and setups metric system.
// This function should be called before launching devp2p stack.
func prepare(ctx *cli.Context) {
// If we're a full node on mainnet without --cache specified, bump default cache allowance
if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {
// Make sure we're not on any supported preconfigured testnet either
if !ctx.GlobalIsSet(utils.LegacyTestnetFlag.Name) && !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) {
// Nope, we're really on mainnet. Bump that cache up!
log.Info("Bumping default cache on mainnet", "provided", ctx.GlobalInt(utils.CacheFlag.Name), "updated", 4096)
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(4096))
}
}
// If we're running a known preset, log it for convenience.
switch {
case ctx.GlobalIsSet(utils.LegacyTestnetFlag.Name):
Expand All @@ -290,6 +281,15 @@ func prepare(ctx *cli.Context) {
case !ctx.GlobalIsSet(utils.NetworkIdFlag.Name):
log.Info("Starting Geth on Ethereum mainnet...")
}
// If we're a full node on mainnet without --cache specified, bump default cache allowance
if ctx.GlobalString(utils.SyncModeFlag.Name) != "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) && !ctx.GlobalIsSet(utils.NetworkIdFlag.Name) {
// Make sure we're not on any supported preconfigured testnet either
if !ctx.GlobalIsSet(utils.LegacyTestnetFlag.Name) && !ctx.GlobalIsSet(utils.RopstenFlag.Name) && !ctx.GlobalIsSet(utils.RinkebyFlag.Name) && !ctx.GlobalIsSet(utils.GoerliFlag.Name) && !ctx.GlobalIsSet(utils.DeveloperFlag.Name) {
// Nope, we're really on mainnet. Bump that cache up!
log.Info("Bumping default cache on mainnet", "provided", ctx.GlobalInt(utils.CacheFlag.Name), "updated", 4096)
ctx.GlobalSet(utils.CacheFlag.Name, strconv.Itoa(4096))
}
}
// If we're running a light client on any network, drop the cache to some meaningfully low amount
if ctx.GlobalString(utils.SyncModeFlag.Name) == "light" && !ctx.GlobalIsSet(utils.CacheFlag.Name) {
log.Info("Dropping default light client cache", "provided", ctx.GlobalInt(utils.CacheFlag.Name), "updated", 128)
Expand Down