Merge branch 'website' into website-fix

This commit is contained in:
Felix Lange 2024-05-29 12:35:15 +02:00 committed by GitHub
commit c0654bd268
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 37 additions and 55 deletions

View file

@ -9,7 +9,7 @@ It is often convenient for developers to work in an environment where changes to
- Sets max peers to 0 (meaning Geth does not search for peers) - Sets max peers to 0 (meaning Geth does not search for peers)
- Turns off discovery by other nodes (meaning the node is invisible to other nodes) - Turns off discovery by other nodes (meaning the node is invisible to other nodes)
- Sets the gas price to 0 (no cost to send transactions) - Sets the gas price to 0 (no cost to send transactions)
- Uses the Clique proof-of-authority consensus engine which allows blocks to be mined as needed without excessive CPU and memory consumption - Simulates a consensus client which allows blocks to be mined as-needed without excessive CPU and memory consumption
- Uses on-demand block generation, producing blocks when transactions are waiting to be mined - Uses on-demand block generation, producing blocks when transactions are waiting to be mined
This configuration enables developers to experiment with Geth's source code or develop new applications without having to sync to a pre-existing public network. Blocks are only mined when there are pending transactions. Developers can break things on this network without affecting other users. This page will demonstrate how to spin up a local Geth testnet and a simple smart contract will be deployed to it using the Remix online integrated development environment (IDE). This configuration enables developers to experiment with Geth's source code or develop new applications without having to sync to a pre-existing public network. Blocks are only mined when there are pending transactions. Developers can break things on this network without affecting other users. This page will demonstrate how to spin up a local Geth testnet and a simple smart contract will be deployed to it using the Remix online integrated development environment (IDE).
@ -22,7 +22,7 @@ Some basic knowledge of [Solidity](https://docs.soliditylang.org/) and [smart co
## Start Geth in Dev Mode {#start-geth-in-dev-mode} ## Start Geth in Dev Mode {#start-geth-in-dev-mode}
Starting Geth in developer mode is as simple as providing the `--dev` flag. It is also possible to create a realistic block creation frequency by setting `--dev.period 13` instead of creating blocks only when transactions are pending. Additional configuration options are required to follow this tutorial. Starting Geth in developer mode is as simple as providing the `--dev` flag. It is also possible to create a realistic block creation frequency by setting `--dev.period 12` instead of creating blocks only when transactions are pending. Additional configuration options required to follow this tutorial.
Remix will be used to deploy a smart contract to the node which requires information to be exchanged externally with Geth's own domain. To permit this, enable `http` and the `net` namespace must be enabled and the Remix URL must be provided to `--http.corsdomain`. Some other namespaces will also be enabled for this tutorial. The full command is as follows: Remix will be used to deploy a smart contract to the node which requires information to be exchanged externally with Geth's own domain. To permit this, enable `http` and the `net` namespace must be enabled and the Remix URL must be provided to `--http.corsdomain`. Some other namespaces will also be enabled for this tutorial. The full command is as follows:
@ -78,12 +78,12 @@ geth attach <datadir>/geth.ipc
The Javascript terminal will open with the following welcome message: The Javascript terminal will open with the following welcome message:
```terminal ```terminal
Welcome to the Geth Javascript console! Welcome to the Geth JavaScript console!
instance: Geth/v1.10.18-unstable-8d84a701-20220503/linux-amd64/go.1.18.1 instance: Geth/v1.14.3-stable-ab48ba42/linux-arm64/go1.22.3
coinbase: 0x540dbaeb2390f2eb005f7a6dbf3436a0959197a9 at block: 0 (Thu Jan 01 1970 00:00:00 GMT+0000 (UTC))
at block: 0 (Thu Jan 01 1970 01:00:00 GMT+0100 (BST)) datadir:
modules: eth:1.0 rpc:1.0 web3:1.0 modules: admin:1.0 debug:1.0 dev:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0
To exit, press ctrl-d or type exit To exit, press ctrl-d or type exit
> >
@ -95,21 +95,16 @@ For simplicity this tutorial uses Geth's built-in account management. First, the
eth.accounts eth.accounts
``` ```
An array containing a single address will be displayed in the terminal, despite no accounts being explicitly created. This is the "coinbase" account. The coinbase address is the recipient of the total amount of ether created at the local network genesis. Querying the ether balance of the coinbase account will return a very large number. The coinbase account can be invoked as `eth.accounts[0]` or as `eth.coinbase`: An array containing a single address will be displayed in the terminal, despite no accounts having yet been explicitly created. This is the "developer" account. The developer address is the recipient of the total amount of ether created at the local network genesis. Querying the ether balance of the developer account will return a very large number. The developer account can be invoked as `eth.accounts[0]`.
```terminal
> eth.coinbase==eth.accounts[0]
true
```
The following command can be used to query the balance. The return value is in units of Wei, which is divided by 1<sup>18</sup> to give units of ether. This can be done explicitly or by calling the `web3.FromWei()` function: The following command can be used to query the balance. The return value is in units of Wei, which is divided by 1<sup>18</sup> to give units of ether. This can be done explicitly or by calling the `web3.FromWei()` function:
```sh ```sh
eth.getBalance(eth.coinbase)/1e18 eth.getBalance(eth.accounts[0])/1e18
// or // or
web3.fromWei(eth.getBalance(eth.coinbase)) web3.fromWei(eth.getBalance(eth.accounts[0]))
``` ```
Using `web3.fromWei()` is less error-prone because the correct multiplier is built in. These commands both return the following: Using `web3.fromWei()` is less error-prone because the correct multiplier is built in. These commands both return the following:
@ -118,7 +113,7 @@ Using `web3.fromWei()` is less error-prone because the correct multiplier is bui
1.157920892373162e+59 1.157920892373162e+59
``` ```
A new account can be created using Clef. Some of the ether from the coinbase can then be transferred across to it. A new account is generated using the `newaccount` function on the command line: A new account can be created using Clef. Some of the ether from the developer account can then be transferred across to it. A new account is generated using the `newaccount` function on the command line:
```sh ```sh
clef newaccount --keystore <path-to-keystore> clef newaccount --keystore <path-to-keystore>
@ -126,10 +121,10 @@ clef newaccount --keystore <path-to-keystore>
The terminal will display a request for a password, twice. Once provided, a new account will be created, and its address will be printed to the terminal. The account creation is also logged in the Geth terminal, including the location of the keyfile in the keystore. It is a good idea to back up the password somewhere at this point. If this were an account on a live network, intended to own assets of real-world value, it would be critical to back up the account password and the keystore in a secure manner. The terminal will display a request for a password, twice. Once provided, a new account will be created, and its address will be printed to the terminal. The account creation is also logged in the Geth terminal, including the location of the keyfile in the keystore. It is a good idea to back up the password somewhere at this point. If this were an account on a live network, intended to own assets of real-world value, it would be critical to back up the account password and the keystore in a secure manner.
To reconfirm the account creation, running `eth.accounts` in the Javascript console should display an array containing two account addresses, one being the coinbase and the other being the newly generated address. The following command transfers 50 ETH from the coinbase to the new account: To reconfirm the account creation, running `eth.accounts` in the Javascript console should display an array containing two account addresses, one being the developer account and the other being the newly generated address. The following command transfers 50 ETH from the developer account to the new account:
```sh ```sh
eth.sendTransaction({from: eth.coinbase, to: eth.accounts[1], value: web3.toWei(50, "ether")}) eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(50, "ether")})
``` ```
A transaction hash will be returned to the console. This transaction hash will also be displayed in the logs in the Geth console, followed by logs confirming that a new block was mined (remember, in the local development network, blocks are mined when transactions are pending). The transaction details can be displayed in the Javascript console by passing the transaction hash to `eth.getTransaction()`: A transaction hash will be returned to the console. This transaction hash will also be displayed in the logs in the Geth console, followed by logs confirming that a new block was mined (remember, in the local development network, blocks are mined when transactions are pending). The transaction details can be displayed in the Javascript console by passing the transaction hash to `eth.getTransaction()`:
@ -160,7 +155,8 @@ The transaction details are displayed as follows:
transactionIndex: 0, transactionIndex: 0,
type: "0x2", type: "0x2",
v: "0x0", v: "0x0",
value: 50000000000000000000 value: 50000000000000000000,
yParity: "0x0"
} }
``` ```
@ -171,30 +167,15 @@ Now that the user account is funded with ether, a contract can be created and de
This tutorial will make use of a classic example smart contract, `Storage.sol`. This contract exposes two public functions, one to add a value to the contract storage and one to view the stored value. The contract, written in Solidity, is provided below: This tutorial will make use of a classic example smart contract, `Storage.sol`. This contract exposes two public functions, one to add a value to the contract storage and one to view the stored value. The contract, written in Solidity, is provided below:
```solidity ```solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0; pragma solidity >=0.8.2 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage { contract Storage {
uint256 number; uint256 number;
/**
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public { function store(uint256 num) public {
number = num; number = num;
} }
/**
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256) { function retrieve() public view returns (uint256) {
return number; return number;
} }
@ -213,7 +194,7 @@ The Solidity logo is present as an icon in the Remix sidebar. Clicking this icon
![Remix-compiler](/images/docs/remix-compiler.png) ![Remix-compiler](/images/docs/remix-compiler.png)
Below the Solidity icon is a fourth icon that includes the Ethereum logo. Clicking this opens the Deploy menu. In this menu, Remix can be configured to connect to the local Geth node. In the drop-down menu labelled `ENVIRONMENT`, select `Injected Web3`. This will open an information pop-up with instructions for configuring Geth - these can be ignored as they were completed earlier in this tutorial. However, at the bottom of this pop-up is a box labelled `Web3 Provider Endpoint`. This should be set to Geth's 8545 port on `localhost` (`127.0.0.1:8545`). Click OK. The `ACCOUNT` field should automatically populate with the address of the account created earlier using the Geth Javascript console. Below the Solidity icon is a fourth icon that includes the Ethereum logo. Clicking this opens the Deploy menu. In this menu, Remix can be configured to connect to the local Geth node. In the drop-down menu labelled `ENVIRONMENT`, select `Custom - External Http Provider`. This will open an information pop-up with instructions for configuring Geth - these can be ignored as they were completed earlier in this tutorial. However, at the bottom of this pop-up is a box labelled `External HTTP Provider Endpoint`. This should be set to Geth's 8545 port on `localhost` (`http://127.0.0.1:8545`). Click OK. The `ACCOUNT` field should automatically populate with the address of the account created earlier using the Geth Javascript console.
![Remix-deploy](/images/docs/remix-deploy.png) ![Remix-deploy](/images/docs/remix-deploy.png)
@ -268,7 +249,8 @@ The transaction hash can be used to retrieve the transaction details using the G
transactionIndex: 0, transactionIndex: 0,
type: "0x2", type: "0x2",
v: "0x1", v: "0x1",
value: 0 value: 0,
yParity: "0x1"
} }
``` ```

View file

@ -39,7 +39,7 @@ The last two arguments of [`keystore.NewKeyStore`](https://godoc.org/github.com/
## Account lifecycle {#account-lifecycle} ## Account lifecycle {#account-lifecycle}
Once an encrypted keystore for Ethereum accounts exists it, it can be used to manage accounts for the entire account lifecycle requirements of a Go native application. This includes the basic functionality of creating new accounts and deleting existing ones as well as updating access credentials, exporting existing accounts, and importing them on other devices. Once an encrypted keystore for Ethereum accounts exists, it can be used to manage accounts for the entire account lifecycle requirements of a Go native application. This includes the basic functionality of creating new accounts and deleting existing ones as well as updating access credentials, exporting existing accounts, and importing them on other devices.
Although the keystore defines the encryption strength it uses to store accounts, there is no global master password that can grant access to all of them. Rather each account is maintained individually, and stored on disk in its [encrypted format](https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition) individually, ensuring a much cleaner and stricter separation of credentials. Although the keystore defines the encryption strength it uses to store accounts, there is no global master password that can grant access to all of them. Rather each account is maintained individually, and stored on disk in its [encrypted format](https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition) individually, ensuring a much cleaner and stricter separation of credentials.

View file

@ -86,7 +86,7 @@ The ABI for `Storage.sol` (`Storage.abi`) looks as follows:
The contract binding can then be generated by passing the ABI to `abigen` as follows: The contract binding can then be generated by passing the ABI to `abigen` as follows:
```sh ```sh
$ abigen --abi Storage.abi --pkg main --type Storage --out Storage.go $ abigen --abi build/Storage.abi --pkg main --type Storage --out Storage.go
``` ```
Where the flags are: Where the flags are:

View file

@ -91,7 +91,7 @@ To test out this tracer the source is first compiled with `make geth`. Then in t
Transaction traces include the complete status of the EVM at every point during the transaction execution, which can be a very large amount of data. Often, users are only interested in a small subset of that data. Javascript trace filters are available to isolate the useful information. Transaction traces include the complete status of the EVM at every point during the transaction execution, which can be a very large amount of data. Often, users are only interested in a small subset of that data. Javascript trace filters are available to isolate the useful information.
Specifying the `tracer` option in one of the tracing methods (see list in [reference](/docs/interacting-with-geth/rpc/ns-debug)) enables JavaScript-based tracing. In this mode, `tracer` is interpreted as a JavaScript expression that is expected to evaluate to an object which must expose the `result` and `fault` methods. There exist 4 additional methods, namely: `setup`, `step`, `enter`, and `exit`. `enter` and `exit` must be present or omitted together. Specifying the `tracer` option in one of the tracing methods (see list in [reference](/docs/interacting-with-geth/rpc/ns-debug)) enables JavaScript-based tracing. In this mode, `tracer` is interpreted as a JavaScript expression that is expected to evaluate an object which must expose the `result` and `fault` methods. There exist 4 additional methods, namely: `setup`, `step`, `enter`, and `exit`. `enter` and `exit` must be present or omitted together.
### Setup ### Setup

View file

@ -98,4 +98,4 @@ Updating Geth to the latest version simply requires stopping the node, downloadi
## What is a preimage? ## What is a preimage?
Geth stores the Ethereum state in a [Patricia Merkle Trie](https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/#state-trie). It contains `(key,value)` pairs with account addresses as keys and and [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/#top) encoded `account` as the value, where an account is an array containing essential account information, specifically: `nonce`, `balance`, `StorageRoot` and `codeHash`. Definitions for these parameters are available in the Ethereum whitepaper. However, Geth's state trie does not use the keys directly, instead account information is indexed using the SHA3 hash of the key. This means that looking up the account information for an address can be done by traversing the trie for `sha3(address)`, but querying addresses that contain certain data is not possible - the addresses themselves are not part of the trie. This problem is solved using preimages - these are mappings of addresses to their hashes. Geth generates these preimages during block-by-block sync as information is added to the trie but they are deleted once they reach a certain age (128 blocks by default). To retain the preimages, Geth should be started with `--cache.preimages=true`. Geth stores the Ethereum state in a [Patricia Merkle Trie](https://ethereum.org/en/developers/docs/data-structures-and-encoding/patricia-merkle-trie/#state-trie). It contains `(key,value)` pairs with account addresses as keys and [RLP](https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/#top) encoded `account` as the value, where an account is an array containing essential account information, specifically: `nonce`, `balance`, `StorageRoot` and `codeHash`. Definitions for these parameters are available in the Ethereum whitepaper. However, Geth's state trie does not use the keys directly, instead account information is indexed using the SHA3 hash of the key. This means that looking up the account information for an address can be done by traversing the trie for `sha3(address)`, but querying addresses that contain certain data is not possible - the addresses themselves are not part of the trie. This problem is solved using preimages - these are mappings of addresses to their hashes. Geth generates these preimages during block-by-block sync as information is added to the trie but they are deleted once they reach a certain age (128 blocks by default). To retain the preimages, Geth should be started with `--cache.preimages=true`.

View file

@ -42,7 +42,7 @@ Enter 'ok' to proceed:
> >
``` ```
Geth can be started in a separate terminal. To connect to Clef, ensure the data directory is consistent with the path provided to Clef and pass the location of the the Clef IPC file - which Clef saves to the path provided to its `--configdir` flag - in this case we set it to `~/go-ethereum/sepolia-data/clef`: Geth can be started in a separate terminal. To connect to Clef, ensure the data directory is consistent with the path provided to Clef and pass the location of the Clef IPC file - which Clef saves to the path provided to its `--configdir` flag - in this case we set it to `~/go-ethereum/sepolia-data/clef`:
```sh ```sh
geth --sepolia --datadir sepolia <other flags> --signer=sepolia-data/clef/clef.ipc geth --sepolia --datadir sepolia <other flags> --signer=sepolia-data/clef/clef.ipc

View file

@ -23,7 +23,7 @@ geth --networkid 12345
### Choosing A Consensus Algorithm {#choosing-a-consensus-mechanism} ### Choosing A Consensus Algorithm {#choosing-a-consensus-mechanism}
While the main network uses proof-of-stake (PoS) to secure the blockchain, Geth also supports the the 'Clique' proof-of-authority (PoA) consensus algorithm and the Ethash proof-of-work algorithm as alternatives for private networks. Clique is strongly recommended for private testnets because PoA is far less resource-intensive than PoW. The key differences between the consensus algorithms available in Geth are: While the main network uses proof-of-stake (PoS) to secure the blockchain, Geth also supports the 'Clique' proof-of-authority (PoA) consensus algorithm and the Ethash proof-of-work algorithm as alternatives for private networks. Clique is strongly recommended for private testnets because PoA is far less resource-intensive than PoW. The key differences between the consensus algorithms available in Geth are:
#### Ethash {#ethash} #### Ethash {#ethash}

View file

@ -34,7 +34,7 @@ There may be a period of >1 hour during the Compacting Database stage with no lo
## Pruning command {#pruning-command} ## Pruning command {#pruning-command}
For a normal Geth node, Geth should be stopped and the following command executed to start a offline state prune: For a normal Geth node, Geth should be stopped and the following command executed to start an offline state prune:
```sh ```sh
geth snapshot prune-state geth snapshot prune-state

View file

@ -18,7 +18,7 @@ In order to get the most value from the tutorials on this page, the following sk
- Basic knowledge about HTTP and JavaScript - Basic knowledge about HTTP and JavaScript
- Basic knowledge of node architecture and consensus clients - Basic knowledge of node architecture and consensus clients
Users that need to revisit these fundamentals can find helpful resources relating to the command line [here](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Understanding_client-side_tools/Command_line), Ethereum and its testnets [here](https://ethereum.org/en/developers/tutorials/), http [here](https://developer.mozilla.org/en-US/docs/Web/HTTP) and Javascript [here](https://www.javascript.com/learn). Information on node architecture can be found [here](/docs/fundamentals/node-architecture) and our guide for configuring Geth to connect to a Users that need to revisit these fundamentals can find helpful resources relating to the command line [here](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Understanding_client-side_tools/Command_line), Ethereum and its testnets [here](https://ethereum.org/en/developers/tutorials/), [here](https://developer.mozilla.org/en-US/docs/Web/HTTP) and Javascript [here](https://www.javascript.com/learn). Information on node architecture can be found [here](/docs/fundamentals/node-architecture) and our guide for configuring Geth to connect to a
consensus client is [here](/docs/getting-started/consensus-clients). consensus client is [here](/docs/getting-started/consensus-clients).
<Note>If Geth was installed from source on Linux, `make` saves the binaries for Geth and the associated tools in `/build/bin`. To run these programs it is convenient to move them to the top level project directory (e.g. running `mv ./build/bin/* ./`) from `/go-ethereum`. Then `./` must be prepended to the commands in the code snippets in order to execute a particular program, e.g. `./geth` instead of simply `geth`. If the executables are not moved then either navigate to the `bin` directory to run them (e.g. `cd ./build/bin` and `./geth`) or provide their path (e.g. `./build/bin/geth`). These instructions can be ignored for other installations.</Note> <Note>If Geth was installed from source on Linux, `make` saves the binaries for Geth and the associated tools in `/build/bin`. To run these programs it is convenient to move them to the top level project directory (e.g. running `mv ./build/bin/* ./`) from `/go-ethereum`. Then `./` must be prepended to the commands in the code snippets in order to execute a particular program, e.g. `./geth` instead of simply `geth`. If the executables are not moved then either navigate to the `bin` directory to run them (e.g. `cd ./build/bin` and `./geth`) or provide their path (e.g. `./build/bin/geth`). These instructions can be ignored for other installations.</Note>
@ -143,7 +143,7 @@ INFO [02-10|13:59:06.997] IPC endpoint opened url=/.../geth
INFO [02-10|13:59:06.998] HTTP server started endpoint=127.0.0.1:8545 prefix= cors= vhosts=localhost INFO [02-10|13:59:06.998] HTTP server started endpoint=127.0.0.1:8545 prefix= cors= vhosts=localhost
``` ```
By default, Geth uses snap-sync which download blocks sequentially from a relatively recent block, not the genesis block. It saves the data in files in `/go-ethereum/geth-tutorial/geth/chaindata/`. One the sequence of headers has been verified, Geth downloads the block bodies and state data before starting the "state healing" phase to update the state for newly arriving data. This is confirmed by the logs printed to the terminal. There should be a rapidly-growing sequence of logs in the terminal with the following syntax: By default, Geth uses snap-sync which download blocks sequentially from a relatively recent block, not the genesis block. It saves the data in files in `/go-ethereum/geth-tutorial/geth/chaindata/`. Once the sequence of headers has been verified, Geth downloads the block bodies and state data before starting the "state healing" phase to update the state for newly arriving data. This is confirmed by the logs printed to the terminal. There should be a rapidly-growing sequence of logs in the terminal with the following syntax:
```terminal ```terminal
INFO [04-29][15:54:09.238] Looking for peers peercount=2 tried=0 static=0 INFO [04-29][15:54:09.238] Looking for peers peercount=2 tried=0 static=0
@ -299,7 +299,7 @@ Approve? [y/N]:
Please enter the password for account 0xca57F3b40B42FCce3c37B8D18aDBca5260ca72EC Please enter the password for account 0xca57F3b40B42FCce3c37B8D18aDBca5260ca72EC
``` ```
After approving the transaction, the following confirmation screen in displayed in the Clef terminal: After approving the transaction, the following confirmation screen is displayed in the Clef terminal:
```terminal ```terminal
----------------------- -----------------------
@ -371,7 +371,7 @@ Up to this point this tutorial has interacted with Geth using the convenience li
### Checking account balance {#checking-balance} ### Checking account balance {#checking-balance}
The command below returns the balance of the given account. This is a HTTP POST request to the local port 8545. The `-H` flag is for header information. It is used here to define the format of the incoming payload, which is JSON. The `--data` flag defines the content of the payload, which is a JSON object. That JSON object contains four fields: `jsonrpc` defines the spec version for the JSON-RPC API, `method` is the specific function being invoked, `params` are the function arguments, and `id` is used for ordering transactions. The two arguments passed to `eth_getBalance` are the account address whose balance to check and the block to query (here `latest` is used to check the balance in the most recently mined block). The command below returns the balance of the given account. This is an HTTP POST request to the local port 8545. The `-H` flag is for header information. It is used here to define the format of the incoming payload, which is JSON. The `--data` flag defines the content of the payload, which is a JSON object. That JSON object contains four fields: `jsonrpc` defines the spec version for the JSON-RPC API, `method` is the specific function being invoked, `params` are the function arguments, and `id` is used for ordering transactions. The two arguments passed to `eth_getBalance` are the account address whose balance to check and the block to query (here `latest` is used to check the balance in the most recently mined block).
```sh ```sh
curl -X POST http://127.0.0.1:8545 \ curl -X POST http://127.0.0.1:8545 \

View file

@ -159,7 +159,7 @@ The standalone bundles can be downloaded from the [Geth Downloads](/downloads) p
## Docker container {#docker-container} ## Docker container {#docker-container}
A Docker image with recent snapshot builds from our `develop` branch is maintained on DockerHub to support users who prefer to run containerized processes. There four different Docker images available for running the latest stable or development versions of Geth. A Docker image with recent snapshot builds from our `develop` branch is maintained on DockerHub to support users who prefer to run containerized processes. There are four different Docker images available for running the latest stable or development versions of Geth.
- `ethereum/client-go:latest` is the latest development version of Geth (default) - `ethereum/client-go:latest` is the latest development version of Geth (default)
- `ethereum/client-go:stable` is the latest stable version of Geth - `ethereum/client-go:stable` is the latest stable version of Geth

View file

@ -593,7 +593,7 @@ TraceCallConfig is a superset of [TraceConfig](#traceconfig), providing addition
- `stateOverrides`: `StateOverride`. Overrides for the state data (accounts/storage) for the call, see [StateOverride](/docs/developers/evm-tracing/built-in-tracers#state-overrides) for more details. - `stateOverrides`: `StateOverride`. Overrides for the state data (accounts/storage) for the call, see [StateOverride](/docs/developers/evm-tracing/built-in-tracers#state-overrides) for more details.
- `blockOverrides`: `BlockOverrides`. Overrides for the block data (number, timestamp etc) for the call, see [BlockOverrides](/docs/developers/evm-tracing/built-in-tracers#block-overrides) for more details. - `blockOverrides`: `BlockOverrides`. Overrides for the block data (number, timestamp etc) for the call, see [BlockOverrides](/docs/developers/evm-tracing/built-in-tracers#block-overrides) for more details.
- `txIndex`: `NUMBER`. If set, the state at the the given transaction index will be used to tracing (default = the last transaction index in the block). - `txIndex`: `NUMBER`. If set, the state at the given transaction index will be used to tracing (default = the last transaction index in the block).
**Example:** **Example:**

View file

@ -16,7 +16,7 @@ To follow along with the instructions on this page it will be useful to have:
## Monitoring stack {#monitoring-stack} ## Monitoring stack {#monitoring-stack}
An Ethereum client collects lots of data which can be read in the form of a chronological database. To make monitoring easier, this data can be fed into data visualisation software. On this page, a Geth client will be configured to push data into a InfluxDB database and Grafana will be used to visualize the data. An Ethereum client collects lots of data which can be read in the form of a chronological database. To make monitoring easier, this data can be fed into data visualisation software. On this page, a Geth client will be configured to push data into an InfluxDB database and Grafana will be used to visualize the data.
## Setting up InfluxDB {#setting-up-influxdb} ## Setting up InfluxDB {#setting-up-influxdb}
@ -35,7 +35,7 @@ sudo systemctl start influxdb
sudo apt install influxdb-client sudo apt install influxdb-client
``` ```
By default, InfluxDB it is reachable at `localhost:8086`. Before using the `influx` client, a new user with admin privileges needs to be created. This user will serve for high level management, creating databases and users. By default, InfluxDB is reachable at `localhost:8086`. Before using the `influx` client, a new user with admin privileges needs to be created. This user will serve for high level management, creating databases and users.
```sh ```sh
curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE USER username WITH PASSWORD 'password' WITH ALL PRIVILEGES" curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE USER username WITH PASSWORD 'password' WITH ALL PRIVILEGES"
@ -80,7 +80,7 @@ docker run \
prom/prometheus:latest prom/prometheus:latest
``` ```
Here a example directory of `/path/to/prometheus`: Here is an example directory of `/path/to/prometheus`:
```sh ```sh
prometheus/ prometheus/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 67 KiB