Skip to content

Commit 7e2cf04

Browse files
committed
Better docs for accumulate and reports stats
1 parent f081f57 commit 7e2cf04

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

accumulate/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ artifact frequently varies, even when generated from identical source code. As
1616
a result, you can just rely on the code blob embedded in the test vectors, which
1717
is available within the `accounts` map.
1818

19+
## Statistics
20+
21+
A subset of service activity statistics ($π_S$) updated by the STF subsystem used
22+
to process these test vectors.
23+
24+
In particular the `accumulate-count` (a.0), `accumulate-gas-used` (a.1),
25+
`on-transfers-count` (t.0) and `on-transfers-gas-used` (t.1).
26+
1927
## Tiny Vectors
2028

2129
- [no_available_reports-1](./tiny/no_available_reports-1.json)

accumulate/accumulate.asn

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,29 @@ AccountsMapEntry ::= SEQUENCE {
3939
}
4040

4141
State ::= SEQUENCE {
42+
-- [τ] Most recent block's timeslot.
4243
slot TimeSlot,
44+
-- [n_0'] Posterior entropy accumulator.
4345
entropy Entropy,
46+
-- [ϑ] Work packages ready to be accumulated.
4447
ready-queue ReadyQueue,
48+
-- [ξ] Work packages recently accumulated.
4549
accumulated AccumulatedQueue,
50+
-- [χ] Privileged service indices.
4651
privileges Privileges,
52+
-- [π_S] Services statistics.
53+
-- Note: Only stats related to accumulate STF are updated, in particular:
54+
-- accumulate_count (a.0), accumulate_gas_used (a.1),
55+
-- on_transfers_count (t.0), on_transfers_gas_used (t.1)
4756
statistics ServicesStatistics,
4857
-- [δ] Relevant services account data. Refer to T(σ) in GP Appendix D.
4958
accounts SEQUENCE OF AccountsMapEntry
5059
}
5160

5261
Input ::= SEQUENCE {
53-
-- [H_t] Block's timeslot.
62+
-- [H_t] Current time slot as found within the block header.
5463
slot TimeSlot,
64+
-- Newly available work reports (W).
5565
reports SEQUENCE OF WorkReport
5666
}
5767

reports/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ Any update to the pools is delegated to the dedicated ["authorizations"](../auth
1212
subsystem, which is tasked with removing consumed items from the authorization
1313
pools and introduce new authorizers from the authorization queue.
1414

15+
## Statistics
16+
17+
A subset of service ($π_S$) and core ($π_S$) activity statistics updated by the
18+
STF subsystem used to process these test vectors.
19+
20+
In particular, for cores statistics we may update imports (i), exports (e),
21+
extrinsic_size (z), extrinsic_count (x), bundle_size (b), gas_used (u).
22+
For services statistics we may update refinement_count (r.0), refinement_gas_used (r.1),
23+
imports (i), exports (x), extrinsic_size (z), extrinsic_count (x).
24+
1525
## Tiny Vectors
1626

1727
- [report_curr_rotation](./tiny/report_curr_rotation-1.json) 🟢

reports/reports.asn

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,16 @@ State ::= SEQUENCE {
5151
-- [δ] Relevant services account data. Refer to T(σ) in GP Appendix D.
5252
accounts SEQUENCE OF AccountsMapEntry,
5353

54-
-- Cores statistics.
54+
-- [π_C] Cores statistics.
55+
-- Note: Only stats related to reports STF are updated, in particular:
56+
-- imports (i), exports (e), extrinsic_size (z), extrinsic_count (x),
57+
-- bundle_size (b), gas_used (u).
5558
cores-statistics CoresStatistics,
5659

57-
-- Services statistics.
60+
-- [π_S] Services statistics.
61+
-- Note: Only stats related to reports STF are updated, in particular:
62+
-- refinement_count (r.0), refinement_gas_used (r.1), imports (i),
63+
-- exports (x), extrinsic_size (z), extrinsic_count (x).
5864
services-statistics ServicesStatistics
5965
}
6066

statistics/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ These vectors exclusively contribute to updating validator-related statistics
1010

1111
In contrast, service and core statistics ($π_S$ and $π_C$) are updated by
1212
vectors that more directly influence the state changes relevant to those
13-
metrics (i.e. see [preimages](../preimages/README.md#statistics), `reports` and `accumulate`).
13+
metrics (i.e. see [preimages](../preimages/README.md#statistics),
14+
[reports](../reports/README.md#statistics) and
15+
[accumulate](../accumulate/README.md#statistics)).
1416

1517
## ⚠️Extrinsic Semantic Validity
1618

0 commit comments

Comments
 (0)