Skip to content

Commit 924fd5d

Browse files
committed
Merge branch 'main' into unified-lxly-bridge
2 parents 9d079da + 1165aee commit 924fd5d

File tree

23 files changed

+1634
-65
lines changed

23 files changed

+1634
-65
lines changed

docs/cdk/version-matrix.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,22 @@ The table below shows the version compatibility for CDK releases and related com
2222
</thead>
2323
<tbody>
2424
<tr>
25-
<td>Ares release</td>
25+
<td>CDK Elderberry 2 Release </td>
26+
<td>9</td>
27+
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.4">v0.6.4 Elderberry 2</a></td>
28+
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-validium-node/0.6.4-cdk/images/sha256-6393eebf06fae415549070001d118aeb886777e532858777ab52096b3c25e5f2?context=explore">0.6.4-cdk</a> </td>
29+
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-data-availability/0.0.7/images/sha256-17590789a831259d7a07d8a042ea87e381c5708dec3a7daef6f3f782f50b2c00?context=explore">v0.0.7</a></td>
30+
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v6.0.0">v6.0.0</a></td>
31+
<td> <a href="https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v5.0.1-rc.2-fork.8">v5.0.1</a></td>
32+
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td>
33+
</tr>
34+
<td>CDK Elderberry 1 Release </td>
2635
<td>8</td>
2736
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.2">v0.6.2 Elderberry</a></td>
2837
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-validium-node/0.6.2-cdk/images/sha256-6393eebf06fae415549070001d118aeb886777e532858777ab52096b3c25e5f2?context=explore">0.6.2-cdk</a> </td>
2938
<td><a href="https://hub.docker.com/layers/0xpolygon/cdk-data-availability/0.0.6/images/sha256-17590789a831259d7a07d8a042ea87e381c5708dec3a7daef6f3f782f50b2c00?context=explore">v0.0.6</a></td>
3039
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v5.0.7">v5.0.7</a></td>
31-
<td> <a href="https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v5.0.1-rc.2-fork.8">v5.0.1-rc.2-fork.8</a></td>
40+
<td> <a href="https://github.com/0xPolygonHermez/zkevm-contracts/releases/tag/v5.0.1-rc.2-fork.8">v5.0.1</a></td>
3241
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td>
3342
</tr>
3443
<tr>
@@ -56,7 +65,7 @@ The table below shows the version compatibility for CDK releases and related com
5665

5766
### Migrating
5867

59-
- Anyone on earlier versions, we recommend going straight to fork ID 8.
68+
- Anyone on earlier versions, we recommend going straight to fork ID 9.
6069

6170
## zkEVM
6271

@@ -73,15 +82,21 @@ The table below shows the version compatibility for Polygon zkEVM releases.
7382
</thead>
7483
<tbody>
7584
<tr>
76-
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.10">v0.6.2 </a></td>
77-
<td>v0.4.2</td>
78-
<td>v5.0.7</td>
85+
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.4">v0.6.4 </a></td>
86+
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td>
87+
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v6.0.0">v6.0.0</a></td>
88+
<td>Mainnet &amp; Cardona: 4-9 <br>Testnet (Goerli): 1-6</td>
89+
</tr>
90+
<tr>
91+
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.6.2">v0.6.2 </a></td>
92+
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td>
93+
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v5.0.7">v5.0.7</a></td>
7994
<td>Mainnet &amp; Cardona: 4-8. <br>Testnet (Goerli): 1-6</td>
8095
</tr>
8196
<tr>
82-
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.10">v0.5.10</a></td>
83-
<td>v0.4.0</td>
84-
<td>v4.0.4</td>
97+
<td><a href="https://github.com/0xPolygonHermez/zkevm-node/releases/tag/v0.5.13">v0.5.13</a></td>
98+
<td><a href="https://github.com/0xPolygonHermez/zkevm-bridge-service/releases/tag/v0.4.2">v0.4.2</a></td>
99+
<td><a href="https://github.com/0xPolygonHermez/zkevm-prover/releases/tag/v4.0.19">v4.0.19</a></td>
85100
<td>Mainnet &amp; Cardona: 4-7. <br>Testnet (Goerli): 1-6</td>
86101
</tr>
87102
<tr>

docs/img/cdk/stb-1.png

-80 KB
Binary file not shown.

docs/img/pos/checkpoint.png

88.8 KB
Loading

docs/img/pos/checkpoint.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.
693 KB
Loading

docs/pos/architecture/heimdall/checkpoints.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type CheckpointBlockHeader struct {
3232

3333
#### Root hash calculation
3434

35-
![Root Hash Image](../../../img/pos/checkpoint.svg)
35+
![Root Hash Image](../../../img/pos/checkpoint.png)
3636

3737
The `RootHash` is calculated as a Merkle hash of Bor block hashes from `StartBlock` to `EndBlock`. The process involves hashing each block's number, time, transaction hash, and receipt hash, then creating a Merkle root of these hashes.
3838

@@ -83,44 +83,41 @@ rootHash := tree.Root().Hash
8383
`AccountRootHash` is the hash of the validator account-related information that needs to pass to the Ethereum chain at each checkpoint.
8484

8585
```jsx
86-
eachAccountHash := keccak256([validator id, withdraw fee, slash amount])
86+
eachAccountHash := keccak256([validator id, withdraw fee])
8787
```
8888

8989
Pseudocode for the account root hash for `1` to `n` Bor blocks:
9090

9191
```go
92-
B(1) := keccak256([validator id, withdraw fee, slash amount])
93-
B(2) := keccak256([validator id, withdraw fee, slash amount])
92+
B(1) := keccak256([validator id, withdraw fee])
93+
B(2) := keccak256([validator id, withdraw fee])
9494
.
9595
.
9696
.
97-
B(n) := keccak256([validator id, withdraw fee, slash amount])
97+
B(n) := keccak256([validator id, withdraw fee])
9898

9999
// account root hash is Merkle root of all block hash
100100
checkpoint's account root hash = Merkel[B(1), B(2), ....., B(n)]
101101
```
102102
103-
Golang code for the account hash can be found here: [https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go#L91-L101](https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go#L91-L101)
103+
Golang code for the account hash can be found here: [https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go](https://github.com/maticnetwork/heimdall/blob/develop/types/dividend-account.go)
104104
105105
```go
106-
// DividendAccount contains Fee, Slashed amount
106+
// DividendAccount contains burned Fee amount
107107
type DividendAccount struct {
108-
ID DividendAccountID `json:"ID"`
109-
FeeAmount string `json:"feeAmount"` // string representation of big.Int
110-
SlashedAmount string `json:"slashedAmount"` // string representation of big.Int
108+
User HeimdallAddress `json:"user"`
109+
FeeAmount string `json:"feeAmount"` // string representation of big.Int
111110
}
112111
113-
// calculate hash for particular account
112+
// CalculateHash hashes the values of a DividendAccount
114113
func (da DividendAccount) CalculateHash() ([]byte, error) {
115-
fee, _ := big.NewInt(0).SetString(da.FeeAmount, 10)
116-
slashAmount, _ := big.NewInt(0).SetString(da.SlashedAmount, 10)
117-
divAccountHash := crypto.Keccak256(appendBytes32(
118-
new(big.Int).SetUint64(uint64(da.ID)).Bytes(),
119-
fee.Bytes(),
120-
slashAmount.Bytes(),
121-
))
122-
123-
return divAccountHash, nil
114+
fee, _ := big.NewInt(0).SetString(da.FeeAmount, 10)
115+
divAccountHash := crypto.Keccak256(appendBytes32(
116+
da.User.Bytes(),
117+
fee.Bytes(),
118+
))
119+
120+
return divAccountHash, nil
124121
}
125122
```
126123

docs/pos/concepts/transactions/eip-4337.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ interface IAccount {
4040
- [ERC-4337 proposal](https://eips.ethereum.org/EIPS/eip-4337) is the link to the official proposal and technical specification.
4141
- [@account-abstraction SDK](https://www.npmjs.com/package/@account-abstraction/sdk) is an npm package for using ERC-4337 developed by the authors of the proposal.
4242
- [Stackup](https://docs.stackup.sh/) provides node services with ERC-4337 bundlers and other ERC-4337 infrastructure.
43+
- [WalletKit](https://walletkit.com) is an all-in-one platform for adding smart, gasless wallets to your app. It has integrated support for ERC-4337 and comes with a paymaster and bundler included, requiring no extra setup.

docs/pos/reference/contracts/stakingmanager.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,14 @@ PIP4 introduced the concept of showcasing validator performance for community vi
2525

2626
## Methods and variables
2727

28-
!!!caution
29-
Slashing Implementation
30-
31-
`jail`, `unJail`, and `slash` functions are not used currently as part of the slashing implementation.
32-
33-
3428
### validatorThreshold
3529

3630
It stores the maximum number of validators accepted by the system, also called slots.
3731

3832
### AccountStateRoot
3933

4034
- For various accounting done on Heimdall for validators and delegator, account root is submitted while submitting the `checkpoint`.
41-
- accRoot is used while `claimRewards` and `unStakeClaim`.
35+
- `accRoot` is used while `claimRewards` and `unStakeClaim`.
4236

4337
### stake / stakeFor
4438

@@ -76,9 +70,7 @@ function stakeFor(
7670
```solidity
7771
function unstakeClaim(uint256 validatorId) public;
7872
```
79-
80-
- After `unstaking`, validators are put into withdrawal period so that they can be slashed, if any fraud found after `unstaking`, for past frauds.
81-
- Once `WITHDRAWAL_DELAY` period is served, validators can call this function and do settlement with `stakeManager` (get rewards if any, get staked tokens back, burn NFT, etc).
73+
Once `WITHDRAWAL_DELAY` period is served, validators can call this function and do settlement with `stakeManager` (get rewards if any, get staked tokens back, burn NFT, etc).
8274

8375
### restake
8476

@@ -127,7 +119,7 @@ function claimFee(
127119

128120
This method is used to withdraw fees from Heimdall. `accountStateRoot` is updated on each checkpoint, so that validators can provide proof of inclusion in this root for account on Heimdall and withdraw fee.
129121

130-
Note that `accountStateRoot` is re-written to prevent exits on multiple checkpoints (for old root and save accounting on `stakeManager`). `accumSlashedAmount` is unused at the moment and will be used for slashing on Heimdall if needed.
122+
Note that `accountStateRoot` is re-written to prevent exits on multiple checkpoints (for old root and save accounting on `stakeManager`).
131123

132124
### StakingNFT
133125

docs/tools/data/subquery.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
!!! note "Content disclaimer"
2+
3+
Please view the third-party content disclaimer [here](https://github.com/0xPolygon/polygon-docs/blob/main/CONTENT_DISCLAIMER.md).
4+
5+
## Intro
6+
7+
SubQuery is a leading blockchain data indexer that provides developers with fast, flexible, universal, open source and decentralised APIs for web3 projects. SubQuery SDK allows developers to get rich indexed data and build intuitive and immersive decentralised applications in a faster and more efficient way. SubQuery supports 100+ ecosystems including Polygon, Polygon zkEVM, Polygon Mumbai, Ethereum, Polkadot, Algorand, NEAR, and Avalanche.
8+
9+
Another one of SubQuery's competitive advantages is the ability to aggregate data not only within a chain but across multiple blockchains all within a single project. This allows the creation of feature-rich dashboard analytics and multi-chain block scanners.
10+
11+
Other advantages include superior performance with multiple RPC endpoint configurations, multi-worker capabilities and a configurable caching architecture. To find out more, visit our [documentation](https://academy.subquery/).
12+
13+
**Useful resources**:
14+
15+
- SubQuery docs: [SubQuery Academy (Documentation)](https://academy.subquery.network/)
16+
17+
- Intro quick start guide: [1. Create a New Project](https://academy.subquery.network/quickstart/quickstart.html)
18+
19+
- [Polygon Quick Start Guide](https://academy.subquery.network/quickstart/quickstart_chains/polygon.html)
20+
21+
- [Polygon ZKEVM quick start guide](https://academy.subquery.network/quickstart/quickstart_chains/polygon-zkevm.html)
22+
23+
- [Polygon Plasma bridge multi-chain quick start guide](https://academy.subquery.network/quickstart/quickstart_multichain/polygon-plasma-bridge.html)
24+
25+
- [Polygon's starter projects directory](https://github.com/subquery/ethereum-subql-starter/tree/main/Polygon)
26+
27+
For technical questions and support reach out to us start@subquery.network
28+
29+
## Running and hosting your Polygon SubQuery APIs
30+
31+
SubQuery is open-source, meaning you have the freedom to run it in the following three ways:
32+
33+
- Locally on your own computer (or a cloud provider of your choosing), [view the instructions on how to run SubQuery Locally](https://academy.subquery.network/run_publish/run.html).
34+
35+
- You can publish it to SubQuery's enterprise-level [Managed Service](https://managedservice.subquery.network/), where we'll host your SubQuery project in production ready services for mission critical data with zero-downtime blue/green deployments. There even is a generous free tier. [Find out how](https://academy.subquery.network/run_publish/publish.html).
36+
37+
- You can publish it to the decentralised [SubQuery Network](https://subquery.network/network), the most open, performant, reliable, and scalable data service for dApp developers. The SubQuery Network indexes and services data to the global community in an incentivised and verifiable way and supports Polygon from launch.

0 commit comments

Comments
 (0)