mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-08 20:47:59 -05:00
Add placeholders system to have global variables in markdown (#1425)
* fixes PIE-1374 add placeholders system to have global variables in markdown
implement and configure a first batch of variables for versions to be changeable
in only one place and change in the whole doc.
available placeholders are :
{{ versions.pantheon_stable }} -> the latest stable release
{{ versions.quickstart }} -> the latest quickstart release whicjh is currently
pointing to the same value as Pantheon as QS and Pantheon releases are in sync
but I still keep two separated values to make it clear.
Also includes few fixes like removing $ in front of bash commands and changed an
info block syntax
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit is contained in:
@@ -59,5 +59,5 @@ setting it before starting Pantheon.
|
||||
To set the debug logging and start Pantheon connected to the Rinkeby testnet:
|
||||
|
||||
```bash
|
||||
$ LOG4J_CONFIGURATION_FILE=./debug.xml pantheon --network=rinkeby
|
||||
LOG4J_CONFIGURATION_FILE=./debug.xml pantheon --network=rinkeby
|
||||
```
|
||||
@@ -11,6 +11,6 @@ For Bash-based executions, you can set the variable for only the scope of the pr
|
||||
|
||||
!!! example
|
||||
```bash
|
||||
$ PANTHEON_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 \
|
||||
$ pantheon --network=rinkeby
|
||||
PANTHEON_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 \
|
||||
pantheon --network=rinkeby
|
||||
```
|
||||
@@ -25,8 +25,8 @@ To run a Pantheon node in a container connected to the Ethereum mainnet:
|
||||
docker run pegasyseng/pantheon:latest
|
||||
```
|
||||
|
||||
```bash tab="1.0"
|
||||
docker run pegasyseng/pantheon:1.0
|
||||
```bash tab="{{ versions.pantheon_stable }}"
|
||||
docker run pegasyseng/pantheon:{{ versions.pantheon_stable }}
|
||||
```
|
||||
|
||||
!!! note
|
||||
@@ -208,7 +208,7 @@ Where `myauthconfig.toml` is the credentials file and `path` is the absolute pat
|
||||
```
|
||||
|
||||
```bash tab="WS"
|
||||
docker run --mount type=bind,source=/Users/username/pantheon/myauthconfig.toml,target=/etc/pantheon/rpc_ws_auth_config.toml pegasyseng/pantheon:latest
|
||||
docker run --mount type=bind,source=/Users/username/pantheon/myauthconfig.toml,target=/etc/pantheon/rpc_ws_auth_config.toml pegasyseng/pantheon:latest
|
||||
```
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ options).
|
||||
|
||||
To run Pantheon exposing local ports for access:
|
||||
```bash
|
||||
$ docker run -p <localportJSON-RPC>:8545 -p <localportWS>:8546 -p <localportP2P>:30303 pegasyseng/pantheon:latest --rpc-http-enabled --rpc-ws-enabled
|
||||
docker run -p <localportJSON-RPC>:8545 -p <localportWS>:8546 -p <localportP2P>:30303 pegasyseng/pantheon:latest --rpc-http-enabled --rpc-ws-enabled
|
||||
```
|
||||
|
||||
!!!example
|
||||
|
||||
@@ -14,4 +14,5 @@ command line examples for connecting to MainNet, public testnets, and running a
|
||||
|
||||
Pantheon documentation is on the [Pantheon documentation site](https://docs.pantheon.pegasys.tech/en/stable/).
|
||||
|
||||
>**Note** Starting Pantheon by double-clicking the `pantheon` or `pantheon.bat` executables starts a node synchronizing with the Ethereum mainnet.
|
||||
!!! note
|
||||
Starting Pantheon by double-clicking the `pantheon` or `pantheon.bat` executables starts a node synchronizing with the Ethereum mainnet.
|
||||
@@ -29,7 +29,7 @@ description: Building Pantheon from source code
|
||||
Clone the **PegaSysEng/pantheon** repo to your home directory (`/home/<user>`):
|
||||
|
||||
```bash
|
||||
$ git clone --recursive https://github.com/PegaSysEng/pantheon.git
|
||||
git clone --recursive https://github.com/PegaSysEng/pantheon.git
|
||||
```
|
||||
|
||||
### Build Pantheon
|
||||
@@ -39,23 +39,23 @@ After cloning, go to the `pantheon` directory.
|
||||
Build Pantheon with the Gradle wrapper `gradlew`, omitting tests as follows:
|
||||
|
||||
```bash
|
||||
$ ./gradlew build -x test
|
||||
./gradlew build -x test
|
||||
```
|
||||
|
||||
Go to the distribution directory:
|
||||
```bash
|
||||
$ cd build/distributions/
|
||||
cd build/distributions/
|
||||
```
|
||||
|
||||
Expand the distribution archive:
|
||||
```bash
|
||||
$ tar -xzf pantheon-<version>.tar.gz
|
||||
tar -xzf pantheon-<version>.tar.gz
|
||||
```
|
||||
|
||||
Move to the expanded folder and display the Pantheon help to confirm installation.
|
||||
````bash
|
||||
$ cd pantheon-<version>/
|
||||
$ bin/pantheon --help
|
||||
cd pantheon-<version>/
|
||||
bin/pantheon --help
|
||||
````
|
||||
|
||||
!!! note "Linux Open File Limit"
|
||||
|
||||
@@ -12,13 +12,13 @@ description: Install Pantheon from binary distribution
|
||||
### Install Using Homebrew
|
||||
|
||||
```bash
|
||||
$ brew tap pegasyseng/pantheon
|
||||
$ brew install pantheon
|
||||
brew tap pegasyseng/pantheon
|
||||
brew install pantheon
|
||||
```
|
||||
Display Pantheon command line help to confirm installation:
|
||||
|
||||
```bash
|
||||
$ pantheon --help
|
||||
pantheon --help
|
||||
```
|
||||
|
||||
## Windows with Chocolatey
|
||||
@@ -75,7 +75,7 @@ Unpack the downloaded files and change into the `pantheon-<release>` directory.
|
||||
Display Pantheon command line help to confirm installation:
|
||||
|
||||
```bash tab="Linux/macOS"
|
||||
$ bin/pantheon --help
|
||||
bin/pantheon --help
|
||||
```
|
||||
|
||||
```bat tab="Windows"
|
||||
|
||||
@@ -69,7 +69,7 @@ To obtain an authentication token, make a request to the `/login` endpoint with
|
||||
|
||||
!!! example
|
||||
```bash tab="curl HTTPS request"
|
||||
$ curl -X POST --data '{"username":"username1","password":"pegasys"}' <JSON-RPC-https-endpoint:port>/login
|
||||
curl -X POST --data '{"username":"username1","password":"pegasys"}' <JSON-RPC-https-endpoint:port>/login
|
||||
```
|
||||
|
||||
```json tab="JSON result"
|
||||
|
||||
@@ -236,7 +236,7 @@ None
|
||||
{
|
||||
"jsonrpc" : "2.0",
|
||||
"id" : 53,
|
||||
"result" : "pantheon/1.0.0"
|
||||
"result" : "pantheon/{{ versions.pantheon_stable }}"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1096,11 +1096,11 @@ This command provides blocks related actions.
|
||||
### import
|
||||
|
||||
```bash tab="Syntax"
|
||||
$ pantheon blocks import --from=<block-file>
|
||||
pantheon blocks import --from=<block-file>
|
||||
```
|
||||
|
||||
```bash tab="Example"
|
||||
$ pantheon blocks import --from=/home/me/me_project/mainnet.blocks
|
||||
pantheon blocks import --from=/home/me/me_project/mainnet.blocks
|
||||
```
|
||||
|
||||
Imports blocks from the specified file into the blockchain database
|
||||
@@ -1112,15 +1112,15 @@ This command provides node public key related actions.
|
||||
### export
|
||||
|
||||
```bash tab="Syntax"
|
||||
$ pantheon public-key export [--to=<key-file>]
|
||||
pantheon public-key export [--to=<key-file>]
|
||||
```
|
||||
|
||||
```bash tab="Example (to standard output)"
|
||||
$ pantheon --data-path=<node data path> public-key export
|
||||
pantheon --data-path=<node data path> public-key export
|
||||
```
|
||||
|
||||
```bash tab="Example (to file)"
|
||||
$ pantheon --data-path=<node data path> public-key export --to=/home/me/me_project/not_precious_pub_key
|
||||
pantheon --data-path=<node data path> public-key export --to=/home/me/me_project/not_precious_pub_key
|
||||
```
|
||||
|
||||
Outputs the node public key to standard output or writes it to the specified file if
|
||||
@@ -1129,15 +1129,15 @@ Outputs the node public key to standard output or writes it to the specified fil
|
||||
### export-address
|
||||
|
||||
```bash tab="Syntax"
|
||||
$ pantheon public-key export-address [--to=<address-file>]
|
||||
pantheon public-key export-address [--to=<address-file>]
|
||||
```
|
||||
|
||||
```bash tab="Example (to standard output)"
|
||||
$ pantheon --data-path=<node data path> public-key export-address
|
||||
pantheon --data-path=<node data path> public-key export-address
|
||||
```
|
||||
|
||||
```bash tab="Example (to file)"
|
||||
$ pantheon --data-path=<node data path> public-key export-address --to=/home/me/me_project/me_node_address
|
||||
pantheon --data-path=<node data path> public-key export-address --to=/home/me/me_project/me_node_address
|
||||
```
|
||||
|
||||
Outputs the node public key address to standard output or writes it to the specified file if
|
||||
@@ -1153,11 +1153,11 @@ This command generates the hash of a given password. Include the hash in the [cr
|
||||
for JSON-RPC API [authentication](../Pantheon-API/Authentication.md).
|
||||
|
||||
```bash tab="Syntax"
|
||||
$ pantheon password hash --password=<my-password>
|
||||
pantheon password hash --password=<my-password>
|
||||
```
|
||||
|
||||
```bash tab="Example"
|
||||
$ pantheon password hash --password=myPassword123
|
||||
pantheon password hash --password=myPassword123
|
||||
```
|
||||
|
||||
### rlp
|
||||
@@ -1169,15 +1169,15 @@ This command provides RLP related actions.
|
||||
This command encodes a typed JSON value from a file or from the standard input into an RLP hexadecimal string.
|
||||
|
||||
```bash tab="Syntax"
|
||||
$ pantheon rlp encode [--from=<FILE>] [--to=<FILE>] [--type=<type>]
|
||||
pantheon rlp encode [--from=<FILE>] [--to=<FILE>] [--type=<type>]
|
||||
```
|
||||
|
||||
```bash tab="File Example"
|
||||
$ pantheon rlp encode --from=ibft_extra_data.json --to=extra_data_for_ibft_genesis.txt --type=IBFT_EXTRA_DATA
|
||||
pantheon rlp encode --from=ibft_extra_data.json --to=extra_data_for_ibft_genesis.txt --type=IBFT_EXTRA_DATA
|
||||
```
|
||||
|
||||
```bash tab="Standart Input/Output Example"
|
||||
$ cat extra_data.json | pantheon rlp encode > rlp.txt
|
||||
cat extra_data.json | pantheon rlp encode > rlp.txt
|
||||
```
|
||||
|
||||
The `IBFT_EXTRA_DATA` type is the only type supported for RLP encoding.
|
||||
|
||||
@@ -31,17 +31,12 @@ the MetaMask plug-in installed. This tutorial uses screenshots from Brave.
|
||||
|
||||
## Clone Pantheon Quickstart Source Code
|
||||
|
||||
Clone the repository from the `pantheon-quickstart` repository where `<version>` is replaced with the latest version (for example, `0.8.5`):
|
||||
Clone the repository from the `pantheon-quickstart` with the version matching Pantheon version, currently `{{ versions.quickstart }}`:
|
||||
|
||||
```bash tab="Linux/MacOS"
|
||||
git clone --branch <version> https://github.com/PegaSysEng/pantheon-quickstart.git
|
||||
git clone --branch {{ versions.quickstart }} https://github.com/PegaSysEng/pantheon-quickstart.git
|
||||
```
|
||||
|
||||
```bash tab="Example"
|
||||
git clone --branch 0.8.5 https://github.com/PegaSysEng/pantheon-quickstart.git
|
||||
```
|
||||
|
||||
|
||||
## Build Docker Images and Start Services and Network
|
||||
|
||||
This tutorial uses [Docker Compose](https://docs.docker.com/compose/) to assemble the images and
|
||||
@@ -58,6 +53,11 @@ When the process ends, it lists the running services:
|
||||
|
||||
!!! example "Docker-compose services list example"
|
||||
```log
|
||||
*************************************
|
||||
Pantheon Quickstart {{ versions.quickstart }}
|
||||
*************************************
|
||||
List endpoints and services
|
||||
----------------------------------
|
||||
Name Command State Ports
|
||||
-----------------------------------------------------------------------------------------------------------------------------
|
||||
quickstart_bootnode_1 /opt/pantheon/bootnode_sta ... Up 30303/tcp, 8545/tcp, 8546/tcp
|
||||
@@ -143,7 +143,7 @@ The result specifies the client version:
|
||||
{
|
||||
"jsonrpc" : "2.0",
|
||||
"id" : 1,
|
||||
"result" : "pantheon/1.0.0"
|
||||
"result" : "pantheon/{{ versions.pantheon_stable }}"
|
||||
}
|
||||
```
|
||||
Here we simply query the version of the Pantheon node, which confirms the node is running.
|
||||
|
||||
@@ -39,12 +39,12 @@ the `run.sh` script.
|
||||
To create and display the transaction string, run the Javascript script.
|
||||
|
||||
```bash
|
||||
$ node create_signed_raw_transaction.js
|
||||
node create_signed_raw_transaction.js
|
||||
```
|
||||
|
||||
To send a signed transaction, run:
|
||||
```bash
|
||||
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["raw_transaction_string"],"id":1}' <JSON-RPC-endpoint:port>
|
||||
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["raw_transaction_string"],"id":1}' <JSON-RPC-endpoint:port>
|
||||
```
|
||||
|
||||
Where:
|
||||
@@ -54,7 +54,7 @@ Where:
|
||||
|
||||
!!!example
|
||||
```bash
|
||||
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf86a808203e882520894f17f52151ebef6c7334fad080c5704d77216b732896c6b935b8bbd400000801ca08ce4a6c12f7f273321c5dc03910744f8fb11573fcce8140aa44486d385d22fb3a051f6bcc918bf3f12e06bfccfd1451bea5c517dffee0777ebd50caf177b17f383"],"id":1}' http://localhost:8545
|
||||
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf86a808203e882520894f17f52151ebef6c7334fad080c5704d77216b732896c6b935b8bbd400000801ca08ce4a6c12f7f273321c5dc03910744f8fb11573fcce8140aa44486d385d22fb3a051f6bcc918bf3f12e06bfccfd1451bea5c517dffee0777ebd50caf177b17f383"],"id":1}' http://localhost:8545
|
||||
```
|
||||
|
||||
All accounts and private keys in the examples are from the `dev.json` genesis file in the `/pantheon/ethereum/core/src/main/resources` directory.
|
||||
|
||||
@@ -5,3 +5,4 @@ Markdown>=3.1
|
||||
markdown-fenced-code-tabs>=1.0
|
||||
markdown-include>=0.5
|
||||
MarkupSafe>=1.1
|
||||
mkdocs-markdownextradata-plugin==0.0.5
|
||||
@@ -19,6 +19,9 @@ copyright: Pantheon and its documentation are licensed under Apache 2.0 license
|
||||
|
||||
#extra project info and template customisation
|
||||
extra:
|
||||
versions:
|
||||
pantheon_stable: &pantheon_stable_version 1.1.0
|
||||
quickstart: *pantheon_stable_version
|
||||
support:
|
||||
gitter: https://gitter.im/PegaSysEng/pantheon
|
||||
email: support@pegasys.tech
|
||||
@@ -148,3 +151,4 @@ markdown_extensions:
|
||||
|
||||
plugins:
|
||||
- search
|
||||
- markdownextradata
|
||||
|
||||
Reference in New Issue
Block a user