Expose ClaimQueue via a runtime api and use it in collation-generation (#3580)

The PR adds two things:
1. Runtime API exposing the whole claim queue
2. Consumes the API in `collation-generation` to fetch the next
scheduled `ParaEntry` for an occupied core.

Related to https://github.com/paritytech/polkadot-sdk/issues/1797
This commit is contained in:
Tsvetomir Dimitrov
2024-03-20 08:55:58 +02:00
committed by GitHub
parent e659c4b3f7
commit e58e854a32
15 changed files with 532 additions and 52 deletions
+11
View File
@@ -177,6 +177,9 @@ where
self.requests_cache.cache_async_backing_params(relay_parent, params),
NodeFeatures(session_index, params) =>
self.requests_cache.cache_node_features(session_index, params),
ClaimQueue(relay_parent, sender) => {
self.requests_cache.cache_claim_queue(relay_parent, sender);
},
}
}
@@ -329,6 +332,8 @@ where
Some(Request::NodeFeatures(index, sender))
}
},
Request::ClaimQueue(sender) =>
query!(claim_queue(), sender).map(|sender| Request::ClaimQueue(sender)),
}
}
@@ -626,5 +631,11 @@ where
sender,
result = (index)
),
Request::ClaimQueue(sender) => query!(
ClaimQueue,
claim_queue(),
ver = Request::CLAIM_QUEUE_RUNTIME_REQUIREMENT,
sender
),
}
}