From 936bc918d337fba27772dbb490134566340e09fc Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 20 May 2026 11:39:48 +0200 Subject: [PATCH 1/3] cmd/{clef, geth}: remove CLI flags that were deprecated for more than a year --- cmd/clef/main.go | 8 +-- cmd/geth/chaincmd.go | 4 +- cmd/geth/config.go | 3 - cmd/geth/main.go | 19 ------ cmd/utils/flags.go | 36 +---------- cmd/utils/flags_legacy.go | 124 +------------------------------------- node/config.go | 4 -- signer/core/api.go | 50 +++++++-------- 8 files changed, 29 insertions(+), 219 deletions(-) diff --git a/cmd/clef/main.go b/cmd/clef/main.go index dde4ae853f..5a97726557 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -269,7 +269,6 @@ func init() { configdirFlag, chainIdFlag, utils.LightKDFFlag, - utils.NoUSBFlag, utils.SmartCardDaemonPathFlag, utils.HTTPListenAddrFlag, utils.HTTPVirtualHostsFlag, @@ -409,7 +408,7 @@ func initInternalApi(c *cli.Context) (*core.UIServerAPI, core.UIClientAPI, error lightKdf = c.Bool(utils.LightKDFFlag.Name) ) am := core.StartClefAccountManager(ksLoc, true, lightKdf, "") - api := core.NewSignerAPI(am, 0, true, ui, nil, false, pwStorage) + api := core.NewSignerAPI(am, 0, ui, nil, false, pwStorage) internalApi := core.NewUIServerAPI(api) return internalApi, ui, nil } @@ -698,14 +697,13 @@ func signer(c *cli.Context) error { ksLoc = c.String(keystoreFlag.Name) lightKdf = c.Bool(utils.LightKDFFlag.Name) advanced = c.Bool(advancedMode.Name) - nousb = c.Bool(utils.NoUSBFlag.Name) scpath = c.String(utils.SmartCardDaemonPathFlag.Name) ) log.Info("Starting signer", "chainid", chainId, "keystore", ksLoc, "light-kdf", lightKdf, "advanced", advanced) - am := core.StartClefAccountManager(ksLoc, nousb, lightKdf, scpath) + am := core.StartClefAccountManager(ksLoc, lightKdf, scpath) defer am.Close() - apiImpl := core.NewSignerAPI(am, chainId, nousb, ui, db, advanced, pwStorage) + apiImpl := core.NewSignerAPI(am, chainId, ui, db, advanced, pwStorage) // Establish the bidirectional communication, by creating a new UI backend and registering // it with the UI. diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index 98ed348d8c..d32756591b 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -101,7 +101,6 @@ if one is set. Otherwise it prints the genesis from the datadir.`, utils.NoCompactionFlag, utils.LogSlowBlockFlag, utils.MetricsEnabledFlag, - utils.MetricsEnabledExpensiveFlag, utils.MetricsHTTPFlag, utils.MetricsPortFlag, utils.MetricsEnableInfluxDBFlag, @@ -116,7 +115,6 @@ if one is set. Otherwise it prints the genesis from the datadir.`, utils.MetricsInfluxDBBucketFlag, utils.MetricsInfluxDBOrganizationFlag, utils.StateSizeTrackingFlag, - utils.TxLookupLimitFlag, utils.VMTraceFlag, utils.VMTraceJsonConfigFlag, utils.TransactionHistoryFlag, @@ -157,7 +155,7 @@ be gzipped.`, Name: "import-history", Usage: "Import an Era archive", ArgsUsage: "", - Flags: slices.Concat([]cli.Flag{utils.TxLookupLimitFlag, utils.TransactionHistoryFlag, utils.EraFormatFlag}, utils.DatabaseFlags, utils.NetworkFlags), + Flags: slices.Concat([]cli.Flag{utils.TransactionHistoryFlag, utils.EraFormatFlag}, utils.DatabaseFlags, utils.NetworkFlags), Description: ` The import-history command will import blocks and their corresponding receipts from Era archives. diff --git a/cmd/geth/config.go b/cmd/geth/config.go index c02e307bdc..ab9a336349 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -354,9 +354,6 @@ func applyMetricConfig(ctx *cli.Context, cfg *gethConfig) { if ctx.IsSet(utils.MetricsEnabledFlag.Name) { cfg.Metrics.Enabled = ctx.Bool(utils.MetricsEnabledFlag.Name) } - if ctx.IsSet(utils.MetricsEnabledExpensiveFlag.Name) { - log.Warn("Expensive metrics are collected by default, please remove this flag", "flag", utils.MetricsEnabledExpensiveFlag.Name) - } if ctx.IsSet(utils.MetricsHTTPFlag.Name) { cfg.Metrics.HTTP = ctx.String(utils.MetricsHTTPFlag.Name) } diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 850e26d161..e547256e00 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -49,13 +49,11 @@ var ( // flags that configure the node nodeFlags = slices.Concat([]cli.Flag{ utils.IdentityFlag, - utils.UnlockedAccountFlag, utils.PasswordFileFlag, utils.BootnodesFlag, utils.MinFreeDiskSpaceFlag, utils.KeyStoreDirFlag, utils.ExternalSignerFlag, - utils.NoUSBFlag, // deprecated utils.USBFlag, utils.SmartCardDaemonPathFlag, utils.OverrideOsaka, @@ -63,7 +61,6 @@ var ( utils.OverrideBPO2, utils.OverrideUBT, utils.OverrideGenesisFlag, - utils.EnablePersonal, // deprecated utils.TxPoolLocalsFlag, utils.TxPoolNoLocalsFlag, utils.TxPoolJournalFlag, @@ -83,7 +80,6 @@ var ( utils.ExitWhenSyncedFlag, utils.GCModeFlag, utils.SnapshotFlag, - utils.TxLookupLimitFlag, // deprecated utils.TransactionHistoryFlag, utils.ChainHistoryFlag, utils.LogHistoryFlag, @@ -95,12 +91,9 @@ var ( utils.BinTrieGroupDepthFlag, utils.LightKDFFlag, utils.EthRequiredBlocksFlag, - utils.LegacyWhitelistFlag, // deprecated utils.CacheFlag, utils.CacheDatabaseFlag, utils.CacheTrieFlag, - utils.CacheTrieJournalFlag, // deprecated - utils.CacheTrieRejournalFlag, // deprecated utils.CacheGCFlag, utils.CacheSnapshotFlag, utils.CacheNoPrefetchFlag, @@ -112,20 +105,16 @@ var ( utils.DiscoveryPortFlag, utils.MaxPeersFlag, utils.MaxPendingPeersFlag, - utils.MiningEnabledFlag, // deprecated utils.MinerGasLimitFlag, utils.MinerGasPriceFlag, - utils.MinerEtherbaseFlag, // deprecated utils.MinerExtraDataFlag, utils.MinerMaxBlobsFlag, utils.MinerRecommitIntervalFlag, utils.MinerPendingFeeRecipientFlag, - utils.MinerNewPayloadTimeoutFlag, // deprecated utils.NATFlag, utils.NoDiscoverFlag, utils.DiscoveryV4Flag, utils.DiscoveryV5Flag, - utils.LegacyDiscoveryV5Flag, // deprecated utils.NetrestrictFlag, utils.NodeKeyFileFlag, utils.NodeKeyHexFlag, @@ -145,8 +134,6 @@ var ( utils.GpoMaxGasPriceFlag, utils.GpoIgnoreGasPriceFlag, configFileFlag, - utils.LogDebugFlag, - utils.LogBacktraceAtFlag, utils.BeaconApiFlag, utils.BeaconApiHeaderFlag, utils.BeaconThresholdFlag, @@ -182,7 +169,6 @@ var ( utils.WSPathPrefixFlag, utils.IPCDisabledFlag, utils.IPCPathFlag, - utils.InsecureUnlockAllowedFlag, utils.RPCGlobalGasCapFlag, utils.RPCGlobalEVMTimeoutFlag, utils.RPCGlobalTxFeeCapFlag, @@ -204,7 +190,6 @@ var ( metricsFlags = []cli.Flag{ utils.MetricsEnabledFlag, - utils.MetricsEnabledExpensiveFlag, utils.MetricsHTTPFlag, utils.MetricsPortFlag, utils.MetricsEnableInfluxDBFlag, @@ -340,10 +325,6 @@ func startNode(ctx *cli.Context, stack *node.Node, isConsole bool) { // Start up the node itself utils.StartNode(ctx, stack, isConsole) - if ctx.IsSet(utils.UnlockedAccountFlag.Name) { - log.Warn(`The "unlock" flag has been deprecated and has no effect`) - } - // Register wallet event handlers to open and auto-derive wallets events := make(chan accounts.WalletEvent, 16) stack.AccountManager().Subscribe(events) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index c41cf4ee40..00f88ef77d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1432,9 +1432,6 @@ func MakeDatabaseHandles(max int) int { // setEtherbase retrieves the etherbase from the directly specified command line flags. func setEtherbase(ctx *cli.Context, cfg *ethconfig.Config) { - if ctx.IsSet(MinerEtherbaseFlag.Name) { - log.Warn("Option --miner.etherbase is deprecated as the etherbase is set by the consensus client post-merge") - } if !ctx.IsSet(MinerPendingFeeRecipientFlag.Name) { return } @@ -1507,9 +1504,6 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) { if ctx.IsSet(JWTSecretFlag.Name) { cfg.JWTSecret = ctx.String(JWTSecretFlag.Name) } - if ctx.IsSet(EnablePersonal.Name) { - log.Warn(fmt.Sprintf("Option --%s is deprecated. The 'personal' RPC namespace has been removed.", EnablePersonal.Name)) - } if ctx.IsSet(ExternalSignerFlag.Name) { cfg.ExternalSigner = ctx.String(ExternalSignerFlag.Name) @@ -1524,15 +1518,9 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) { if ctx.IsSet(LightKDFFlag.Name) { cfg.UseLightweightKDF = ctx.Bool(LightKDFFlag.Name) } - if ctx.IsSet(NoUSBFlag.Name) || cfg.NoUSB { - log.Warn("Option --nousb is deprecated and USB is deactivated by default. Use --usb to enable") - } if ctx.IsSet(USBFlag.Name) { cfg.USB = ctx.Bool(USBFlag.Name) } - if ctx.IsSet(InsecureUnlockAllowedFlag.Name) { - log.Warn(fmt.Sprintf("Option --%s is deprecated and has no effect", InsecureUnlockAllowedFlag.Name)) - } if ctx.IsSet(DBEngineFlag.Name) { dbEngine := ctx.String(DBEngineFlag.Name) if dbEngine != "leveldb" && dbEngine != "pebble" { @@ -1541,13 +1529,6 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) { log.Info(fmt.Sprintf("Using %s as db engine", dbEngine)) cfg.DBEngine = dbEngine } - // deprecation notice for log debug flags (TODO: find a more appropriate place to put these?) - if ctx.IsSet(LogBacktraceAtFlag.Name) { - log.Warn("Option --log.backtrace flag is deprecated") - } - if ctx.IsSet(LogDebugFlag.Name) { - log.Warn("Option --log.debug flag is deprecated") - } } func setSmartCard(ctx *cli.Context, cfg *node.Config) { @@ -1685,9 +1666,6 @@ func setBlobPool(ctx *cli.Context, cfg *blobpool.Config) { } func setMiner(ctx *cli.Context, cfg *miner.Config) { - if ctx.Bool(MiningEnabledFlag.Name) { - log.Warn("The flag --mine is deprecated and will be removed") - } if ctx.IsSet(MinerExtraDataFlag.Name) { cfg.ExtraData = []byte(ctx.String(MinerExtraDataFlag.Name)) } @@ -1700,10 +1678,6 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) { if ctx.IsSet(MinerRecommitIntervalFlag.Name) { cfg.Recommit = ctx.Duration(MinerRecommitIntervalFlag.Name) } - if ctx.IsSet(MinerNewPayloadTimeoutFlag.Name) { - log.Warn("The flag --miner.newpayload-timeout is deprecated and will be removed, please use --miner.recommit") - cfg.Recommit = ctx.Duration(MinerNewPayloadTimeoutFlag.Name) - } if ctx.IsSet(MinerMaxBlobsFlag.Name) { cfg.MaxBlobsPerBlock = ctx.Int(MinerMaxBlobsFlag.Name) } @@ -1712,12 +1686,7 @@ func setMiner(ctx *cli.Context, cfg *miner.Config) { func setRequiredBlocks(ctx *cli.Context, cfg *ethconfig.Config) { requiredBlocks := ctx.String(EthRequiredBlocksFlag.Name) if requiredBlocks == "" { - if ctx.IsSet(LegacyWhitelistFlag.Name) { - log.Warn("The flag --whitelist is deprecated and will be removed, please use --eth.requiredblocks") - requiredBlocks = ctx.String(LegacyWhitelistFlag.Name) - } else { - return - } + return } cfg.RequiredBlocks = make(map[uint64]common.Hash) for _, entry := range strings.Split(requiredBlocks, ",") { @@ -1837,9 +1806,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { } if ctx.IsSet(TransactionHistoryFlag.Name) { cfg.TransactionHistory = ctx.Uint64(TransactionHistoryFlag.Name) - } else if ctx.IsSet(TxLookupLimitFlag.Name) { - log.Warn("The flag --txlookuplimit is deprecated and will be removed, please use --history.transactions") - cfg.TransactionHistory = ctx.Uint64(TxLookupLimitFlag.Name) } if ctx.String(GCModeFlag.Name) == "archive" { if cfg.TransactionHistory != 0 { diff --git a/cmd/utils/flags_legacy.go b/cmd/utils/flags_legacy.go index 239be03ad6..2a3e417993 100644 --- a/cmd/utils/flags_legacy.go +++ b/cmd/utils/flags_legacy.go @@ -19,8 +19,6 @@ package utils import ( "fmt" - "github.com/ethereum/go-ethereum/eth/ethconfig" - "github.com/ethereum/go-ethereum/internal/flags" "github.com/urfave/cli/v2" ) @@ -32,127 +30,7 @@ var ShowDeprecated = &cli.Command{ Description: "Show flags that have been deprecated and will soon be removed", } -var DeprecatedFlags = []cli.Flag{ - NoUSBFlag, - LegacyWhitelistFlag, - CacheTrieJournalFlag, - CacheTrieRejournalFlag, - LegacyDiscoveryV5Flag, - TxLookupLimitFlag, - LogBacktraceAtFlag, - LogDebugFlag, - MinerNewPayloadTimeoutFlag, - MinerEtherbaseFlag, - MiningEnabledFlag, - MetricsEnabledExpensiveFlag, - EnablePersonal, - UnlockedAccountFlag, - InsecureUnlockAllowedFlag, -} - -var ( - // Deprecated May 2020, shown in aliased flags section - NoUSBFlag = &cli.BoolFlag{ - Name: "nousb", - Hidden: true, - Usage: "Disables monitoring for and managing USB hardware wallets (deprecated)", - Category: flags.DeprecatedCategory, - } - // Deprecated March 2022 - LegacyWhitelistFlag = &cli.StringFlag{ - Name: "whitelist", - Hidden: true, - Usage: "Comma separated block number-to-hash mappings to enforce (=) (deprecated in favor of --eth.requiredblocks)", - Category: flags.DeprecatedCategory, - } - // Deprecated July 2023 - CacheTrieJournalFlag = &cli.StringFlag{ - Name: "cache.trie.journal", - Hidden: true, - Usage: "Disk journal directory for trie cache to survive node restarts", - Category: flags.DeprecatedCategory, - } - CacheTrieRejournalFlag = &cli.DurationFlag{ - Name: "cache.trie.rejournal", - Hidden: true, - Usage: "Time interval to regenerate the trie cache journal", - Category: flags.DeprecatedCategory, - } - LegacyDiscoveryV5Flag = &cli.BoolFlag{ - Name: "v5disc", - Hidden: true, - Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism (deprecated, use --discv5 instead)", - Category: flags.DeprecatedCategory, - } - // Deprecated August 2023 - TxLookupLimitFlag = &cli.Uint64Flag{ - Name: "txlookuplimit", - Hidden: true, - Usage: "Number of recent blocks to maintain transactions index for (default = about one year, 0 = entire chain) (deprecated, use history.transactions instead)", - Value: ethconfig.Defaults.TransactionHistory, - Category: flags.DeprecatedCategory, - } - // Deprecated November 2023 - LogBacktraceAtFlag = &cli.StringFlag{ - Name: "log.backtrace", - Hidden: true, - Usage: "Request a stack trace at a specific logging statement (deprecated)", - Value: "", - Category: flags.DeprecatedCategory, - } - LogDebugFlag = &cli.BoolFlag{ - Name: "log.debug", - Hidden: true, - Usage: "Prepends log messages with call-site location (deprecated)", - Category: flags.DeprecatedCategory, - } - // Deprecated February 2024 - MinerNewPayloadTimeoutFlag = &cli.DurationFlag{ - Name: "miner.newpayload-timeout", - Hidden: true, - Usage: "Specify the maximum time allowance for creating a new payload (deprecated)", - Value: ethconfig.Defaults.Miner.Recommit, - Category: flags.DeprecatedCategory, - } - MinerEtherbaseFlag = &cli.StringFlag{ - Name: "miner.etherbase", - Hidden: true, - Usage: "0x prefixed public address for block mining rewards (deprecated)", - Category: flags.DeprecatedCategory, - } - MiningEnabledFlag = &cli.BoolFlag{ - Name: "mine", - Hidden: true, - Usage: "Enable mining (deprecated)", - Category: flags.DeprecatedCategory, - } - MetricsEnabledExpensiveFlag = &cli.BoolFlag{ - Name: "metrics.expensive", - Hidden: true, - Usage: "Enable expensive metrics collection and reporting (deprecated)", - Category: flags.DeprecatedCategory, - } - // Deprecated Oct 2024 - EnablePersonal = &cli.BoolFlag{ - Name: "rpc.enabledeprecatedpersonal", - Hidden: true, - Usage: "This used to enable the 'personal' namespace.", - Category: flags.DeprecatedCategory, - } - UnlockedAccountFlag = &cli.StringFlag{ - Name: "unlock", - Hidden: true, - Usage: "Comma separated list of accounts to unlock (deprecated)", - Value: "", - Category: flags.DeprecatedCategory, - } - InsecureUnlockAllowedFlag = &cli.BoolFlag{ - Name: "allow-insecure-unlock", - Hidden: true, - Usage: "Allow insecure account unlocking when account-related RPCs are exposed by http (deprecated)", - Category: flags.DeprecatedCategory, - } -) +var DeprecatedFlags = []cli.Flag{} // showDeprecated displays deprecated flags that will be soon removed from the codebase. func showDeprecated(*cli.Context) error { diff --git a/node/config.go b/node/config.go index 255b0f0aa9..77ca78a471 100644 --- a/node/config.go +++ b/node/config.go @@ -86,10 +86,6 @@ type Config struct { // InsecureUnlockAllowed is a deprecated option to allow users to accounts in unsafe http environment. InsecureUnlockAllowed bool `toml:",omitempty"` - // NoUSB disables hardware wallet monitoring and connectivity. - // Deprecated: USB monitoring is disabled by default and must be enabled explicitly. - NoUSB bool `toml:",omitempty"` - // USB enables hardware wallet monitoring and connectivity. USB bool `toml:",omitempty"` diff --git a/signer/core/api.go b/signer/core/api.go index 12acf925f0..a882734882 100644 --- a/signer/core/api.go +++ b/signer/core/api.go @@ -130,7 +130,7 @@ type Metadata struct { Origin string `json:"Origin"` } -func StartClefAccountManager(ksLocation string, nousb, lightKDF bool, scpath string) *accounts.Manager { +func StartClefAccountManager(ksLocation string, lightKDF bool, scpath string) *accounts.Manager { var ( backends []accounts.Backend n, p = keystore.StandardScryptN, keystore.StandardScryptP @@ -142,28 +142,26 @@ func StartClefAccountManager(ksLocation string, nousb, lightKDF bool, scpath str if len(ksLocation) > 0 { backends = append(backends, keystore.NewKeyStore(ksLocation, n, p)) } - if !nousb { - // Start a USB hub for Ledger hardware wallets - if ledgerhub, err := usbwallet.NewLedgerHub(); err != nil { - log.Warn(fmt.Sprintf("Failed to start Ledger hub, disabling: %v", err)) - } else { - backends = append(backends, ledgerhub) - log.Debug("Ledger support enabled") - } - // Start a USB hub for Trezor hardware wallets (HID version) - if trezorhub, err := usbwallet.NewTrezorHubWithHID(); err != nil { - log.Warn(fmt.Sprintf("Failed to start HID Trezor hub, disabling: %v", err)) - } else { - backends = append(backends, trezorhub) - log.Debug("Trezor support enabled via HID") - } - // Start a USB hub for Trezor hardware wallets (WebUSB version) - if trezorhub, err := usbwallet.NewTrezorHubWithWebUSB(); err != nil { - log.Warn(fmt.Sprintf("Failed to start WebUSB Trezor hub, disabling: %v", err)) - } else { - backends = append(backends, trezorhub) - log.Debug("Trezor support enabled via WebUSB") - } + // Start a USB hub for Ledger hardware wallets + if ledgerhub, err := usbwallet.NewLedgerHub(); err != nil { + log.Warn(fmt.Sprintf("Failed to start Ledger hub, disabling: %v", err)) + } else { + backends = append(backends, ledgerhub) + log.Debug("Ledger support enabled") + } + // Start a USB hub for Trezor hardware wallets (HID version) + if trezorhub, err := usbwallet.NewTrezorHubWithHID(); err != nil { + log.Warn(fmt.Sprintf("Failed to start HID Trezor hub, disabling: %v", err)) + } else { + backends = append(backends, trezorhub) + log.Debug("Trezor support enabled via HID") + } + // Start a USB hub for Trezor hardware wallets (WebUSB version) + if trezorhub, err := usbwallet.NewTrezorHubWithWebUSB(); err != nil { + log.Warn(fmt.Sprintf("Failed to start WebUSB Trezor hub, disabling: %v", err)) + } else { + backends = append(backends, trezorhub) + log.Debug("Trezor support enabled via WebUSB") } // Start a smart card hub @@ -281,14 +279,12 @@ var ErrRequestDenied = errors.New("request denied") // key that is generated when a new Account is created. // noUSB disables USB support that is required to support hardware devices such as // ledger and trezor. -func NewSignerAPI(am *accounts.Manager, chainID int64, noUSB bool, ui UIClientAPI, validator Validator, advancedMode bool, credentials storage.Storage) *SignerAPI { +func NewSignerAPI(am *accounts.Manager, chainID int64, ui UIClientAPI, validator Validator, advancedMode bool, credentials storage.Storage) *SignerAPI { if advancedMode { log.Info("Clef is in advanced mode: will warn instead of reject") } signer := &SignerAPI{big.NewInt(chainID), am, ui, validator, !advancedMode, credentials} - if !noUSB { - signer.startUSBListener() - } + signer.startUSBListener() return signer } func (api *SignerAPI) openTrezor(url accounts.URL) { From 37ff34ea7d47235b1e01b054289716facb55ae89 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Thu, 21 May 2026 13:27:23 +0200 Subject: [PATCH 2/3] fix tests --- cmd/clef/main.go | 2 +- signer/core/api_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 5a97726557..72dfd5016b 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -407,7 +407,7 @@ func initInternalApi(c *cli.Context) (*core.UIServerAPI, core.UIClientAPI, error ksLoc = c.String(keystoreFlag.Name) lightKdf = c.Bool(utils.LightKDFFlag.Name) ) - am := core.StartClefAccountManager(ksLoc, true, lightKdf, "") + am := core.StartClefAccountManager(ksLoc, lightKdf, "") api := core.NewSignerAPI(am, 0, ui, nil, false, pwStorage) internalApi := core.NewUIServerAPI(api) return internalApi, ui, nil diff --git a/signer/core/api_test.go b/signer/core/api_test.go index ed4fdc5096..7c5cefdf8c 100644 --- a/signer/core/api_test.go +++ b/signer/core/api_test.go @@ -120,8 +120,8 @@ func setup(t *testing.T) (*core.SignerAPI, *headlessUi) { t.Fatal(err.Error()) } ui := &headlessUi{make(chan string, 20), make(chan string, 20)} - am := core.StartClefAccountManager(tmpDirName(t), true, true, "") - api := core.NewSignerAPI(am, 1337, true, ui, db, true, &storage.NoStorage{}) + am := core.StartClefAccountManager(tmpDirName(t), true, "") + api := core.NewSignerAPI(am, 1337, ui, db, true, &storage.NoStorage{}) return api, ui } func createAccount(ui *headlessUi, api *core.SignerAPI, t *testing.T) { From 13893feb5ca0ce64f5a84709afd06f2239f3e6b1 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Thu, 21 May 2026 15:38:45 +0200 Subject: [PATCH 3/3] fix tests --- cmd/geth/consolecmd_test.go | 5 ++--- cmd/geth/run_test.go | 7 +------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cmd/geth/consolecmd_test.go b/cmd/geth/consolecmd_test.go index 12ee7e7dd1..2c8522d109 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/geth/consolecmd_test.go @@ -51,10 +51,9 @@ func runMinimalGeth(t *testing.T, args ...string) *testgeth { // then terminated by closing the input stream. func TestConsoleWelcome(t *testing.T) { t.Parallel() - coinbase := "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182" // Start a geth console, make sure it's cleaned up and terminate the console - geth := runMinimalGeth(t, "--miner.etherbase", coinbase, "console") + geth := runMinimalGeth(t, "console") // Gather all the infos the welcome message needs to contain geth.SetTemplateFunc("goos", func() string { return runtime.GOOS }) @@ -98,7 +97,7 @@ func TestAttachWelcome(t *testing.T) { p := trulyRandInt(1024, 65533) // Yeah, sometimes this will fail, sorry :P httpPort = strconv.Itoa(p) wsPort = strconv.Itoa(p + 1) - geth := runMinimalGeth(t, "--miner.etherbase", "0x8605cdbbdb6d264aa742e77020dcbc58fcdce182", + geth := runMinimalGeth(t, "--ipcpath", ipc, "--http", "--http.port", httpPort, "--ws", "--ws.port", wsPort) diff --git a/cmd/geth/run_test.go b/cmd/geth/run_test.go index 1d32880325..f75e32f570 100644 --- a/cmd/geth/run_test.go +++ b/cmd/geth/run_test.go @@ -32,8 +32,7 @@ type testgeth struct { *cmdtest.TestCmd // template variables for expect - Datadir string - Etherbase string + Datadir string } func init() { @@ -75,10 +74,6 @@ func runGeth(t *testing.T, args ...string) *testgeth { if i < len(args)-1 { tt.Datadir = args[i+1] } - case "--miner.etherbase": - if i < len(args)-1 { - tt.Etherbase = args[i+1] - } } } if tt.Datadir == "" {