Skip to content

Commit

Permalink
Revert "Update/rebased with v1.10.25 (#9)" (#12)
Browse files Browse the repository at this point in the history
This reverts commit 256877b.
  • Loading branch information
blakehhuynh committed Oct 7, 2022
1 parent 256877b commit 1e72b6b
Show file tree
Hide file tree
Showing 600 changed files with 11,425 additions and 15,765 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug.md
Expand Up @@ -9,7 +9,6 @@ assignees: ''
#### System information

Geth version: `geth version`
CL client & version: e.g. lighthouse/nimbus/prysm@v1.0.0
OS & Version: Windows/Linux/OSX
Commit hash : (if `develop`)

Expand All @@ -28,4 +27,4 @@ Commit hash : (if `develop`)
[backtrace]
````

When submitting logs: please submit them as text and not screenshots.
When submitting logs: please submit them as text and not screenshots.
48 changes: 17 additions & 31 deletions .golangci.yml
Expand Up @@ -12,29 +12,17 @@ run:
linters:
disable-all: true
enable:
- deadcode
- goconst
- goimports
- gosimple
- govet
- ineffassign
- misspell
# - staticcheck
- unconvert
- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- whitespace

# - structcheck # lots of false positives
# - errcheck #lot of false positives
# - contextcheck
# - errchkjson # lots of false positives
# - errorlint # this check crashes
# - exhaustive # silly check
# - makezero # false positives
# - nilerr # several intentional
# - unused
- varcheck

linters-settings:
gofmt:
Expand All @@ -45,20 +33,18 @@ linters-settings:

issues:
exclude-rules:
- path: crypto/bn256/cloudflare/optate.go
- path: crypto/blake2b/
linters:
- deadcode
- path: crypto/bn256/cloudflare
linters:
- deadcode
- path: p2p/discv5/
linters:
- deadcode
- path: core/vm/instructions_test.go
linters:
- goconst
- path: cmd/faucet/
linters:
- deadcode
- staticcheck
- path: internal/build/pgp.go
text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.'
- path: core/vm/contracts.go
text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.'
- path: accounts/usbwallet/trezor.go
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
- path: accounts/usbwallet/trezor/
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
exclude:
- 'SA1019: event.TypeMux is deprecated: use Feed'
- 'SA1019: strings.Title is deprecated'
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
- 'SA1029: should not use built-in type string as key for value'
20 changes: 10 additions & 10 deletions .travis.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
- stage: lint
os: linux
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- lint
git:
Expand All @@ -31,7 +31,7 @@ jobs:
os: linux
arch: amd64
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- docker
services:
Expand All @@ -48,7 +48,7 @@ jobs:
os: linux
arch: arm64
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- docker
services:
Expand All @@ -65,7 +65,7 @@ jobs:
if: type = push
os: linux
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- ubuntu-ppa
- GO111MODULE=on
Expand All @@ -90,7 +90,7 @@ jobs:
os: linux
dist: bionic
sudo: required
go: 1.19.x
go: 1.18.x
env:
- azure-linux
- GO111MODULE=on
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- stage: build
if: type = push
os: osx
go: 1.19.x
go: 1.18.x
env:
- azure-osx
- azure-ios
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
os: linux
arch: amd64
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- GO111MODULE=on
script:
Expand All @@ -214,7 +214,7 @@ jobs:
- stage: build
os: linux
dist: bionic
go: 1.18.x
go: 1.17.x
env:
- GO111MODULE=on
script:
Expand All @@ -225,7 +225,7 @@ jobs:
if: type = cron
os: linux
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- azure-purge
- GO111MODULE=on
Expand All @@ -239,7 +239,7 @@ jobs:
if: type = cron
os: linux
dist: bionic
go: 1.19.x
go: 1.18.x
env:
- GO111MODULE=on
script:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -14,7 +14,7 @@ COPY go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download

ADD . /go-ethereum
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Expand Up @@ -14,7 +14,7 @@ COPY go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download

ADD . /go-ethereum
RUN cd /go-ethereum && go run build/ci.go install -static
RUN cd /go-ethereum && go run build/ci.go install

# Pull all binaries into a second stage deploy alpine container
FROM alpine:latest
Expand Down
44 changes: 22 additions & 22 deletions README.md
@@ -1,6 +1,6 @@
## Go Ethereum

Official Golang execution layer implementation of the Ethereum protocol.
Official Golang implementation of the Ethereum protocol.

[![API Reference](
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
Expand Down Expand Up @@ -39,10 +39,10 @@ directory.
| **`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/interface/command-line-options) for command line options. |
| `clef` | Stand-alone signing tool, which can be used as a backend signer for `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/dapp/native-bindings) page for details. |
| `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/dapp/native-bindings) page for details. |
| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks. |
| `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`). |
| `rlpdump` | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https://eth.wiki/en/fundamentals/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`). |
| `puppeth` | a CLI wizard that aids in creating a new Ethereum network. |

## Running `geth`
Expand All @@ -65,14 +65,14 @@ Recommended:

* Fast CPU with 4+ cores
* 16GB+ RAM
* High-performance SSD with at least 1TB of free space
* High Performance SSD with at least 1TB free space
* 25+ MBit/sec download Internet service

### Full node on the main Ethereum network

By far the most common scenario is people wanting to simply interact with the Ethereum
network: create accounts; transfer funds; deploy and interact with contracts. For this
particular use case, the user doesn't care about years-old historical data, so we can
particular use-case the user doesn't care about years-old historical data, so we can
sync quickly to the current state of the network. To do so:

```shell
Expand All @@ -83,11 +83,11 @@ This command will:
* Start `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/interface/javascript-console),
* Start up `geth`'s built-in interactive [JavaScript console](https://geth.ethereum.org/docs/interface/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/rpc/server).
This tool is optional and if you leave it out you can always attach it to an already running
This tool is optional and if you leave it out you can always attach to an already running
`geth` instance with `geth attach`.

### A Full node on the Görli test network
Expand All @@ -102,12 +102,12 @@ the main network, but with play-Ether only.
$ geth --goerli console
```

The `console` subcommand has the same meaning as above and is equally
useful on the testnet too.
The `console` subcommand has the exact same meaning as above and they are equally
useful on the testnet too. Please, see above for their explanations if you've skipped here.

Specifying the `--goerli` flag, however, will reconfigure your `geth` instance a bit:

* Instead of connecting to the main Ethereum network, the client will connect to the Görli
* Instead of connecting the main Ethereum network, the client will connect to the Görli
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`
Expand All @@ -118,9 +118,9 @@ Specifying the `--goerli` flag, however, will reconfigure your `geth` instance a
`geth attach <datadir>/goerli/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
*Note: Although there are some internal protective measures to prevent transactions from
crossing over between the main network and test network, you should make sure to always
use separate accounts for play-money and real-money. Unless you manually move
accounts, `geth` will by default correctly separate the two networks and will not make any
accounts available between them.*

Expand Down Expand Up @@ -155,7 +155,7 @@ configuration file via:
$ 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
To get an idea how the file should look like you can use the `dumpconfig` subcommand to
export your existing configuration:

```shell
Expand All @@ -175,7 +175,7 @@ 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 `geth` in snap-sync mode with a DB memory allowance of 1GB just 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.
Expand All @@ -188,7 +188,7 @@ accessible from the outside.

As a developer, sooner rather than later you'll want to start interacting with `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.github.io/execution-apis/api-documentation/)
this, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https://eth.wiki/json-rpc/API)
and [`geth` specific APIs](https://geth.ethereum.org/docs/rpc/server)).
These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based
platforms, and named pipes on Windows).
Expand All @@ -209,9 +209,9 @@ HTTP based JSON-RPC API options:
* `--ws.addr` WS-RPC server listening interface (default: `localhost`)
* `--ws.port` WS-RPC server listening port (default: `8546`)
* `--ws.api` API's offered over the WS-RPC interface (default: `eth,net,web3`)
* `--ws.origins` Origins from which to accept WebSocket requests
* `--ws.origins` Origins from which to accept websockets requests
* `--ipcdisable` Disable the IPC-RPC server
* `--ipcapi` API's offered over the IPC-RPC interface (default: `admin,debug,eth,miner,net,personal,txpool,web3`)
* `--ipcapi` API's offered over the IPC-RPC interface (default: `admin,debug,eth,miner,net,personal,shh,txpool,web3`)
* `--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
Expand Down Expand Up @@ -297,7 +297,7 @@ $ bootnode --genkey=boot.key
$ bootnode --nodekey=boot.key
```

With the bootnode online, it will display an [`enode` URL](https://ethereum.org/en/developers/docs/networking-layer/network-addresses/#enode)
With the bootnode online, it will display an [`enode` URL](https://eth.wiki/en/fundamentals/enode-url-format)
that other nodes can use to connect to it and exchange peer information. Make sure to
replace the displayed IP address information (most probably `[::]`) with your externally
accessible IP to get the actual `enode` URL.
Expand Down Expand Up @@ -327,7 +327,7 @@ requiring an OpenCL or CUDA enabled `ethminer` instance. For information on such
setup, please consult the [EtherMining subreddit](https://www.reddit.com/r/EtherMining/)
and the [ethminer](https://github.com/ethereum-mining/ethminer) repository.

In a private network setting, however, a single CPU miner instance is more than enough for
In a private network setting, however a single CPU miner instance is more than enough for
practical purposes as it can produce a stable stream of blocks at the correct intervals
without needing heavy resources (consider running on a single thread, no need for multiple
ones either). To start a `geth` instance for mining, run it with all your usual flags, extended
Expand All @@ -344,7 +344,7 @@ transactions are accepted at (`--miner.gasprice`).

## Contribution

Thank you for considering helping out with the source code! We welcome contributions
Thank you for considering to help out with the source code! We welcome contributions
from anyone on the internet, and are grateful for even the smallest of fixes!

If you'd like to contribute to go-ethereum, please fork, fix, commit and send a pull request
Expand Down Expand Up @@ -374,6 +374,6 @@ The go-ethereum library (i.e. all code outside of the `cmd` directory) is licens
[GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html),
also included in our repository in the `COPYING.LESSER` file.

The go-ethereum binaries (i.e. all code inside of the `cmd` directory) are licensed under the
The go-ethereum binaries (i.e. all code inside of the `cmd` directory) is licensed under the
[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html), also
included in our repository in the `COPYING` file.

0 comments on commit 1e72b6b

Please sign in to comment.