Skip to content

Commit 8de052e

Browse files
committed
Adjust accumulate STF vectors stuff
1 parent 08a443f commit 8de052e

File tree

61 files changed

+988
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+988
-497
lines changed

stf/accumulate/accumulate.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
ServiceInfo,
1313
ByteSequence,
1414
Privileges,
15-
ServicesStatistics
15+
ServicesStatistics,
16+
Vec,
17+
U32
1618
)
1719
from jam_types import class_name as n
1820

@@ -22,32 +24,41 @@ class AccumulateStorageMapEntry(Struct):
2224
('value', n(ByteSequence)),
2325
]
2426

25-
class AccumulatePreimagesMapEntry(Struct):
27+
class AccumulatePreimagesBlobMapEntry(Struct):
2628
type_mapping = [
2729
('hash', n(OpaqueHash)),
2830
('blob', n(ByteSequence)),
2931
]
3032

31-
class AccumulatePreimagesStatusMapEntry(Struct):
33+
class AccumulatePreimagesRequestsMapKey(Struct):
3234
type_mapping = [
3335
('hash', n(OpaqueHash)),
36+
('length', n(U32)),
37+
]
38+
39+
class AccumulatePreimagesRequestsMapEntry(Struct):
40+
type_mapping = [
41+
('key', n(AccumulatePreimagesRequestsMapKey)),
3442
('status', 'Vec<TimeSlot>')
3543
]
3644

37-
class AccumulateAccountMapData(Struct):
45+
class AccumulateServiceAccount(Struct):
3846
type_mapping = [
3947
('service', n(ServiceInfo)),
4048
('storage', 'Vec<AccumulateStorageMapEntry>'),
41-
('preimages_blob', 'Vec<AccumulatePreimagesMapEntry>'),
42-
('preimages_status', 'Vec<AccumulatePreimagesStatusMapEntry>')
49+
('preimage_blobs', 'Vec<AccumulatePreimagesBlobMapEntry>'),
50+
('preimage_requests', 'Vec<AccumulatePreimagesRequestsMapEntry>')
4351
]
4452

45-
class AccumulateAccountMapEntry(Struct):
53+
class AccumulateServiceAccountMapEntry(Struct):
4654
type_mapping = [
4755
('id', n(ServiceId)),
48-
('data', n(AccumulateAccountMapData))
56+
('data', n(AccumulateServiceAccount))
4957
]
5058

59+
class AccumulateServiceAccountMap(Vec):
60+
sub_type = n(AccumulateServiceAccountMapEntry)
61+
5162
class AccumulateState(Struct):
5263
type_mapping = [
5364
('slot', n(TimeSlot)),
@@ -56,7 +67,7 @@ class AccumulateState(Struct):
5667
('accumulated', n(AccumulatedQueue)),
5768
('privileges', n(Privileges)),
5869
('statistics', n(ServicesStatistics)),
59-
('accounts', 'Vec<AccumulateAccountMapEntry>'),
70+
('accounts', n(AccumulateServiceAccountMap))
6071
]
6172

6273
class AccumulateInput(Struct):

stf/accumulate/full/accumulate_ready_queued_reports-1.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain-1.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain-2.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain-3.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain-4.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain_wraps-1.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain_wraps-2.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain_wraps-3.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

stf/accumulate/full/enqueue_and_unlock_chain_wraps-4.json

Lines changed: 12 additions & 6 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)