Skip to content

STF Vectors #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 242 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
d94bdc8
Blinding factor used to compute blinding nonce
davxy Jul 29, 2024
b954edf
Introduce offenders to the STF inputs
davxy Aug 8, 2024
02bf209
Disputes STF test vectors
davxy Aug 14, 2024
d5c1c39
Leave safrole alone here
davxy Aug 14, 2024
926e6c0
ASN.1 schema for disputes
davxy Aug 16, 2024
4dd16f4
Sequence of U8 are just OCTET STRING(s)
davxy Aug 16, 2024
921413c
Check constraints
davxy Aug 16, 2024
2a04e2c
Nit
davxy Aug 16, 2024
2f32cc2
Use OCTET STRING instead of SEQUENCE OF U8
davxy Aug 16, 2024
edc6a08
Use greek letters as per GP
davxy Aug 16, 2024
fb50df3
Add missing bits to state for signatures verification
davxy Aug 17, 2024
7fc4038
Rename vectors
davxy Aug 17, 2024
3008118
README
davxy Aug 17, 2024
8f7e9b5
README completed
davxy Aug 17, 2024
0c6c282
Improve README
davxy Aug 17, 2024
b2e2713
On error pre-state matches post-state
davxy Aug 18, 2024
2c8fb6b
Fix validation after vector name change
davxy Aug 18, 2024
a7ea6b9
For test vectors, set zk-rows to 0, as per spec
davxy Aug 20, 2024
673df81
Remove verdicts mark from output
davxy Aug 25, 2024
80d8be2
Test vectors
davxy Aug 25, 2024
e47b0df
Twak sequence of options for ASN.1 compliance
davxy Aug 25, 2024
04c2c14
Fix ASN.1 validation of case including sequence of options
davxy Aug 25, 2024
cac43c2
Use Keccak-256 for MMR
davxy Aug 26, 2024
bcc43b7
Fix doc
davxy Aug 26, 2024
ac7e31f
Fix MMR hash
davxy Aug 28, 2024
142fbf4
WorkReport requires at least one result
davxy Sep 3, 2024
2d71c3f
Add test for padded ring commitment
davxy Sep 24, 2024
53ab147
Add vectors with JAM compact codec
davxy Sep 24, 2024
695567a
Update ASN schema
davxy Sep 24, 2024
284ef4b
Fix link
davxy Sep 24, 2024
78f74a4
Add vectors with JAM compact integer codec
davxy Sep 24, 2024
6ef5ff8
Add vectors with JAM compact integer codec
davxy Sep 24, 2024
9e6aa03
Rename vector
davxy Sep 24, 2024
ed65fac
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Oct 15, 2024
ff5a107
Merge branch 'disputes' into polkajam-vectors
davxy Oct 15, 2024
30638fa
Merge branch 'blocks-history' into polkajam-vectors
davxy Oct 15, 2024
9bab1f7
README
davxy Oct 15, 2024
b9ba221
Merge branch 'blocks-history' into polkajam-vectors
davxy Oct 15, 2024
c2ab5c7
Remove old SCALE vectors
davxy Nov 4, 2024
aebb223
Remove old SCALE vectors
davxy Nov 4, 2024
58869d2
Reported work packages comes with the exported segment root
davxy Nov 4, 2024
f791dff
Remove old SCALE vectors
davxy Nov 4, 2024
205517f
Signatures change after alteration of opaque work dummy-work-report
davxy Nov 4, 2024
1fa652f
Update binary encoded files
davxy Nov 4, 2024
df36605
Update binary encoded files
davxy Nov 4, 2024
fdf9e9c
Merge branch 'blocks-history' into polkajam-vectors
davxy Nov 4, 2024
c1d27e6
Merge branch 'disputes' into polkajam-vectors
davxy Nov 4, 2024
1c80e4a
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Nov 4, 2024
2340a11
Tiny vectors
davxy Nov 16, 2024
cf9b936
README and vectors update
davxy Nov 16, 2024
fe16aad
README update
davxy Nov 16, 2024
2faa306
WARN
davxy Nov 16, 2024
c72baad
Update to 0.5
davxy Nov 16, 2024
b7a706f
Update
davxy Nov 16, 2024
7bf321f
Merge branch 'disputes' into polkajam-vectors
davxy Nov 18, 2024
b51a4e7
Merge branch 'blocks-history' into polkajam-vectors
davxy Nov 18, 2024
b9c8b4e
Merge branch 'codec-vectors-update' into polkajam-vectors
davxy Nov 18, 2024
54b3f0c
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Nov 18, 2024
df0c355
Merge branch 'work-reports' into polkajam-vectors
davxy Nov 18, 2024
0ee6d82
Full vectors
davxy Nov 18, 2024
ccc431e
Merge branch 'work-reports' into polkajam-vectors
davxy Nov 18, 2024
c86d442
Begin shared ASN.1 schema
davxy Nov 18, 2024
7744558
Codecs and history using common schema and utils
davxy Nov 18, 2024
a74939d
Use common code for history
davxy Nov 18, 2024
078db06
safrole is using shared asn.1 code
davxy Nov 18, 2024
22485a9
Allow for invalid attempt number
davxy Nov 18, 2024
af6e913
Begin reports schema definition
davxy Nov 18, 2024
132d7a2
General overhaul
davxy Nov 19, 2024
7dc0f5c
Reports ASN1 schema
davxy Nov 19, 2024
9f99153
Use common JAM ASN.1 types
davxy Nov 19, 2024
20c4809
Use common JAM ASN.1 types
davxy Nov 19, 2024
fb0c8ef
Use common JAM ASN.1 types
davxy Nov 19, 2024
643cb1d
Use common JAM ASN.1 types
davxy Nov 19, 2024
c30506c
All in one asn1 syntax file
davxy Nov 19, 2024
96666aa
All in one asn1 syntax file
davxy Nov 19, 2024
26e882b
All in one asn1 syntax file
davxy Nov 19, 2024
95b73ca
All in one asn1 syntax file
davxy Nov 19, 2024
e7ecc70
Add tickets entropy to epoch marker
davxy Nov 21, 2024
5191709
Add tickets entropy to epoch marker
davxy Nov 21, 2024
9ffd698
Add tickets entropy to epoch marker
davxy Nov 21, 2024
df18b31
Add tickets entropy to epoch marker
davxy Nov 21, 2024
fde23dd
Fix reported issues
davxy Nov 21, 2024
7e2c61d
Fix ASN.1
davxy Nov 21, 2024
e091053
Merge branch 'master' into safrole-ring-signatures-update
davxy Nov 21, 2024
1df9896
Remove dead code
davxy Nov 21, 2024
99fb959
Merge branch 'master' into blocks-history
davxy Nov 21, 2024
10f5122
Nit
davxy Nov 21, 2024
f44aefb
Merge branch 'master' into disputes
davxy Nov 21, 2024
bfd9cf3
Merge branch 'master' into work-reports
davxy Nov 21, 2024
eddd7f9
Pick jam-types-asn from master
davxy Nov 22, 2024
bcfcce4
Merge branch 'master' into polkajam-vectors
davxy Nov 22, 2024
fe46d60
Merge branch 'blocks-history' into polkajam-vectors
davxy Nov 22, 2024
8303360
Merge branch 'disputes' into polkajam-vectors
davxy Nov 22, 2024
43561e3
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Nov 22, 2024
43bc4b4
Merge branch 'work-reports' into polkajam-vectors
davxy Nov 22, 2024
de1d5aa
Update README
davxy Nov 25, 2024
01b3f9d
Explicit GP symbols in ASN1 schema
davxy Nov 25, 2024
4a14a19
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Nov 25, 2024
5b9e74e
Explicit GP symbols in ASN1 schema
davxy Nov 25, 2024
b40d625
Merge branch 'disputes' into polkajam-vectors
davxy Nov 25, 2024
db2bb40
Explicit GP symbols in ASN1 schema
davxy Nov 25, 2024
4cd28a9
Merge branch 'blocks-history' into polkajam-vectors
davxy Nov 25, 2024
be4b014
Improve ASN1 schema
davxy Nov 25, 2024
d10987d
README
davxy Nov 25, 2024
bd352a1
Move entropy and offenders to state
davxy Nov 25, 2024
686a850
Merge branch 'work-reports' into polkajam-vectors
davxy Nov 25, 2024
aeb976f
Move posterior offenders list to state
davxy Nov 25, 2024
d4a7c87
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Nov 25, 2024
379c503
- Rotation period for full set to 10 (was 4)
davxy Nov 28, 2024
318c737
README update with explicit rotation period
davxy Nov 28, 2024
ae8c5b0
Merge branch 'work-reports' into polkajam-vectors
davxy Nov 29, 2024
2d4e4f4
Update safrole.asn
xDimon Nov 29, 2024
0fa0840
Increase attempts per validator to 3 for tiny
davxy Nov 30, 2024
0867291
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Nov 30, 2024
86106e8
Schema
davxy Dec 2, 2024
9cae0a6
Tiny
davxy Dec 2, 2024
39cff81
Full
davxy Dec 2, 2024
d089a64
Fix
davxy Dec 2, 2024
3b76ab7
ASN1 validation works
davxy Dec 2, 2024
835560c
Update README
davxy Dec 2, 2024
d47eeea
Fix docs
davxy Dec 2, 2024
973f041
Merge branch 'assurances' into polkajam-vectors
davxy Dec 2, 2024
730f919
README update
davxy Dec 2, 2024
f399076
Merge branch 'work-reports' into polkajam-vectors
davxy Dec 2, 2024
e5ab869
Merge pull request #2 from xDimon/patch-1
davxy Dec 2, 2024
287862b
Update safrole.asn
xDimon Nov 29, 2024
a4b431b
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Dec 2, 2024
4690180
Post offenders sequence must match prior one
davxy Dec 2, 2024
dfd0d0e
Same for full
davxy Dec 2, 2024
f2b9511
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Dec 2, 2024
9407a72
Update ark-ec-vrfs rev
davxy Dec 4, 2024
25aaedc
Tiny tickets limit set to 3
davxy Dec 4, 2024
5385316
Full tickets fix
davxy Dec 4, 2024
b06f7cd
Align asn1 syntax
davxy Dec 4, 2024
610b742
Statistics vectors
davxy Dec 5, 2024
8fc8404
Merge branch 'safrole-ring-signatures-update' into polkajam-vectors
davxy Dec 5, 2024
3f7ffac
Merge branch 'statistics' into polkajam-vectors
davxy Dec 5, 2024
a3ccb8d
Statistics STF vectors
davxy Dec 5, 2024
b789300
Update README
davxy Dec 5, 2024
67bd2f9
Missing Statistics definition in ASN1 types
davxy Dec 5, 2024
eb8e2db
Merge branch 'statistics' into polkajam-vectors
davxy Dec 5, 2024
c08d0ff
Not sorted or unique assurances
davxy Dec 6, 2024
64a7117
Merge branch 'assurances' into polkajam-vectors
davxy Dec 6, 2024
1fce96e
Merge branch 'codec-update' into polkajam-vectors
davxy Dec 7, 2024
86b1e00
GP 0.5.2 - Assurances STF vectors update
davxy Dec 7, 2024
2ce0576
Merge branch 'master' into polkajam-vectors
davxy Dec 8, 2024
2737ae4
Include protocol version
davxy Dec 8, 2024
78ef799
reports: fix beefy root
davxy Dec 8, 2024
82b5418
assurances: proactive removal of stale reports (GP 0.5.2)
davxy Dec 8, 2024
88bec12
disputes: align new gas naming
davxy Dec 8, 2024
8a6c01c
reports: add missing test to readme
davxy Dec 8, 2024
1db626e
README update
davxy Dec 9, 2024
2028209
Be more explicit about state items semantics
davxy Dec 9, 2024
e821f29
Big work report output vectors
davxy Dec 11, 2024
729592c
Auth pools are not mutated by reports STF
davxy Dec 11, 2024
1c5211f
Auth pools are not mutated (full)
davxy Dec 11, 2024
b059bc7
reports: add new error code to asn1
davxy Dec 11, 2024
e6238ba
Add tickets_per_validator constant
xDimon Dec 13, 2024
a1a8490
Merge pull request #4 from xDimon/tickets_per_validator
davxy Dec 13, 2024
ba4293c
Authorizations STF vectors
davxy Dec 13, 2024
79389b5
ASN.1 schema and validation
davxy Dec 13, 2024
86cdcdd
README update
davxy Dec 13, 2024
71471d7
README update
davxy Dec 13, 2024
0e78675
Merge pull request #5 from davxy/authorizations-stf-vectors
davxy Dec 13, 2024
12505a1
statistics: remove reporters from input
davxy Dec 16, 2024
2a58a11
safrole: restore tickets order
davxy Dec 17, 2024
4456b9c
First pass
davxy Dec 20, 2024
ae7bedf
Add bad-export variant to WorkError
davxy Dec 22, 2024
2e0c424
Merge pull request #8 from davxy/preimages-vectors
davxy Dec 23, 2024
a53c74e
Skeleton
davxy Jan 2, 2025
00ca6c5
Tiny
davxy Jan 2, 2025
c7d8dbe
Full
davxy Jan 2, 2025
54225ea
README
davxy Jan 2, 2025
d516c43
Add test service
davxy Jan 2, 2025
5883752
Nit
davxy Jan 2, 2025
caecad8
Update GP revision
davxy Jan 29, 2025
cbaa3fc
Regen
davxy Feb 3, 2025
b7ba390
Reports vectors update after mmr root token fix
davxy Feb 3, 2025
bcf7ecb
Available work reports sorted by core index
davxy Feb 3, 2025
1564dcf
Bump GP version to 0.6.1
davxy Feb 3, 2025
a503a63
Merge branch 'polkajam-vectors' into accumulate-stf
davxy Feb 3, 2025
0069ef1
Merge pull request #10 from davxy/accumulate-stf
davxy Feb 4, 2025
c4ab447
Consistent accounts data
davxy Feb 4, 2025
58e1124
Preimages ASN1
davxy Feb 4, 2025
0c987a6
Reports ASN1 fix
davxy Feb 4, 2025
267c0f6
Accumulate ASN1 schema
davxy Feb 4, 2025
20061d4
Merge pull request #12 from davxy/consistent-accounts-data
davxy Feb 5, 2025
af94b95
Fix self referential test case
davxy Feb 5, 2025
562f11d
Align to jam-pvm-common 0.1.12
davxy Feb 5, 2025
875a98a
Accumulate README
davxy Feb 5, 2025
ac013b0
Merge pull request #13 from davxy/fix-accumulate-vectors
davxy Feb 5, 2025
dd92193
README improvements
davxy Feb 5, 2025
123218c
Preimages vectors brief description
davxy Feb 5, 2025
553ba30
Merge pull request #14 from davxy/improve-readme
davxy Feb 5, 2025
529f0ed
Explicit reports note about auth-pools management
davxy Feb 11, 2025
f346074
Preimages order check vectors
davxy Feb 12, 2025
4c37026
Fix ASN1
davxy Feb 12, 2025
01e036c
Merge pull request #20 from davxy/preimages-order-check
davxy Feb 12, 2025
e3cc45e
New vectors
davxy Mar 4, 2025
e607618
README
davxy Mar 5, 2025
9204d09
Merge pull request #26 from davxy/accumulate-new-vectors
davxy Mar 5, 2025
6e56c75
Update tiny
davxy Mar 5, 2025
14c057c
Merge branch 'w3f:master' into polkajam-vectors
davxy Mar 5, 2025
23c2337
Update full
davxy Mar 5, 2025
9fa0333
README
davxy Mar 5, 2025
960728f
ASN1 update
davxy Mar 5, 2025
038bd89
Merge pull request #27 from davxy/gp-0.6.3
davxy Mar 5, 2025
39c40dc
Update codec vectors
davxy Mar 20, 2025
280f060
Update accumulate tiny
davxy Mar 20, 2025
2bde128
Update assurances tiny
davxy Mar 20, 2025
1b0b1b0
Update disputes tiny
davxy Mar 20, 2025
faf0742
Update safrole tiny
davxy Mar 20, 2025
5290a37
Reports tiny
davxy Mar 21, 2025
acde36b
Statistics tiny
davxy Mar 21, 2025
3cf5bb2
Align full vectors
davxy Mar 21, 2025
a5e75f6
Bump version
davxy Mar 21, 2025
776f16c
Codec
davxy Mar 21, 2025
ea29b2e
Include ed25519 in epoch marker
davxy Mar 21, 2025
24758cc
Align ASN.1 types for codec
davxy Mar 21, 2025
d157968
Statistics ASN1
davxy Mar 22, 2025
6e162b4
Reports ASN1
davxy Mar 22, 2025
0b841c1
Reports ASN1 update
davxy Mar 22, 2025
dea7eef
Merge pull request #30 from davxy/gp-0.6.4
davxy Mar 22, 2025
3bcccba
Update Safrole README.md
davxy Mar 22, 2025
fb3ce3f
Nit
davxy Mar 22, 2025
55b5950
Fix: Validator stats are not compact
davxy Mar 24, 2025
b2478c4
Update Safrole README
davxy Mar 29, 2025
40589ba
Scale gas for tiny
davxy Mar 31, 2025
615bf6a
Fix stats items order
davxy Apr 4, 2025
1794bbd
ASN1 update
davxy Apr 4, 2025
bf97f6f
Use gas alias consistently
davxy Apr 4, 2025
6db01a5
Merge pull request #36 from davxy/use-gas-alias
davxy Apr 4, 2025
a8696a8
Merge branch 'polkajam-vectors' into fix-stats-order
davxy Apr 7, 2025
c19e139
Merge pull request #35 from davxy/fix-stats-order
davxy Apr 7, 2025
1c6f27b
Remove error ambiguity from bad signature vectors
davxy Apr 7, 2025
211aae5
Invalid keys vectors
davxy Apr 7, 2025
5d05b62
Align ASN.1 to new error variants
davxy Apr 7, 2025
3356ab0
README
davxy Apr 7, 2025
26df4cc
Merge pull request #38 from davxy/improve-disputes-vectors
davxy Apr 7, 2025
5e772bb
Update vectors
davxy Apr 7, 2025
394a155
One extra vector
davxy Apr 7, 2025
5236b05
Merge pull request #6 from davxy/fix-state-to-build-prev-reported-pac…
davxy Apr 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
# Test Vectors for the JAM Protocol

## Index
JAM protocol version 0.6.4

## Codec

- [Codec](./codec/README.md)

## State Transition Functions

We offer two types of test vectors:

- **Tiny**: designed for quick adjustments and prototyping, with reduced
- validators count: 6
- cores count: 2
- epoch period: 12
- core assignment rotation period: 4
- ticket attempts: 3

- **Full**: vectors with production specs
- validators count: 1023
- cores count: 341
- epoch period: 600
- core assignment rotation period: 10
- ticket attempts: 2

### STF Output

Technically, the STF execution process does not inherently produce auxiliary
outputs beyond the success or failure result. In this context, we propose
an extension to include additional information that may be beneficial for
implementors or useful for executing other subsystems reliant on values
generated post-STF execution.

When the error or success values are not pertinent to your test vector
processing procedures, you may disregard them as necessary.

A mapping of error code semantics is provided within the ASN.1 schema for each
specific subsystem.

### Vectors

- [Safrole](./safrole/README.md)
- [Disputes](./disputes/README.md)
- [History](./history/README.md)
- [Assurances](./assurances/README.md)
- [Reports](./reports/README.md)
- [Statistics](./statistics/README.md)
- [Authorizations](./authorizations/README.md)
- [Preimages](./preimages/README.md)
- [Accumulate](./accumulate/README.md)
86 changes: 86 additions & 0 deletions accumulate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Accumulate STF Test Vectors

Both JSON and SCALE formats conform to the JAM ASN.1 [schema](../jam-types-asn/jam-types.asn)
and this subsystem STF specific [schema](./accumulate.asn).

## Test Service Code

Test vectors invoke the `accumulate` method of the provided [test-service](./test-service).

The PVM binary, which refers to the compiled version of the `test-service`, is
generated using the [`jam-pvm-build`](https://crates.io/crates/jam-pvm-build)
tool.

Due to differences in dependencies and compiler versions, the resulting binary
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use version locking here for reproducible builds?

artifact frequently varies, even when generated from identical source code. As
a result, you can just rely on the code blob embedded in the test vectors, which
is available within the `accounts` map.

## Tiny Vectors

- [no_available_reports-1](./tiny/no_available_reports-1.json)
- No reports.
- [process_one_immediate_report-1](./tiny/process_one_immediate_report-1.json)
- Report with no dependencies.
- [enqueue_and_unlock_simple-1](./tiny/enqueue_and_unlock_simple-1.json)
- Report with unsatisfied dependency added to the ready-queue.
- [enqueue_and_unlock_simple-2](./tiny/enqueue_and_unlock_simple-2.json)
- Report with no dependencies that resolves previous dependency.
- [enqueue_and_unlock_with_sr_lookup-1](./tiny/enqueue_and_unlock_with_sr_lookup-1.json)
- Report with unsatisfied segment tree root dependency added to the ready-queue.
- [enqueue_and_unlock_with_sr_lookup-2](./tiny/enqueue_and_unlock_with_sr_lookup-2.json)
- Report with no dependencies that resolves previous dependency.
- [enqueue_and_unlock_chain-1](./tiny/enqueue_and_unlock_chain-1.json)
- Two reports with unsatisfied dependencies added to the ready-queue.
- [enqueue_and_unlock_chain-2](./tiny/enqueue_and_unlock_chain-2.json)
- Two additional reports with unsatisfied dependencies added to the ready-queue.
- [enqueue_and_unlock_chain-3](./tiny/enqueue_and_unlock_chain-3.json)
- Two additional reports. One with unsatisfied dependencies, thus added to the ready-queue.
- One report is accumulated and resolves two previously enqueued reports.
- [enqueue_and_unlock_chain-4](./tiny/enqueue_and_unlock_chain-4.json)
- Report that resolves all remaining queued dependencies.
- [enqueue_and_unlock_chain_wraps-1](./tiny/enqueue_and_unlock_chain_wraps-1.json)
- Two reports with unsatisfied dependencies added to the ready-queue.
- [enqueue_and_unlock_chain_wraps-2](./tiny/enqueue_and_unlock_chain_wraps-2.json)
- Two additional reports, one with no dependencies and thus immediately accumulated.
- The other is pushed to the ready-queue which fills up and wraps around
(ready-queue is a ring buffer).
- [enqueue_and_unlock_chain_wraps-3](./tiny/enqueue_and_unlock_chain_wraps-3.json)
- Two additional reports with unsatisfied dependencies pushed to the ready-queue.
- [enqueue_and_unlock_chain_wraps-4](./tiny/enqueue_and_unlock_chain_wraps-4.json)
- Two additional reports, one with no dependencies and thus immediately accumulated.
- Three old entries in the ready-queue are removed.
- [enqueue_and_unlock_chain_wraps-5](./tiny/enqueue_and_unlock_chain_wraps-5.json)
- Report with no dependencies resolves all previous enqueued reports.
- [enqueue_self_referential-1](./tiny/enqueue_self_referential-1.json)
- Report with direct dependency on itself.
- This makes the report stale, but pushed to the ready-queue anyway.
- [enqueue_self_referential-2](./tiny/enqueue_self_referential-2.json)
- Two reports with indirect circular dependency.
- This makes the reports stale, but pushed to the ready-queue anyway.
- [enqueue_self_referential-3](./tiny/enqueue_self_referential-3.json)
- Two reports. First depends on second, which depends on unseen report.
- [enqueue_self_referential-4](./tiny/enqueue_self_referential-4.json)
- New report creates a cycle with the previously queued reports.
- This makes the reports stale, but pushed to the ready-queue anyway.
- [accumulate_ready_queued_reports-1](./tiny/accumulate_ready_queued_reports-1.json)
- There are some reports in the ready-queue ready to be accumulated.
- Even though we don't supply any new available work report these are processed.
- This condition may result because of gas exhausition during previous block execution.
- [queues_are_shifted-1](./tiny/queues_are_shifted-1.json)
- Check that ready-queue and accumulated-reports queues are shifted.
- A new available report is supplied.
- [queues_are_shifted-2](./tiny/queues_are_shifted-2.json)
- Check that ready-queue and accumulated-reports queues are shifted.
- No new report is supplied.
- [ready_queue_editing-1](./tiny/ready_queue_editing-1.json)
- Two reports with unsatisfied dependencies added to the ready-queue.
- [ready_queue_editing-2](./tiny/ready_queue_editing-2.json)
- Two reports, one with unsatisfied dependency added to the ready-queue.
- One accumulated. Ready queue items dependencies are edited.
- [ready_queue_editing-3](./tiny/ready_queue_editing-3.json)
- One report unlocks reports in the ready-queue.

## Full Vectors

Currently, the same test cases as tiny vectors but at a larger scale.
57 changes: 57 additions & 0 deletions accumulate/accumulate.asn
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
-- Accumulate STF test vectors schema

AccumulateModule DEFINITIONS ::= BEGIN

IMPORTS
TimeSlot, ServiceId, ServiceInfo, WorkReport, OpaqueHash, ByteSequence,
Entropy, ReadyQueue, AccumulatedQueue, Privileges, AccumulateRoot
FROM JamTypes;


PreimagesMapEntry ::= SEQUENCE {
hash OpaqueHash,
blob ByteSequence
}

-- Service account information relevant for this STF.
Account ::= SEQUENCE {
-- [a_c, a_b, a_g, a_m, a_o, a_i] Service metadata.
service ServiceInfo,
--[a_p] Preimages blobs.
preimages SEQUENCE OF PreimagesMapEntry
}

AccountsMapEntry ::= SEQUENCE {
id ServiceId,
data Account
}

State ::= SEQUENCE {
slot TimeSlot,
entropy Entropy,
ready-queue ReadyQueue,
accumulated AccumulatedQueue,
privileges Privileges,
-- [δ] Relevant services account data. Refer to T(σ) in GP Appendix D.
accounts SEQUENCE OF AccountsMapEntry
}

Input ::= SEQUENCE {
-- [H_t] Block's timeslot.
slot TimeSlot,
reports SEQUENCE OF WorkReport
}

Output ::= CHOICE {
ok AccumulateRoot,
err NULL
}

TestCase ::= SEQUENCE {
input Input,
pre-state State,
output Output,
post-state State
}

END
Binary file not shown.
Loading