diff --git a/README.md b/README.md
index 3c633bc383..7043b9cc02 100644
--- a/README.md
+++ b/README.md
@@ -49,3 +49,11 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
+
+## Adding a new documentation page
+
+Documentation pages are located in the `/docs` folder in the root directory of the project.
+
+When you want to add a new page, add the new file in the appropriate folder in the `/docs` page. `index.md` files will be the default page for a directory, and `{pagename}.md` will define subpages for a directory.
+
+After adding this page, you will need to add it `/src/data/documentation-links.yaml` which adds documentation structure which you will see on the left sidebar in the documentation pages.
diff --git a/docs/developers/contributing.md b/docs/developers/contributing.md
index 39eb58bef0..c232f2abfb 100644
--- a/docs/developers/contributing.md
+++ b/docs/developers/contributing.md
@@ -12,11 +12,8 @@ If you'd like to contribute to the Geth source code, please fork the [Github rep
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"
diff --git a/docs/developers/evm-tracing/built-in-tracers.md b/docs/developers/evm-tracing/built-in-tracers.md
index 1dabc52667..741eafb540 100644
--- a/docs/developers/evm-tracing/built-in-tracers.md
+++ b/docs/developers/evm-tracing/built-in-tracers.md
@@ -176,7 +176,6 @@ Return:
Things to note about the call tracer:
- Calls to precompiles are also included in the result
-
- In case a frame reverts, the field `output` will contain the raw return data
- In case the top level frame reverts, its `revertReason` field will contain the parsed reason of revert as returned by the Solidity contract
@@ -186,7 +185,6 @@ Things to note about the call tracer:
`callTracer` accepts two options:
- `onlyTopCall: true` instructs the tracer to only process the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info are required.
-
- `withLog: true` instructs the tracer to also collect the logs emitted during each call.
Example invokation with the `onlyTopCall` flag:
diff --git a/docs/developers/geth-developer/dev-mode.md b/docs/developers/geth-developer/dev-mode.md
index 29da44f882..ae0bbf44c5 100644
--- a/docs/developers/geth-developer/dev-mode.md
+++ b/docs/developers/geth-developer/dev-mode.md
@@ -6,15 +6,10 @@ description: Instructions for setting up Geth in developer mode
It is often convenient for developers to work in an environment where changes to client or application software can be deployed and tested rapidly and without putting real-world users or assets at risk. For this purpose, Geth has a `--dev` flag that spins up Geth in "developer mode". This creates a single-node Ethereum test network with no connections to any external peers. It exists solely on the local machine. Starting Geth in developer mode does the following:
- Initializes the data directory with a testing genesis block
-
- 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)
-
- 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
-
- 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).
diff --git a/docs/fundamentals/account-management.md b/docs/fundamentals/account-management.md
index be91498500..cfb5c6ccfb 100644
--- a/docs/fundamentals/account-management.md
+++ b/docs/fundamentals/account-management.md
@@ -78,7 +78,7 @@ The console will hang because Clef is waiting for manual approval. Switch to the
It is critical to backup the account password safely and securely as it cannot be retrieved or reset.
-{% include note.html content=" If the password provided on account creation is lost or forgotten, there is no way to retrive it and the account will simply stay locked forever. The password MUST be backed up safely and securely! **IT IS CRITICAL TO BACKUP THE KEYSTORE AND REMEMBER PASSWORDS**" %}
+If the password provided on account creation is lost or forgotten, there is no way to retrive it and the account will simply stay locked forever. The password MUST be backed up safely and securely! **IT IS CRITICAL TO BACKUP THE KEYSTORE AND REMEMBER PASSWORDS**
The newly generated key files can be viewed in `/keystore/`. The file naming format is `UTC----` where `date` is the date and time of key creation formatted according to [UTC 8601](https://www.iso.org/iso-8601-date-and-time-format.html) with zero time offset and seconds precise to eight decimal places. `address` is the 40 hexadecimal characters that make up the account address without a leading `0x`, for example:
diff --git a/docs/fundamentals/les.md b/docs/fundamentals/les.md
index 81890b183f..c1d607f0bb 100644
--- a/docs/fundamentals/les.md
+++ b/docs/fundamentals/les.md
@@ -3,13 +3,13 @@ title: Light client
description: Introduction to Geth's light sync mode
---
-{% include note.html content="Light nodes do not currently work on proof-of-stake Ethereum, but new proof-of-stake light clients are expected to ship soon!" %}
+Light nodes do not currently work on proof-of-stake Ethereum, but new proof-of-stake light clients are expected to ship soon!
Running a full node is the most trustless, private, decentralized and censorship resistant way to interact with Ethereum. It is also the best choice for the health of the network, because a decentralized network relies on having many individual nodes that independently verify the head of the chain. In a full node a copy of the blockchain is stored locally enabling users to verify incoming data against a local source of truth. However, running a full node requires a lot of disk space and non-negligible CPU allocation and takes hours (for snap sync) or days (for full sync) to sync the blockchain from genesis. Geth also offers a light mode that overcomes these issues and provides some of the benefits of running a node but requires only a fraction of the resources.
Read more about the reasons to run nodes on [ethereum.org](https://ethereum.org/en/run-a-node/).
-{% include note.html content=" Geth light clients **do not currently work** on proof-of-stake Ethereum. New light clients that work with the proof-of-stake consensus engine are expected to ship soon!" %}
+Geth light clients **do not currently work** on proof-of-stake Ethereum. New light clients that work with the proof-of-stake consensus engine are expected to ship soon!
## Light node vs full node {#light-node-vs-full-node}
diff --git a/docs/fundamentals/mining.md b/docs/fundamentals/mining.md
index c9b03abfa7..31201b3baf 100644
--- a/docs/fundamentals/mining.md
+++ b/docs/fundamentals/mining.md
@@ -3,7 +3,7 @@ title: Proof-of-work mining with Ethash
description: Introduction to proof-of-work mining with Geth
---
-{% include note.html content=" Proof-of-work mining is no longer used to secure Ethereum Mainnet. The information below is included because the Ethash code is still part of Geth and it could be used to create a private proof-of-work network or testnet." %}
+Proof-of-work mining is no longer used to secure Ethereum Mainnet. The information below is included because the Ethash code is still part of Geth and it could be used to create a private proof-of-work network or testnet.
Blockchains grow when individual nodes create valid blocks and distribute them to their peers who check the blocks and add them to their own local databases.
Nodes that add blocks are rewarded with ether payouts. On Ethereum Mainnet, the proof-of-stake consensus engine randomly selects a node to produce each block.
diff --git a/docs/fundamentals/pruning.md b/docs/fundamentals/pruning.md
index ed53205e34..1b286faf4d 100644
--- a/docs/fundamentals/pruning.md
+++ b/docs/fundamentals/pruning.md
@@ -3,7 +3,7 @@ title: Pruning
description: Instructions for pruning a Geth node
---
-{% include note.html content="Offline pruning is only for the hash-based state scheme. Soon, we will have a path-based state scheme which enables the pruning by default. Once the hash-based state scheme is no longer supported, offline pruning will be deprecated." %}
+Offline pruning is only for the hash-based state scheme. Soon, we will have a path-based state scheme which enables the pruning by default. Once the hash-based state scheme is no longer supported, offline pruning will be deprecated.
A snap-sync'd Geth node currently requires more than 650 GB of disk space to store the historic blockchain data. With default cache size the database grows by about 14 GB/week. This means that Geth users will rapidly run out of space on 1TB hard drives. To solve this problem without needing to purchase additional hardware, Geth can be pruned. Pruning is the process of erasing older data to save disk space. Since Geth `v1.10`, users have been able to trigger a snapshot offline prune to bring the total storage back down to the original ~650 GB in about 4-5 hours. This has to be done periodically to keep the total disk storage
within the bounds of the local hardware (e.g. every month or so for a 1TB disk).
@@ -13,13 +13,9 @@ To prune a Geth node at least 40 GB of free disk space is recommended. This mean
## Pruning rules {#pruning-rules}
1. Do not try to prune an archive node. Archive nodes need to maintain ALL historic data by definition.
-
2. Ensure there is at least 40 GB of storage space still available on the disk that will be pruned. Failures have been reported with ~25GB of free space.
-
3. Geth is at least `v1.10` ideally > `v1.10.3`
-
4. Geth is fully sync'd
-
5. Geth has finished creating a snapshot that is at least 128 blocks old. This is true when "state snapshot generation" is no longer reported in the logs.
With these rules satisfied, Geth's database can be pruned.
diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md
index d899607b44..74a0d1c04b 100644
--- a/docs/getting-started/index.md
+++ b/docs/getting-started/index.md
@@ -21,7 +21,7 @@ In order to get the most value from the tutorials on this page, the following sk
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
consensus client is [here](/docs/getting_started/consensus-clients).
-{% include note.html content="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." %}
+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.
## Background {#background}
diff --git a/docs/interacting-with-geth/javascript-console.md b/docs/interacting-with-geth/javascript-console.md
index e81e5a0074..192799bc40 100644
--- a/docs/interacting-with-geth/javascript-console.md
+++ b/docs/interacting-with-geth/javascript-console.md
@@ -18,7 +18,7 @@ This returns a result which is also a JSON object, with values expressed as hexa
This is a low level and rather error-prone way to interact with Geth. Most developers prefer to use convenience libraries that abstract away some of the more tedious and awkward tasks such as converting values from hexadecimal strings into numbers, or converting between denominations of ether (Wei, Gwei, etc). One such library is [Web3.js](https://web3js.readthedocs.io/en/v1.7.3/).
The purpose of Geth's Javascript console is to provide a built-in environment to use a subset of the Web3.js libraries to interact with a Geth node.
-{% include note.html content="The web3.js version that comes bundled with Geth is not up to date with the official Web3.js documentation. There are several Web3.js libraries that are not available in the Geth Javascript Console. There are also administrative APIs included in the Geth console that are not documented in the Web3.js documentation. The full list of libraries available in the Geth console is available on the [JSON-RPC API page](/docs/interacting-with-geth/rpc/server)." %}
+The web3.js version that comes bundled with Geth is not up to date with the official Web3.js documentation. There are several Web3.js libraries that are not available in the Geth Javascript Console. There are also administrative APIs included in the Geth console that are not documented in the Web3.js documentation. The full list of libraries available in the Geth console is available on the [JSON-RPC API page](/docs/interacting-with-geth/rpc/server).
## Starting the console {#starting-the-console}
diff --git a/docs/interacting-with-geth/rpc/index.md b/docs/interacting-with-geth/rpc/index.md
index 47cea2bd4f..0639935c30 100644
--- a/docs/interacting-with-geth/rpc/index.md
+++ b/docs/interacting-with-geth/rpc/index.md
@@ -78,7 +78,7 @@ geth --ws --ws.origins http://myapp.example.com
As with `--http.corsdomain`, using the wildcard `--ws.origins '*'` allows access from any origin.
-{% include note.html content=" By default, **account unlocking is forbidden when HTTP or Websocket access is enabled** (i.e. by passing `--http` or `ws` flag). This is because an attacker that manages to access the node via the externally-exposed HTTP/WS port can then control the unlocked account. It is possible to force account unlock by including the `--allow-insecure-unlock` flag but this is unsafe and **not recommended** except for expert users that completely understand how it can be used safely. This is not a hypothetical risk: **there are bots that continually scan for http-enabled Ethereum nodes to attack**" %}
+By default, **account unlocking is forbidden when HTTP or Websocket access is enabled** (i.e. by passing `--http` or `ws` flag). This is because an attacker that manages to access the node via the externally-exposed HTTP/WS port can then control the unlocked account. It is possible to force account unlock by including the `--allow-insecure-unlock` flag but this is unsafe and **not recommended** except for expert users that completely understand how it can be used safely. This is not a hypothetical risk: **there are bots that continually scan for http-enabled Ethereum nodes to attack**
### IPC Server {#ipc-server}
diff --git a/docs/interacting-with-geth/rpc/ns-debug.md b/docs/interacting-with-geth/rpc/ns-debug.md
index 8ce151439f..1ab4376bc6 100644
--- a/docs/interacting-with-geth/rpc/ns-debug.md
+++ b/docs/interacting-with-geth/rpc/ns-debug.md
@@ -29,7 +29,7 @@ The location is specified as `:`.
Example:
-``` js
+```js
> debug.backtraceAt("server.go:443")
```
@@ -579,13 +579,16 @@ No specific call options:
Tracing a call with a destination and specific sender, disabling the storage and memory output (less data returned over RPC)
```js
-debug.traceCall({
- "from": "0xdeadbeef29292929192939494959594933929292",
- "to": "0xde929f939d939d393f939393f93939f393929023",
- "gas": "0x7a120",
- "data": "0xf00d4b5d00000000000000000000000001291230982139282304923482304912923823920000000000000000000000001293123098123928310239129839291010293810"
- },
- "latest", {"disableStorage": true, "disableMemory": true})
+debug.traceCall(
+ {
+ from: '0xdeadbeef29292929192939494959594933929292',
+ to: '0xde929f939d939d393f939393f93939f393929023',
+ gas: '0x7a120',
+ data: '0xf00d4b5d00000000000000000000000001291230982139282304923482304912923823920000000000000000000000001293123098123928310239129839291010293810'
+ },
+ 'latest',
+ { disableStorage: true, disableMemory: true }
+);
```
It is possible to supply 'overrides' for both state-data (accounts/storage) and block data (number, timestamp etc). In the example below, a call which executes `NUMBER` is performed, and the overridden number is placed on the stack:
@@ -731,26 +734,26 @@ Sets the logging verbosity pattern.
If you want to see messages from a particular Go package (directory) and all subdirectories, use:
-``` js
+```js
> debug.vmodule("eth/*=6")
```
If you want to restrict messages to a particular package (e.g. p2p) but exclude subdirectories, use:
-``` js
+```js
> debug.vmodule("p2p=6")
```
If you want to see log messages from a particular source file, use
-``` js
+```js
> debug.vmodule("server.go=6")
```
You can compose these basic patterns. If you want to see all output from peer.go in a package below eth (eth/peer.go, eth/downloader/peer.go) as well as output from package p2p at level <= 5, use:
-``` js
-debug.vmodule("eth/*/peer.go=6,p2p=5")
+```js
+debug.vmodule('eth/*/peer.go=6,p2p=5');
```
### debug_writeBlockProfile
diff --git a/docs/interacting-with-geth/rpc/ns-eth.md b/docs/interacting-with-geth/rpc/ns-eth.md
index 8f9bf247bd..37d5901c8e 100644
--- a/docs/interacting-with-geth/rpc/ns-eth.md
+++ b/docs/interacting-with-geth/rpc/ns-eth.md
@@ -40,7 +40,6 @@ The _state override set_ is an optional address-to-state mapping, where each ent
The goal of the _state override set_ is manyfold:
- It can be used by DApps to reduce the amount of contract code needed to be deployed on chain. Code that simply returns internal state or does pre-defined validations can be kept off chain and fed to the node on-demand.
-
- It can be used for smart contract analysis by extending the code deployed on chain with custom methods and invoking them. This avoids having to download and reconstruct the entire state in a sandbox to run custom code against.
- It can be used to debug smart contracts in an already deployed large suite of contracts by selectively overriding some code or state and seeing how execution changes. Specialized tooling will probably be necessary.
diff --git a/docs/interacting-with-geth/rpc/ns_personal_deprecation.md b/docs/interacting-with-geth/rpc/ns-personal-deprecation.md
similarity index 100%
rename from docs/interacting-with-geth/rpc/ns_personal_deprecation.md
rename to docs/interacting-with-geth/rpc/ns-personal-deprecation.md
diff --git a/docs/interacting-with-geth/rpc/ns-personal.md b/docs/interacting-with-geth/rpc/ns-personal.md
index 24ec453aed..ed1ad88a68 100644
--- a/docs/interacting-with-geth/rpc/ns-personal.md
+++ b/docs/interacting-with-geth/rpc/ns-personal.md
@@ -3,7 +3,7 @@ title: personal Namespace
description: Documentation for the JSON-RPC API "personal" namespace
---
-{% include note.html content="The personal namespace will be deprecated in the very near future." %}
+The personal namespace will be deprecated in the very near future.
The personal API managed private keys in the key store. It is deprecated in favour of using [Clef](/docs/tools/clef/Introduction) for interacting with accounts Please refer to the [ns_personal deprecation page](/docs/interacting-with-geth/rpc/ns_personal_deprecation) to see the equivalent methods. The following documentation should be treated as archive information and users should migrate tousing Clef for account interactions.
diff --git a/docs/interacting-with-geth/rpc/pubsub.md b/docs/interacting-with-geth/rpc/pubsub.md
index e27b3e45bf..7eee1a038b 100644
--- a/docs/interacting-with-geth/rpc/pubsub.md
+++ b/docs/interacting-with-geth/rpc/pubsub.md
@@ -34,11 +34,8 @@ to cancel the subscription:
## Considerations {#considerations}
1. Notifications are sent for current events and not for past events. For use cases that depend on not to miss any notifications subscriptions are probably not the best option.
-
2. Subscriptions require a full duplex connection. Geth offers such connections in the form of WebSocket and IPC (enabled by default).
-
3. Subscriptions are coupled to a connection. If the connection is closed all subscriptions that are created over this connection are removed.
-
4. Notifications are stored in an internal buffer and sent from this buffer to the client. If the client is unable to keep up and the number of buffered notifications reaches a limit (currently 10k) the connection is closed. Keep in mind that subscribing to some events can cause a flood of notifications, e.g. listening for all logs/blocks when the node starts to synchronize.
## Create subscription {#create-subscriptions}
diff --git a/docs/monitoring/dashboards.md b/docs/monitoring/dashboards.md
index 7a73e72d8c..fa2153c484 100644
--- a/docs/monitoring/dashboards.md
+++ b/docs/monitoring/dashboards.md
@@ -10,7 +10,6 @@ There are several ways to monitor the performance of a Geth node. Insights into
To follow along with the instructions on this page it will be useful to have:
- a running Geth instance.
-
- basic working knowlegde of bash/terminal.
[This video](https://www.youtube.com/watch?v=cOBab8IJMYI) provides an excellent introduction to Geth monitoring.
diff --git a/docs/monitoring/ethstats.md b/docs/monitoring/ethstats.md
index 22bb2d66c9..0c613f7326 100644
--- a/docs/monitoring/ethstats.md
+++ b/docs/monitoring/ethstats.md
@@ -50,11 +50,11 @@ each with detailed installation instructions. They all share the common trait th
started with a specific URL that can be passed to Geth.
[EthNetStats "Classic"](https://github.com/ethereum/eth-netstats)
-
+
[EthNet Intelligence API](https://github.com/ethereum/eth-net-intelligence-api)
-
+
[Goerli Ethstats client](https://github.com/goerli/ethstats-client)
-
+
[Goerli Ethstats server](https://github.com/goerli/ethstats-server)
If enabled, Geth spins up a minimal Ethstats reporting daemon that pushes statistics about the
diff --git a/docs/tools/clef/clique-signing.md b/docs/tools/clef/clique-signing.md
index 0ce79becf3..b47334634d 100644
--- a/docs/tools/clef/clique-signing.md
+++ b/docs/tools/clef/clique-signing.md
@@ -69,6 +69,7 @@ Initiate Geth:
```sh
$ geth --datadir ./ddir init genesis.json
```
+
```terminal
...
INFO [06-16|11:14:54.123] Writing custom genesis block
@@ -90,6 +91,7 @@ These two things are independent of each other. First of all, however, `clef` mu
```sh
$ clef --keystore ./ddir/keystore --configdir ./clef --chainid 15 --suppress-bootwarn init
```
+
```terminal
The master seed of clef will be locked with a password.
Please specify a password. Do not forget this password!
@@ -117,6 +119,7 @@ With that done, `clef` can be made aware of the password. To do this `setpw {
- return (
-
- {children}
-
- );
- },
- // links
- a: ({ children, href }: any) => {
- return (
-
-
- {children}
-
-
- );
- },
- // headings
- h1: ({ children }: any) => {
- return (
-
- {children}
-
- );
- },
- h2: ({ children }: any) => {
- return (
-
- {children}
-
- );
- },
- h3: ({ children }: any) => {
- return (
-
- {children}
-
- );
- },
- h4: ({ children }: any) => {
- return (
-
- {children}
-
- );
- },
- // tables
- table: ({ children }: any) => (
-
-
- {children}
-
-
- ),
- // pre
- pre: ({ children }: any) => (
-
-