mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Create issues for all TODOs/FIXMEs (#224)
* network and validation * remainder of todos * ref new issue * change issue number
This commit is contained in:
committed by
Robert Habermeier
parent
33df0a4adf
commit
2bbfa0ae98
@@ -64,7 +64,7 @@ pub trait Worker: IntoExit {
|
||||
|
||||
/// Return configuration for the polkadot node.
|
||||
// TODO: make this the full configuration, so embedded nodes don't need
|
||||
// string CLI args
|
||||
// string CLI args (https://github.com/paritytech/polkadot/issues/111)
|
||||
fn configuration(&self) -> service::CustomConfiguration { Default::default() }
|
||||
|
||||
/// Do work and schedule exit.
|
||||
|
||||
@@ -184,7 +184,7 @@ impl CollatorPool {
|
||||
if let Some(para_id) = self.collators.get(&collator_id) {
|
||||
debug_assert_eq!(para_id, &collation.receipt.parachain_index);
|
||||
|
||||
// TODO: punish if not primary?
|
||||
// TODO: punish if not primary? (https://github.com/paritytech/polkadot/issues/213)
|
||||
|
||||
self.collations.entry((relay_parent, para_id.clone()))
|
||||
.or_insert_with(CollationSlot::blank_now)
|
||||
@@ -205,6 +205,7 @@ impl CollatorPool {
|
||||
/// Returns a set of actions to perform on the network level.
|
||||
pub fn maintain_peers(&mut self) -> Vec<Action> {
|
||||
// TODO: rearrange periodically to new primary, evaluate based on latency etc.
|
||||
// https://github.com/paritytech/polkadot/issues/214
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ impl PeerInfo {
|
||||
pub enum Message {
|
||||
/// As a validator, tell the peer your current session key.
|
||||
// TODO: do this with a cryptographic proof of some kind
|
||||
// https://github.com/paritytech/polkadot/issues/47
|
||||
SessionKey(SessionKey),
|
||||
/// Requesting parachain block data by (relay_parent, candidate_hash).
|
||||
RequestBlockData(RequestId, Hash, Hash),
|
||||
|
||||
@@ -148,6 +148,7 @@ impl NetworkService for TestNetwork {
|
||||
let mut context = TestContext::default();
|
||||
let res = with(&mut *self.proto.lock(), &mut context);
|
||||
// TODO: send context to worker for message routing.
|
||||
// https://github.com/paritytech/polkadot/issues/215
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ pub mod wasm_executor;
|
||||
pub mod wasm_api;
|
||||
|
||||
/// Validation parameters for evaluating the parachain validity function.
|
||||
// TODO: balance downloads
|
||||
// TODO: balance downloads (https://github.com/paritytech/polkadot/issues/220)
|
||||
#[derive(PartialEq, Eq, Decode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Encode))]
|
||||
pub struct ValidationParams {
|
||||
@@ -92,7 +92,7 @@ pub struct ValidationParams {
|
||||
}
|
||||
|
||||
/// The result of parachain validation.
|
||||
// TODO: egress and balance uploads
|
||||
// TODO: egress and balance uploads (https://github.com/paritytech/polkadot/issues/220)
|
||||
#[derive(PartialEq, Eq, Encode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Decode))]
|
||||
pub struct ValidationResult {
|
||||
|
||||
@@ -59,7 +59,7 @@ use primitives::bytes;
|
||||
|
||||
/// An index to a block.
|
||||
/// 32-bits will allow for 136 years of blocks assuming 1 block per second.
|
||||
/// TODO: switch to u32
|
||||
/// TODO: switch to u32 (https://github.com/paritytech/polkadot/issues/221)
|
||||
pub type BlockNumber = u64;
|
||||
|
||||
/// Alias to 512-bit hash when used in the context of a signature on the relay chain.
|
||||
|
||||
@@ -152,6 +152,7 @@ impl PartialOrd for CandidateReceipt {
|
||||
impl Ord for CandidateReceipt {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
// TODO: compare signatures or something more sane
|
||||
// https://github.com/paritytech/polkadot/issues/222
|
||||
self.parachain_index.cmp(&other.parachain_index)
|
||||
.then_with(|| self.head_data.cmp(&other.head_data))
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ impl<T: Trait> Module<T> {
|
||||
}
|
||||
|
||||
/*
|
||||
// TODO: Consider integrating if needed.
|
||||
// TODO: Consider integrating if needed. (https://github.com/paritytech/polkadot/issues/223)
|
||||
/// Extract the parachain heads from the block.
|
||||
pub fn parachain_heads(&self) -> &[CandidateReceipt] {
|
||||
let x = self.inner.extrinsics.get(PARACHAINS_SET_POSITION as usize).and_then(|xt| match xt.function {
|
||||
|
||||
@@ -48,7 +48,7 @@ pub trait Collators: Clone {
|
||||
/// will be passed to the `TableRouter` instance.
|
||||
fn collate(&self, parachain: ParaId, relay_parent: Hash) -> Self::Collation;
|
||||
|
||||
/// Note a bad collator. TODO: take proof
|
||||
/// Note a bad collator. TODO: take proof (https://github.com/paritytech/polkadot/issues/217)
|
||||
fn note_bad_collator(&self, collator: CollatorId);
|
||||
}
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ impl<C, TxApi> CreateProposal<C, TxApi> where
|
||||
.join(", ")
|
||||
);
|
||||
|
||||
// TODO: full re-evaluation
|
||||
// TODO: full re-evaluation (https://github.com/paritytech/polkadot/issues/216)
|
||||
let active_parachains = runtime_api.active_parachains(&self.parent_id)?;
|
||||
assert!(evaluation::evaluate_initial(
|
||||
&new_block,
|
||||
|
||||
@@ -139,6 +139,7 @@ impl SharedTableInner {
|
||||
let digest = &summary.candidate;
|
||||
|
||||
// TODO: consider a strategy based on the number of candidate votes as well.
|
||||
// https://github.com/paritytech/polkadot/issues/218
|
||||
let do_validation = para_member && match self.validated.entry(digest.clone()) {
|
||||
Entry::Occupied(_) => false,
|
||||
Entry::Vacant(entry) => {
|
||||
|
||||
Reference in New Issue
Block a user