diff --git a/Dockerfile b/Dockerfile index 005ad16a3e..c29ba713bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,16 @@ COPY go.sum /bera-geth/ RUN cd /bera-geth && go mod download ADD . /bera-geth -RUN cd /bera-geth && go run build/ci.go install -static ./cmd/geth +RUN cd /bera-geth && go run build/ci.go install -static ./cmd/bera-geth # Pull Geth into a second stage deploy alpine container FROM alpine:latest RUN apk add --no-cache ca-certificates -COPY --from=builder /bera-geth/build/bin/geth /usr/local/bin/ +COPY --from=builder /bera-geth/build/bin/bera-geth /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp -ENTRYPOINT ["geth"] +ENTRYPOINT ["bera-geth"] # Add some metadata labels to help programmatic image consumption ARG COMMIT="" diff --git a/Dockerfile.alltools b/Dockerfile.alltools index 80fbc4cea8..bd8ef68ae3 100644 --- a/Dockerfile.alltools +++ b/Dockerfile.alltools @@ -19,7 +19,7 @@ ADD . /bera-geth # makes it so that under certain circumstances, the docker layer can be cached, # and the builder can jump to the next (build all) command, with the go cache fully loaded. # -RUN cd /bera-geth && go run build/ci.go install -static ./cmd/geth +RUN cd /bera-geth && go run build/ci.go install -static ./cmd/bera-geth RUN cd /bera-geth && go run build/ci.go install -static diff --git a/Makefile b/Makefile index 9f666b537e..ffa9bae6a5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # with Go source code. If you know what GOPATH is then you probably # don't need to bother with make. -.PHONY: geth evm all test lint fmt clean devtools help +.PHONY: bera-geth evm all test lint fmt clean devtools help GOBIN = ./build/bin GO ?= latest @@ -13,11 +13,11 @@ BRANCH = $(shell git rev-parse --abbrev-ref HEAD) TAG := $(shell git describe --tags --abbrev=0 --match "v*") BUILD_FLAGS := -git-commit=$(COMMIT) -git-branch=$(BRANCH) -git-tag=$(TAG) -#? geth: Build geth. -geth: - $(GORUN) build/ci.go install ./cmd/geth +#? bera-geth: Build bera-geth. +bera-geth: + $(GORUN) build/ci.go install ./cmd/bera-geth @echo "Done building." - @echo "Run \"$(GOBIN)/geth\" to launch geth." + @echo "Run \"$(GOBIN)/bera-geth\" to launch bera-geth." #? evm: Build evm. evm: diff --git a/README.md b/README.md index 78a56baece..3bc34ab87f 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,11 @@ archives are published at https://geth.ethereum.org/downloads/. For prerequisites and detailed build instructions please read the [Installation Instructions](https://geth.ethereum.org/docs/getting-started/installing-geth). -Building `geth` requires both a Go (version 1.23 or later) and a C compiler. You can install +Building `bera-geth` requires both a Go (version 1.23 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run ```shell -make geth +make bera-geth ``` or, to build the full suite of utilities: @@ -36,19 +36,19 @@ directory. | Command | Description | | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **`geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `geth --help` and the [CLI page](https://geth.ethereum.org/docs/fundamentals/command-line-options) for command line options. | -| `clef` | Stand-alone signing tool, which can be used as a backend signer for `geth`. | +| **`bera-geth`** | Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `bera-geth --help` and the [CLI page](https://geth.ethereum.org/docs/fundamentals/command-line-options) for command line options. | +| `clef` | Stand-alone signing tool, which can be used as a backend signer for `bera-geth`. | | `devp2p` | Utilities to interact with nodes on the networking layer, without running a full blockchain. | | `abigen` | Source code generator to convert Ethereum contract definitions into easy-to-use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https://docs.soliditylang.org/en/develop/abi-spec.html) with expanded functionality if the contract bytecode is also available. However, it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https://geth.ethereum.org/docs/developers/dapp-developer/native-bindings) page for details. | | `evm` | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug run`). | | `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp)) dumps (data encoding used by the Ethereum protocol both network as well as consensus wise) to user-friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`). | -## Running `geth` +## Running `bera-geth` Going through all the possible command line flags is out of scope here (please consult our [CLI Wiki page](https://geth.ethereum.org/docs/fundamentals/command-line-options)), but we've enumerated a few common parameter combos to get you up to speed quickly -on how you can run your own `geth` instance. +on how you can run your own `bera-geth` instance. ### Hardware Requirements @@ -74,19 +74,19 @@ particular use case, the user doesn't care about years-old historical data, so w sync quickly to the current state of the network. To do so: ```shell -$ geth console +$ bera-geth console ``` This command will: - * Start `geth` in snap sync mode (default, can be changed with the `--syncmode` flag), + * Start `bera-geth` in snap sync mode (default, can be changed with the `--syncmode` flag), causing it to download more data in exchange for avoiding processing the entire history of the Ethereum network, which is very CPU intensive. * Start the built-in interactive [JavaScript console](https://geth.ethereum.org/docs/interacting-with-geth/javascript-console), (via the trailing `console` subcommand) through which you can interact using [`web3` methods](https://github.com/ChainSafe/web3.js/blob/0.20.7/DOCUMENTATION.md) - (note: the `web3` version bundled within `geth` is very old, and not up to date with official docs), - as well as `geth`'s own [management APIs](https://geth.ethereum.org/docs/interacting-with-geth/rpc). + (note: the `web3` version bundled within `bera-geth` is very old, and not up to date with official docs), + as well as `bera-geth`'s own [management APIs](https://geth.ethereum.org/docs/interacting-with-geth/rpc). This tool is optional and if you leave it out you can always attach it to an already running - `geth` instance with `geth attach`. + `bera-geth` instance with `bera-geth attach`. ### A Full node on the Holesky test network @@ -97,45 +97,45 @@ network, you want to join the **test** network with your node, which is fully eq the main network, but with play-Ether only. ```shell -$ geth --holesky console +$ bera-geth --holesky console ``` The `console` subcommand has the same meaning as above and is equally useful on the testnet too. -Specifying the `--holesky` flag, however, will reconfigure your `geth` instance a bit: +Specifying the `--holesky` flag, however, will reconfigure your `bera-geth` instance a bit: * Instead of connecting to the main Ethereum network, the client will connect to the Holesky test network, which uses different P2P bootnodes, different network IDs and genesis states. - * Instead of using the default data directory (`~/.ethereum` on Linux for example), `geth` + * Instead of using the default data directory (`~/.ethereum` on Linux for example), `bera-geth` will nest itself one level deeper into a `holesky` subfolder (`~/.ethereum/holesky` on Linux). Note, on OSX and Linux this also means that attaching to a running testnet node - requires the use of a custom endpoint since `geth attach` will try to attach to a + requires the use of a custom endpoint since `bera-geth attach` will try to attach to a production node endpoint by default, e.g., - `geth attach /holesky/geth.ipc`. Windows users are not affected by + `bera-geth attach /holesky/geth.ipc`. Windows users are not affected by this. *Note: Although some internal protective measures prevent transactions from crossing over between the main network and test network, you should always use separate accounts for play and real money. Unless you manually move -accounts, `geth` will by default correctly separate the two networks and will not make any +accounts, `bera-geth` will by default correctly separate the two networks and will not make any accounts available between them.* ### Configuration -As an alternative to passing the numerous flags to the `geth` binary, you can also pass a +As an alternative to passing the numerous flags to the `bera-geth` binary, you can also pass a configuration file via: ```shell -$ geth --config /path/to/your_config.toml +$ bera-geth --config /path/to/your_config.toml ``` To get an idea of how the file should look like you can use the `dumpconfig` subcommand to export your existing configuration: ```shell -$ geth --your-favourite-flags dumpconfig +$ bera-geth --your-favourite-flags dumpconfig ``` #### Docker quick start @@ -149,25 +149,25 @@ docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ ethereum/client-go ``` -This will start `geth` in snap-sync mode with a DB memory allowance of 1GB, as the +This will start `bera-geth` in snap-sync mode with a DB memory allowance of 1GB, as the above command does. It will also create a persistent volume in your home directory for saving your blockchain as well as map the default ports. There is also an `alpine` tag available for a slim version of the image. Do not forget `--http.addr 0.0.0.0`, if you want to access RPC from other containers -and/or hosts. By default, `geth` binds to the local interface and RPC endpoints are not +and/or hosts. By default, `bera-geth` binds to the local interface and RPC endpoints are not accessible from the outside. -### Programmatically interfacing `geth` nodes +### Programmatically interfacing `bera-geth` nodes -As a developer, sooner rather than later you'll want to start interacting with `geth` and the +As a developer, sooner rather than later you'll want to start interacting with `bera-geth` and the Ethereum network via your own programs and not manually through the console. To aid -this, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://ethereum.org/en/developers/docs/apis/json-rpc/) -and [`geth` specific APIs](https://geth.ethereum.org/docs/interacting-with-geth/rpc)). +this, `bera-geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://ethereum.org/en/developers/docs/apis/json-rpc/) +and [`bera-geth` specific APIs](https://geth.ethereum.org/docs/interacting-with-geth/rpc)). These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based platforms, and named pipes on Windows). -The IPC interface is enabled by default and exposes all the APIs supported by `geth`, +The IPC interface is enabled by default and exposes all the APIs supported by `bera-geth`, whereas the HTTP and WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons. These can be turned on/off and configured as you'd expect. @@ -188,7 +188,7 @@ HTTP based JSON-RPC API options: * `--ipcpath` Filename for IPC socket/pipe within the datadir (explicit paths escape it) You'll need to use your own programming environments' capabilities (libraries, tools, etc) to -connect via HTTP, WS or IPC to a `geth` node configured with the above flags and you'll +connect via HTTP, WS or IPC to a `bera-geth` node configured with the above flags and you'll need to speak [JSON-RPC](https://www.jsonrpc.org/specification) on all transports. You can reuse the same connection for multiple requests! @@ -204,7 +204,7 @@ Maintaining your own private network is more involved as a lot of configurations granted in the official networks need to be manually set up. Unfortunately since [the Merge](https://ethereum.org/en/roadmap/merge/) it is no longer possible -to easily set up a network of geth nodes without also setting up a corresponding beacon chain. +to easily set up a network of bera-geth nodes without also setting up a corresponding beacon chain. There are three different solutions depending on your use case: diff --git a/build/ci.go b/build/ci.go index a7e257b78f..a34dc92a8e 100644 --- a/build/ci.go +++ b/build/ci.go @@ -64,18 +64,18 @@ import ( ) var ( - // Files that end up in the geth*.zip archive. + // Files that end up in the bera-geth*.zip archive. gethArchiveFiles = []string{ "COPYING", - executablePath("geth"), + executablePath("bera-geth"), } - // Files that end up in the geth-alltools*.zip archive. + // Files that end up in the bera-geth-alltools*.zip archive. allToolsArchiveFiles = []string{ "COPYING", executablePath("abigen"), executablePath("evm"), - executablePath("geth"), + executablePath("bera-geth"), executablePath("rlpdump"), executablePath("clef"), } @@ -91,7 +91,7 @@ var ( Description: "Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode.", }, { - BinaryName: "geth", + BinaryName: "bera-geth", Description: "Ethereum CLI client.", }, { @@ -558,7 +558,7 @@ func doArchive(cmdline []string) { atype = flag.String("type", "zip", "Type of archive to write (zip|tar)") signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. LINUX_SIGNING_KEY)`) signify = flag.String("signify", "", `Environment variable holding the signify key (e.g. LINUX_SIGNIFY_KEY)`) - upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`) + upload = flag.String("upload", "", `Destination to upload the archives (usually "berachain/bera-geth")`) ext string ) flag.CommandLine.Parse(cmdline) @@ -615,7 +615,7 @@ func archiveUpload(archive string, blobstore string, signer string, signifyVar s } if signifyVar != "" { key := os.Getenv(signifyVar) - untrustedComment := "verify with geth-release.pub" + untrustedComment := "verify with bera-geth-release.pub" trustedComment := fmt.Sprintf("%s (%s)", archive, time.Now().UTC().Format(time.RFC1123)) if err := signify.SignFile(archive, archive+".sig", key, untrustedComment, trustedComment); err != nil { return err @@ -727,7 +727,7 @@ func doDebianSource(cmdline []string) { cachedir = flag.String("cachedir", "./build/cache", `Filesystem path to cache the downloaded Go bundles at`) signer = flag.String("signer", "", `Signing key name, also used as package author`) upload = flag.String("upload", "", `Where to upload the source package (usually "ethereum/ethereum")`) - sshUser = flag.String("sftp-user", "", `Username for SFTP upload (usually "geth-ci")`) + sshUser = flag.String("sftp-user", "", `Username for SFTP upload (usually "bera-geth-ci")`) workdir = flag.String("workdir", "", `Output directory for packages (uses temp dir if unset)`) now = time.Now() ) @@ -886,7 +886,7 @@ func makeWorkdir(wdflag string) string { if wdflag != "" { err = os.MkdirAll(wdflag, 0744) } else { - wdflag, err = os.MkdirTemp("", "geth-build-") + wdflag, err = os.MkdirTemp("", "bera-geth-build-") } if err != nil { log.Fatal(err) @@ -1040,7 +1040,7 @@ func doWindowsInstaller(cmdline []string) { arch = flag.String("arch", runtime.GOARCH, "Architecture for cross build packaging") signer = flag.String("signer", "", `Environment variable holding the signing key (e.g. WINDOWS_SIGNING_KEY)`) signify = flag.String("signify key", "", `Environment variable holding the signify signing key (e.g. WINDOWS_SIGNIFY_KEY)`) - upload = flag.String("upload", "", `Destination to upload the archives (usually "gethstore/builds")`) + upload = flag.String("upload", "", `Destination to upload the archives (usually "berachain/bera-geth")`) workdir = flag.String("workdir", "", `Output directory for packages (uses temp dir if unset)`) ) flag.CommandLine.Parse(cmdline) @@ -1059,7 +1059,7 @@ func doWindowsInstaller(cmdline []string) { continue } allTools = append(allTools, filepath.Base(file)) - if filepath.Base(file) == "geth.exe" { + if filepath.Base(file) == "bera-geth.exe" { gethTool = file } else { devTools = append(devTools, file) @@ -1073,7 +1073,7 @@ func doWindowsInstaller(cmdline []string) { "Geth": gethTool, "DevTools": devTools, } - build.Render("build/nsis.geth.nsi", filepath.Join(*workdir, "geth.nsi"), 0644, nil) + build.Render("build/nsis.geth.nsi", filepath.Join(*workdir, "bera-geth.nsi"), 0644, nil) build.Render("build/nsis.install.nsh", filepath.Join(*workdir, "install.nsh"), 0644, templateData) build.Render("build/nsis.uninstall.nsh", filepath.Join(*workdir, "uninstall.nsh"), 0644, allTools) build.Render("build/nsis.pathupdate.nsh", filepath.Join(*workdir, "PathUpdate.nsh"), 0644, nil) @@ -1091,7 +1091,7 @@ func doWindowsInstaller(cmdline []string) { if env.Commit != "" { ver[2] += "-" + env.Commit[:8] } - installer, err := filepath.Abs("geth-" + archiveBasename(*arch, version.Archive(env.Tag, env.Commit)) + ".exe") + installer, err := filepath.Abs("bera-geth-" + archiveBasename(*arch, version.Archive(env.Tag, env.Commit)) + ".exe") if err != nil { log.Fatalf("Failed to convert installer file path: %v", err) } @@ -1101,7 +1101,7 @@ func doWindowsInstaller(cmdline []string) { "/DMINORVERSION="+ver[1], "/DBUILDVERSION="+ver[2], "/DARCH="+*arch, - filepath.Join(*workdir, "geth.nsi"), + filepath.Join(*workdir, "bera-geth.nsi"), ) // Sign and publish installer. if err := archiveUpload(installer, *upload, *signer, *signify); err != nil { @@ -1113,7 +1113,7 @@ func doWindowsInstaller(cmdline []string) { func doPurge(cmdline []string) { var ( - store = flag.String("store", "", `Destination from where to purge archives (usually "gethstore/builds")`) + store = flag.String("store", "", `Destination from where to purge archives (usually "berachain/bera-geth")`) limit = flag.Int("days", 30, `Age threshold above which to delete unstable archives`) ) flag.CommandLine.Parse(cmdline) diff --git a/cmd/geth/accountcmd.go b/cmd/bera-geth/accountcmd.go similarity index 100% rename from cmd/geth/accountcmd.go rename to cmd/bera-geth/accountcmd.go diff --git a/cmd/geth/accountcmd_test.go b/cmd/bera-geth/accountcmd_test.go similarity index 100% rename from cmd/geth/accountcmd_test.go rename to cmd/bera-geth/accountcmd_test.go diff --git a/cmd/geth/attach_test.go b/cmd/bera-geth/attach_test.go similarity index 100% rename from cmd/geth/attach_test.go rename to cmd/bera-geth/attach_test.go diff --git a/cmd/geth/chaincmd.go b/cmd/bera-geth/chaincmd.go similarity index 100% rename from cmd/geth/chaincmd.go rename to cmd/bera-geth/chaincmd.go diff --git a/cmd/geth/chaincmd_test.go b/cmd/bera-geth/chaincmd_test.go similarity index 100% rename from cmd/geth/chaincmd_test.go rename to cmd/bera-geth/chaincmd_test.go diff --git a/cmd/geth/config.go b/cmd/bera-geth/config.go similarity index 100% rename from cmd/geth/config.go rename to cmd/bera-geth/config.go diff --git a/cmd/geth/consolecmd.go b/cmd/bera-geth/consolecmd.go similarity index 100% rename from cmd/geth/consolecmd.go rename to cmd/bera-geth/consolecmd.go diff --git a/cmd/geth/consolecmd_test.go b/cmd/bera-geth/consolecmd_test.go similarity index 97% rename from cmd/geth/consolecmd_test.go rename to cmd/bera-geth/consolecmd_test.go index d04371ffba..5bff98a596 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/bera-geth/consolecmd_test.go @@ -69,7 +69,7 @@ func TestConsoleWelcome(t *testing.T) { geth.Expect(` Welcome to the Geth JavaScript console! -instance: bera-geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} +instance: BeraGeth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} at block: 0 ({{niltime}}) datadir: {{.Datadir}} modules: {{apis}} @@ -140,7 +140,7 @@ func testAttachWelcome(t *testing.T, geth *testgeth, endpoint, apis string) { attach.Expect(` Welcome to the Geth JavaScript console! -instance: bera-geth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} +instance: BeraGeth/v{{gethver}}/{{goos}}-{{goarch}}/{{gover}} at block: 0 ({{niltime}}){{if ipc}} datadir: {{datadir}}{{end}} modules: {{apis}} diff --git a/cmd/geth/dbcmd.go b/cmd/bera-geth/dbcmd.go similarity index 100% rename from cmd/geth/dbcmd.go rename to cmd/bera-geth/dbcmd.go diff --git a/cmd/geth/exportcmd_test.go b/cmd/bera-geth/exportcmd_test.go similarity index 100% rename from cmd/geth/exportcmd_test.go rename to cmd/bera-geth/exportcmd_test.go diff --git a/cmd/geth/genesis_test.go b/cmd/bera-geth/genesis_test.go similarity index 100% rename from cmd/geth/genesis_test.go rename to cmd/bera-geth/genesis_test.go diff --git a/cmd/geth/logging_test.go b/cmd/bera-geth/logging_test.go similarity index 100% rename from cmd/geth/logging_test.go rename to cmd/bera-geth/logging_test.go diff --git a/cmd/geth/logtestcmd_active.go b/cmd/bera-geth/logtestcmd_active.go similarity index 100% rename from cmd/geth/logtestcmd_active.go rename to cmd/bera-geth/logtestcmd_active.go diff --git a/cmd/geth/logtestcmd_inactive.go b/cmd/bera-geth/logtestcmd_inactive.go similarity index 100% rename from cmd/geth/logtestcmd_inactive.go rename to cmd/bera-geth/logtestcmd_inactive.go diff --git a/cmd/geth/main.go b/cmd/bera-geth/main.go similarity index 94% rename from cmd/geth/main.go rename to cmd/bera-geth/main.go index a15175b5ea..a338435d2c 100644 --- a/cmd/geth/main.go +++ b/cmd/bera-geth/main.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with go-ethereum. If not, see . -// geth is a command-line client for Ethereum. +// bera-geth is a command-line client for Ethereum. package main import ( @@ -207,7 +207,7 @@ var app = flags.NewApp("the go-ethereum command line interface") func init() { // Initialize the CLI app and start Geth - app.Action = geth + app.Action = berageth app.Commands = []*cli.Command{ // See chaincmd.go: initCommand, @@ -255,7 +255,7 @@ func init() { debug.Flags, metricsFlags, ) - flags.AutoEnvVars(app.Flags, "GETH") + flags.AutoEnvVars(app.Flags, "BERA_GETH") app.Before = func(ctx *cli.Context) error { maxprocs.Set() // Automatically set GOMAXPROCS to match Linux container CPU quota. @@ -263,7 +263,7 @@ func init() { if err := debug.Setup(ctx); err != nil { return err } - flags.CheckEnvVars(ctx, app.Flags, "GETH") + flags.CheckEnvVars(ctx, app.Flags, "BERA_GETH") return nil } app.After = func(ctx *cli.Context) error { @@ -286,22 +286,22 @@ func prepare(ctx *cli.Context) { // If we're running a known preset, log it for convenience. switch { case ctx.IsSet(utils.MainnetFlag.Name): - log.Info("Starting Geth on Ethereum mainnet...") + log.Info("Starting bera-geth on Ethereum mainnet...") case ctx.IsSet(utils.SepoliaFlag.Name): - log.Info("Starting Geth on Sepolia testnet...") + log.Info("Starting bera-geth on Sepolia testnet...") case ctx.IsSet(utils.HoleskyFlag.Name): - log.Info("Starting Geth on Holesky testnet...") + log.Info("Starting bera-geth on Holesky testnet...") case ctx.IsSet(utils.HoodiFlag.Name): - log.Info("Starting Geth on Hoodi testnet...") + log.Info("Starting bera-geth on Hoodi testnet...") case ctx.IsSet(utils.BepoliaFlag.Name): - log.Info("Starting Geth on Bepolia testnet...") + log.Info("Starting bera-geth on Bepolia testnet...") case !ctx.IsSet(utils.NetworkIdFlag.Name), ctx.IsSet(utils.BerachainFlag.Name): - log.Info("Starting Geth on Berachain mainnet...") + log.Info("Starting bera-geth on Berachain mainnet...") } // If we're a full node on Berachain mainnet without --cache specified, bump default cache allowance @@ -319,10 +319,10 @@ func prepare(ctx *cli.Context) { } } -// geth is the main entry point into the system if no special subcommand is run. +// berageth is the main entry point into the system if no special subcommand is run. // It creates a default node based on the command line arguments and runs it in // blocking mode, waiting for it to be shut down. -func geth(ctx *cli.Context) error { +func berageth(ctx *cli.Context) error { if args := ctx.Args().Slice(); len(args) > 0 { return fmt.Errorf("invalid command: %q", args[0]) } @@ -350,7 +350,7 @@ func startNode(ctx *cli.Context, stack *node.Node, isConsole bool) { events := make(chan accounts.WalletEvent, 16) stack.AccountManager().Subscribe(events) - // Create a client to interact with local geth node. + // Create a client to interact with local bera-geth node. rpcClient := stack.Attach() ethClient := ethclient.NewClient(rpcClient) diff --git a/cmd/geth/misccmd.go b/cmd/bera-geth/misccmd.go similarity index 100% rename from cmd/geth/misccmd.go rename to cmd/bera-geth/misccmd.go diff --git a/cmd/geth/run_test.go b/cmd/bera-geth/run_test.go similarity index 100% rename from cmd/geth/run_test.go rename to cmd/bera-geth/run_test.go diff --git a/cmd/geth/snapshot.go b/cmd/bera-geth/snapshot.go similarity index 100% rename from cmd/geth/snapshot.go rename to cmd/bera-geth/snapshot.go diff --git a/cmd/geth/testdata/blockchain.blocks b/cmd/bera-geth/testdata/blockchain.blocks similarity index 100% rename from cmd/geth/testdata/blockchain.blocks rename to cmd/bera-geth/testdata/blockchain.blocks diff --git a/cmd/geth/testdata/clique.json b/cmd/bera-geth/testdata/clique.json similarity index 100% rename from cmd/geth/testdata/clique.json rename to cmd/bera-geth/testdata/clique.json diff --git a/cmd/geth/testdata/empty.js b/cmd/bera-geth/testdata/empty.js similarity index 100% rename from cmd/geth/testdata/empty.js rename to cmd/bera-geth/testdata/empty.js diff --git a/cmd/geth/testdata/guswallet.json b/cmd/bera-geth/testdata/guswallet.json similarity index 100% rename from cmd/geth/testdata/guswallet.json rename to cmd/bera-geth/testdata/guswallet.json diff --git a/cmd/geth/testdata/key.prv b/cmd/bera-geth/testdata/key.prv similarity index 100% rename from cmd/geth/testdata/key.prv rename to cmd/bera-geth/testdata/key.prv diff --git a/cmd/geth/testdata/logging/logtest-json.txt b/cmd/bera-geth/testdata/logging/logtest-json.txt similarity index 100% rename from cmd/geth/testdata/logging/logtest-json.txt rename to cmd/bera-geth/testdata/logging/logtest-json.txt diff --git a/cmd/geth/testdata/logging/logtest-logfmt.txt b/cmd/bera-geth/testdata/logging/logtest-logfmt.txt similarity index 100% rename from cmd/geth/testdata/logging/logtest-logfmt.txt rename to cmd/bera-geth/testdata/logging/logtest-logfmt.txt diff --git a/cmd/geth/testdata/logging/logtest-terminal.txt b/cmd/bera-geth/testdata/logging/logtest-terminal.txt similarity index 100% rename from cmd/geth/testdata/logging/logtest-terminal.txt rename to cmd/bera-geth/testdata/logging/logtest-terminal.txt diff --git a/cmd/geth/testdata/password.txt b/cmd/bera-geth/testdata/password.txt similarity index 100% rename from cmd/geth/testdata/password.txt rename to cmd/bera-geth/testdata/password.txt diff --git a/cmd/geth/testdata/passwords.txt b/cmd/bera-geth/testdata/passwords.txt similarity index 100% rename from cmd/geth/testdata/passwords.txt rename to cmd/bera-geth/testdata/passwords.txt diff --git a/cmd/geth/testdata/vcheck/data.json b/cmd/bera-geth/testdata/vcheck/data.json similarity index 100% rename from cmd/geth/testdata/vcheck/data.json rename to cmd/bera-geth/testdata/vcheck/data.json diff --git a/cmd/geth/testdata/vcheck/minisig-sigs-new/data.json.minisig b/cmd/bera-geth/testdata/vcheck/minisig-sigs-new/data.json.minisig similarity index 100% rename from cmd/geth/testdata/vcheck/minisig-sigs-new/data.json.minisig rename to cmd/bera-geth/testdata/vcheck/minisig-sigs-new/data.json.minisig diff --git a/cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.1 b/cmd/bera-geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.1 similarity index 100% rename from cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.1 rename to cmd/bera-geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.1 diff --git a/cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.2 b/cmd/bera-geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.2 similarity index 100% rename from cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.2 rename to cmd/bera-geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.2 diff --git a/cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.3 b/cmd/bera-geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.3 similarity index 100% rename from cmd/geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.3 rename to cmd/bera-geth/testdata/vcheck/minisig-sigs/vulnerabilities.json.minisig.3 diff --git a/cmd/geth/testdata/vcheck/minisign.pub b/cmd/bera-geth/testdata/vcheck/minisign.pub similarity index 100% rename from cmd/geth/testdata/vcheck/minisign.pub rename to cmd/bera-geth/testdata/vcheck/minisign.pub diff --git a/cmd/geth/testdata/vcheck/minisign.sec b/cmd/bera-geth/testdata/vcheck/minisign.sec similarity index 100% rename from cmd/geth/testdata/vcheck/minisign.sec rename to cmd/bera-geth/testdata/vcheck/minisign.sec diff --git a/cmd/geth/testdata/vcheck/signify-sigs/data.json.sig b/cmd/bera-geth/testdata/vcheck/signify-sigs/data.json.sig similarity index 100% rename from cmd/geth/testdata/vcheck/signify-sigs/data.json.sig rename to cmd/bera-geth/testdata/vcheck/signify-sigs/data.json.sig diff --git a/cmd/geth/testdata/vcheck/signifykey.pub b/cmd/bera-geth/testdata/vcheck/signifykey.pub similarity index 100% rename from cmd/geth/testdata/vcheck/signifykey.pub rename to cmd/bera-geth/testdata/vcheck/signifykey.pub diff --git a/cmd/geth/testdata/vcheck/signifykey.sec b/cmd/bera-geth/testdata/vcheck/signifykey.sec similarity index 100% rename from cmd/geth/testdata/vcheck/signifykey.sec rename to cmd/bera-geth/testdata/vcheck/signifykey.sec diff --git a/cmd/geth/testdata/vcheck/vulnerabilities.json b/cmd/bera-geth/testdata/vcheck/vulnerabilities.json similarity index 100% rename from cmd/geth/testdata/vcheck/vulnerabilities.json rename to cmd/bera-geth/testdata/vcheck/vulnerabilities.json diff --git a/cmd/geth/testdata/wrong-passwords.txt b/cmd/bera-geth/testdata/wrong-passwords.txt similarity index 100% rename from cmd/geth/testdata/wrong-passwords.txt rename to cmd/bera-geth/testdata/wrong-passwords.txt diff --git a/cmd/geth/verkle.go b/cmd/bera-geth/verkle.go similarity index 100% rename from cmd/geth/verkle.go rename to cmd/bera-geth/verkle.go diff --git a/cmd/geth/version_check.go b/cmd/bera-geth/version_check.go similarity index 100% rename from cmd/geth/version_check.go rename to cmd/bera-geth/version_check.go diff --git a/cmd/geth/version_check_test.go b/cmd/bera-geth/version_check_test.go similarity index 100% rename from cmd/geth/version_check_test.go rename to cmd/bera-geth/version_check_test.go diff --git a/node/config.go b/node/config.go index dc436876cc..638c02c503 100644 --- a/node/config.go +++ b/node/config.go @@ -298,8 +298,8 @@ func (c *Config) ExtRPCEnabled() bool { func (c *Config) NodeName() string { name := c.name() // Backwards compatibility: previous versions used title-cased "Geth", keep that. - if name == "geth" || name == "geth-testnet" { - name = "Geth" + if name == "bera-geth" || name == "bera-geth-testnet" { + name = "BeraGeth" } if c.UserIdent != "" { name += "/" + c.UserIdent @@ -344,7 +344,7 @@ func (c *Config) ResolvePath(path string) string { // by geth 1.4 are used if they exist. if warn, isOld := isOldGethResource[path]; isOld { oldpath := "" - if c.name() == "geth" { + if c.name() == "bera-geth" { oldpath = filepath.Join(c.DataDir, path) } if oldpath != "" && common.FileExist(oldpath) { diff --git a/node/config_test.go b/node/config_test.go index a94bce9267..6970b3f097 100644 --- a/node/config_test.go +++ b/node/config_test.go @@ -80,8 +80,8 @@ func TestIPCPathResolution(t *testing.T) { {"", "", false, ""}, {"data", "", false, ""}, {"", "bera-geth.ipc", false, filepath.Join(os.TempDir(), "bera-geth.ipc")}, - {"data", "bera-geth.ipc", false, "data/bera-geth.ipc"}, - {"data", "./bera-geth.ipc", false, "./bera-geth.ipc"}, + {"data", "bera-geth.ipc", false, "data" + string(os.PathSeparator) + "bera-geth.ipc"}, + {"data", "./bera-geth.ipc", false, "." + string(os.PathSeparator) + "bera-geth.ipc"}, {"data", "/bera-geth.ipc", false, "/bera-geth.ipc"}, {"", "", true, ``}, {"data", "", true, ``},