Official Go implementation of the Ethereum protocol

Go Ethereum

Official Golang implementation of the Ethereum protocol.

API Reference Go Report Card Travis Discord

Automated builds are available for stable releases and the unstable master branch. Binary archives are published at https://geth.ethereum.org/downloads/.

Building the source

For prerequisites and detailed build instructions please read the Installation Instructions.

Building geth requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run

make geth

or, to build the full suite of utilities:

make all

Executables

The go-ethereum project comes with several wrappers/executables found in the cmd directory.

Command Description
geth Our main Ethereum CLI client. It is the entry point into the Ethereum network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It can be used by other processes as a gateway into the Ethereum network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. geth --help and the CLI page 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 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 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) 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

Going through all the possible command line flags is out of scope here (please consult our CLI Wiki page), but we've enumerated a few common parameter combos to get you up to speed quickly on how you can run your own geth instance.

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 sync quickly to the current state of the network. To do so:

$ geth console

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 up geth's built-in interactive JavaScript console, (via the trailing console subcommand) through which you can interact using web3 methods (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. 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

Transitioning towards developers, if you'd like to play around with creating Ethereum contracts, you almost certainly would like to do that without any real money involved until you get the hang of the entire system. In other words, instead of attaching to the main network, you want to join the test network with your node, which is fully equivalent to the main network, but with play-Ether only.

$ geth --goerli console

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 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 will nest itself one level deeper into a goerli subfolder (~/.ethereum/goerli on Linux). Note, on OSX and Linux this also means that attaching to a running testnet node requires the use of a custom endpoint since geth attach will try to attach to a production node endpoint by default, e.g., geth attach <datadir>/goerli/geth.ipc. Windows users are not affected by this.

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.

Full node on the Rinkeby test network

Go Ethereum also supports connecting to the older proof-of-authority based test network called Rinkeby which is operated by members of the community.

$ geth --rinkeby console

Full node on the Ropsten test network

In addition to Görli and Rinkeby, Geth also supports the ancient Ropsten testnet. The Ropsten test network is based on the Ethash proof-of-work consensus algorithm. As such, it has certain extra overhead and is more susceptible to reorganization attacks due to the network's low difficulty/security.

$ geth --ropsten console

Note: Older Geth configurations store the Ropsten database in the testnet subdirectory.

Configuration

As an alternative to passing the numerous flags to the geth binary, you can also pass a configuration file via:

$ geth --config /path/to/your_config.toml

To get an idea how the file should look like you can use the dumpconfig subcommand to export your existing configuration:

$ geth --your-favourite-flags dumpconfig

Note: This works only with geth v1.6.0 and above.

Docker quick start

One of the quickest ways to get Ethereum up and running on your machine is by using Docker:

docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
           -p 8545:8545 -p 30303:30303 \
           ethereum/client-go

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.

Do not forget --http.addr 0.0.0.0, if you want to access RPC from other containers and/or hosts. By default, geth binds to the local interface and RPC endpoints is not accessible from the outside.

Programmatically interfacing geth nodes

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 and geth specific APIs). These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based platforms, and named pipes on Windows).

The IPC interface is enabled by default and exposes all the APIs supported by geth, whereas the HTTP and WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons. These can be turned on/off and configured as you'd expect.

HTTP based JSON-RPC API options:

  • --http Enable the HTTP-RPC server
  • --http.addr HTTP-RPC server listening interface (default: localhost)
  • --http.port HTTP-RPC server listening port (default: 8545)
  • --http.api API's offered over the HTTP-RPC interface (default: eth,net,web3)
  • --http.corsdomain Comma separated list of domains from which to accept cross origin requests (browser enforced)
  • --ws Enable the WS-RPC server
  • --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 websockets requests
  • --ipcdisable Disable the IPC-RPC server
  • --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 connect via HTTP, WS or IPC to a geth node configured with the above flags and you'll need to speak JSON-RPC on all transports. You can reuse the same connection for multiple requests!

Note: Please understand the security implications of opening up an HTTP/WS based transport before doing so! Hackers on the internet are actively trying to subvert Ethereum nodes with exposed APIs! Further, all browser tabs can access locally running web servers, so malicious web pages could try to subvert locally available APIs!

Operating a private network

Maintaining your own private network is more involved as a lot of configurations taken for granted in the official networks need to be manually set up.

Defining the private genesis state

First, you'll need to create the genesis state of your networks, which all nodes need to be aware of and agree upon. This consists of a small JSON file (e.g. call it genesis.json):

{
  "config": {
    "chainId": <arbitrary positive integer>,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "berlinBlock": 0,
    "londonBlock": 0
  },
  "alloc": {},
  "coinbase": "0x0000000000000000000000000000000000000000",
  "difficulty": "0x20000",
  "extraData": "",
  "gasLimit": "0x2fefd8",
  "nonce": "0x0000000000000042",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp": "0x00"
}

The above fields should be fine for most purposes, although we'd recommend changing the nonce to some random value so you prevent unknown remote nodes from being able to connect to you. If you'd like to pre-fund some accounts for easier testing, create the accounts and populate the alloc field with their addresses.

"alloc": {
  "0x0000000000000000000000000000000000000001": {
    "balance": "111111111"
  },
  "0x0000000000000000000000000000000000000002": {
    "balance": "222222222"
  }
}

With the genesis state defined in the above JSON file, you'll need to initialize every geth node with it prior to starting it up to ensure all blockchain parameters are correctly set:

$ geth init path/to/genesis.json

Creating the rendezvous point

With all nodes that you want to run initialized to the desired genesis state, you'll need to start a bootstrap node that others can use to find each other in your network and/or over the internet. The clean way is to configure and run a dedicated bootnode:

$ bootnode --genkey=boot.key
$ bootnode --nodekey=boot.key

With the bootnode online, it will display an enode URL 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.

Note: You could also use a full-fledged geth node as a bootnode, but it's the less recommended way.

Starting up your member nodes

With the bootnode operational and externally reachable (you can try telnet <ip> <port> to ensure it's indeed reachable), start every subsequent geth node pointed to the bootnode for peer discovery via the --bootnodes flag. It will probably also be desirable to keep the data directory of your private network separated, so do also specify a custom --datadir flag.

$ geth --datadir=path/to/custom/data/folder --bootnodes=<bootnode-enode-url-from-above>

Note: Since your network will be completely cut off from the main and test networks, you'll also need to configure a miner to process transactions and create new blocks for you.

Running a private miner

Mining on the public Ethereum network is a complex task as it's only feasible using GPUs, requiring an OpenCL or CUDA enabled ethminer instance. For information on such a setup, please consult the EtherMining subreddit and the ethminer repository.

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 by:

$ geth <usual-flags> --mine --miner.threads=1 --miner.etherbase=0x0000000000000000000000000000000000000000

Which will start mining blocks and transactions on a single CPU thread, crediting all proceedings to the account specified by --miner.etherbase. You can further tune the mining by changing the default gas limit blocks converge to (--miner.targetgaslimit) and the price transactions are accepted at (--miner.gasprice).

Contribution

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 for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our Discord Server to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.

Please make sure your contributions adhere to our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Pull requests need to be based on and opened against the master branch.
  • Commit messages should be prefixed with the package(s) they modify.
    • E.g. "eth, rpc: make trace configs optional"

Please see the Developers' Guide for more details on configuring your environment, managing project dependencies, and testing procedures.

License

The go-ethereum library (i.e. all code outside of the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the COPYING.LESSER file.

The go-ethereum binaries (i.e. all code inside of the cmd directory) is licensed under the GNU General Public License v3.0, also included in our repository in the COPYING file.

Comments
  • Rinkeby Faucet Down

    Rinkeby Faucet Down

    https://faucet.rinkeby.io/

    I'm not sure if this is the right place to put this, but I hear one of the mods here runs the rinkeby faucet. A ton of new developers are trying to use the rinkeby testnet, and the faucet is malfunctioning.

    Is there someone here who owns it and can bring it back up to speed?

  • Rinkeby faucet not working again?

    Rinkeby faucet not working again?

    Is it possible that Rinkeby faucet not working again?

    as in #21637

    I'm trying to retrieve some founds with a twitter but I always get an No Ethereum address found to fund message(https://twitter.com/aubsptest/status/1340407355704532994)

  • What is the upper bound of

    What is the upper bound of "imported new state entries"?

    System information

    Geth version: 1.6.5 OS & Version: Windows 7 x64 geth Command: geth --fast --cache 8192

    Expected behaviour

    Geth should start in full mode.

    Actual behaviour

    After nearing the current block geth is continuously "imported new state entries".

    Steps to reproduce the behaviour

    Currently running since 10 days.

    Geth console info

    eth.blockNumber 6 eth.syncing { currentBlock: 3890742, highestBlock: 3890893, knownStates: 17124512, pulledStates: 17105895, startingBlock: 3890340 }

    Backtrace

    INFO [06-18|10:10:31] Imported new state entries count=384 elapsed=22.001ms processed=17118951 pending=24263 INFO [06-18|10:10:32] Imported new state entries count=384 elapsed=33.001ms processed=17119335 pending=23819 INFO [06-18|10:10:33] Imported new state entries count=384 elapsed=111.006ms processed=17119719 pending=23875 INFO [06-18|10:10:34] Imported new state entries count=384 elapsed=131.007ms processed=17120103 pending=23855 INFO [06-18|10:10:35] Imported new state entries count=384 elapsed=116.006ms processed=17120487 pending=23978 INFO [06-18|10:10:36] Imported new state entries count=384 elapsed=134.007ms processed=17120871 pending=24186 INFO [06-18|10:10:38] Imported new state entries count=384 elapsed=305.017ms processed=17121255 pending=27727 INFO [06-18|10:10:42] Imported new state entries count=384 elapsed=448.025ms processed=17121639 pending=33614 INFO [06-18|10:10:46] Imported new state entries count=384 elapsed=441.025ms processed=17122023 pending=39642 INFO [06-18|10:10:48] Imported new state entries count=384 elapsed=44.002ms processed=17122407 pending=39170 INFO [06-18|10:10:52] Imported new state entries count=384 elapsed=427.024ms processed=17122791 pending=45142 INFO [06-18|10:10:55] Imported new state entries count=384 elapsed=473.027ms processed=17123175 pending=51166 INFO [06-18|10:10:58] Imported new state entries count=384 elapsed=448.025ms processed=17123559 pending=57128 INFO [06-18|10:11:01] Imported new state entries count=384 elapsed=444.025ms processed=17123943 pending=63129 INFO [06-18|10:11:04] Imported new state entries count=384 elapsed=441.025ms processed=17124327 pending=69173 INFO [06-18|10:11:04] Imported new state entries count=1 elapsed=0s processed=17124328 pending=69172 INFO [06-18|10:11:07] Imported new state entries count=384 elapsed=442.025ms processed=17124712 pending=75182 INFO [06-18|10:11:10] Imported new state entries count=384 elapsed=470.026ms processed=17125096 pending=81186 INFO [06-18|10:11:11] Imported new state entries count=384 elapsed=335.019ms processed=17125480 pending=81736 INFO [06-18|10:11:14] Imported new state entries count=384 elapsed=440.025ms processed=17125864 pending=87718 INFO [06-18|10:11:15] Imported new state entries count=384 elapsed=140.008ms processed=17126248 pending=87812 INFO [06-18|10:11:16] Imported new state entries count=384 elapsed=31.001ms processed=17126632 pending=87226 INFO [06-18|10:11:18] Imported new state entries count=384 elapsed=88.005ms processed=17127016 pending=87040 INFO [06-18|10:11:19] Imported new state entries count=384 elapsed=39.002ms processed=17127400 pending=86803 INFO [06-18|10:11:20] Imported new state entries count=384 elapsed=36.002ms processed=17127784 pending=86585 INFO [06-18|10:11:23] Imported new state entries count=1 elapsed=0s processed=17127785 pending=86272 INFO [06-18|10:11:23] Imported new state entries count=384 elapsed=1.610s processed=17128169 pending=86271 INFO [06-18|10:11:25] Imported new state entries count=384 elapsed=143.008ms processed=17128553 pending=87792 INFO [06-18|10:11:28] Imported new state entries count=384 elapsed=183.010ms processed=17128937 pending=90117 INFO [06-18|10:11:28] Imported new state entries count=1 elapsed=1ms processed=17128938 pending=90120 INFO [06-18|10:11:28] Imported new state entries count=1 elapsed=0s processed=17128939 pending=90118 INFO [06-18|10:11:29] Imported new state entries count=384 elapsed=102.005ms processed=17129323 pending=90022 INFO [06-18|10:11:30] Imported new state entries count=384 elapsed=184.010ms processed=17129707 pending=92320 INFO [06-18|10:11:32] Imported new state entries count=384 elapsed=185.010ms processed=17130091 pending=94665 INFO [06-18|10:11:34] Imported new state entries count=384 elapsed=187.010ms processed=17130475 pending=97053 INFO [06-18|10:11:36] Imported new state entries count=384 elapsed=194.011ms processed=17130859 pending=99550 INFO [06-18|10:11:38] Imported new state entries count=384 elapsed=183.010ms processed=17131243 pending=101954 INFO [06-18|10:11:40] Imported new state entries count=384 elapsed=202.011ms processed=17131627 pending=104395 INFO [06-18|10:11:42] Imported new state entries count=384 elapsed=196.011ms processed=17132011 pending=106904 INFO [06-18|10:11:44] Imported new state entries count=384 elapsed=186.010ms processed=17132395 pending=109176 INFO [06-18|10:11:47] Imported new state entries count=384 elapsed=184.010ms processed=17132779 pending=111554 INFO [06-18|10:11:47] Imported new state entries count=2 elapsed=184.010ms processed=17132781 pending=111554 INFO [06-18|10:11:48] Imported new state entries count=384 elapsed=34.002ms processed=17133165 pending=110760 INFO [06-18|10:11:50] Imported new state entries count=384 elapsed=193.011ms processed=17133549 pending=113172

  • What is the upper bound of

    What is the upper bound of "imported new state entries"? When will it end?

    System information

    Geth version: 1.7.2 OS & Version: OSX

    Expected behaviour

    geth --fast should finish soon.

    Actual behaviour

    it run for 3days and print “Imported new state entries count=384 elapsed=26.970ms processed=50023987 pending=33074 retry=0 duplicate=19087 unexpected=47765” constantly

    Steps to reproduce the behaviour

    run geth --fast in console

    Backtrace

    INFO [12-06|07:08:00] Imported new state entries count=1259 elapsed=12.971ms processed=50014526 pending=34891 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:23] Imported new state entries count=774 elapsed=8.950ms processed=50015300 pending=34311 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:31] Imported new state entries count=1125 elapsed=9.513ms processed=50016425 pending=33428 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:39] Imported new state entries count=1061 elapsed=11.198ms processed=50017486 pending=32566 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:08:49] Imported new state entries count=1314 elapsed=12.041ms processed=50018800 pending=31248 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:09:10] Imported new state entries count=1028 elapsed=10.446ms processed=50019828 pending=30496 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:09:25] Imported new state entries count=1241 elapsed=10.423ms processed=50021069 pending=30088 retry=0 duplicate=19087 unexpected=47765 INFO [12-06|07:09:37] Imported new state entries count=777 elapsed=6.224ms processed=50021846 pending=29851 retry=26 duplicate=19087 unexpected=47765

  • "Nonce too low" error message on faucet.rinkeby.io

    Hi,

    Request ether via https://faucet.rinkeby.io/ throws an error message "Nonce too low" using both Twitter and G+.

    System information OS & Version: Mac, Chrome(version 65) and Safari.

    Expected behaviour Requesting ether using Google+/Twitter URL should transfer ether.

    Actual behaviour Clicking "Give me ether" throws an error "Nonce too low".

    Steps to reproduce the behaviour chrome-ether-rinkeby

    screen shot 2018-04-29 at 14 12 59

    Open Chrome (or Safari), input https://faucet.rinkeby.io/, and copy URL, and then click "give me ether".

  • geth --fast stalls before crossing finish line

    geth --fast stalls before crossing finish line

    System information

    Geth version: geth version 1.5.9-stable, Go1.7.4 OS & Version: OSX 10.12.6 MacMini 4GB RAM (latest MacMini doesn't support field RAM upgrade anymore) VDSL connection with an average of 20-40Mbit throughput. Ethereum Wallet 0.9.0 Commit hash : (if develop)

    Expected behaviour

    fast sync to current latest block followed by auto disabling

    Actual behaviour

    stalling from a few thousand blocks up to a few hundred to current latest block. Tries to catch up to latest block, but number of new blocks is greater than the speed of adding fast blocks. Never auto disables fast sync mode.

    Steps to reproduce the behaviour

    Removedb and geth --fast --cache=1024. 5 times on that machine over the last weeks.

    Fast sync is already my workaround, starting a fresh fast sync from scratch. Before I was unsuccessful on that machine trying to sync with existing blockchain data instead. This was also a lost race of catching up to the latest block on that machine. This workaround was good until now.

    Today even the workaround in fast sync mode (cache -1024) will not completely load the blockchain anymore. It catches up some hundred blocks to the latest block and stalls for hours. By the time it catches up a few hundred blocks, the latest block moved ahead again. The closer geth is getting to import to the latest block (at time of writing 4173161), the slower it gets. It does not catch up anymore. Tried 5 times now over the last weeks and giving up at around 4-5 days each.

    Does the machine not meet todays minimum hardware requirement anymore or is this a major bug?

    Backtrace

    latest block 13 hours ago (!)

    I0818 00:15:26.444933 core/blockchain.go:805] imported 148 receipts in 2.775s. #4169952 [e3f556fc… / 36f4d3c9…]

    ...

    latest header chain 50 minutes ago

    I0818 12:47:45.107445 core/headerchain.go:342] imported 1 headers in 4.954ms. #4173009 [350d1426… / 350d1426…]

    ...

    currently only importing nothing but state entries

    I0818 13:36:41.103101 eth/downloader/downloader.go:966] imported 172 state entries in 10.009s: processed 10010213, pending at least 129361 I0818 13:36:41.103131 eth/downloader/downloader.go:966] imported 384 state entries in 783.519ms: processed 10010597, pending at least 129361 I0818 13:36:41.103154 eth/downloader/downloader.go:966] imported 381 state entries in 6.963s: processed 10010978, pending at least 129361 I0818 13:36:41.103167 eth/downloader/downloader.go:966] imported 25 state entries in 87.654ms: processed 10011003, pending at least 129360 I0818 13:36:46.014244 eth/downloader/downloader.go:966] imported 384 state entries in 2.482s: processed 10011387, pending at least 127584 I0818 13:36:49.074483 eth/downloader/downloader.go:966] imported 381 state entries in 7.082s: processed 10011768, pending at least 127105 I0818 13:36:49.074553 eth/downloader/downloader.go:966] imported 384 state entries in 7.971s: processed 10012152, pending at least 127105 I0818 13:36:49.074574 eth/downloader/downloader.go:966] imported 384 state entries in 3.772s: processed 10012536, pending at least 127105 I0818 13:36:49.074603 eth/downloader/downloader.go:966] imported 162 state entries in 5.822s: processed 10012698, pending at least 127105 I0818 13:36:49.074622 eth/downloader/downloader.go:966] imported 25 state entries in 4.050s: processed 10012723, pending at least 127105 I0818 13:36:49.074639 eth/downloader/downloader.go:966] imported 381 state entries in 3.060s: processed 10013104, pending at least 127105 I0818 13:36:49.074742 eth/downloader/downloader.go:966] imported 85 state entries in 7.117s: processed 10013189, pending at least 127105 I0818 13:36:49.074765 eth/downloader/downloader.go:966] imported 375 state entries in 2.219s: processed 10013564, pending at least 127105 I0818 13:36:49.074782 eth/downloader/downloader.go:966] imported 87 state entries in 3.915s: processed 10013651, pending at least 127105 I0818 13:36:49.074795 eth/downloader/downloader.go:966] imported 23 state entries in 271.734ms: processed 10013674, pending at least 127104

  • eth_listTransactions

    eth_listTransactions

    This feature has been discussed on gitter in the past and we would like to see this get implemented for accounts and contracts.

    Proposal

    eth_listTransactions

    Returns a list of transaction hashes for a given external or contract account

    Parameters

    String - the account or contract address

    params: [
      "0x385acafdb80b71ae001f1dbd0d65e62ec2fff055"
    ]
    

    Returns

    DATA - A list of transaction hashes

  • Rinkeby Faucet: No Ethereum address found to fund

    Rinkeby Faucet: No Ethereum address found to fund

    this is the tweet that clearly contains an ethereum address: https://twitter.com/mr_ligi/status/1268171687159357443

    Rinkeby: Authenticated Faucet - Brave_579

    Guess there is something off with the twitter connection

  • eth_compilers, eth_compileSolidity are gone in go-ethereum 1.6.0

    eth_compilers, eth_compileSolidity are gone in go-ethereum 1.6.0

    System information

    Geth version: v1.6.0-unstable-6d038e76/linux/go1.7.3 OS & Version: Linux/Ubuntu 16.04.1 LTS (x86_64) Commit hash : 6d038e76

    Expected behaviour

    Running eth.getCompilers() in the geth console should return an array of compilers ['solidity'] that could even be empty ( [] )

    Actual behaviour

    The command returns Error: The method eth_getCompilers does not exist/is not available but I have started the node with --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" and I am able to run other eth commands. I was actually trying to execute the command via RPC with web3j and was getting an error then realized it didn't work in the console either.

    > eth.compile
    {
      lll: function(),
      serpent: function(),
      solidity: function()
    }
    
    

    Steps to reproduce the behaviour

    1. Attach the console to a running node with -ipc enabled
    2. Run eth.getCompilers()
    3. If no compilers are installed you should get [], not an error message
  • Can't Unlock Any Of My Four Geth-Generated Accounts, 30,000 ETH Inside

    Can't Unlock Any Of My Four Geth-Generated Accounts, 30,000 ETH Inside

    I thought I should edit to include an update right at the top of the body: three of the four Geth accounts have been unlocked thanks to @DcyMatrix's suggestion below

    Requesting advice/help in solving this problem:

    I created four Geth accounts in late May, and gave each a different password, which I carefully noted down (I wrote the passwords down on paper, then I entered them into the Geth command line).

    Yesterday I tried to unlock the accounts, and none of the passwords worked, for any of the accounts. I'm transcribing the passwords from the same piece of paper that I initially read from when entering them into the Geth client, so it's very unlikely that this was an input error.

    I've searched the internet and found these four links where people report having similar problems:

    Mist Wallet password problem - https://www.reddit.com/r/ethereum/comments/4na19x/mist_wallet_password_problem/

    Mist Wallet says wrong password, be careful - https://www.reddit.com/r/ethereum/comments/4jzxft/mist_wallet_says_wrong_password_be_careful/

    Mist password wrong error 0.7.6 - https://github.com/ethereum/mist/issues/923

    Password Assistance Needed :) - https://forum.ethereum.org/discussion/8422/password-assistance-needed

    A common factor in all of these is accounts being created in May, so it may have something to do with a version of Geth that was in wide use in May.

    Someone in the discussion linked by the second URL from the top mentioned fixing their problem with Jaxx Kryptokit. I tried importing one of the accounts into the Jaxx Kryptokit wallet:

    https://ethereumwallet.com/beta/index.html#dYb9

    and put in the password, and it did not work, so I do believe that the password is wrong.

    I found this bug report relating to both Mist and Geth:

    https://github.com/ethereum/mist/issues/182#issuecomment-198908871

    I'm wondering if this could be related.

    I created two new accounts today with two new passwords, and was able to unlock both with their passwords, but I did that with Geth 1.5.0-unstable and the version I was running in late May was different.

    If I lose this ETH this would set me back a few years, so I'm very anxious right now. Any help would be appreciated.

    Edit, more details:

    I was running Geth 1.5.0 unstable, with this snapshot: 1.5.0+986SNAPSHOT20160511110231trusty-0ubuntu1

    So this is the snapshot as of May 11th 2016

  • Transactions not being broadcasted

    Transactions not being broadcasted

    System information

    Geth version:

    Geth
    Version: 1.6.5-stable
    Git Commit: cf87713dd42162861b7ed227f79f0638a33571df
    Architecture: amd64
    Protocol Versions: [63 62]
    Network Id: 1
    Go Version: go1.7
    Operating System: linux
    GOPATH=
    GOROOT=/usr/local/go
    

    OS & Version: Ubuntu 14.04.5 LTS, Trusty Tahr

    Expected behaviour

    eth.sendTransaction returns a hash and the transaction should be broadcasted to the network.

    Actual behaviour

    eth.sendTransaction returns a hash but the transaction is never broadcasted to the network.

    Steps to reproduce the behaviour

    This tends to happen when the network is congested (usually around large ICOs). But calling sendTransaction during this time returns transaction hashes and these seem to just get lost in the ether.

    More background

    We operate an ETH exchange and stopped withdrawals about 18 hours ago to prevent getting ourselves into a bigger mess and stop adding things to the queue. We had to upgrade and restart geth yesterday as 1.6.0 was refusing to sync and was losing peers. 1.6.5 is now syncing without issues.

    When sending transactions we use dynamic gas prices, using the recommended value returned by eth.gasPrice.

    Even after upgrading to 1.6.5 we see this behavior. Our node hasn't restarted since we upgraded to 1.6.5, we have txhashes returned by geth when calling sendTransaction, but txpool.content.pending[sending_address] returns undefined.

    More questions

    1. When is it safe to credit funds back to users? I understand it's theoretically possible that after calling sendTransaction the txs were broadcasted and are still in some other node's txpool
    2. How do we prevent this from happening in the future?
    3. What else can we do to help you debug this issue?
  • Etherscan contract interface does not check for authentication, Large number of admin functions callable by public, XSS vulnerability in etherscan.

    Etherscan contract interface does not check for authentication, Large number of admin functions callable by public, XSS vulnerability in etherscan.

    Expected behaviour

    • Many functions across all contracts are publicly callable that are clearly only intended for admins of the contract to use, it is as though there is no authentication happening in most contracts for some contract function calls whatsoever.
    • The 'Write Contract' interface should prompt for authentication to make clicking the writable functions more difficult.
    • The form processing done on input from text boxes on the smart contract interface screens of "Read Contract" / "Write Contract" should filter special characters when receiving input, at least for double quotes and their various representations in hex, decimal, unicode, html entities, escaped JavaScript, etc. Code can currently be injected into function calls by escaping the double quotes character and at a minimum cause exceptions as a method of burning gas on purpose ( not all gas is reverted upon certain exceptions).

    Actual behaviour

    The public can manipulate some of the top contracts, potential for data corruption via XSS on etherscan, writeable panel of contract interface issues network requests on button clicks even if user is not logged in. ( No error message or success message is displayed, but the request is sent and received and processed by the server when the button is pressed. ) Some contracts that I was able to look at on goerli had nearly every writable function callable anonymously by the public without doing a proper transaction or requiring coins to issue.

    Steps to reproduce the behaviour

    View a contract on testnet like this one, go to "Write Contract" and enter zeros into each field, hit submit, and you have written to the contract without spending coins. - https://goerli.etherscan.io/address/0x8ae7063d03213d4d90103c16f048b3f64de2d4d0#code

    I have been trying to submit and get attention to these problems for some time now, to both an almost comical and embarassing degree, and after being completely ignored and seeing as this is being obviously abused I decided it better to post here so that people are made aware of the situation sooner than later. I had reported this to solidity but have not heard back anything from them and in my opinion it is too late to siliently roll out a fix.

  • Does ecies support secp256k1 curve?

    Does ecies support secp256k1 curve?

    The README said ecies only support P256, P384 and P512, but the 'paramsFromCurve' map variable also has S256 in source code.

    var paramsFromCurve = map[elliptic.Curve]*ECIESParams{
    	ethcrypto.S256(): ECIES_AES128_SHA256,
    	elliptic.P256():  ECIES_AES128_SHA256,
    	elliptic.P384():  ECIES_AES256_SHA384,
    	elliptic.P521():  ECIES_AES256_SHA512,
    }
    

    I wrote a unit test using S256 to generate a key-pair and encrypt/decrypt some data. It seems work fine.

    func TestS256(t *testing.T) {
    	privateKeyECDSA, e := ecdsa.GenerateKey(crypto.S256(), rand.Reader)
    	if e != nil {
    		panic(e)
    	}
    	pubKey := &privateKeyECDSA.PublicKey
    	expect := []byte("ksldfkjsdlksw12213123")
    	msg, e := EncryptECIES(pubKey, expect)
    	if e != nil {
    		panic(e)
    	}
    	real, e := DecryptECIES(privateKeyECDSA, msg)
    	if e != nil {
    		panic(e)
    	}
    	fmt.Printf("%s", real)
    	if !bytes.Equal(expect, real) {
    		t.FailNow()
    	}
    }
    

    So, can I use it in a production environment?

  • No pivot movements during block download

    No pivot movements during block download

    image

    The image shows the snap traffic during a sync from scratch. It started ok, then nothing happened, and as soon as the block body download completed, the snap sync got started again.

    The abbreviated logs that mention pivoting from that time:

    Dec 22 20:01:12 bench06.ethdevops.io geth WARN [12-22|19:01:12.117] Pivot became stale, moving old=16,240,072 new=16,240,289
    Dec 22 20:01:14 bench06.ethdevops.io geth WARN [12-22|19:01:14.379] Pivot became stale, moving old=16,240,289 new=16,240,369
    Dec 22 20:01:15 bench06.ethdevops.io geth WARN [12-22|19:01:15.509] Pivot became stale, moving old=16,240,369 new=16,241,203
    Dec 22 20:01:17 bench06.ethdevops.io geth WARN [12-22|19:01:17.485] Pivot became stale, moving old=16,241,203 new=16,241,413
    Dec 22 20:01:18 bench06.ethdevops.io geth WARN [12-22|19:01:18.838] Pivot became stale, moving old=16,241,413 new=16,242,137
    Dec 22 20:14:04 bench06.ethdevops.io geth WARN [12-22|19:14:03.987] Pivot became stale, moving old=16,242,137 new=16,242,201
    Dec 22 20:26:54 bench06.ethdevops.io geth WARN [12-22|19:26:54.145] Pivot became stale, moving old=16,242,201 new=16,242,265
    Dec 22 20:33:17 bench06.ethdevops.io geth INFO [12-22|19:33:17.075] Loaded last fast-sync pivot marker number=16,242,265
    Dec 22 20:41:37 bench06.ethdevops.io geth INFO [12-22|19:41:36.944] Loaded last fast-sync pivot marker number=16,242,296
    Dec 22 20:48:38 bench06.ethdevops.io geth INFO [12-22|19:48:38.560] Loaded last fast-sync pivot marker number=16,242,336
    Dec 22 20:59:52 bench06.ethdevops.io geth INFO [12-22|19:59:52.177] Loaded last fast-sync pivot marker number=16,242,372
    Dec 22 21:05:15 bench06.ethdevops.io geth INFO [12-22|20:05:15.853] Loaded last fast-sync pivot marker number=16,242,427
    Dec 22 21:17:02 bench06.ethdevops.io geth INFO [12-22|20:17:02.419] Loaded last fast-sync pivot marker number=16,242,454
    Dec 22 21:29:14 bench06.ethdevops.io geth INFO [12-22|20:29:14.868] Loaded last fast-sync pivot marker number=16,242,513
    Dec 22 21:36:02 bench06.ethdevops.io geth INFO [12-22|20:36:02.103] Loaded last fast-sync pivot marker number=16,242,574
    Dec 22 21:41:59 bench06.ethdevops.io geth INFO [12-22|20:41:59.003] Loaded last fast-sync pivot marker number=16,242,608
    Dec 22 21:52:35 bench06.ethdevops.io geth INFO [12-22|20:52:35.468] Loaded last fast-sync pivot marker number=16,242,637
    Dec 22 21:59:39 bench06.ethdevops.io geth INFO [12-22|20:59:39.659] Loaded last fast-sync pivot marker number=16,242,690
    Dec 22 22:06:08 bench06.ethdevops.io geth INFO [12-22|21:06:08.784] Loaded last fast-sync pivot marker number=16,242,726
    Dec 22 22:18:54 bench06.ethdevops.io geth WARN [12-22|21:18:54.860] Pivot became stale, moving old=16,242,758 new=16,242,824
    Dec 22 22:26:38 bench06.ethdevops.io geth INFO [12-22|21:26:38.847] Loaded last fast-sync pivot marker number=16,242,824
    Dec 22 22:33:28 bench06.ethdevops.io geth INFO [12-22|21:33:27.969] Loaded last fast-sync pivot marker number=16,242,860
    Dec 22 22:39:52 bench06.ethdevops.io geth INFO [12-22|21:39:52.875] Loaded last fast-sync pivot marker number=16,242,894
    Dec 22 22:47:05 bench06.ethdevops.io geth INFO [12-22|21:47:05.580] Loaded last fast-sync pivot marker number=16,242,926
    Dec 22 22:54:07 bench06.ethdevops.io geth INFO [12-22|21:54:07.114] Loaded last fast-sync pivot marker number=16,242,962
    Dec 22 23:01:35 bench06.ethdevops.io geth INFO [12-22|22:01:35.340] Loaded last fast-sync pivot marker number=16,242,997
    Dec 22 23:09:02 bench06.ethdevops.io geth INFO [12-22|22:09:02.134] Loaded last fast-sync pivot marker number=16,243,034
    Dec 22 23:19:35 bench06.ethdevops.io geth INFO [12-22|22:19:35.564] Loaded last fast-sync pivot marker number=16,243,072
    Dec 22 23:27:58 bench06.ethdevops.io geth INFO [12-22|22:27:57.948] Loaded last fast-sync pivot marker number=16,243,124
    Dec 22 23:35:50 bench06.ethdevops.io geth INFO [12-22|22:35:50.523] Loaded last fast-sync pivot marker number=16,243,166
    Dec 22 23:44:13 bench06.ethdevops.io geth INFO [12-22|22:44:13.809] Loaded last fast-sync pivot marker number=16,243,205
    Dec 22 23:51:15 bench06.ethdevops.io geth INFO [12-22|22:51:14.997] Loaded last fast-sync pivot marker number=16,243,248
    Dec 22 23:57:51 bench06.ethdevops.io geth INFO [12-22|22:57:51.087] Loaded last fast-sync pivot marker number=16,243,283
    Dec 23 00:05:35 bench06.ethdevops.io geth INFO [12-22|23:05:35.251] Loaded last fast-sync pivot marker number=16,243,316
    Dec 23 00:12:52 bench06.ethdevops.io geth INFO [12-22|23:12:52.381] Loaded last fast-sync pivot marker number=16,243,354
    Dec 23 00:25:13 bench06.ethdevops.io geth WARN [12-22|23:25:13.747] Pivot became stale, moving old=16,243,391 new=16,243,455```
    

    The TL;DR is that once the block download phase finished, it does 5 pivot movements with a few seconds in between. 16,240,072 -> 16,242,137 , 2065 blocks, representing nearly 7 hours.

    This is because head updates from the CL node does not trigger pivot movements, only full block download does. But if our head pivot is already at 16M, and we spend 6 hours downloading 16M -> genesis, then obviously nothing will push it.

    This needs to be fixed by somehow trigger pivot movements from head updates.

Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated builds are available for stable releases and the unstable master branch

Nov 24, 2021
Official Go implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated builds are available for stable releases and the unstable master branch

Jan 8, 2023
RepoETH - Official Golang implementation of the Ethereum protocol
RepoETH - Official Golang implementation of the Ethereum protocol

HANNAGAN ALEXANDRE Powershell Go Ethereum Official Golang implementation of the

Jan 3, 2022
Official Golang implementation of the Ethereum protocol

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated builds are available for stable releases and the unstable master branch

Sep 20, 2022
Go language implementation of a blockchain based on the BDLS BFT protocol. The implementation was adapted from Ethereum and Sperax implementation

BDLS protocol based PoS Blockchain Most functionalities of this client is similar to the Ethereum golang implementation. If you do not find your quest

Oct 14, 2022
A Commander for Go implementation of official Ethereum Client

Young A Commander for Go implementation of official Ethereum Client by zhong-my. Overview Young Dependencies Young stands on the shoulder of many grea

Oct 14, 2021
Koisan-chain - Official Golang implementation of the Koisan protocol

Go Ethereum Official Golang implementation of the Koisan protocol. Building the

Feb 6, 2022
Jan 7, 2023
LEO (Low Ethereum Orbit) is an Ethereum Portal Network client.

LEO LEO (Low Ethereum Orbit) is an Ethereum Portal Network client. What makes LEO different from other Portal Network clients is that it uses libp2p f

Apr 19, 2022
Ethereum-vanity-wallet - A fork of https://github.com/meehow/ethereum-vanity-wallet but the key can be exported to a JSON keystore file

ethereum-vanity-wallet See https://github.com/meehow/ethereum-vanity-wallet This version: doesn't display the private key let's you interactively expo

Jan 2, 2022
This library aims to make it easier to interact with Ethereum through de Go programming language by adding a layer of abstraction through a new client on top of the go-ethereum library.

Simple ethereum client Simple ethereum client aims to make it easier for the developers to interact with Ethereum through a new layer of abstraction t

May 1, 2022
Monorepo implementing the Optimistic Ethereum protocol
Monorepo implementing the Optimistic Ethereum protocol

The Optimism Monorepo TL;DR This is the primary place where Optimism works on stuff related to Optimistic Ethereum. Documentation Extensive documentat

Sep 18, 2022
Official Go implementation of the Catcoin project

Go Ethereum Official Golang implementation of the Ethereum protocol. Automated builds are available for stable releases and the unstable master branch

Jan 7, 2022
Go implementation of Ethereum proof of stake

Prysm: An Ethereum Consensus Implementation Written in Go This is the core repository for Prysm, a Golang implementation of the Ethereum Consensus spe

Jan 1, 2023
ECIES implementation forked of the `crypto/ecies` package from Ethereum

# NOTE This implementation is direct fork of Kylom's implementation. I claim no authorship over this code apart from some minor modifications. Please

Dec 7, 2021
A permissioned implementation of Ethereum supporting data privacy
A permissioned implementation of Ethereum supporting data privacy

GoQuorum is an Ethereum-based distributed ledger protocol with transaction/contract privacy and new consensus mechanisms. GoQuorum is a fork of go-eth

Dec 31, 2022
Mini Blockchain Implementation In Golang Inspired by Go-Ethereum🚀

JP Blockchain ?? ?? Mini Blockchain Implementation In Golang Inspired by Go Ethereum & BlockChain Bar by Lukas (Web3Coach) Features Working Core Compo

Aug 8, 2022
Go-block-api - Golang implementation of Ethereum Block API

Go Ethereum Block API Golang implementation of Ethereum Block API This API can s

Jan 13, 2022
A Go implementation of EIP-4361 Sign In With Ethereum verification

Sign-In with Ethereum This go module provides a pure Go implementation of EIP-4361: Sign In With Ethereum. Installation go get github.com/jiulongw/siw

Apr 24, 2022