Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
haikoschol committed Dec 16, 2024
1 parent dd1ebdf commit 5ec9c39
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/docs/design/bitfield-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ use it in `DistributeBitfield`.

2. [`AvailabilityStore::QueryChunkAvailability(CandidateHash, ValidatorIndex, response_channel)`](https://github.com/paritytech/polkadot-sdk/blob/1e3b8e1639c1cf784eabf0a9afcab1f3987e0ca4/polkadot/node/subsystem-types/src/messages.rs#L556)

This type is already defined as `availabilitystore.QueryChunkAvailability` in
This message is sent once for each occupied core, whenever the subsystem is notified of a new active leaf.

The type is already defined as `availabilitystore.QueryChunkAvailability` in
`dot/parachain/availability-store/messages.go`.

## Subsystem State
Expand Down Expand Up @@ -72,6 +74,10 @@ type BitfieldSigning struct {
}
```

Ideally the implementation should avoid lock contention around the keystore. Since the signing key remains the same for
the duration of the signing task, the subsystem could pass in the key pair or just the private key. The implementer
should double-check that this approach is thread-safe.

Again, this should probably use a (to be created) type `CheckedSignedAvailabilityBitfield`.

## Message Handling Logic
Expand All @@ -91,6 +97,4 @@ for the given leaf from the runtime.
3. For each core, concurrently check whether the core is occupied and if so, query the availability store using
`QueryChunkAvailability`.

4. Collect the results of the queries into a bitfield, sign it and send it to the subsystem.

5. In the subsystem, receive the signed bitfield and send a `DistributeBitfield` message to the overseer.
4. Collect the results of the queries into a bitfield, sign it and send a `DistributeBitfield` message to the overseer.

0 comments on commit 5ec9c39

Please sign in to comment.