Skip to content

Conversation

@tlovell-sxt
Copy link
Contributor

Rationale for this change

Currently, submissions storage is keyed from the data hash to the accounts, rather than keyed from an account to data hash. This design choice makes it possible for submitters to disagree with themselves, and input an unbounded number of unique submissions for the same batch id.

The solution for this is to change the map from being..

BatchId -> DataHash -> QuorumScope -> [AccountId]

to...

BatchId -> QuorumScope -> AccountId -> DataHash

This change adds a new piece of storage SubmissionsV1 to reflect that second mapping, and switches the pallet-indexing logic over to using it. No data migration is provided, since submissions are fairly disposable in practice. A future PR will handle clearing out the old submissions (and even pruning the new submissions).

What changes are included in this PR?

  • feat: reorganize submissions-finding-quorum storage with SubmissionsV1
  • fix: update pallet-indexing weights

Are these changes tested?

Yes.

Currently, submissions storage is keyed from the data hash to the
accounts, rather than keyed from an account to data hash. This design
choice makes it possible for submitters to disagree with themselves,
and input an unbounded number of unique submissions for the same batch
id.

The solution for this is to change the map from being..
```
BatchId -> DataHash -> QuorumScope -> [AccountId]
```

to...
```
BatchId -> QuorumScope -> AccountId -> DataHash
```

This change adds a new piece of storage SubmissionsV1 to reflect that
second mapping, and switches the pallet-indexing logic over to using it.
No data migration is provided, since submissions are fairly disposable
in practice. A future PR will handle clearing out the old submissions
(and even pruning the new submissions).
Recent changes have been made that switch pallet-indexing to using a
newer form of submissions storage to find quorum. This change
re-benchmarks the weights (which didn't really change much).
@tlovell-sxt tlovell-sxt requested review from a team as code owners December 5, 2025 01:20
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

1.48.0

Bug Fixes

  • update pallet-indexing weights (143d138

Features

  • reorganize submissions-finding-quorum storage with SubmissionsV1 (b86d3ca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants