Skip to content

Commit 5145ff6

Browse files
Merge pull request 0xPolygon#55 from 0xPolygon/empieichO-docs-review
update POS docs, all intros done
2 parents 3a42685 + 46cd489 commit 5145ff6

File tree

12 files changed

+60
-39
lines changed

12 files changed

+60
-39
lines changed

docs/img/pos/polygon-instance.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/pos/api/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/pos/architecture/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Architecture
22

3+
This section provides architectural details of Polygon PoS from a node perspective.
4+
35
Due to the proof-of-stake consensus, Polygon PoS consists of a consensus layer called Heimdall and execution layer called Bor.
46

57
Nodes on Polygon are therefore designed with a two-layer implementation represented by Bor (the block producer layer) and Heimdall (the validator layer).
68

7-
This section provides architectural details of Polygon PoS.
8-
99
In particular, and on the execution client side, it delineates on snapshots and state syncing, network configurations, and frequently used commands when running PoS nodes.
1010

1111
On the consesus client side, one finds descriptions on how Heimdall handles; authentication of account addresses, management of validators' keys, management of gas limits, enhancement of transaction verifications, balance transfers, staking and general chain management.

docs/pos/get-started/building-on-polygon.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ In order to be a validator on the Polygon Network, you need to:
2222

2323
## Wallets
2424

25-
To interact with the Polygon Network, you need to have an Ethereum-based wallet because Polygon runs on Ethereum Virtual Machine (EVM). You can choose to set up a [Metamask](https://github.com/0xPolygon/wiki/blob/master/docs/tools/wallets/metamask/overview.md) or [Arkane](https://github.com/0xPolygon/wiki/blob/master/docs/develop/wallets/arkane/intro_arkane.md) Wallet. More on wallet-related information and why you need one can be found in our [wallet documentation](https://docs.polygon.technology/docs/develop/wallets/getting-started).
25+
To interact with the Polygon Network, you need to have an Ethereum-based wallet because Polygon runs on Ethereum Virtual Machine (EVM). You can choose to set up a [Metamask](https://github.com/0xPolygon/wiki/blob/master/docs/tools/wallets/metamask/overview.md) or Arkane Wallet.
2626

2727
## Smart contracts
2828

29-
Polygon supports many services you can use to test, compile, debug, and deploy decentralized applications onto the Polygon Network. These include deployment using [thirdweb](https://github.com/0xPolygon/wiki/blob/master/docs/develop/thirdweb.md), [Alchemy](https://github.com/0xPolygon/wiki/blob/master/docs/develop/alchemy.md)[Chainstack](https://github.com/0xPolygon/wiki/blob/master/docs/develop/chainstack.md)[QuickNode](https://github.com/0xPolygon/wiki/blob/master/docs/develop/quicknode.md)[Remix](https://github.com/0xPolygon/wiki/blob/master/docs/develop/remix.md)[Truffle](https://github.com/0xPolygon/wiki/blob/master/docs/develop/truffle.md)[Hardhat](https://github.com/0xPolygon/wiki/blob/master/docs/develop/hardhat.md), and [Replit](https://github.com/0xPolygon/wiki/blob/master/docs/develop/replit.md).
29+
Polygon supports many services you can use to test, compile, debug, and deploy decentralized applications onto the Polygon Network. These include deployment using thirdweb, AlchemyChainstackQuickNodeRemixTruffleHardhat, and Replit.
3030

3131
## Connecting to Polygon
3232

33-
You can add Polygon to MetaMask or directly use Arkane, which allows you to connect to Polygon using [RPC](https://docs.polygon.technology/docs/tools/wallets/metamask/config-polygon-on-metamask/).
33+
You can add Polygon to MetaMask or directly use Arkane, which allows you to connect to Polygon using RPC.
3434

3535
In order to connect with the Polygon network to read blockchain information, we recommend using the Alchemy SDK.
3636

@@ -71,11 +71,11 @@ Suppose you have no prior experience building decentralized applications (dApps)
7171
- [Web3.js](https://www.dappuniversity.com/articles/web3-js-intro)
7272
- [Ethers.js](https://docs.ethers.io/v5/)
7373
- [thirdweb](https://portal.thirdweb.com)
74-
- [Remix](https://docs.polygon.technology/docs/develop/remix/)
75-
- [Truffle](https://docs.polygon.technology/docs/develop/truffle)
76-
- [Metamask](https://docs.polygon.technology/docs/tools/wallets/metamask/overview)
77-
- [Arkane](https://docs.polygon.technology/docs/develop/wallets/arkane/intro)
78-
- [Develop a dApp using Fauna, Polygon and React](https://docs.polygon.technology/docs/develop/dapp-fauna-polygon-react)
74+
- Remix
75+
- Truffle
76+
- Metamask
77+
- Arkane
78+
- Develop a dApp using Fauna, Polygon and React
7979

8080
## Already have a dApp?
8181

docs/pos/how-to/bridging/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This subsection contains guides on how to deploy bridge smart contracts to enable transfer of assets between the Polygon PoS and Ethereum, as well as setting up a communication channel between an L2 chain and an L1 network.
2+
3+
The subsection gives details on how to enable reading state data in the Polygon chain as though it is read in the Ethereum network. This is enabled through a process that involves deployment of a `Sender contract` and a `Receiver contract`, mapping the Sender with the Receiver, and finally sending and receiving data.
4+
5+
Sending data from Polygon to Ethereum is different from the converse, which is discussed above. The `MATIC to Ethereum` subsection outlines how to setup such a bridge, and provides a tutorial on how to achieve the transfer.
6+
7+
The L1-L2 communication sub-subsection discusses how to achieve `State transfer` and `State syncing`.
8+
9+
10+
11+
12+
13+
14+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This sub-subsection provides technical details on how to achieve `State transfer` and `State syncing`.
2+
3+
The `State transfer` sub-subsection provides details of all requirements, contracts and functions that will be called to execute a State transfer.
4+
5+
The subsequent `Bridging with FxPortal` sub-subsection contains a tutorial implementing State syncing using FxPortal, which is a powerful yet simple implementation of Polygon's State syncing mechanism relying on a centralized mapping of a party's tokens on one chain to their contract on the other.

docs/pos/how-to/operating/access-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The majority of developers use a node provider, or a third-party external servic
44

55
!!! tip Recommended
66

7-
New developers on the Polygon network can use Alchemy as their node provider because of it's reliability, scale, and [Enhanced APIs](https://docs.alchemy.com/reference/enhanced-apis-overview).
7+
New developers on the Polygon network can use Alchemy as their node provider because of its reliability, scalability, and [Enhanced APIs](https://docs.alchemy.com/reference/enhanced-apis-overview).
88

99
## Send your first blockchain request
1010

docs/pos/how-to/operating/full-node/docker.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,34 +83,35 @@ With Docker running and storage prepared, it's time to set up Heimdall:
8383

8484
1. Test Heimdall with Docker:
8585

86-
```bash
87-
docker run -it 0xpolygon/heimdall:1.0.3 heimdallcli version
88-
```
86+
```bash
87+
docker run -it 0xpolygon/heimdall:1.0.3 heimdallcli version
88+
```
8989

90-
2. Initialize Heimdall's home directory:
90+
2. Initialize Heimdall's home directory:
9191
92-
```bash
93-
docker run -v /mnt/data/heimdall:/heimdall-home:rw --entrypoint /usr/bin/heimdalld -it 0xpolygon/heimdall:1.0.3 init --home=/heimdall-home
94-
```
92+
```bash
93+
docker run -v /mnt/data/heimdall:/heimdall-home:rw --entrypoint /usr/bin/heimdalld -it 0xpolygon/heimdall:1.0.3 init --home=/heimdall-home
94+
```
9595
96-
3. Edit `config.toml` in `/mnt/data/heimdall/config`:
96+
3. Edit `config.toml` in `/mnt/data/heimdall/config`:
9797
98-
- Set `moniker` to a unique node name.
99-
- Change `laddr` to `tcp://0.0.0.0:26657`.
100-
- Update `seeds` with the latest list (found in the section on seed nodes and bootnodes).
98+
- Set `moniker` to a unique node name.
99+
- Change `laddr` to `tcp://0.0.0.0:26657`.
100+
- Update `seeds` with the latest list (found in the section on seed nodes and bootnodes).
101101
102-
4. Edit `heimdall-config.toml`:
102+
4. Edit `heimdall-config.toml`:
103103
104-
- Set `eth_rpc_url` to your Ethereum Mainnet RPC URL.
105-
- Change `bor_rpc_url` to `<http://bor:8545>
104+
- Set `eth_rpc_url` to your Ethereum Mainnet RPC URL.
105+
- Change `bor_rpc_url` to `<http://bor:8545>`.
106106
107-
`.
107+
5. Update the `genesis.json` for Mainnet:
108108
109-
5. Update the `genesis.json` for Mainnet:
110109
111-
```bash
112-
sudo curl -o /mnt/data/heimdall/config/genesis.json https://raw.githubusercontent.com/maticnetwork/heimdall/master/builder/files/genesis-mainnet-v1.json
113-
```
110+
```bash
111+
sudo curl -o /mnt/data/heimdall/config/genesis.json https://raw.githubusercontent.com/maticnetwork/heimdall/master/builder/files/genesis-mainnet-v1.json
112+
```
113+
114+
114115
115116
Verify the hash with `sha256sum genesis.json`.
116117

docs/pos/how-to/smart-contracts/alchemy.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
Polygon technical documentation serves as an industry public good and is made available under the [MIT License](https://opensource.org/license/mit/). In addition, please view the official [Polygon Labs Terms of Use](https://polygon.technology/terms-of-use).
88

9-
This tutorial is for developers who are either new to Ethereum blockchain development or want to understand the fundamentals of deploying and interacting with smart contracts. It will walk you through creating and deploying a smart contract on the Polygon Mumbai test network using a cryptocurrency wallet ([Metamask](https://metamask.io)), [Solidity](https://docs.soliditylang.org/en/v0.8.0/), [Hardhat](https://hardhat.org), and [Alchemy](https://alchemy.com/?a=polygon-docs).
10-
119
## What you will learn
1210

1311
To create a smart contract in this tutorial, you will learn how to use Alchemy's platform to:
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
Welcome to the Polygon PoS how-to section! There's a bunch of how-tos here to help you get started with common technical tasks. We hope you find them useful.
1+
This subsection provides guides on how to work with smart contracts, following tutorials supplied by various third parties.
2+
3+
The tutorials contained in here are suitable for developers who are either new to blockchain development on Ethereum, or want to understand the fundamentals of deploying and interacting with smart contracts.
4+
5+
The tutorials are walk-throughs to creating and deploying smart contracts on the Polygon Mumbai test network using a Web3 wallet like [Metamask](https://metamask.io), [Solidity](https://docs.soliditylang.org/en/v0.8.0/), [Hardhat](https://hardhat.org), and [Alchemy](https://alchemy.com/?a=polygon-docs).

0 commit comments

Comments
 (0)