Skip to content

Commit 59a9d45

Browse files
committed
v2 docs update
1 parent 94c4038 commit 59a9d45

File tree

3 files changed

+64
-4
lines changed

3 files changed

+64
-4
lines changed

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

0 commit comments

Comments
 (0)