You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introducing db-sync-explorer service which expose db-sync database as as
REST service. Added some helper endpoint to check meta information about
db-sync and validate sync process (we can query sync process expressed
as percentage or difference between current date and last registered
block). Finally added api/v0/tx/hash/{...} endpoint which can return
transaction information if exists in db sync. This can be useful for any
clients for example GVC to check if registration transaction is
confirmed
description: Request for fetching information about Db Sync synchronization status. 'Behind' endpoint return date interval object which represent difference between utc::now() and last block time registered in db sync.
16
+
operationId: behindTip
17
+
responses:
18
+
'200':
19
+
description: 'On correct response'
20
+
content:
21
+
application/json:
22
+
schema:
23
+
$ref: '#/components/schemas/Behind'
24
+
example:
25
+
- behind_by:
26
+
secs_since_epoch: 1669792739,
27
+
nanos_since_epoch: 0
28
+
'500':
29
+
description: 'On internal server error'
30
+
/api/v0/meta:
31
+
get:
32
+
tags: [meta]
33
+
summary: Meta information
34
+
description: Provides information about meta information of db sync, like version, network and start date
description: Returns information about transaction by given hash. Returns collection of transaction matching given hash. If none transaction is found, returns empty collection.
description: Endpoint can provide float represents percentage of synchronization between dbsync and target network (to check target network please use meta endpoint). Number is expressed as BigDecimal
87
+
operationId: syncPercentage
88
+
responses:
89
+
'200':
90
+
description: 'On correct request'
91
+
content:
92
+
application/json:
93
+
schema:
94
+
$ref: "#/components/schemas/SyncPercentage"
95
+
example:
96
+
sync_percentage: "99.9999554682794478"
97
+
98
+
/api/v0/health:
99
+
post:
100
+
tags: [meta]
101
+
summary: Health
102
+
description: Health endpoint for checking if service is up
103
+
operationId: health
104
+
responses:
105
+
'200':
106
+
description: 'Server is up'
107
+
108
+
tags:
109
+
- name: sync
110
+
description: Information on db sync state against network.
111
+
- name: tx
112
+
description: Information on transactions.
113
+
- name: meta
114
+
description: Information on service or db sync condition.
115
+
116
+
117
+
components:
118
+
schemas:
119
+
TransactionConfirmation:
120
+
type: object
121
+
properties:
122
+
epoch_no:
123
+
type: integer
124
+
format: int32
125
+
description: epoch number in which transction was minted.
126
+
slot_no:
127
+
type: integer
128
+
description: slot number in which transaction was minted.
129
+
absolute_slot:
130
+
type: integer
131
+
description: absolute slot number in which transaction was minted
132
+
block_no:
133
+
type: integer
134
+
description: block number in which transaction was minted
135
+
Behind:
136
+
type: object
137
+
properties:
138
+
behind_by:
139
+
$ref: '#/components/schemas/SystemTime'
140
+
141
+
SyncPercentage:
142
+
type: object
143
+
properties:
144
+
sync_percentage:
145
+
type: number
146
+
format: float
147
+
description: "sync progression expressed in percents"
148
+
Meta:
149
+
type: object
150
+
properties:
151
+
id:
152
+
type: number
153
+
format: int64
154
+
description: "identifier of meta information"
155
+
start_time:
156
+
$ref: '#/components/schemas/SystemTime'
157
+
version:
158
+
type: number
159
+
format: float
160
+
description: "db sync version"
161
+
network_name:
162
+
type: number
163
+
format: float
164
+
description: "network name db sync points to"
165
+
SystemTime:
166
+
type: object
167
+
properties:
168
+
secs_since_epoch:
169
+
type: integer
170
+
format: int32
171
+
description: seconds since epoch start represents date.
172
+
nanos_since_epoch:
173
+
type: integer
174
+
description: seconds since epoch start represents date.
0 commit comments