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