mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 06:31:09 +00:00
Replace StartWork and StopWork with an ActiveLeavesUpdate signal (#1431)
This commit is contained in:
committed by
GitHub
parent
42ddcada02
commit
5be366d6dc
@@ -29,10 +29,11 @@ Input: [`AvailabilityStoreMessage`](../../types/overseer-protocol.md#availabilit
|
||||
|
||||
## Functionality
|
||||
|
||||
On `StartWork`:
|
||||
On `ActiveLeavesUpdate`:
|
||||
|
||||
- Note any new candidates backed in the block. Update pruning records for any stored `PoVBlock`s.
|
||||
- Note any newly-included candidates backed in the block. Update pruning records for any stored availability chunks.
|
||||
For each head in the `activated` list:
|
||||
- Note any new candidates backed in the block. Update pruning records for any stored `PoVBlock`s.
|
||||
- Note any newly-included candidates backed in the block. Update pruning records for any stored availability chunks.
|
||||
|
||||
On block finality events:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ There are two types of network messages this sends and receives:
|
||||
- ProtocolMessage(ProtocolId, Bytes)
|
||||
- ViewUpdate(View)
|
||||
|
||||
`StartWork` and `StopWork` determine the computation of our local view. A `ViewUpdate` is issued to each connected peer, and a `NetworkBridgeUpdate::OurViewChange` is issued for each registered event producer.
|
||||
`ActiveLeavesUpdate`'s `activated` and `deactivated` lists determine the evolution of our local view over time. A `ViewUpdate` is issued to each connected peer after each update, and a `NetworkBridgeUpdate::OurViewChange` is issued for each registered event producer.
|
||||
|
||||
On `RegisterEventProducer`:
|
||||
|
||||
|
||||
@@ -50,8 +50,12 @@ The subsystem should maintain a set of handles to Block Authorship Provisioning
|
||||
|
||||
### On Overseer Signal
|
||||
|
||||
- `StartWork`: spawn a Block Authorship Provisioning Job with the given relay parent, storing a bidirectional channel with that job.
|
||||
- `StopWork`: terminate the Block Authorship Provisioning Job for the given relay parent, if any.
|
||||
- `ActiveLeavesUpdate`:
|
||||
- For each `activated` head:
|
||||
- spawn a Block Authorship Provisioning Job with the given relay parent, storing a bidirectional channel with that job.
|
||||
- For each `deactivated` head:
|
||||
- terminate the Block Authorship Provisioning Job for the given relay parent, if any.
|
||||
- `Conclude`: Forward `Conclude` to all jobs, waiting a small amount of time for them to join, and then hard-exiting.
|
||||
|
||||
### On `ProvisionerMessage`
|
||||
|
||||
|
||||
@@ -16,4 +16,4 @@ On receipt of `RuntimeApiMessage::Request(relay_parent, request)`, answer the re
|
||||
|
||||
## Jobs
|
||||
|
||||
> TODO Don't limit requests based on parent hash, but limit caching. No caching should be done for any requests on relay_parents that are not live based on `StartWork` or `StopWork` messages. Maybe with some leeway for things that have just been stopped.
|
||||
> TODO Don't limit requests based on parent hash, but limit caching. No caching should be done for any requests on relay_parents that are not active based on `ActiveLeavesUpdate` messages. Maybe with some leeway for things that have just been stopped.
|
||||
|
||||
Reference in New Issue
Block a user