-
Notifications
You must be signed in to change notification settings - Fork 7
/
subvt_report_service.yml
225 lines (225 loc) · 6.8 KB
/
subvt_report_service.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
swagger: "2.0"
info:
description: "SubVT report service endpoints."
version: "0.1.0"
title: "SubVT Report Service"
termsOfService: "https://subvt-test.helikon.io"
contact:
email: "[email protected]"
license:
name: "GPL-3.0"
url: "https://www.gnu.org/licenses/gpl-3.0.en.html"
host: "78.181.100.160:17777"
basePath: "/report"
tags:
- name: "era"
description: "Single or multiple era reports."
- name: "validator"
description: "Single or multiple era-validator reports."
schemes:
- "http"
paths:
/era:
get:
tags:
- "era"
summary: "Get era(s) report"
description: "Get era report for a single era or a range of eras."
produces:
- "application/json"
operationId: "getEraReport"
parameters:
- name: "start_era_index"
in: "query"
description: "Index of the report start era."
required: true
type: "integer"
format: "int32"
minimum: 1
- name: "end_era_index"
in: "query"
description: "Index of the report end era. Report is generated for single era if this field is null."
required: false
type: "integer"
format: "int32"
responses:
"200":
description: "Operation successful"
schema:
type: "array"
items:
$ref: "#/definitions/EraReport"
"400":
description: "Bad request"
schema:
$ref: "#/definitions/Error"
"500":
description: "Internal server error"
schema:
$ref: "#/definitions/Error"
/validator/{account_id_hex}:
get:
tags:
- "validator"
summary: "Get validator report for era(s)"
description: "Get validator report over a single era or a range of eras."
produces:
- "application/json"
operationId: "getValidatorReport"
parameters:
- name: "account_id_hex"
in: "path"
description: "Hex-encoded 32-byte account id of the validator, 0x-prefixed or not."
required: true
type: "string"
- name: "start_era_index"
in: "query"
description: "Index of the report start era."
required: true
type: "integer"
format: "int32"
minimum: 1
- name: "end_era_index"
in: "query"
description: "Index of the report end era (inclusive). Report is generated for single era if this field is null."
required: false
type: "integer"
format: "int32"
responses:
"200":
description: "Operation successful"
schema:
type: "array"
items:
$ref: "#/definitions/EraValidatorReport"
"400":
description: "Bad request"
schema:
$ref: "#/definitions/Error"
"500":
description: "Internal server error"
schema:
$ref: "#/definitions/Error"
definitions:
Era:
type: "object"
properties:
index:
type: "integer"
format: "int64"
start_timestamp:
type: "integer"
format: "int64"
description: "Era start timestamp in milliseconds."
end_timestamp:
type: "integer"
format: "int64"
description: "Era end timestamp in milliseconds."
EraReport:
type: "object"
properties:
era:
$ref: "#/definitions/Era"
minimum_stake:
type: "integer"
format: "int64"
description: "Minimum stake backing a validator."
maximum_stake:
type: "integer"
format: "int64"
description: "Maximum stake backing a validator."
average_stake:
type: "integer"
format: "int64"
description: "Average of stakes backing all validators."
median_stake:
type: "integer"
format: "int64"
description: "Median of stakes backing all validators."
total_validator_reward:
type: "integer"
format: "int64"
description: "Total reward distributed to the validators in era."
total_reward_points:
type: "integer"
format: "int64"
description: "Total reward points earned in era by active validators."
total_reward:
type: "integer"
format: "int64"
description: "Total rewards distributed in era in native currency."
total_stake:
type: "integer"
format: "int64"
description: "Total amount staked by nominators/validators in era."
active_nominator_count:
type: "integer"
format: "int64"
description: "Number of active nominators in era."
offline_offence_count:
type: "integer"
format: "int64"
description: "Number of offline offences committed by the active validators in era."
slashed_amount:
type: "integer"
format: "int64"
description: "Total slashed amount in era."
chilling_count:
type: "integer"
format: "int64"
description: "Number of validator chilling events in era."
EraValidatorReport:
type: "object"
properties:
era:
$ref: "#/definitions/Era"
is_active:
type: "boolean"
description: "Whether the validator was active in era."
commission_per_billion:
type: "integer"
format: "int64"
description: "Validator commission per billion in era."
self_stake:
type: "integer"
format: "int64"
description: "Self stake of the validator in era."
total_stake:
type: "integer"
format: "int64"
description: "Total active stake of the validator in era."
block_count:
type: "integer"
format: "int64"
description: "Number of blocks authored by the validator in era."
reward_points:
type: "integer"
format: "int64"
description: "Reward points earned by the validator in era."
self_reward:
type: "integer"
format: "int64"
description: "Total amount earned by the validator in native token in era."
staker_reward:
type: "integer"
format: "int64"
description: "Total amount distributed to stakers in era."
offline_offence_count:
type: "integer"
format: "int64"
description: "Number of offline offences committed by the validator in era."
slashed_amount:
type: "integer"
format: "int64"
description: "Amount slashed from the validator in era."
chilling_count:
type: "integer"
format: "int64"
description: "Number of chilling events for the validator in era."
Error:
type: "object"
required: [ "description" ]
properties:
description:
type: "string"
description: "Error description."