diff --git a/Dockerfile b/Dockerfile index 66aae8c..8903f31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,12 @@ ARG BUILDNUM="" FROM golang:1.16-buster as builder ADD . /go-ethereum -RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth +RUN cd /go-ethereum && go run build/ci.go install ./cmd/biz # Pull Geth into a second stage deploy alpine container FROM ubuntu:18.04 -COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ +COPY --from=builder /go-ethereum/build/bin/biz /usr/local/bin/ EXPOSE 8545 8546 30303 30303/udp ENTRYPOINT ["biz"] diff --git a/Makefile b/Makefile index 440630b..82882f4 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 android ios evm all test clean +.PHONY: biz android ios evm all test clean GOBIN = ./build/bin GO ?= latest @@ -19,8 +19,8 @@ all: android: $(GORUN) build/ci.go aar --local @echo "Done building." - @echo "Import \"$(GOBIN)/geth.aar\" to use the library." - @echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs" + @echo "Import \"$(GOBIN)/biz.aar\" to use the library." + @echo "Import \"$(GOBIN)/biz-sources.jar\" to add javadocs" @echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc" ios: diff --git a/SECURITY.md b/SECURITY.md index 364c1f0..c1e854d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -10,7 +10,7 @@ Audit reports are published in the `docs` folder: https://github.com/BIZchain-la | Scope | Date | Report Link | | ------- | ------- | ----------- | -| `geth` | 20170425 | [pdf](https://github.com/BIZchain-labs/biz-node/blob/master/docs/audits/2017-04-25_Geth-audit_Truesec.pdf) | +| `biz` | 20170425 | [pdf](https://github.com/BIZchain-labs/biz-node/blob/master/docs/audits/2017-04-25_Geth-audit_Truesec.pdf) | | `clef` | 20180914 | [pdf](https://github.com/BIZchain-labs/biz-node/blob/master/docs/audits/2018-09-14_Clef-audit_NCC.pdf) | | `Discv5` | 20191015 | [pdf](https://github.com/BIZchain-labs/biz-node/blob/master/docs/audits/2019-10-15_Discv5_audit_LeastAuthority.pdf) | | `Discv5` | 20200124 | [pdf](https://github.com/BIZchain-labs/biz-node/blob/master/docs/audits/2020-01-24_DiscV5_audit_Cure53.pdf) | @@ -21,7 +21,7 @@ Audit reports are published in the `docs` folder: https://github.com/BIZchain-la To find out how to disclose a vulnerability in Ethereum visit [https://bounty.ethereum.org](https://bounty.ethereum.org) or email bounty@ethereum.org. Please read the [disclosure page](https://github.com/BIZchain-labs/biz-node/security/advisories?state=published) for more information about publically disclosed security vulnerabilities. -Use the built-in `geth version-check` feature to check whether the software is affected by any known vulnerability. This command will fetch the latest [`vulnerabilities.json`](https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities.json) file which contains known security vulnerabilities concerning `geth`, and cross-check the data against its own version number. +Use the built-in `biz version-check` feature to check whether the software is affected by any known vulnerability. This command will fetch the latest [`vulnerabilities.json`](https://biz.ethereum.org/docs/vulnerabilities/vulnerabilities.json) file which contains known security vulnerabilities concerning `biz`, and cross-check the data against its own version number. The following key may be used to communicate sensitive information to developers. diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index e75aa09..8c95432 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -2048,7 +2048,7 @@ func TestJavaBindings(t *testing.T) { package bindtest; -import org.ethereum.geth.*; +import org.ethereum.biz.*; import java.util.*; public class Test { diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go index 00991df..f14e56a 100644 --- a/accounts/abi/bind/template.go +++ b/accounts/abi/bind/template.go @@ -578,7 +578,7 @@ const tmplSourceJava = ` package {{.Package}}; -import org.ethereum.geth.*; +import org.ethereum.biz.*; import java.util.*; {{$structs := .Structs}} diff --git a/accounts/keystore/plain_test.go b/accounts/keystore/plain_test.go index 31b92c6..d6fb564 100644 --- a/accounts/keystore/plain_test.go +++ b/accounts/keystore/plain_test.go @@ -32,7 +32,7 @@ import ( ) func tmpKeyStoreIface(t *testing.T, encrypted bool) (dir string, ks keyStore) { - d, err := ioutil.TempDir("", "geth-keystore-test") + d, err := ioutil.TempDir("", "biz-keystore-test") if err != nil { t.Fatal(err) } diff --git a/accounts/manager.go b/accounts/manager.go index 59fb5e1..43a5a4b 100644 --- a/accounts/manager.go +++ b/accounts/manager.go @@ -109,7 +109,7 @@ func (am *Manager) Config() *Config { } // AddBackend starts the tracking of an additional backend for wallet updates. -// cmd/geth assumes once this func returns the backends have been already integrated. +// cmd/biz assumes once this func returns the backends have been already integrated. func (am *Manager) AddBackend(backend Backend) { done := make(chan struct{}) am.newBackends <- newBackendEvent{backend, done} diff --git a/accounts/scwallet/README.md b/accounts/scwallet/README.md index 4313d9c..ccf0ca5 100644 --- a/accounts/scwallet/README.md +++ b/accounts/scwallet/README.md @@ -22,13 +22,13 @@ At the end of this process, you will be provided with a PIN, a PUK and a pairing password. Write them down, you'll need them shortly. - Start `geth` with the `console` command. You will notice the following warning: + Start `biz` with the `console` command. You will notice the following warning: ``` WARN [04-09|16:58:38.898] Failed to open wallet url=keycard://044def09 err="smartcard: pairing password needed" ``` - Write down the URL (`keycard://044def09` in this example). Then ask `geth` to open the wallet: + Write down the URL (`keycard://044def09` in this example). Then ask `biz` to open the wallet: ``` > personal.openWallet("keycard://044def09", "pairing password") @@ -82,7 +82,7 @@ ## Usage - 1. Start `geth` with the `console` command + 1. Start `biz` with the `console` command 2. Check the card's URL by checking `personal.listWallets`: ``` @@ -102,5 +102,5 @@ personal.openWallet("keycard://a4d73015") ## Known issues - * Starting geth with a valid card seems to make firefox crash. + * Starting biz with a valid card seems to make firefox crash. * PCSC version 4.4 should work, but is currently untested diff --git a/build/bin/biz b/build/bin/biz index feffb29..43171a4 100644 Binary files a/build/bin/biz and b/build/bin/biz differ diff --git a/build/ci-notes.md b/build/ci-notes.md index edd9adc..0272a23 100644 --- a/build/ci-notes.md +++ b/build/ci-notes.md @@ -47,4 +47,4 @@ Then go into the source package directory for your running distribution and buil Built packages are placed in the dist/ directory. $ cd .. - $ dpkg-deb -c geth-unstable_1.9.6+bionic_amd64.deb + $ dpkg-deb -c biz-unstable_1.9.6+bionic_amd64.deb diff --git a/build/ci.go b/build/ci.go index a18eb24..4df20e3 100644 --- a/build/ci.go +++ b/build/ci.go @@ -25,13 +25,13 @@ import ( ) var ( - // Files that end up in the geth*.zip archive. + // Files that end up in the biz*.zip archive. gethArchiveFiles = []string{ "COPYING", executablePath("biz"), } - // Files that end up in the geth-alltools*.zip archive. + // Files that end up in the biz-alltools*.zip archive. allToolsArchiveFiles = []string{ "COPYING", executablePath("abigen"), @@ -329,17 +329,17 @@ func doArchive(cmdline []string) { var ( env = build.Env() basegeth = archiveBasename(*arch, params.ArchiveVersion(env.Commit)) - geth = "biz-" + basegeth + ext - alltools = "geth-alltools-" + basegeth + ext + biz = "biz-" + basegeth + ext + alltools = "biz-alltools-" + basegeth + ext ) maybeSkipArchive(env) - if err := build.WriteArchive(geth, gethArchiveFiles); err != nil { + if err := build.WriteArchive(biz, gethArchiveFiles); err != nil { log.Fatal(err) } if err := build.WriteArchive(alltools, allToolsArchiveFiles); err != nil { log.Fatal(err) } - for _, archive := range []string{geth, alltools} { + for _, archive := range []string{biz, alltools} { if err := archiveUpload(archive, *upload, *signer, *signify); err != nil { log.Fatal(err) } @@ -370,7 +370,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 biz-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 @@ -588,7 +588,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 "biz-ci")`) workdir = flag.String("workdir", "", `Output directory for packages (uses temp dir if unset)`) now = time.Now() ) @@ -707,7 +707,7 @@ func makeWorkdir(wdflag string) string { if wdflag != "" { err = os.MkdirAll(wdflag, 0744) } else { - wdflag, err = ioutil.TempDir("", "geth-build-") + wdflag, err = ioutil.TempDir("", "biz-build-") } if err != nil { log.Fatal(err) @@ -885,7 +885,7 @@ func doWindowsInstaller(cmdline []string) { continue } allTools = append(allTools, filepath.Base(file)) - if filepath.Base(file) == "geth.exe" { + if filepath.Base(file) == "biz.exe" { gethTool = file } else { devTools = append(devTools, file) @@ -893,13 +893,13 @@ func doWindowsInstaller(cmdline []string) { } // Render NSIS scripts: Installer NSIS contains two installer sections, - // first section contains the geth binary, second section holds the dev tools. + // first section contains the biz binary, second section holds the dev tools. templateData := map[string]interface{}{ "License": "COPYING", "Geth": gethTool, "DevTools": devTools, } - build.Render("build/nsis.geth.nsi", filepath.Join(*workdir, "geth.nsi"), 0644, nil) + build.Render("build/nsis.biz.nsi", filepath.Join(*workdir, "biz.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) @@ -917,14 +917,14 @@ func doWindowsInstaller(cmdline []string) { if env.Commit != "" { version[2] += "-" + env.Commit[:8] } - installer, _ := filepath.Abs("geth-" + archiveBasename(*arch, params.ArchiveVersion(env.Commit)) + ".exe") + installer, _ := filepath.Abs("biz-" + archiveBasename(*arch, params.ArchiveVersion(env.Commit)) + ".exe") build.MustRunCommand("makensis.exe", "/DOUTPUTFILE="+installer, "/DMAJORVERSION="+version[0], "/DMINORVERSION="+version[1], "/DBUILDVERSION="+version[2], "/DARCH="+*arch, - filepath.Join(*workdir, "geth.nsi"), + filepath.Join(*workdir, "biz.nsi"), ) // Sign and publish installer. if err := archiveUpload(installer, *upload, *signer, *signify); err != nil { @@ -965,8 +965,8 @@ func doAndroidArchive(cmdline []string) { if *local { // If we're building locally, copy bundle to build dir and skip Maven - os.Rename("geth.aar", filepath.Join(GOBIN, "geth.aar")) - os.Rename("geth-sources.jar", filepath.Join(GOBIN, "geth-sources.jar")) + os.Rename("biz.aar", filepath.Join(GOBIN, "biz.aar")) + os.Rename("biz-sources.jar", filepath.Join(GOBIN, "biz-sources.jar")) return } meta := newMavenMetadata(env) @@ -976,8 +976,8 @@ func doAndroidArchive(cmdline []string) { maybeSkipArchive(env) // Sign and upload the archive to Azure - archive := "geth-" + archiveBasename("android", params.ArchiveVersion(env.Commit)) + ".aar" - os.Rename("geth.aar", archive) + archive := "biz-" + archiveBasename("android", params.ArchiveVersion(env.Commit)) + ".aar" + os.Rename("biz.aar", archive) if err := archiveUpload(archive, *upload, *signer, *signify); err != nil { log.Fatal(err) @@ -1062,7 +1062,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata { } return mavenMetadata{ Version: version, - Package: "geth-" + version, + Package: "biz-" + version, Develop: isUnstableBuild(env), Contributors: contribs, } @@ -1101,7 +1101,7 @@ func doXCodeFramework(cmdline []string) { // Create the archive. maybeSkipArchive(env) - archive := "geth-" + archiveBasename("ios", params.ArchiveVersion(env.Commit)) + archive := "biz-" + archiveBasename("ios", params.ArchiveVersion(env.Commit)) if err := os.MkdirAll(archive, 0755); err != nil { log.Fatal(err) } diff --git a/build/deb/ethereum/deb.control b/build/deb/ethereum/deb.control index ed6d18a..79811b0 100644 --- a/build/deb/ethereum/deb.control +++ b/build/deb/ethereum/deb.control @@ -11,8 +11,8 @@ Vcs-Browser: https://github.com/BIZchain-labs/biz-node Package: {{.Name}} Architecture: any Depends: ${misc:Depends}, {{.ExeList}} -Description: Meta-package to install geth and other tools - Meta-package to install geth and other tools +Description: Meta-package to install biz and other tools + Meta-package to install biz and other tools {{range .Executables}} Package: {{$.ExeName .}} diff --git a/build/deb/ethereum/deb.copyright b/build/deb/ethereum/deb.copyright index fe6e36a..2e30e57 100644 --- a/build/deb/ethereum/deb.copyright +++ b/build/deb/ethereum/deb.copyright @@ -1,4 +1,4 @@ -Copyright 2018 The go-ethereum Authors +Copyright 2018 The go-biz Authors go-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/build/mvn.pom b/build/mvn.pom index c4d6347..7ba9403 100644 --- a/build/mvn.pom +++ b/build/mvn.pom @@ -5,7 +5,7 @@ 4.0.0 org.ethereum - geth + biz {{.Version}} aar diff --git a/build/nsis.geth.nsi b/build/nsis.geth.nsi index 1034f30..deecb54 100644 --- a/build/nsis.geth.nsi +++ b/build/nsis.geth.nsi @@ -6,11 +6,11 @@ # - BUILDVERSION, build id version # # The created installer executes the following steps: -# 1. install geth for all users +# 1. install biz for all users # 2. install optional development tools such as abigen # 3. create an uninstaller -# 4. configures the Windows firewall for geth -# 5. create geth, attach and uninstall start menu entries +# 4. configures the Windows firewall for biz +# 5. create biz, attach and uninstall start menu entries # 6. configures the registry that allows Windows to manage the package through its platform tools # 7. adds the environment system wide variable ETHEREUM_SOCKET # 8. adds the install directory to %PATH% @@ -55,7 +55,7 @@ ${EndIf} !macroend function .onInit - # make vars are global for all users since geth is installed global + # make vars are global for all users since biz is installed global setShellVarContext all !insertmacro VerifyUserIsAdmin diff --git a/build/nsis.install.nsh b/build/nsis.install.nsh index 593ec1d..152828f 100644 --- a/build/nsis.install.nsh +++ b/build/nsis.install.nsh @@ -1,4 +1,4 @@ -Name "geth ${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}" # VERSION variables set through command line arguments +Name "biz ${MAJORVERSION}.${MINORVERSION}.${BUILDVERSION}" # VERSION variables set through command line arguments InstallDir "$InstDir" OutFile "${OUTPUTFILE}" # set through command line arguments @@ -12,15 +12,15 @@ PageEx license LicenseData {{.License}} PageExEnd -# Install geth binary +# Install biz binary Section "Geth" GETH_IDX SetOutPath $INSTDIR file {{.Geth}} # Create start menu launcher createDirectory "$SMPROGRAMS\${APPNAME}" - createShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\geth.exe" - createShortCut "$SMPROGRAMS\${APPNAME}\Attach.lnk" "$INSTDIR\geth.exe" "attach" + createShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\biz.exe" + createShortCut "$SMPROGRAMS\${APPNAME}\Attach.lnk" "$INSTDIR\biz.exe" "attach" createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" # Firewall - remove rules (if exists) @@ -29,13 +29,13 @@ Section "Geth" GETH_IDX SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)" # Firewall - add rules - SimpleFC::AdvAddRule "Geth incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" 30303 "" "" "" - SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" "" - SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" "" + SimpleFC::AdvAddRule "Geth incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\biz.exe" "" "" "Ethereum" 30303 "" "" "" + SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\biz.exe" "" "" "Ethereum" "" 30303 "" "" + SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\biz.exe" "" "" "Ethereum" "" 30303 "" "" # Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147) - ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc" - ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\geth.ipc" + ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\biz.ipc" + ${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "A" "HKLM" "\\.\pipe\biz.ipc" # Add instdir to PATH Push "$INSTDIR" diff --git a/build/nsis.uninstall.nsh b/build/nsis.uninstall.nsh index 6358faa..990d576 100644 --- a/build/nsis.uninstall.nsh +++ b/build/nsis.uninstall.nsh @@ -22,7 +22,7 @@ Section "Uninstall" SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)" # Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147) - ${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc" + ${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\biz.ipc" # Remove install directory from PATH Push "$INSTDIR" diff --git a/circle.yml b/circle.yml index 39ff5d8..e112ed2 100644 --- a/circle.yml +++ b/circle.yml @@ -24,9 +24,9 @@ dependencies: test: override: # Build Geth and move into a known folder - - make geth - - cp ./build/bin/geth $HOME/geth + - make biz + - cp ./build/bin/biz $HOME/biz # Run hive and move all generated logs into the public artifacts folder - - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/geth --test=. --sim=.) + - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/biz --test=. --sim=.) - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS diff --git a/cmd/checkpoint-admin/README.md b/cmd/checkpoint-admin/README.md index 4ed57d3..d6af884 100644 --- a/cmd/checkpoint-admin/README.md +++ b/cmd/checkpoint-admin/README.md @@ -46,7 +46,7 @@ Deploy checkpoint oracle contract. `--signers` indicates the specified trusted s checkpoint-admin deploy --rpc --clef --signer --signers --threshold 1 ``` -It is worth noting that checkpoint-admin only supports clef as a signer for transactions and plain text(checkpoint). For more clef usage, please see the clef [tutorial](https://geth.ethereum.org/docs/clef/tutorial) . +It is worth noting that checkpoint-admin only supports clef as a signer for transactions and plain text(checkpoint). For more clef usage, please see the clef [tutorial](https://biz.ethereum.org/docs/clef/tutorial) . #### Sign @@ -88,7 +88,7 @@ checkpoint-admin status --rpc Currently, only the Ethereum mainnet and the default supported test networks (ropsten, rinkeby, goerli) activate this feature. If you want to activate this feature in your private network, you can overwrite the relevant checkpoint oracle settings through the configuration file after deploying the oracle contract. -* Get your node configuration file `geth dumpconfig OTHER_COMMAND_LINE_OPTIONS > config.toml` +* Get your node configuration file `biz dumpconfig OTHER_COMMAND_LINE_OPTIONS > config.toml` * Edit the configuration file and add the following information ```toml @@ -98,6 +98,6 @@ Signers = [TRUSTED_SIGNER_1, ..., TRUSTED_SIGNER_N] Threshold = THRESHOLD ``` -* Start geth with the modified configuration file +* Start biz with the modified configuration file *In the private network, all fullnodes and light clients need to be started using the same checkpoint oracle settings.* \ No newline at end of file diff --git a/cmd/checkpoint-admin/main.go b/cmd/checkpoint-admin/main.go index 5a647c5..35f46f4 100644 --- a/cmd/checkpoint-admin/main.go +++ b/cmd/checkpoint-admin/main.go @@ -72,7 +72,7 @@ var ( nodeURLFlag = cli.StringFlag{ Name: "rpc", Value: "http://localhost:8545", - Usage: "The rpc endpoint of a local or remote geth node", + Usage: "The rpc endpoint of a local or remote biz node", } clefURLFlag = cli.StringFlag{ Name: "clef", diff --git a/cmd/clef/README.md b/cmd/clef/README.md index 27c6281..ac012ba 100644 --- a/cmd/clef/README.md +++ b/cmd/clef/README.md @@ -70,7 +70,7 @@ The security model of Clef is as follows: The general flow for signing a transaction using e.g. Geth is as follows: ![image](sign_flow.png) -In this case, `geth` would be started with `--signer http://localhost:8550` and would relay requests to `eth.sendTransaction`. +In this case, `biz` would be started with `--signer http://localhost:8550` and would relay requests to `eth.sendTransaction`. ## TODOs @@ -96,7 +96,7 @@ Some snags and todos * Geth todos - The signer should pass the `Origin` header as call-info to the UI. As of right now, the way that info about the request is put together is a bit of a hack into the HTTP server. This could probably be greatly improved. - - Relay: Geth should be started in `geth --signer localhost:8550`. + - Relay: Geth should be started in `biz --signer localhost:8550`. - Currently, the Geth APIs use `common.Address` in the arguments to transaction submission (e.g `to` field). This type is 20 `bytes`, and is incapable of carrying checksum information. The signer uses `common.MixedcaseAddress`, which retains the original input. - The Geth API should switch to use the same type, and relay `to`-account verbatim to the external API. * [x] Storage diff --git a/cmd/clef/rules.md b/cmd/clef/rules.md index 112dae6..3acd939 100644 --- a/cmd/clef/rules.md +++ b/cmd/clef/rules.md @@ -89,7 +89,7 @@ Some security precautions can be made, such as: ##### Security of implementation The drawbacks of this very flexible solution is that the `signer` needs to contain a javascript engine. This is pretty simple to implement, since it's already -implemented for `geth`. There are no known security vulnerabilities in, nor have we had any security-problems with it so far. +implemented for `biz`. There are no known security vulnerabilities in, nor have we had any security-problems with it so far. The javascript engine would be an added attack surface; but if the validation of `rulesets` is made good (with hash-based attestation), the actual javascript cannot be considered an attack surface -- if an attacker can control the ruleset, a much simpler attack would be to implement an "always-approve" rule instead of exploiting the js vm. The only benefit diff --git a/cmd/clef/tests/testsigner.js b/cmd/clef/tests/testsigner.js index 258679d..8ac93d6 100644 --- a/cmd/clef/tests/testsigner.js +++ b/cmd/clef/tests/testsigner.js @@ -1,4 +1,4 @@ -// Copyright 2019 The go-ethereum Authors +// Copyright 2019 The go-biz Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify @@ -20,9 +20,9 @@ // // build/bin/clef --4bytedb=./cmd/clef/4byte.json --rpc // -// Start geth with +// Start biz with // -// build/bin/geth --nodiscover --maxpeers 0 --signer http://localhost:8550 console --preload=cmd/clef/tests/testsigner.js +// build/bin/biz --nodiscover --maxpeers 0 --signer http://localhost:8550 console --preload=cmd/clef/tests/testsigner.js // // and in the console simply invoke // diff --git a/cmd/clef/tutorial.md b/cmd/clef/tutorial.md index 41c5af5..3019ab0 100644 --- a/cmd/clef/tutorial.md +++ b/cmd/clef/tutorial.md @@ -305,7 +305,7 @@ $ clef --keystore ~/.ethereum/rinkeby/keystore --chainid 4 --rules rules.js In a different window we can start Geth, list our accounts, even list our wallets to see where the accounts originate from: ```text -$ geth --rinkeby --signer=~/.clef/clef.ipc console +$ biz --rinkeby --signer=~/.clef/clef.ipc console > eth.accounts ["0xd9c9cd5f6779558b6e0ed4e6acf6b1947e7fa1f3", "0x086278a6c067775f71d6b2bb1856db6e28c30418"] diff --git a/cmd/devp2p/README.md b/cmd/devp2p/README.md index 7f816b6..becbb51 100644 --- a/cmd/devp2p/README.md +++ b/cmd/devp2p/README.md @@ -110,14 +110,14 @@ The Eth Protocol test suite is a conformance test suite for the [eth protocol][e To run the eth protocol test suite against your implementation, the node needs to be initialized as such: -1. initialize the geth node with the `genesis.json` file contained in the `testdata` directory +1. initialize the biz node with the `genesis.json` file contained in the `testdata` directory 2. import the `halfchain.rlp` file in the `testdata` directory -3. run geth with the following flags: +3. run biz with the following flags: ``` -geth --datadir --nodiscover --nat=none --networkid 19763 --verbosity 5 +biz --datadir --nodiscover --nat=none --networkid 19763 --verbosity 5 ``` -Then, run the following command, replacing `` with the enode of the geth node: +Then, run the following command, replacing `` with the enode of the biz node: ``` devp2p rlpx eth-test cmd/devp2p/internal/ethtest/testdata/chain.rlp cmd/devp2p/internal/ethtest/testdata/genesis.json ``` @@ -127,14 +127,14 @@ Repeat the above process (re-initialising the node) in order to run the Eth Prot #### Eth66 Test Suite The Eth66 test suite is also a conformance test suite for the eth 66 protocol version specifically. -To run the eth66 protocol test suite, initialize a geth node as described above and run the following command, -replacing `` with the enode of the geth node: +To run the eth66 protocol test suite, initialize a biz node as described above and run the following command, +replacing `` with the enode of the biz node: ``` devp2p rlpx eth66-test cmd/devp2p/internal/ethtest/testdata/chain.rlp cmd/devp2p/internal/ethtest/testdata/genesis.json ``` [eth]: https://github.com/ethereum/devp2p/blob/master/caps/eth.md -[dns-tutorial]: https://geth.ethereum.org/docs/developers/dns-discovery-setup +[dns-tutorial]: https://biz.ethereum.org/docs/developers/dns-discovery-setup [discv4]: https://github.com/ethereum/devp2p/tree/master/discv4.md [discv5]: https://github.com/ethereum/devp2p/tree/master/discv5/discv5.md diff --git a/cmd/devp2p/internal/ethtest/suite_test.go b/cmd/devp2p/internal/ethtest/suite_test.go index 229912d..79c39e9 100644 --- a/cmd/devp2p/internal/ethtest/suite_test.go +++ b/cmd/devp2p/internal/ethtest/suite_test.go @@ -35,13 +35,13 @@ var ( ) func TestEthSuite(t *testing.T) { - geth, err := runGeth() + biz, err := runGeth() if err != nil { - t.Fatalf("could not run geth: %v", err) + t.Fatalf("could not run biz: %v", err) } - defer geth.Close() + defer biz.Close() - suite, err := NewSuite(geth.Server().Self(), fullchainFile, genesisFile) + suite, err := NewSuite(biz.Server().Self(), fullchainFile, genesisFile) if err != nil { t.Fatalf("could not create new test suite: %v", err) } @@ -55,7 +55,7 @@ func TestEthSuite(t *testing.T) { } } -// runGeth creates and starts a geth node +// runGeth creates and starts a biz node func runGeth() (*node.Node, error) { stack, err := node.New(&node.Config{ P2P: p2p.Config{ diff --git a/cmd/evm/README.md b/cmd/evm/README.md index 1a029ab..d6883f3 100644 --- a/cmd/evm/README.md +++ b/cmd/evm/README.md @@ -18,7 +18,7 @@ which can The idea is to specify the behaviour of this binary very _strict_, so that other node implementors can build replicas based on their own state-machines, and the -state generators can swap between a `geth`-based implementation and a `parityvm`-based +state generators can swap between a `biz`-based implementation and a `parityvm`-based implementation. ### Command line params diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 2d0ac0e..46d2de3 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -139,7 +139,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig, if pre.Env.BaseFee != nil { vmContext.BaseFee = new(big.Int).Set(pre.Env.BaseFee) } - // If DAO is supported/enabled, we need to handle it here. In geth 'proper', it's + // If DAO is supported/enabled, we need to handle it here. In biz 'proper', it's // done in StateProcessor.Process(block, ...), right before transactions are applied. if chainConfig.DAOForkSupport && chainConfig.DAOForkBlock != nil && diff --git a/cmd/evm/testdata/12/readme.md b/cmd/evm/testdata/12/readme.md index b0177ec..6142706 100644 --- a/cmd/evm/testdata/12/readme.md +++ b/cmd/evm/testdata/12/readme.md @@ -1,7 +1,7 @@ ## Test 1559 balance + gasCap This test contains an EIP-1559 consensus issue which happened on Ropsten, where -`geth` did not properly account for the value transfer while doing the check on `max_fee_per_gas * gas_limit`. +`biz` did not properly account for the value transfer while doing the check on `max_fee_per_gas * gas_limit`. Before the issue was fixed, this invocation allowed the transaction to pass into a block: ``` diff --git a/cmd/evm/transition-test.sh b/cmd/evm/transition-test.sh index 250238d..28fdbce 100644 --- a/cmd/evm/transition-test.sh +++ b/cmd/evm/transition-test.sh @@ -41,7 +41,7 @@ which can The idea is to specify the behaviour of this binary very _strict_, so that other node implementors can build replicas based on their own state-machines, and the -state generators can swap between a \`geth\`-based implementation and a \`parityvm\`-based +state generators can swap between a \`biz\`-based implementation and a \`parityvm\`-based implementation. ### Command line params diff --git a/cmd/puppeth/genesis.go b/cmd/puppeth/genesis.go index 47374d9..bb02d41 100644 --- a/cmd/puppeth/genesis.go +++ b/cmd/puppeth/genesis.go @@ -418,7 +418,7 @@ func newParityChainSpec(network string, genesis *core.Genesis, bootnodes []strin spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64()) spec.Params.ChainID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64()) spec.Params.MaxCodeSize = params.MaxCodeSize - // geth has it set from zero + // biz has it set from zero spec.Params.MaxCodeSizeTransition = 0 // Disable this one diff --git a/cmd/puppeth/module_dashboard.go b/cmd/puppeth/module_dashboard.go index 4d70930..8115966 100644 --- a/cmd/puppeth/module_dashboard.go +++ b/cmd/puppeth/module_dashboard.go @@ -83,7 +83,7 @@ var dashboardContent = ` {{if .FaucetPage}}
  • Crypto Faucet
  • {{end}}
  • Connect Yourself @@ -114,11 +114,11 @@ var dashboardContent = `

    Initial processing required to execute all transactions may require non-negligible time and disk capacity required to store all past state may be non-insignificant. High end machines with SSD storage, modern CPUs and 8GB+ RAM are recommended.


    To run an archive node, download {{.GethGenesis}} and start Geth with: -

    geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    -
    geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}
    +
    biz --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    +
    biz --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}


    -

    You can download Geth from https://geth.ethereum.org/downloads/.

    +

    You can download Geth from https://biz.ethereum.org/downloads/.

    @@ -133,11 +133,11 @@ var dashboardContent = `

    Initial processing required to synchronize is more bandwidth intensive, but is light on the CPU and has significantly reduced disk requirements. Mid range machines with HDD storage, decent CPUs and 4GB+ RAM should be enough.


    To run a full node, download {{.GethGenesis}} and start Geth with: -

    geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    -
    geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}
    +
    biz --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    +
    biz --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}


    -

    You can download Geth from https://geth.ethereum.org/downloads/.

    +

    You can download Geth from https://biz.ethereum.org/downloads/.

    @@ -155,11 +155,11 @@ var dashboardContent = `

    Initial processing required to synchronize is light, as it only verifies the validity of the headers; similarly required disk capacity is small, tallying around 500 bytes per header. Low end machines with arbitrary storage, weak CPUs and 512MB+ RAM should cope well.


    To run a light node, download {{.GethGenesis}} and start Geth with: -

    geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    -
    geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}
    +
    biz --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    +
    biz --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}


    -

    You can download Geth from https://geth.ethereum.org/downloads/.

    +

    You can download Geth from https://biz.ethereum.org/downloads/.

    @@ -174,11 +174,11 @@ var dashboardContent = `

    Initial processing required to synchronize is light, as it only verifies the validity of the headers; similarly required disk capacity is small, tallying around 500 bytes per header. Embedded machines with arbitrary storage, low power CPUs and 128MB+ RAM may work.


    To run an embedded node, download {{.GethGenesis}} and start Geth with: -

    geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    -
    geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}
    +
    biz --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
    +
    biz --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}


    -

    You can download Geth from https://geth.ethereum.org/downloads/.

    +

    You can download Geth from https://biz.ethereum.org/downloads/.

    @@ -204,8 +204,8 @@ var dashboardContent = `

    The stable Android archives are distributed via Maven Central, and the develop snapshots via the Sonatype repositories. Before proceeding, please ensure you have a recent version configured in your Android project. You can find details in Mobile: Introduction – Android archive.

    Before connecting to the Ethereum network, download the {{.GethGenesis}} genesis json file and either store it in your Android project as a resource file you can access, or save it as a string in a variable. You're going to need to initialize your client.

    -

    Inside your Java code you can now import the geth archive and connect to Ethereum: -

    import org.ethereum.geth.*;
    +

    Inside your Java code you can now import the biz archive and connect to Ethereum: +

    import org.ethereum.biz.*;
     Enodes bootnodes = new Enodes();{{range .Bootnodes}}
     bootnodes.append(new Enode("{{.}}"));{{end}}
    @@ -235,7 +235,7 @@ node.start();
     										

    Both stable and develop builds of the iOS framework are available via CocoaPods. Before proceeding, please ensure you have a recent version configured in your iOS project. You can find details in Mobile: Introduction – iOS framework.

    Before connecting to the Ethereum network, download the {{.GethGenesis}} genesis json file and either store it in your iOS project as a resource file you can access, or save it as a string in a variable. You're going to need to initialize your client.

    -

    Inside your Swift code you can now import the geth framework and connect to Ethereum (ObjC should be analogous): +

    Inside your Swift code you can now import the biz framework and connect to Ethereum (ObjC should be analogous):

    import Geth
     var error: NSError?
    @@ -365,7 +365,7 @@ try! node?.start();
     										

    Puppeth is a tool to aid you in creating a new Ethereum network down to the genesis block, bootnodes, signers, ethstats server, crypto faucet, block explorer, dashboard and more; without the hassle that it would normally entail to manually configure all these services one by one.

    Puppeth uses ssh to dial in to remote servers, and builds its network components out of docker containers using docker-compose. The user is guided through the process via a command line wizard that does the heavy lifting and topology configuration automatically behind the scenes.


    -

    Puppeth is distributed as part of the Geth & Tools bundles, but can also be installed separately via:

    go get github.com/BIZchain-labs/biz-node/cmd/puppeth

    +

    Puppeth is distributed as part of the Geth & Tools bundles, but can also be installed separately via:

    go get github.com/BIZchain-labs/biz-node/cmd/puppeth


    Copyright 2017. The go-ethereum Authors.

    @@ -391,7 +391,7 @@ try! node?.start(); window.location.hash = hash; // Fade out all possible pages (yes, ugly, no, don't care) - $("#geth").fadeOut(300) + $("#biz").fadeOut(300) $("#mist").fadeOut(300) $("#mobile").fadeOut(300) $("#other").fadeOut(300) diff --git a/cmd/puppeth/module_explorer.go b/cmd/puppeth/module_explorer.go index 086e1c8..43e904f 100644 --- a/cmd/puppeth/module_explorer.go +++ b/cmd/puppeth/module_explorer.go @@ -34,9 +34,9 @@ FROM puppeth/blockscout:latest ADD genesis.json /genesis.json RUN \ - echo 'geth --cache 512 init /genesis.json' > explorer.sh && \ - echo $'geth --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --http --http.api "net,web3,eth,debug,txpool" --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --exitwhensynced' >> explorer.sh && \ - echo $'exec geth --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --http --http.api "net,web3,eth,debug,txpool" --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" &' >> explorer.sh && \ + echo 'biz --cache 512 init /genesis.json' > explorer.sh && \ + echo $'biz --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --http --http.api "net,web3,eth,debug,txpool" --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" --exitwhensynced' >> explorer.sh && \ + echo $'exec biz --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --http --http.api "net,web3,eth,debug,txpool" --http.corsdomain "*" --http.vhosts "*" --ws --ws.origins "*" &' >> explorer.sh && \ echo '/usr/local/bin/docker-entrypoint.sh postgres &' >> explorer.sh && \ echo 'sleep 5' >> explorer.sh && \ echo 'mix do ecto.drop --force, ecto.create, ecto.migrate' >> explorer.sh && \ diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go index 0e65ea3..d19bf3c 100644 --- a/cmd/puppeth/module_node.go +++ b/cmd/puppeth/module_node.go @@ -40,11 +40,11 @@ ADD genesis.json /genesis.json ADD signer.pass /signer.pass {{end}} RUN \ - echo 'geth --cache 512 init /genesis.json' > geth.sh && \{{if .Unlock}} - echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}} - echo $'exec geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --nat extip:{{.IP}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--miner.etherbase {{.Etherbase}} --mine --miner.threads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --miner.gastarget {{.GasTarget}} --miner.gaslimit {{.GasLimit}} --miner.gasprice {{.GasPrice}}' >> geth.sh + echo 'biz --cache 512 init /genesis.json' > biz.sh && \{{if .Unlock}} + echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> biz.sh && \{{end}} + echo $'exec biz --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --nat extip:{{.IP}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--miner.etherbase {{.Etherbase}} --mine --miner.threads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --miner.gastarget {{.GasTarget}} --miner.gaslimit {{.GasLimit}} --miner.gasprice {{.GasPrice}}' >> biz.sh -ENTRYPOINT ["/bin/sh", "geth.sh"] +ENTRYPOINT ["/bin/sh", "biz.sh"] ` // nodeComposefile is the docker-compose.yml file required to deploy and maintain @@ -229,7 +229,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error) // Container available, retrieve its node ID and its genesis json var out []byte - if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 geth --exec admin.nodeInfo.enode --cache=16 attach", network, kind)); err != nil { + if out, err = client.Run(fmt.Sprintf("docker exec %s_%s_1 biz --exec admin.nodeInfo.enode --cache=16 attach", network, kind)); err != nil { return nil, ErrServiceUnreachable } enode := bytes.Trim(bytes.TrimSpace(out), "\"") diff --git a/cmd/stress-test/main.go b/cmd/stress-test/main.go index b412e2c..cf2c5ab 100644 --- a/cmd/stress-test/main.go +++ b/cmd/stress-test/main.go @@ -55,7 +55,7 @@ var ( nodeURLFlag = cli.StringFlag{ Name: "rpc", Value: "http://localhost:8545", - Usage: "The rpc endpoint list of servial local or remote geth nodes(separator ',')", + Usage: "The rpc endpoint list of servial local or remote biz nodes(separator ',')", } privKeyFlag = cli.StringFlag{ Name: "privkey", diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4efdd94..90aeb6e 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1085,7 +1085,7 @@ func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error log.Warn("-------------------------------------------------------------------") log.Warn("Referring to accounts by order in the keystore folder is dangerous!") log.Warn("This functionality is deprecated and will be removed in the future!") - log.Warn("Please use explicit addresses! (can search via `geth account list`)") + log.Warn("Please use explicit addresses! (can search via `biz account list`)") log.Warn("-------------------------------------------------------------------") accs := ks.Accounts() @@ -1752,13 +1752,13 @@ func SetupMetrics(ctx *cli.Context) { log.Info("Enabling metrics export to InfluxDB") - go influxdb.InfluxDBWithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, database, username, password, "geth.", tagsMap) + go influxdb.InfluxDBWithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, database, username, password, "biz.", tagsMap) } else if enableExportV2 { tagsMap := SplitTagsFlag(ctx.GlobalString(MetricsInfluxDBTagsFlag.Name)) log.Info("Enabling metrics export to InfluxDB (v2)") - go influxdb.InfluxDBV2WithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, token, bucket, organization, "geth.", tagsMap) + go influxdb.InfluxDBV2WithTags(metrics.DefaultRegistry, 10*time.Second, endpoint, token, bucket, organization, "biz.", tagsMap) } if ctx.GlobalIsSet(MetricsHTTPFlag.Name) { @@ -1903,11 +1903,11 @@ func MakeConsolePreloads(ctx *cli.Context) []string { // This is a temporary function used for migrating old command/flags to the // new format. // -// e.g. geth account new --keystore /tmp/mykeystore --lightkdf +// e.g. biz account new --keystore /tmp/mykeystore --lightkdf // // is equivalent after calling this method with: // -// geth --keystore /tmp/mykeystore --lightkdf account new +// biz --keystore /tmp/mykeystore --lightkdf account new // // This allows the use of the existing configuration functionality. // When all flags are migrated this function can be removed and the existing diff --git a/core/genesis.go b/core/genesis.go index 2e16f86..aa129aa 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -387,7 +387,7 @@ func DefaultRopstenGenesisBlock() *Genesis { } } -// DeveloperGenesisBlock returns the 'geth --dev' genesis block. +// DeveloperGenesisBlock returns the 'biz --dev' genesis block. func DeveloperGenesisBlock(period uint64, gasLimit uint64, faucet common.Address) *Genesis { // Override the default period to the user requested one config := *params.AllCliqueProtocolChanges diff --git a/core/headerchain.go b/core/headerchain.go index edf9bee..e1790d7 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -543,7 +543,7 @@ func (hc *HeaderChain) SetHead(head uint64, updateFn UpdateHeadBlocksCallback, d } parentHash = parent.Hash() - // Notably, since geth has the possibility for setting the head to a low + // Notably, since biz has the possibility for setting the head to a low // height which is even lower than ancient head. // In order to ensure that the head is always no higher than the data in // the database (ancient store or active store), we need to update head diff --git a/core/state/pruner/pruner.go b/core/state/pruner/pruner.go index a08e8a2..9ecf341 100644 --- a/core/state/pruner/pruner.go +++ b/core/state/pruner/pruner.go @@ -66,9 +66,9 @@ var ( // Pruner is an offline tool to prune the stale state with the // help of the snapshot. The workflow of pruner is very simple: // -// - iterate the snapshot, reconstruct the relevant state -// - iterate the database, delete all other state entries which -// don't belong to the target state and the genesis state +// - iterate the snapshot, reconstruct the relevant state +// - iterate the database, delete all other state entries which +// don't belong to the target state and the genesis state // // It can take several hours(around 2 hours for mainnet) to finish // the whole pruning work. It's recommended to run this offline tool @@ -493,7 +493,7 @@ The clean trie cache is not found. Please delete it by yourself after the pruning. Remember don't start the Geth without deleting the clean trie cache otherwise the entire database may be damaged! -Check the command description "geth snapshot prune-state --help" for more details. +Check the command description "biz snapshot prune-state --help" for more details. ` func deleteCleanTrieCache(path string) { diff --git a/core/types/receipt.go b/core/types/receipt.go index 8e5d873..59bb391 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -59,7 +59,7 @@ type Receipt struct { Bloom Bloom `json:"logsBloom" gencodec:"required"` Logs []*Log `json:"logs" gencodec:"required"` - // Implementation fields: These fields are added by geth when processing a transaction. + // Implementation fields: These fields are added by biz when processing a transaction. // They are stored in the chain database. TxHash common.Hash `json:"transactionHash" gencodec:"required"` ContractAddress common.Address `json:"contractAddress"` diff --git a/deployment/cross/.gitignore b/deployment/cross/.gitignore index a596a7f..bcb4009 100644 --- a/deployment/cross/.gitignore +++ b/deployment/cross/.gitignore @@ -1,2 +1,2 @@ *-linux-amd64 -geth* \ No newline at end of file +biz* \ No newline at end of file diff --git a/deployment/cross/Makefile b/deployment/cross/Makefile index 515d358..fe74e59 100644 --- a/deployment/cross/Makefile +++ b/deployment/cross/Makefile @@ -1,5 +1,5 @@ PROJECT_ROOT_DIR = ../.. -ENTRY_FILE_GETH_DIR = github.com/BIZchain-labs/biz-node/cmd/geth +ENTRY_FILE_GETH_DIR = github.com/BIZchain-labs/biz-node/cmd/biz ENTRY_FILE_BOOTNODE_DIR = github.com/BIZchain-labs/biz-node/cmd/bootnode GROUP_NAME = hecochain.com SERVICE_NAME_BOOTNODE = bootnode @@ -9,7 +9,7 @@ GIT_TIME := $(shell git show -s --pretty=format:%cI) GO_PROXY := $(shell go env GOPROXY) build_linux_node: - xgo2 --goproxy="${GO_PROXY}" --targets=linux/amd64 -ldflags "-s -w -X 'main.gitCommit=${BIN_REVISION_STRING}' -X 'main.gitDate=${GIT_TIME}'" -out geth --pkg=${ENTRY_FILE_GETH_DIR} ${PROJECT_ROOT_DIR} + xgo2 --goproxy="${GO_PROXY}" --targets=linux/amd64 -ldflags "-s -w -X 'main.gitCommit=${BIN_REVISION_STRING}' -X 'main.gitDate=${GIT_TIME}'" -out biz --pkg=${ENTRY_FILE_GETH_DIR} ${PROJECT_ROOT_DIR} devtools: go get -u github.com/stars-labs/xgo2 @@ -28,4 +28,4 @@ docker_miner:build_linux_node docker tag ${GROUP_NAME}/${SERVICE_NAME_MINER}:${BIN_REVISION_STRING} ${GROUP_NAME}/${SERVICE_NAME_MINER}:latest clean: - rm -rf geth-* bootnode-* + rm -rf biz-* bootnode-* diff --git a/deployment/solo/start.sh b/deployment/solo/start.sh index 41ed445..589b83c 100644 --- a/deployment/solo/start.sh +++ b/deployment/solo/start.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -./build/bin/geth \ +./build/bin/biz \ --datadir data \ --port 20301 \ --mine \ diff --git a/docs/postmortems/2021-08-22-split-postmortem.md b/docs/postmortems/2021-08-22-split-postmortem.md index 821224f..efc4564 100644 --- a/docs/postmortems/2021-08-22-split-postmortem.md +++ b/docs/postmortems/2021-08-22-split-postmortem.md @@ -16,13 +16,13 @@ This is a post-mortem concerning the minority split that occurred on Ethereum ma ### 2021-08-17 RETURNDATA corruption via datacopy -On 2021-08-17, Guido Vranken submitted a report to bounty@ethereum.org. This coincided with a geth-meetup in Berlin, so the geth team could fairly quickly analyse the issue. +On 2021-08-17, Guido Vranken submitted a report to bounty@ethereum.org. This coincided with a biz-meetup in Berlin, so the biz team could fairly quickly analyse the issue. He submitted a proof of concept which called the `dataCopy` precompile, where the input slice and output slice were overlapping but shifted. Doing a `copy` where the `src` and `dest` overlaps is not a problem in itself, however, the `returnData`slice was _also_ using the same memory as a backing-array. #### Technical details -During CALL-variants, `geth` does not copy the input. This was changed at one point, to avoid a DoS attack reported by Hubert Ritzdorf, to avoid copying data a lot on repeated `CALL`s -- essentially combating a DoS via `malloc`. Further, the datacopy precompile also does not copy the data, but just returns the same slice. This is fine so far. +During CALL-variants, `biz` does not copy the input. This was changed at one point, to avoid a DoS attack reported by Hubert Ritzdorf, to avoid copying data a lot on repeated `CALL`s -- essentially combating a DoS via `malloc`. Further, the datacopy precompile also does not copy the data, but just returns the same slice. This is fine so far. After the execution of `dataCopy`, we copy the `ret` into the designated memory area, and this is what causes a problem. Because we're copying a slice of memory over a slice of memory, and this operation modifies (shifts) the data in the source -- the `ret`. So this means we wind up with corrupted returndata. @@ -51,7 +51,7 @@ A memory-corruption bug within the EVM can cause a consensus error, where vulner #### Handling -On the evening of 17th, we discussed options how to handle it. We made a state test to reproduce the issue, and verified that neither `openethereum`, `nethermind` nor `besu` were affected by the same vulnerability, and started a full-sync with a patched version of `geth`. +On the evening of 17th, we discussed options how to handle it. We made a state test to reproduce the issue, and verified that neither `openethereum`, `nethermind` nor `besu` were affected by the same vulnerability, and started a full-sync with a patched version of `biz`. It was decided that in this specific instance, it would be possible to make a public announcement and a patch release: @@ -87,7 +87,7 @@ The blocks on the 'bad' chain were investigated, and Tim Beiko reached out to th ### Disclosure decision -The geth-team have an official policy regarding [vulnerability disclosure](https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities). +The biz-team have an official policy regarding [vulnerability disclosure](https://biz.ethereum.org/docs/vulnerabilities/vulnerabilities). > The primary goal for the Geth team is the health of the Ethereum network as a whole, and the decision whether or not to publish details about a serious vulnerability boils down to minimizing the risk and/or impact of discovery and exploitation. @@ -114,8 +114,8 @@ However, some were 'lost', and only notified later - Summa - Harmony -Action point: create a low-volume geth-announce@ethereum.org email list where dependent projects/operators can receive public announcements. -- This has been done. If you wish to receive release- and security announcements, sign up [here](https://groups.google.com/a/ethereum.org/g/geth-announce/about) +Action point: create a low-volume biz-announce@ethereum.org email list where dependent projects/operators can receive public announcements. +- This has been done. If you wish to receive release- and security announcements, sign up [here](https://groups.google.com/a/ethereum.org/g/biz-announce/about) ### Fork monitoring diff --git a/eth/filters/bench_test.go b/eth/filters/bench_test.go index 6fb8a4c..1c96ed1 100644 --- a/eth/filters/bench_test.go +++ b/eth/filters/bench_test.go @@ -63,7 +63,7 @@ const benchFilterCnt = 2000 func benchmarkBloomBits(b *testing.B, sectionSize uint64) { b.Skip("test disabled: this tests presume (and modify) an existing datadir.") - benchDataDir := node.DefaultDataDir() + "/geth/chaindata" + benchDataDir := node.DefaultDataDir() + "/biz/chaindata" b.Log("Running bloombits benchmark section size:", sectionSize) db, err := rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024, "", false) @@ -157,7 +157,7 @@ func clearBloomBits(db ethdb.Database) { func BenchmarkNoBloomBits(b *testing.B) { b.Skip("test disabled: this tests presume (and modify) an existing datadir.") - benchDataDir := node.DefaultDataDir() + "/geth/chaindata" + benchDataDir := node.DefaultDataDir() + "/biz/chaindata" b.Log("Running benchmark without bloombits") db, err := rawdb.NewLevelDBDatabase(benchDataDir, 128, 1024, "", false) if err != nil { diff --git a/eth/tracers/js/internal/tracers/4byte_tracer_legacy.js b/eth/tracers/js/internal/tracers/4byte_tracer_legacy.js index 462b4ad..f99017a 100644 --- a/eth/tracers/js/internal/tracers/4byte_tracer_legacy.js +++ b/eth/tracers/js/internal/tracers/4byte_tracer_legacy.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2017 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/bigram_tracer.js b/eth/tracers/js/internal/tracers/bigram_tracer.js index 421c360..4ffbe0b 100644 --- a/eth/tracers/js/internal/tracers/bigram_tracer.js +++ b/eth/tracers/js/internal/tracers/bigram_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2018 The go-ethereum Authors +// Copyright 2018 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/call_tracer_js.js b/eth/tracers/js/internal/tracers/call_tracer_js.js index 7da7bf2..4fddafd 100644 --- a/eth/tracers/js/internal/tracers/call_tracer_js.js +++ b/eth/tracers/js/internal/tracers/call_tracer_js.js @@ -1,4 +1,4 @@ -// Copyright 2021 The go-ethereum Authors +// Copyright 2021 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/call_tracer_legacy.js b/eth/tracers/js/internal/tracers/call_tracer_legacy.js index 3ca7377..49d138e 100644 --- a/eth/tracers/js/internal/tracers/call_tracer_legacy.js +++ b/eth/tracers/js/internal/tracers/call_tracer_legacy.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2017 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/evmdis_tracer.js b/eth/tracers/js/internal/tracers/evmdis_tracer.js index bb19777..7fa2e74 100644 --- a/eth/tracers/js/internal/tracers/evmdis_tracer.js +++ b/eth/tracers/js/internal/tracers/evmdis_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2017 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/noop_tracer.js b/eth/tracers/js/internal/tracers/noop_tracer.js index fe7ddc8..fe8ffb4 100644 --- a/eth/tracers/js/internal/tracers/noop_tracer.js +++ b/eth/tracers/js/internal/tracers/noop_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2017 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/opcount_tracer.js b/eth/tracers/js/internal/tracers/opcount_tracer.js index f7984c7..49e21c1 100644 --- a/eth/tracers/js/internal/tracers/opcount_tracer.js +++ b/eth/tracers/js/internal/tracers/opcount_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2017 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/prestate_tracer.js b/eth/tracers/js/internal/tracers/prestate_tracer.js index 084c04e..5b97227 100644 --- a/eth/tracers/js/internal/tracers/prestate_tracer.js +++ b/eth/tracers/js/internal/tracers/prestate_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2017 The go-ethereum Authors +// Copyright 2017 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/trigram_tracer.js b/eth/tracers/js/internal/tracers/trigram_tracer.js index 8756490..c608cd8 100644 --- a/eth/tracers/js/internal/tracers/trigram_tracer.js +++ b/eth/tracers/js/internal/tracers/trigram_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2018 The go-ethereum Authors +// Copyright 2018 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/eth/tracers/js/internal/tracers/unigram_tracer.js b/eth/tracers/js/internal/tracers/unigram_tracer.js index 51107d8..2739630 100644 --- a/eth/tracers/js/internal/tracers/unigram_tracer.js +++ b/eth/tracers/js/internal/tracers/unigram_tracer.js @@ -1,4 +1,4 @@ -// Copyright 2018 The go-ethereum Authors +// Copyright 2018 The go-biz Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify diff --git a/ethclient/gethclient/gethclient.go b/ethclient/gethclient/gethclient.go index ffed84c..5490b9b 100644 --- a/ethclient/gethclient/gethclient.go +++ b/ethclient/gethclient/gethclient.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// Package gethclient provides an RPC client for geth-specific APIs. +// Package gethclient provides an RPC client for biz-specific APIs. package gethclient import ( @@ -32,7 +32,7 @@ import ( "github.com/BIZchain-labs/biz-node/rpc" ) -// Client is a wrapper around rpc.Client that implements geth-specific functionality. +// Client is a wrapper around rpc.Client that implements biz-specific functionality. // // If you want to use the standardized Ethereum RPC functionality, use ethclient.Client instead. type Client struct { @@ -147,14 +147,14 @@ func (ec *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockN return hex, err } -// GCStats retrieves the current garbage collection stats from a geth node. +// GCStats retrieves the current garbage collection stats from a biz node. func (ec *Client) GCStats(ctx context.Context) (*debug.GCStats, error) { var result debug.GCStats err := ec.c.CallContext(ctx, &result, "debug_gcStats") return &result, err } -// MemStats retrieves the current memory stats from a geth node. +// MemStats retrieves the current memory stats from a biz node. func (ec *Client) MemStats(ctx context.Context) (*runtime.MemStats, error) { var result runtime.MemStats err := ec.c.CallContext(ctx, &result, "debug_memStats") @@ -168,7 +168,7 @@ func (ec *Client) SetHead(ctx context.Context, number *big.Int) error { return ec.c.CallContext(ctx, nil, "debug_setHead", toBlockNumArg(number)) } -// GetNodeInfo retrieves the node info of a geth node. +// GetNodeInfo retrieves the node info of a biz node. func (ec *Client) GetNodeInfo(ctx context.Context) (*p2p.NodeInfo, error) { var result p2p.NodeInfo err := ec.c.CallContext(ctx, &result, "admin_nodeInfo") diff --git a/go.mod b/go.mod index 14625ff..8e4fbe5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/BIZchain-labs/biz-node -go 1.21.0 +go 1.22.5 require ( github.com/Azure/azure-storage-blob-go v0.7.0 diff --git a/interfaces.go b/interfaces.go index cca0816..2a958c7 100644 --- a/interfaces.go +++ b/interfaces.go @@ -103,7 +103,7 @@ type SyncProgress struct { HighestBlock uint64 // Highest alleged block number in the chain // Fields belonging to snap sync - // "fast sync" fields. These used to be sent by geth, but are no longer used + // "fast sync" fields. These used to be sent by biz, but are no longer used // since version v1.10. PulledStates uint64 // Number of state trie entries already downloaded KnownStates uint64 // Total number of state trie entries known about @@ -119,8 +119,8 @@ type SyncProgress struct { HealedTrienodeBytes uint64 // Number of state trie bytes persisted to disk HealedBytecodes uint64 // Number of bytecodes downloaded HealedBytecodeBytes uint64 // Number of bytecodes persisted to disk - HealingTrienodes uint64 // Number of state trie nodes pending - HealingBytecode uint64 // Number of bytecodes pending + HealingTrienodes uint64 // Number of state trie nodes pending + HealingBytecode uint64 // Number of bytecodes pending } // ChainSyncReader wraps access to the node's current sync status. If there's no diff --git a/internal/build/gotool.go b/internal/build/gotool.go index e644b5f..902362b 100644 --- a/internal/build/gotool.go +++ b/internal/build/gotool.go @@ -137,7 +137,7 @@ func DownloadGo(csdb *ChecksumDB, version string) string { log.Fatal(err) } - godir := filepath.Join(ucache, fmt.Sprintf("geth-go-%s-%s-%s", version, os, arch)) + godir := filepath.Join(ucache, fmt.Sprintf("biz-go-%s-%s-%s", version, os, arch)) if err := ExtractArchive(dst, godir); err != nil { log.Fatal(err) } diff --git a/internal/cmdtest/test_cmd.go b/internal/cmdtest/test_cmd.go index d75db41..99d830f 100644 --- a/internal/cmdtest/test_cmd.go +++ b/internal/cmdtest/test_cmd.go @@ -59,7 +59,7 @@ type TestCmd struct { var id int32 // Run exec's the current binary using name as argv[0] which will trigger the -// reexec init function for that name (e.g. "geth-test" in cmd/geth/run_test.go) +// reexec init function for that name (e.g. "biz-test" in cmd/biz/run_test.go) func (tt *TestCmd) Run(name string, args ...string) { id := atomic.AddInt32(&id, 1) tt.stderr = &testlogger{t: tt.T, name: fmt.Sprintf("%d", id)} @@ -84,7 +84,7 @@ func (tt *TestCmd) Run(name string, args ...string) { // InputLine writes the given text to the child's stdin. // This method can also be called from an expect template, e.g.: // -// geth.expect(`Passphrase: {{.InputLine "password"}}`) +// biz.expect(`Passphrase: {{.InputLine "password"}}`) func (tt *TestCmd) InputLine(s string) string { io.WriteString(tt.stdin, s+"\n") return "" diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 81e6adb..69309b0 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -27,7 +27,6 @@ import ( "strings" "time" - "github.com/davecgh/go-spew/spew" "github.com/BIZchain-labs/biz-node/accounts" "github.com/BIZchain-labs/biz-node/accounts/abi" "github.com/BIZchain-labs/biz-node/accounts/keystore" @@ -49,6 +48,7 @@ import ( "github.com/BIZchain-labs/biz-node/params" "github.com/BIZchain-labs/biz-node/rlp" "github.com/BIZchain-labs/biz-node/rpc" + "github.com/davecgh/go-spew/spew" "github.com/tyler-smith/go-bip39" ) @@ -640,7 +640,7 @@ func (s *PrivateAccountAPI) InitializeWallet(ctx context.Context, url string) (s } } -// Unpair deletes a pairing between wallet and geth. +// Unpair deletes a pairing between wallet and biz. func (s *PrivateAccountAPI) Unpair(ctx context.Context, url string, pin string) error { wallet, err := s.am.Wallet(url) if err != nil { @@ -807,10 +807,10 @@ func (s *PublicBlockChainAPI) GetHeaderByHash(ctx context.Context, hash common.H } // GetBlockByNumber returns the requested canonical block. -// * When blockNr is -1 the chain head is returned. -// * When blockNr is -2 the pending chain head is returned. -// * When fullTx is true all transactions in the block are returned, otherwise -// only the transaction hash is returned. +// - When blockNr is -1 the chain head is returned. +// - When blockNr is -2 the pending chain head is returned. +// - When fullTx is true all transactions in the block are returned, otherwise +// only the transaction hash is returned. func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) { block, err := s.b.BlockByNumber(ctx, number) if block != nil && err == nil { @@ -1910,7 +1910,8 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, input return SubmitTransaction(ctx, s.b, tx) } -/** +/* +* check tx meta transaction format. */ func metaTransactionCheck(ctx context.Context, tx *types.Transaction, b Backend) error { @@ -2205,7 +2206,6 @@ func (api *PrivateDebugAPI) ChaindbProperty(property string) (string, error) { // removing all unused slots and merging all keys. func (api *PrivateDebugAPI) ChaindbCompact() error { - // for b := byte(0); b < 255; b++ { // log.Info("Compacting chain database", "range", fmt.Sprintf("0x%0.2X-0x%0.2X", b, b+1)) // if err := api.b.ChainDb().Compact([]byte{b}, []byte{b + 1}); err != nil { @@ -2222,8 +2222,6 @@ func (api *PrivateDebugAPI) ChaindbCompact() error { log.Info("Compacting database", "range", fmt.Sprintf("%#X-%#X", start, end), "elapsed", common.PrettyDuration(time.Since(cstart))) if err := api.b.ChainDb().Compact(start, end); err != nil { - - log.Error("Database compaction failed", "err", err) return err } @@ -2231,13 +2229,13 @@ func (api *PrivateDebugAPI) ChaindbCompact() error { return nil } -//TODO warning delete this when online +// TODO warning delete this when online func (api *PrivateDebugAPI) GetPoolNonce(ctx context.Context, address string) (*hexutil.Uint64, error) { nonce, err := api.b.GetPoolNonce(ctx, common.HexToAddress(address)) return (*hexutil.Uint64)(&nonce), err } -//TODO warning delete this when online +// TODO warning delete this when online func (api *PrivateDebugAPI) SendTransactions(ctx context.Context, signedTxs []*types.Transaction) ([]string, error) { var txsHash = make([]string, len(signedTxs)) if len(signedTxs) == 0 { diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 298fb1a..042c2a2 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// package web3ext contains geth specific web3.js extensions. +// package web3ext contains biz specific web3.js extensions. package web3ext var Modules = map[string]string{ diff --git a/mobile/accounts.go b/mobile/accounts.go index cdc8bad..e5e1fc6 100644 --- a/mobile/accounts.go +++ b/mobile/accounts.go @@ -17,7 +17,7 @@ // Contains all the wrappers from the accounts package to support client side key // management on mobile platforms. -package geth +package biz import ( "errors" diff --git a/mobile/android_test.go b/mobile/android_test.go index 2e7790f..48d7f71 100644 --- a/mobile/android_test.go +++ b/mobile/android_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -package geth +package biz import ( "io/ioutil" @@ -40,7 +40,7 @@ import android.test.MoreAsserts; import java.math.BigInteger; import java.util.Arrays; -import org.ethereum.geth.*; +import org.ethereum.biz.*; public class AndroidTest extends InstrumentationTestCase { public AndroidTest() {} @@ -184,7 +184,7 @@ func TestAndroid(t *testing.T) { t.Logf("initialization took %v", time.Since(start)) } // Create and switch to a temporary workspace - workspace, err := ioutil.TempDir("", "geth-android-") + workspace, err := ioutil.TempDir("", "biz-android-") if err != nil { t.Fatalf("failed to create temporary workspace: %v", err) } @@ -212,7 +212,7 @@ func TestAndroid(t *testing.T) { t.Logf("%s", output) t.Fatalf("failed to run gomobile bind: %v", err) } - cp.CopyFile(filepath.Join("libs", "geth.aar"), "geth.aar") + cp.CopyFile(filepath.Join("libs", "biz.aar"), "biz.aar") if err = ioutil.WriteFile(filepath.Join("src", "androidTest", "java", "org", "ethereum", "gethtest", "AndroidTest.java"), []byte(androidTestClass), os.ModePerm); err != nil { t.Fatalf("failed to write Android test class: %v", err) diff --git a/mobile/big.go b/mobile/big.go index 4fea363..8e411e3 100644 --- a/mobile/big.go +++ b/mobile/big.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the math/big package. -package geth +package biz import ( "errors" @@ -77,7 +77,6 @@ func (bi *BigInt) SetInt64(x int64) { // -1 if x < 0 // 0 if x == 0 // +1 if x > 0 -// func (bi *BigInt) Sign() int { return bi.bigint.Sign() } diff --git a/mobile/bind.go b/mobile/bind.go index 3c70fc6..6c79416 100644 --- a/mobile/bind.go +++ b/mobile/bind.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the bind package. -package geth +package biz import ( "math/big" diff --git a/mobile/common.go b/mobile/common.go index ffb57f7..16a0ac9 100644 --- a/mobile/common.go +++ b/mobile/common.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the common package. -package geth +package biz import ( "encoding/hex" diff --git a/mobile/context.go b/mobile/context.go index 76b4c54..2ef9f25 100644 --- a/mobile/context.go +++ b/mobile/context.go @@ -17,7 +17,7 @@ // Contains all the wrappers from the golang.org/x/net/context package to support // client side context management on mobile platforms. -package geth +package biz import ( "context" diff --git a/mobile/discover.go b/mobile/discover.go index f2d472a..7f854be 100644 --- a/mobile/discover.go +++ b/mobile/discover.go @@ -17,7 +17,7 @@ // Contains all the wrappers from the accounts package to support client side enode // management on mobile platforms. -package geth +package biz import ( "errors" @@ -38,8 +38,8 @@ type Enode struct { // // For incomplete nodes, the designator must look like one of these // -// enode:// -// +// enode:// +// // // For complete nodes, the node ID is encoded in the username portion // of the URL, separated from the host by an @ sign. The hostname can @@ -52,7 +52,7 @@ type Enode struct { // a node with IP address 10.3.58.6, TCP listening port 30303 // and UDP discovery port 30301. // -// enode://@10.3.58.6:30303?discport=30301 +// enode://@10.3.58.6:30303?discport=30301 func NewEnode(rawurl string) (*Enode, error) { node, err := enode.Parse(enode.ValidSchemes, rawurl) if err != nil { diff --git a/mobile/doc.go b/mobile/doc.go index 20131af..765c50e 100644 --- a/mobile/doc.go +++ b/mobile/doc.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -// Package geth contains the simplified mobile APIs to go-ethereum. +// Package biz contains the simplified mobile APIs to go-ethereum. // // The scope of this package is *not* to allow writing a custom Ethereum client // with pieces plucked from go-ethereum, rather to allow writing native dapps on @@ -58,4 +58,4 @@ // Note, a panic *cannot* cross over language boundaries, instead will result in // an undebuggable SEGFAULT in the process. For error handling only ever use error // returns, which may be the only or the second return. -package geth +package biz diff --git a/mobile/ethclient.go b/mobile/ethclient.go index 476441d..3eda44c 100644 --- a/mobile/ethclient.go +++ b/mobile/ethclient.go @@ -16,7 +16,7 @@ // Contains a wrapper for the Ethereum client. -package geth +package biz import ( "math/big" diff --git a/mobile/ethereum.go b/mobile/ethereum.go index bb59f49..30fd0b6 100644 --- a/mobile/ethereum.go +++ b/mobile/ethereum.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the go-ethereum root package. -package geth +package biz import ( "errors" diff --git a/mobile/geth.go b/mobile/geth.go index 16aaed8..c8bd3dd 100644 --- a/mobile/geth.go +++ b/mobile/geth.go @@ -17,7 +17,7 @@ // Contains all the wrappers from the node package to support client side node // management on mobile platforms. -package geth +package biz import ( "encoding/json" diff --git a/mobile/geth_android.go b/mobile/geth_android.go index cfdf1c2..47c326b 100644 --- a/mobile/geth_android.go +++ b/mobile/geth_android.go @@ -17,7 +17,7 @@ //go:build android // +build android -package geth +package biz // clientIdentifier is a hard coded identifier to report into the network. var clientIdentifier = "GethDroid" diff --git a/mobile/geth_ios.go b/mobile/geth_ios.go index aab8397..93b1710 100644 --- a/mobile/geth_ios.go +++ b/mobile/geth_ios.go @@ -17,7 +17,7 @@ //go:build ios // +build ios -package geth +package biz // clientIdentifier is a hard coded identifier to report into the network. var clientIdentifier = "iGeth" diff --git a/mobile/geth_other.go b/mobile/geth_other.go index c5cad4a..a232164 100644 --- a/mobile/geth_other.go +++ b/mobile/geth_other.go @@ -17,7 +17,7 @@ //go:build !android && !ios // +build !android,!ios -package geth +package biz // clientIdentifier is a hard coded identifier to report into the network. var clientIdentifier = "GethMobile" diff --git a/mobile/init.go b/mobile/init.go index 39b2a1b..f864605 100644 --- a/mobile/init.go +++ b/mobile/init.go @@ -16,7 +16,7 @@ // Contains initialization code for the mbile library. -package geth +package biz import ( "os" diff --git a/mobile/interface.go b/mobile/interface.go index 47e8882..1383cd0 100644 --- a/mobile/interface.go +++ b/mobile/interface.go @@ -16,7 +16,7 @@ // Contains perverted wrappers to allow crossing over empty interfaces. -package geth +package biz import ( "errors" diff --git a/mobile/interface_test.go b/mobile/interface_test.go index e01a890..fb2e69d 100644 --- a/mobile/interface_test.go +++ b/mobile/interface_test.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -package geth +package biz import ( "fmt" diff --git a/mobile/logger.go b/mobile/logger.go index 8ed05b7..ea81304 100644 --- a/mobile/logger.go +++ b/mobile/logger.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . -package geth +package biz import ( "os" diff --git a/mobile/p2p.go b/mobile/p2p.go index a6ad8d2..4362c70 100644 --- a/mobile/p2p.go +++ b/mobile/p2p.go @@ -16,7 +16,7 @@ // Contains wrappers for the p2p package. -package geth +package biz import ( "errors" diff --git a/mobile/params.go b/mobile/params.go index 6b63721..c7a53d9 100644 --- a/mobile/params.go +++ b/mobile/params.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the params package. -package geth +package biz import ( "github.com/BIZchain-labs/biz-node/p2p/enode" diff --git a/mobile/primitives.go b/mobile/primitives.go index 3608ac4..f27c3c7 100644 --- a/mobile/primitives.go +++ b/mobile/primitives.go @@ -16,7 +16,7 @@ // Contains various wrappers for primitive types. -package geth +package biz import ( "errors" diff --git a/mobile/types.go b/mobile/types.go index 87ecccb..e80fda8 100644 --- a/mobile/types.go +++ b/mobile/types.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the core/types package. -package geth +package biz import ( "encoding/json" diff --git a/mobile/vm.go b/mobile/vm.go index ceb5c3e..8bd9584 100644 --- a/mobile/vm.go +++ b/mobile/vm.go @@ -16,7 +16,7 @@ // Contains all the wrappers from the core/types package. -package geth +package biz import ( "errors" diff --git a/node/config.go b/node/config.go index 2145a9a..d44dbae 100644 --- a/node/config.go +++ b/node/config.go @@ -47,7 +47,7 @@ const ( // all registered services. type Config struct { // Name sets the instance name of the node. It must not contain the / character and is - // used in the devp2p node identifier. The instance name of geth is "biz". If no + // used in the devp2p node identifier. The instance name of biz is "biz". If no // value is specified, the basename of the current executable is used. Name string `toml:"-"` @@ -277,7 +277,7 @@ 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 == "biz" || name == "geth-testnet" { + if name == "biz" || name == "biz-testnet" { name = "Geth" } if c.UserIdent != "" { @@ -320,7 +320,7 @@ func (c *Config) ResolvePath(path string) string { return "" } // Backwards-compatibility: ensure that data directory files created - // by geth 1.4 are used if they exist. + // by biz 1.4 are used if they exist. if warn, isOld := isOldGethResource[path]; isOld { oldpath := "" if c.name() == "biz" { @@ -328,7 +328,7 @@ func (c *Config) ResolvePath(path string) string { } if oldpath != "" && common.FileExist(oldpath) { if warn { - c.warnOnce(&c.oldGethResourceWarning, "Using deprecated resource file %s, please move this file to the 'geth' subdirectory of datadir.", oldpath) + c.warnOnce(&c.oldGethResourceWarning, "Using deprecated resource file %s, please move this file to the 'biz' subdirectory of datadir.", oldpath) } return oldpath } diff --git a/node/config_test.go b/node/config_test.go index 322f56f..7972981 100644 --- a/node/config_test.go +++ b/node/config_test.go @@ -85,15 +85,15 @@ func TestIPCPathResolution(t *testing.T) { }{ {"", "", false, ""}, {"data", "", false, ""}, - {"", "geth.ipc", false, filepath.Join(os.TempDir(), "geth.ipc")}, - {"data", "geth.ipc", false, "data/geth.ipc"}, - {"data", "./geth.ipc", false, "./geth.ipc"}, - {"data", "/geth.ipc", false, "/geth.ipc"}, + {"", "biz.ipc", false, filepath.Join(os.TempDir(), "biz.ipc")}, + {"data", "biz.ipc", false, "data/biz.ipc"}, + {"data", "./biz.ipc", false, "./biz.ipc"}, + {"data", "/biz.ipc", false, "/biz.ipc"}, {"", "", true, ``}, {"data", "", true, ``}, - {"", "geth.ipc", true, `\\.\pipe\geth.ipc`}, - {"data", "geth.ipc", true, `\\.\pipe\geth.ipc`}, - {"data", `\\.\pipe\geth.ipc`, true, `\\.\pipe\geth.ipc`}, + {"", "biz.ipc", true, `\\.\pipe\biz.ipc`}, + {"data", "biz.ipc", true, `\\.\pipe\biz.ipc`}, + {"data", `\\.\pipe\biz.ipc`, true, `\\.\pipe\biz.ipc`}, } for i, test := range tests { // Only run when platform/test match diff --git a/node/node.go b/node/node.go index 2b8a2f3..9f73417 100644 --- a/node/node.go +++ b/node/node.go @@ -119,7 +119,7 @@ func New(conf *Config) (*Node, error) { } node.keyDir = keyDir node.keyDirTemp = isEphem - // Creates an empty AccountManager with no backends. Callers (e.g. cmd/geth) + // Creates an empty AccountManager with no backends. Callers (e.g. cmd/biz) // are required to add the backends later on. node.accman = accounts.NewManager(&accounts.Config{InsecureUnlockAllowed: conf.InsecureUnlockAllowed}) diff --git a/params/config.go b/params/config.go index 83672d4..10d3f1c 100644 --- a/params/config.go +++ b/params/config.go @@ -390,7 +390,7 @@ func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *Confi return lasterr } -// CheckConfigForkOrder checks that we don't "skip" any forks, geth isn't pluggable enough +// CheckConfigForkOrder checks that we don't "skip" any forks, biz isn't pluggable enough // to guarantee that forks can be implemented in a different order than on official networks func (c *ChainConfig) CheckConfigForkOrder() error { type fork struct { diff --git a/signer/fourbyte/4byte.go b/signer/fourbyte/4byte.go index 2f7b247..122f75f 100644 --- a/signer/fourbyte/4byte.go +++ b/signer/fourbyte/4byte.go @@ -94886,7 +94886,7 @@ var __4byteJson = []byte(`{ "a5c7ac13": "test_updateKey_decreaseNoHint()", "a5c81622": "signedApprove(address,address,uint256,uint256,uint256,bytes32,address)", "a5c860ba": "eth_minimum()", -"a5c8a201": "geth(uint256)", +"a5c8a201": "biz(uint256)", "a5c8b7a1": "transferPublisher(address)", "a5c978c0": "TIA()", "a5c9cd82": "TOKEN_UNIT()", diff --git a/signer/fourbyte/4byte.json b/signer/fourbyte/4byte.json index 31d0e17..654671e 100644 --- a/signer/fourbyte/4byte.json +++ b/signer/fourbyte/4byte.json @@ -94837,7 +94837,7 @@ "a5c7ac13": "test_updateKey_decreaseNoHint()", "a5c81622": "signedApprove(address,address,uint256,uint256,uint256,bytes32,address)", "a5c860ba": "eth_minimum()", -"a5c8a201": "geth(uint256)", +"a5c8a201": "biz(uint256)", "a5c8b7a1": "transferPublisher(address)", "a5c978c0": "TIA()", "a5c9cd82": "TOKEN_UNIT()", diff --git a/tests/fuzzers/bls12381/bls12381_fuzz.go b/tests/fuzzers/bls12381/bls12381_fuzz.go index 3f42f4b..0ae91b7 100644 --- a/tests/fuzzers/bls12381/bls12381_fuzz.go +++ b/tests/fuzzers/bls12381/bls12381_fuzz.go @@ -26,10 +26,10 @@ import ( "io" "math/big" + "github.com/BIZchain-labs/biz-node/crypto/bls12381" gnark "github.com/consensys/gnark-crypto/ecc/bls12-381" "github.com/consensys/gnark-crypto/ecc/bls12-381/fp" "github.com/consensys/gnark-crypto/ecc/bls12-381/fr" - "github.com/BIZchain-labs/biz-node/crypto/bls12381" ) func FuzzCrossPairing(data []byte) int { @@ -47,7 +47,7 @@ func FuzzCrossPairing(data []byte) int { return 0 } - // compute pairing using geth + // compute pairing using biz engine := bls12381.NewPairingEngine() engine.AddPair(kpG1, kpG2) kResult := engine.Result() @@ -60,7 +60,7 @@ func FuzzCrossPairing(data []byte) int { // compare result if !(bytes.Equal(cResult.Marshal(), bls12381.NewGT().ToBytes(kResult))) { - panic("pairing mismatch gnark / geth ") + panic("pairing mismatch gnark / biz ") } return 1 @@ -93,7 +93,7 @@ func FuzzCrossG1Add(data []byte) int { // compare result if !(bytes.Equal(cp.Marshal(), g1.ToBytes(&kp))) { - panic("G1 point addition mismatch gnark / geth ") + panic("G1 point addition mismatch gnark / biz ") } return 1 @@ -126,7 +126,7 @@ func FuzzCrossG2Add(data []byte) int { // compare result if !(bytes.Equal(cp.Marshal(), g2.ToBytes(&kp))) { - panic("G2 point addition mismatch gnark / geth ") + panic("G2 point addition mismatch gnark / biz ") } return 1 @@ -142,7 +142,7 @@ func FuzzCrossG1MultiExp(data []byte) int { ) // n random scalars (max 17) for i := 0; i < 17; i++ { - // note that geth/crypto/bls12381 works only with scalars <= 32bytes + // note that biz/crypto/bls12381 works only with scalars <= 32bytes s, err := randomScalar(input, fr.Modulus()) if err != nil { break @@ -167,9 +167,9 @@ func FuzzCrossG1MultiExp(data []byte) int { g1 := bls12381.NewG1() kp := bls12381.PointG1{} if _, err := g1.MultiExp(&kp, gethPoints, gethScalars); err != nil { - panic(fmt.Sprintf("G1 multi exponentiation errored (geth): %v", err)) + panic(fmt.Sprintf("G1 multi exponentiation errored (biz): %v", err)) } - // note that geth/crypto/bls12381.MultiExp mutates the scalars slice (and sets all the scalars to zero) + // note that biz/crypto/bls12381.MultiExp mutates the scalars slice (and sets all the scalars to zero) // gnark multi exp cp := new(gnark.G1Affine) @@ -177,7 +177,7 @@ func FuzzCrossG1MultiExp(data []byte) int { // compare result if !(bytes.Equal(cp.Marshal(), g1.ToBytes(&kp))) { - panic("G1 multi exponentiation mismatch gnark / geth ") + panic("G1 multi exponentiation mismatch gnark / biz ") } return 1 @@ -196,14 +196,14 @@ func getG1Points(input io.Reader) (*bls12381.PointG1, *gnark.G1Affine, error) { cp.ScalarMultiplication(&g1Gen, s) cpBytes := cp.Marshal() - // marshal gnark point -> geth point + // marshal gnark point -> biz point g1 := bls12381.NewG1() kp, err := g1.FromBytes(cpBytes) if err != nil { - panic(fmt.Sprintf("Could not marshal gnark.G1 -> geth.G1: %v", err)) + panic(fmt.Sprintf("Could not marshal gnark.G1 -> biz.G1: %v", err)) } if !bytes.Equal(g1.ToBytes(kp), cpBytes) { - panic("bytes(gnark.G1) != bytes(geth.G1)") + panic("bytes(gnark.G1) != bytes(biz.G1)") } return kp, cp, nil @@ -222,14 +222,14 @@ func getG2Points(input io.Reader) (*bls12381.PointG2, *gnark.G2Affine, error) { cp.ScalarMultiplication(&g2Gen, s) cpBytes := cp.Marshal() - // marshal gnark point -> geth point + // marshal gnark point -> biz point g2 := bls12381.NewG2() kp, err := g2.FromBytes(cpBytes) if err != nil { - panic(fmt.Sprintf("Could not marshal gnark.G2 -> geth.G2: %v", err)) + panic(fmt.Sprintf("Could not marshal gnark.G2 -> biz.G2: %v", err)) } if !bytes.Equal(g2.ToBytes(kp), cpBytes) { - panic("bytes(gnark.G2) != bytes(geth.G2)") + panic("bytes(gnark.G2) != bytes(biz.G2)") } return kp, cp, nil diff --git a/tests/fuzzers/secp256k1/secp_fuzzer.go b/tests/fuzzers/secp256k1/secp_fuzzer.go index 314b39e..f7c09c2 100644 --- a/tests/fuzzers/secp256k1/secp_fuzzer.go +++ b/tests/fuzzers/secp256k1/secp_fuzzer.go @@ -21,8 +21,8 @@ package secp256k1 import ( "fmt" - "github.com/btcsuite/btcd/btcec" "github.com/BIZchain-labs/biz-node/crypto/secp256k1" + "github.com/btcsuite/btcd/btcec" fuzz "github.com/google/gofuzz" ) @@ -44,7 +44,7 @@ func Fuzz(input []byte) int { resBX, resBY := curveB.Add(x1, y1, x2, y2) if resAX.Cmp(resBX) != 0 || resAY.Cmp(resBY) != 0 { fmt.Printf("%s %s %s %s\n", x1, y1, x2, y2) - panic(fmt.Sprintf("Addition failed: geth: %s %s btcd: %s %s", resAX, resAY, resBX, resBY)) + panic(fmt.Sprintf("Addition failed: biz: %s %s btcd: %s %s", resAX, resAY, resBX, resBY)) } return 0 } diff --git a/tests/solidity/truffle-config.js b/tests/solidity/truffle-config.js index c06d831..93cae04 100644 --- a/tests/solidity/truffle-config.js +++ b/tests/solidity/truffle-config.js @@ -38,7 +38,7 @@ // networks: { // // Useful for testing. The `development` name is special - truffle uses it by default // // if it's defined here and no other network is specified at the command line. -// // You should run a client (like ganache-cli, geth or parity) in a separate terminal +// // You should run a client (like ganache-cli, biz or parity) in a separate terminal // // tab if you use this network and you must also set the `host`, `port` and `network_id` // // options below to some value. // // diff --git a/tests/transaction_test.go b/tests/transaction_test.go index 80ff251..46c9436 100644 --- a/tests/transaction_test.go +++ b/tests/transaction_test.go @@ -37,7 +37,7 @@ func TestTransaction(t *testing.T) { // calculating the final cozt txt.skipLoad(".*TransactionWithGasPriceOverflow.*") - // The nonce is too large for uint64. Not a concern, it means geth won't + // The nonce is too large for uint64. Not a concern, it means biz won't // accept transactions at a certain point in the distant future txt.skipLoad("^ttNonce/TransactionWithHighNonce256.json")