-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wiki docs migrated to Edge repo (#2052)
* adding wiki docs to repo * fix links * fix security smell * one comment in readme * typo * Fix sonarqube violations * Update wiki-docs/docs/contracts/reward-pool.md Co-authored-by: Goran Rojovic <[email protected]> * Update wiki-docs/docs/design/consensus/polybft/ibft.md Co-authored-by: Goran Rojovic <[email protected]> * Update wiki-docs/docs/operate/deploy/staking/stake.md Co-authored-by: Goran Rojovic <[email protected]> * edits during review * removing files from Graces sheet * old files not removed, removing * move docs, include sequence doc, add gitignore --------- Co-authored-by: Stefan Negovanović <[email protected]> Co-authored-by: Goran Rojovic <[email protected]>
- Loading branch information
1 parent
ab9b887
commit 127381d
Showing
96 changed files
with
7,060 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM python:3.9-alpine | ||
|
||
# Install system dependencies | ||
RUN apk update && \ | ||
apk add --no-cache rsync git nodejs npm && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
# Copy and install Python dependencies | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt --no-cache-dir | ||
|
||
# Switch to a non-root user (if 'nonroot' is already created) | ||
USER nonroot | ||
|
||
# Build doc by default | ||
ENTRYPOINT ["mkdocs"] | ||
CMD ["serve", "--dev-addr", "0.0.0.0:8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Polygon Edge docs | ||
|
||
Welcome to the Polygon Edge documentation, built with [the Material theme for MkDocs](https://squidfunk.github.io/mkdocs-material/). | ||
|
||
## Build and serve the site | ||
|
||
### Clone the repo | ||
|
||
```sh | ||
https://github.com/0xPolygon/polygon-edge.git | ||
cd polygon-edge/wiki-docs | ||
``` | ||
|
||
### Run with Python | ||
|
||
1. Download and install Python 3.11: https://www.python.org/downloads/ | ||
|
||
2. Install the `virtualenv` package: | ||
|
||
```sh | ||
pip install virtualenv | ||
``` | ||
|
||
3. Build and serve the html | ||
|
||
```sh | ||
./run.sh | ||
``` | ||
|
||
The site runs at: http://127.0.0.1:8000/ | ||
|
||
### Run with Docker | ||
|
||
:warning: Remove line 10 from the `Dockerfile` to run locally. | ||
|
||
1. Spin up the image: | ||
|
||
```sh | ||
docker build -t polygon-edge-docs . | ||
``` | ||
|
||
2. Run the container: | ||
|
||
``` | ||
docker compose up | ||
``` | ||
|
||
The site runs at: http://127.0.0.1:8000/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.6" | ||
|
||
services: | ||
developer-docs: | ||
image: "polygon-edge-docs" | ||
ports: | ||
- "0.0.0.0:8000:8000" | ||
container_name: "serve-edge-docs" | ||
working_dir: /workspace/ | ||
volumes: | ||
- type: bind | ||
source: . | ||
target: /workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## bridge_generateExitProof | ||
|
||
Returns the proof for a given exit event. Used by users that want to exit the L2 chain and withdraw tokens to L1. | ||
|
||
### Parameters | ||
|
||
**exitID** - ID of the exit event submitted by L2StateSender contract when the user wants to exit the L2 contract. | ||
|
||
### Returns | ||
|
||
|
||
- **Object** - A proof object containing: | ||
- **Array of hashes** - representing the proof of membership of a given exit event on some checkpoint. | ||
- **Map** - containing a leaf index of given exit event in the Merkle tree, Exit event and block number in which checkpoint that contains a given exit event was submitted to the rootchain. | ||
|
||
--- | ||
|
||
## bridge_getStateSyncProof | ||
|
||
Returns the proof for a given state sync event. Used by users (Relayer) when they want to execute a state change on the childchain (for example, depositing funds from L1 to L2). | ||
|
||
### Parameters | ||
|
||
**stateSyncID** - ID of the state sync event submitted by StateSender contract. | ||
|
||
### Returns | ||
|
||
|
||
- **Object** - A proof object containing: | ||
- **Array of hashes** - representing the proof of membership of a given state sync event on some commitment. | ||
- **Map** - containing the state sync event data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
To enable the debug route namespace, you need to modify the configuration and add the "debug" parameter as shown below: | ||
|
||
``` | ||
[jsonrpc.http] | ||
enabled = true | ||
port = 8545 | ||
host = "0.0.0.0" | ||
api = ["eth", "net", "web3", "txpool", "bor", "debug"] | ||
``` | ||
|
||
## debug_traceBlockByNumber | ||
|
||
Executes all transactions in the block specified by number with a tracer and returns the tracing result. | ||
|
||
### Parameters | ||
|
||
* <b>QUANTITY|TAG </b> - integer of a block number, or the string "latest" | ||
* <b> Object </b> - The tracer options: | ||
|
||
+ <b> enableMemory: Boolean </b> - (optional, default: false) The flag indicating enabling memory capture. | ||
+ <b> disableStack: Boolean </b> - (optional, default: false) The flag indicating disabling stack capture. | ||
+ <b> disableStorage: Boolean </b> - (optional, default: false) The flag indicating disabling storage capture. | ||
+ <b> enableReturnData: Boolean </b> - (optional, default: false) The flag indicating enabling return data capture. | ||
+ <b> timeOut: String </b> - (optional, default: "5s") The timeout for cancellation of execution. | ||
+ <b> tracer: String </b> - (default: "structTracer") Defines the debug tracer used for given call. Supported values: structTracer, callTracer. | ||
|
||
|
||
### Returns | ||
|
||
<b> Array </b> - Array of trace objects with the following fields: | ||
|
||
* <b> failed: Boolean </b> - the tx is successful or not | ||
* <b> gas: QUANTITY </b> - the total consumed gas in the tx | ||
* <b> returnValue: DATA </b> - the return value of the executed contract call | ||
* <b> structLogs: Array </b> - the trace result of each step with the following fields: | ||
|
||
+ <b> pc: QUANTITY </b> - the current index in bytecode | ||
+ <b> op: String </b> - the name of current executing operation | ||
+ <b> gas: QUANTITY </b> - the available gas ßin the execution | ||
+ <b> gasCost: QUANTITY </b> - the gas cost of the operation | ||
+ <b> depth: QUANTITY </b> - the number of levels of calling functions | ||
+ <b> error: String </b> - the error of the execution | ||
+ <b> stack: Array </b> - array of values in the current stack | ||
+ <b> memory: Array </b> - array of values in the current memory | ||
+ <b> storage: Object </b> - mapping of the current storage | ||
+ <b> refund: QUANTITY </b> - the total of current refund value | ||
|
||
### Example | ||
|
||
````bash | ||
curl https://rpc-endpoint.io:8545 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["latest"],"id":1}' | ||
```` | ||
|
||
## debug_traceBlockByHash | ||
|
||
Executes all transactions in the block specified by block hash with a tracer and returns the tracing result. | ||
|
||
### Parameters | ||
|
||
* <b> DATA , 32 Bytes </b> - Hash of a block. | ||
* <b> Object </b> - The tracer options. See debug_traceBlockByNumber for more details. | ||
|
||
### Returns | ||
|
||
<b> Array </b> - Array of trace objects. See debug_traceBlockByNumber for more details. | ||
|
||
### Example | ||
|
||
````bash | ||
curl https://rpc-endpoint.io:8545 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"],"id":1}' | ||
```` | ||
|
||
## debug_traceBlock | ||
|
||
Executes all transactions in the block given from the first argument with a tracer and returns the tracing result. | ||
|
||
### Parameters | ||
|
||
* <b> DATA </b> - RLP Encoded block bytes | ||
* <b> Object </b> - The tracer options. See debug_traceBlockByNumber for more details. | ||
|
||
### Returns | ||
|
||
<b> Array </b> - Array of trace objects. See debug_traceBlockByNumber for more details. | ||
|
||
### Example | ||
|
||
````bash | ||
curl https://rpc-endpoint.io:8545 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0xf9...."],"id":1}' | ||
```` | ||
|
||
## debug_traceTransaction | ||
|
||
Executes the transaction specified by transaction hash with a tracer and returns the tracing result. | ||
|
||
### Parameters | ||
|
||
* <b> DATA , 32 Bytes </b> - Hash of a transaction. | ||
* <b> Object </b> - The tracer options. See debug_traceBlockByNumber for more details. | ||
|
||
### Returns | ||
|
||
<b> Object </b> - Trace object. See debug_traceBlockByNumber for more details. | ||
|
||
### Example | ||
|
||
````bash | ||
curl https://rpc-endpoint.io:8545 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"],"id":1}' | ||
```` | ||
|
||
## debug_traceCall | ||
|
||
Executes a new message call with a tracer and returns the tracing result. | ||
|
||
### Parameters | ||
|
||
* <b> Object </b> - The transaction call object | ||
|
||
+ <b> from: DATA, 20 Bytes </b> - (optional) The address the transaction is sent from. | ||
+ <b> to: DATA, 20 Bytes </b> - The address the transaction is directed to. | ||
+ <b> gas: QUANTITY </b> - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. | ||
+ <b> gasPrice: QUANTITY </b> - (optional) Integer of the gasPrice used for each paid gas | ||
+ <b> value: QUANTITY </b> - (optional) Integer of the value sent with this transaction | ||
+ <b> data: DATA </b> - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation | ||
|
||
* <b> QUANTITY|TAG </b> - integer block number, or the string "latest" | ||
* <b> Object </b> - The tracer options. See debug_traceBlockByNumber for more details. | ||
|
||
### Returns | ||
|
||
<b> Object </b> - Trace object. See debug_traceBlockByNumber for more details. | ||
|
||
### Example | ||
|
||
````bash | ||
curl https://rpc-endpoint.io:8545 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"to": "0x1234", "data": "0x1234"}, "latest", {}],"id":1}' | ||
```` |
Oops, something went wrong.