Skip to content

Commit c8c9d78

Browse files
authored
Merge branch '0xPolygon:main' into main
2 parents e38b6f9 + fda0efb commit c8c9d78

File tree

8 files changed

+160
-251
lines changed

8 files changed

+160
-251
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/** @format */
2+
3+
(function () {
4+
let k = window.Kapa;
5+
if (!k) {
6+
let i = function () {
7+
i.c(arguments);
8+
};
9+
i.q = [];
10+
i.c = function (args) {
11+
i.q.push(args);
12+
};
13+
window.Kapa = i;
14+
}
15+
})();
16+
17+
// keeps MkDocs from seeing the keydown
18+
function stopMkdocsShortcuts(e) {
19+
if (e.ctrlKey || e.metaKey || e.altKey) return;
20+
const blocked = new Set(['/', 's', 'f', 'n', 'p', '.']);
21+
if (blocked.has(e.key.toLowerCase())) {
22+
e.stopImmediatePropagation();
23+
}
24+
}
25+
26+
Kapa('onModalOpen', () => {
27+
window.addEventListener('keydown', stopMkdocsShortcuts, true);
28+
});
29+
30+
Kapa('onModalClose', () => {
31+
window.removeEventListener('keydown', stopMkdocsShortcuts, true);
32+
});
33+
34+
document.addEventListener('DOMContentLoaded', function () {
35+
var script = document.createElement('script');
36+
script.src = 'https://widget.kapa.ai/kapa-widget.bundle.js';
37+
script.setAttribute(
38+
'data-website-id',
39+
'd4477ef9-8d35-448e-b5ea-3b8f13d1cf1e'
40+
);
41+
script.setAttribute('data-project-name', 'Polygon');
42+
script.setAttribute('data-project-color', '#6306B6');
43+
script.setAttribute(
44+
'data-project-logo',
45+
'https://polygontechnology.notion.site/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F51562dc1-1dc5-4484-bf96-2aeac848ae2f%2F2c578a74-e8a1-4b2d-aafa-3126339715ae%2FPolygon_Icon_White_Purple_Rn.png?id=f3d302a7-607b-4f4d-8490-240c7eafe3c7&table=block&spaceId=51562dc1-1dc5-4484-bf96-2aeac848ae2f&width=2000&userId=&cache=v2'
46+
);
47+
script.setAttribute('data-button-image-height', '2rem');
48+
script.setAttribute('data-button-image-width', '2.5rem');
49+
script.setAttribute('data-modal-open-by-default', 'false');
50+
script.setAttribute('data-modal-title', 'Polygon Docs Chat Bot');
51+
script.setAttribute('data-modal-example-questions-title', 'Try asking me...');
52+
script.setAttribute('data-font-size-sm', '.7rem');
53+
script.setAttribute('data-query-input-font-size', '0.80rem');
54+
script.setAttribute('data-modal-disclaimer-font-size', '0.6rem');
55+
script.setAttribute('data-modal-title-font-size', '1.1rem');
56+
script.setAttribute("data-example-question-button-font-size","0.6rem");
57+
script.setAttribute("data-user-analytics-cookie-enabled","true");
58+
script.setAttribute(
59+
'data-modal-disclaimer',
60+
'This AI chatbot is powered by kapa.ai. Responses are generated automatically and may be inaccurate or incomplete. Do not rely on this information as legal, financial or other professional advice. By using this assistant, you agree that your input may be processed in accordance with the kapa.ai privacy policy: https://www.kapa.ai/content/privacy-policy'
61+
);
62+
script.setAttribute(
63+
'data-modal-example-questions',
64+
'What is the finality time on Polygon?, How do I connect my wallet to Polygon?'
65+
);
66+
script.setAttribute('data-button-text-color', '#ffffff');
67+
script.setAttribute('data-modal-title-color', '#ffffff');
68+
script.setAttribute('data-modal-header-bg-color', '#6306B6');
69+
script.setAttribute('data-button-position-top', '10px');
70+
script.setAttribute('data-button-position-right', '20px');
71+
script.setAttribute('data-button-text-font-size', '0.8rem');
72+
script.setAttribute('data-button-height', '3.8rem');
73+
script.setAttribute('data-button-width', '3.6rem');
74+
script.async = true;
75+
document.head.appendChild(script);
76+
});

docs/pos/architecture/heimdall_v2/clerk.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ One can run the following query commands from the clerk module :
104104
* `record` - Query for a specific event record by its ID.
105105
* `record-list` - Query a list of event records by page and limit.
106106
* `is-old-tx` - Query if the event record is already processed.
107+
* `latest-record-id` - Query the latest record (state-sync) id from L1.
107108

108109

109110
### CLI commands
@@ -128,6 +129,10 @@ heimdalld query clerk record-sequence [tx-hash] [log-index]
128129
heimdalld query clerk is-old-tx [tx-hash] [log-index]
129130
```
130131

132+
```bash
133+
heimdalld query clerk latest-record-id
134+
```
135+
131136
### GRPC Endpoints
132137

133138
The endpoints and the params are defined in the [clerk/query.proto](/proto/heimdallv2/clerk/query.proto) file.
@@ -153,6 +158,10 @@ grpcurl -plaintext -d '{"tx_hash": <>, "log_index": <>}' localhost:9090 heimdall
153158
grpcurl -plaintext -d '{"tx_hash": <>, "log_index": <>}' localhost:9090 heimdallv2.clerk.Query/IsClerkTxOld
154159
```
155160

161+
```bash
162+
grpcurl -plaintext -d '{}' localhost:9090 heimdallv2.clerk.Query/GetLatestRecordId
163+
```
164+
156165
### REST endpoints
157166

158167
The endpoints and the params are defined in the [clerk/query.proto](/proto/heimdallv2/clerk/query.proto) file.
@@ -162,6 +171,10 @@ Please refer to them for more information about the optional params.
162171
curl localhost:1317/clerk/event-records/list?page=<page>&limit=<limit>
163172
```
164173

174+
```bash
175+
curl localhost:1317/clerk/event-records/latest-id
176+
```
177+
165178
```bash
166179
curl localhost:1317/clerk/event-records/<event-id>
167180
```
@@ -176,4 +189,4 @@ curl localhost:1317/clerk/sequence?tx_hash=<tx-hash>&log_index=<log-index>
176189

177190
```bash
178191
curl localhost:1317/clerk/is-old-tx?tx_hash=<tx-hash>&log_index=<log-index>
179-
```
192+
```

docs/pos/architecture/heimdall_v2/heimdallv2_swagger.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,45 @@ paths:
15391539
format: uint64
15401540
tags:
15411541
- Query
1542+
/clerk/event-records/latest-id:
1543+
get:
1544+
summary: GetLatestRecordId queries the latest record id from L1.
1545+
operationId: GetLatestRecordId
1546+
responses:
1547+
'200':
1548+
description: A successful response.
1549+
schema:
1550+
type: object
1551+
properties:
1552+
latest_record_id:
1553+
type: string
1554+
format: uint64
1555+
is_processed_by_heimdall:
1556+
type: boolean
1557+
default:
1558+
description: An unexpected error response.
1559+
schema:
1560+
type: object
1561+
properties:
1562+
error:
1563+
type: string
1564+
code:
1565+
type: integer
1566+
format: int32
1567+
message:
1568+
type: string
1569+
details:
1570+
type: array
1571+
items:
1572+
type: object
1573+
properties:
1574+
type_url:
1575+
type: string
1576+
value:
1577+
type: string
1578+
format: byte
1579+
tags:
1580+
- Query
15421581
/clerk/event-records/list:
15431582
get:
15441583
summary: GetRecordList queries a list of records
@@ -4204,6 +4243,14 @@ definitions:
42044243
properties:
42054244
is_old:
42064245
type: boolean
4246+
heimdallv2.clerk.LatestRecordIdResponse:
4247+
type: object
4248+
properties:
4249+
latest_record_id:
4250+
type: string
4251+
format: uint64
4252+
is_processed_by_heimdall:
4253+
type: boolean
42074254
heimdallv2.clerk.RecordListResponse:
42084255
type: object
42094256
properties:

docs/pos/architecture/heimdall_v2/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Heimdall v2 is a modernized and revamped consensus client that is at the heart o
88
- Orchestrates the state sync mechanism between Ethereum and Polygon PoS.
99
- Addresses other essential aspects of the system.
1010

11-
It uses the latest [*Cosmos SDK*](https://github.com/maticnetwork/cosmos-sdk) and [*CometBFT*](https://github.com/cometbft/cometbft) for its consensus.
11+
It uses a fork of [*Cosmos SDK*](https://github.com/0xPolygon/cosmos-sdk) based on `v0.50.13` and a fork of [*CometBFT*](https://github.com/0xPolygon/cometbft/) based on `v0.38.17` for its consensus.
1212

13-
Heimdall removes certain modules from Cosmos SDK but primarily utilizes a customized version of it, following a similar pattern.
13+
Heimdall leverages some modified versions of `cosmos-sdk` modules (`auth`, `bank` and `gov`) plus some fully customized modules (`bor`, `chainmanager`, `checkpoint`, `clerk`, `milestone`, `stake` and `topup`).
1414

15-
For detailed instructions on running Heimdall v2, refer to the [Readme](https://github.com/0xPolygon/heimdall-v2/blob/develop/README.md) in the Github repository
15+
For detailed instructions on running Heimdall v2, refer to the [Readme](https://github.com/0xPolygon/heimdall-v2/blob/develop/README.md) in the Github repository

docs/pos/how-to/operate-validator-node/validator-performance.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ A validator’s performance is measured based on the checkpoints it signed over
1717

1818
### Performance benchmark
1919

20-
<center>
21-
![Figure: performance benchmark](../../../img/pos/performance-benchmark.png){width=60%}
22-
</center>
20+
![Figure: performance benchmark](../../../img/pos/performance-benchmark.png)
2321

2422
To facilitate the transition, there will be a slightly lower benchmark around the first two months while validators become accustomed to the parameters.
2523

@@ -53,9 +51,7 @@ The **Public Notices** page shows the recent notices and messages sent to the co
5351

5452
This is what a notice message should look like:
5553

56-
<center>
57-
![Figure: Notice](../../../img/pos/notice.png){width=60%}
58-
</center>
54+
![Figure: Notice](../../../img/pos/notice.png)
5955

6056

6157
### Forced unstaking

docs/pos/reference/network-upgrade-process.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ This page provides hardfork activation timestamps along with links to detailed s
77
On the Polygon Network, upgrades are activated based on timestamps. If you fail to update your Polygon client software before the specified timestamp, it may result in chain divergence, requiring a full resynchronization.
88

99

10-
| Upgrade | Forum | PIP | Activation |
11-
| ------------------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
12-
| Delhi Hardfork | [Link](https://forum.polygon.technology/t/pip-7-delhi-hardfork/10904/2) | [PIP-7](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-07.md) | Block >= `38,189,056` on Polygon Mainnet (Bor) |
13-
| Indore Hard Fork | [Link](https://forum.polygon.technology/t/pip-13-indore-hard-fork12272) | [PIP-13](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-13md) | Block >= `44,934,656` on Polygon Mainnet(Bor) |
14-
| Aalborg Hard Fork | [Link](https://forum.polygon.technology/t/aalborg-upgrade-mainnet-timeline-update/12960)| [PIP-21](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-21.md) | Block >= `15,950,759` on Polygon Mainnet (Heimdall) |
15-
| Agra Hard Fork | [Link](https://forum.polygon.technology/t/pip-28-agra-hardfork/13067) | [PIP-28](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-28.md) | Block >= `50,523,000` on Polygon Mainnet (Bor) |
16-
| | | | Block >= `41,874,000` on Polygon Mumbai (Bor) |
17-
| Napoli Hardfork | [Link](https://forum.polygon.technology/t/pip-33-napoli-upgrade/13405) | [PIP-33](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-33.md) | Block >= `54,876,000` on Polygon Mainnet (Bor) |
18-
| | | | Block >= `5,423,600` on Polygon Amoy (Bor) |
19-
| Ahmedabad Hardfork | [Link](https://forum.polygon.technology/t/pip-37-ahmedabad-hardfork/13885) | [PIP-37](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-37.md) | Block >= `62,278,656` on Polygon Mainnet (Bor) |
20-
| | | | Block >= `11,865,856` on Polygon Amoy (Bor) |
21-
| Jorvik Hardfork | [Link](https://forum.polygon.technology/t/pip-53-jorvik-hardfork/20357) | [PIP-53](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-53.md) | Block >= `22,393,043` on Polygon Mainnet (Heimdall) |
22-
| | | | Block >= `5,768,528` on Polygon Amoy (Heimdall) |
23-
| Danelaw Hardfork | [Link](https://forum.polygon.technology/t/pip-56-danelaw-hardfork/20511) | [PIP-56](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-56.md) | Block >= `22,393,043` on Polygon Mainnet (Heimdall) |
24-
| | | | Block >= `6,490,424` on Polygon Amoy (Heimdall) |
10+
| Upgrade | Forum | PIP | Activation |
11+
| ------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
12+
| Delhi Hardfork | [Link](https://forum.polygon.technology/t/pip-7-delhi-hardfork/10904/2) | [PIP-7](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-07.md) | Block >= `38,189,056` on Polygon Mainnet (Bor) |
13+
| Indore Hard Fork | [Link](https://forum.polygon.technology/t/pip-13-indore-hard-fork12272) | [PIP-13](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-13md) | Block >= `44,934,656` on Polygon Mainnet(Bor) |
14+
| Aalborg Hard Fork | [Link](https://forum.polygon.technology/t/aalborg-upgrade-mainnet-timeline-update/12960) | [PIP-21](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-21.md) | Block >= `15,950,759` on Polygon Mainnet (Heimdall) |
15+
| Agra Hard Fork | [Link](https://forum.polygon.technology/t/pip-28-agra-hardfork/13067) | [PIP-28](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-28.md) | Block >= `50,523,000` on Polygon Mainnet (Bor) |
16+
| | | | Block >= `41,874,000` on Polygon Mumbai (Bor) |
17+
| Napoli Hardfork | [Link](https://forum.polygon.technology/t/pip-33-napoli-upgrade/13405) | [PIP-33](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-33.md) | Block >= `54,876,000` on Polygon Mainnet (Bor) |
18+
| | | | Block >= `5,423,600` on Polygon Amoy (Bor) |
19+
| Ahmedabad Hardfork | [Link](https://forum.polygon.technology/t/pip-37-ahmedabad-hardfork/13885) | [PIP-37](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-37.md) | Block >= `62,278,656` on Polygon Mainnet (Bor) |
20+
| | | | Block >= `11,865,856` on Polygon Amoy (Bor) |
21+
| Jorvik Hardfork | [Link](https://forum.polygon.technology/t/pip-53-jorvik-hardfork/20357) | [PIP-53](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-53.md) | Block >= `22,393,043` on Polygon Mainnet (Heimdall) |
22+
| | | | Block >= `5,768,528` on Polygon Amoy (Heimdall) |
23+
| Danelaw Hardfork | [Link](https://forum.polygon.technology/t/pip-56-danelaw-hardfork/20511) | [PIP-56](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-56.md) | Block >= `22,393,043` on Polygon Mainnet (Heimdall) |
24+
| | | | Block >= `6,490,424` on Polygon Amoy (Heimdall) |
25+
| Bhilai Hardfork | [Link](https://forum.polygon.technology/t/bor-v2-1-0-beta4-release-bhilai-hf-on-amoy/21010) | [PIP-63](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-63.md) | Block >= `22,765,056` on Polygon Amoy (Bor) |
2526

2627

2728

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ validation:
630630
anchors: warn
631631

632632
extra_javascript:
633+
- _site_essentials/js/init_kapa_widget.js
633634
- _site_essentials/js/mathjax.js
634635
- https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=4.8.0
635636
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 commit comments

Comments
 (0)