Development (#172)
* docs: Add CLAUDE_RULES.md with strict rebrand protection rules - Define immutable rebrand rules that cannot be violated - Prohibit reverting rebrand for cargo check convenience - Establish checkpoint and audit trail requirements - Document correct error handling approach * refactor: Complete kurdistan-sdk to pezkuwi-sdk rebrand - Update README.md with pezkuwi-sdk branding - Replace all kurdistan-sdk URL references with pezkuwi-sdk - Replace kurdistan-tech with pezkuwichain in workflows - Update email domains from @kurdistan-tech.io to @pezkuwichain.io - Rename tool references: kurdistan-tech-publish → pezkuwi-publish - Update runner names: kurdistan-tech-* → pezkuwichain-* - Update analytics/forum/matrix domains to pezkuwichain.io - Keep 'Kurdistan Tech Institute' as organization name - Keep tech@kurdistan.gov as official government contact
This commit is contained in:
@@ -471,7 +471,7 @@ pub(crate) async fn handle_new_head<
|
||||
let validator_group_lens: Vec<usize> =
|
||||
session_info.validator_groups.iter().map(|v| v.len()).collect();
|
||||
// insta-approve candidates on low-node testnets:
|
||||
// cf. https://github.com/pezkuwichain/kurdistan-sdk/issues/134
|
||||
// cf. https://github.com/pezkuwichain/pezkuwi-sdk/issues/134
|
||||
let num_candidates = included_candidates.len();
|
||||
let approved_bitfield = {
|
||||
if needed_approvals == 0 {
|
||||
|
||||
@@ -1552,7 +1552,7 @@ pub async fn start_approval_worker<
|
||||
// of actions are generated by handling a single action.
|
||||
//
|
||||
// This particular problem statement is specified in issue 3311:
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/issues/142
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/issues/142
|
||||
//
|
||||
// returns `true` if any of the actions was a `Conclude` command.
|
||||
#[overseer::contextbounds(ApprovalVoting, prefix = self::overseer)]
|
||||
|
||||
@@ -175,7 +175,7 @@ pub fn canonicalize(
|
||||
|
||||
// due to the fork pruning, this range actually might go too far above where our actual highest
|
||||
// block is, if a relatively short fork is canonicalized.
|
||||
// TODO https://github.com/pezkuwichain/kurdistan-sdk/issues/143
|
||||
// TODO https://github.com/pezkuwichain/pezkuwi-sdk/issues/143
|
||||
let new_range = StoredBlockRange(canon_number + 1, std::cmp::max(range.1, canon_number + 2));
|
||||
|
||||
overlay_db.write_stored_block_range(new_range);
|
||||
|
||||
@@ -647,7 +647,7 @@ async fn run_iteration<Context>(
|
||||
|
||||
// Start prune-all on a separate thread, so that in the case when the operation takes
|
||||
// longer than expected we don't keep the whole subsystem blocked.
|
||||
// See: https://github.com/pezkuwichain/kurdistan-sdk/issues/170 for more details.
|
||||
// See: https://github.com/pezkuwichain/pezkuwi-sdk/issues/170 for more details.
|
||||
#[overseer::contextbounds(AvailabilityStore, prefix = self::overseer)]
|
||||
async fn start_prune_all<Context>(
|
||||
ctx: &mut Context,
|
||||
|
||||
@@ -49,7 +49,7 @@ mod tests;
|
||||
const SPAWNED_TASK_DELAY: Duration = Duration::from_millis(1500);
|
||||
const LOG_TARGET: &str = "teyrchain::bitfield-signing";
|
||||
|
||||
// TODO: use `fatality` (https://github.com/pezkuwichain/kurdistan-sdk/issues/158).
|
||||
// TODO: use `fatality` (https://github.com/pezkuwichain/pezkuwi-sdk/issues/158).
|
||||
/// Errors we may encounter in the course of executing the `BitfieldSigningSubsystem`.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[allow(missing_docs)]
|
||||
|
||||
@@ -114,7 +114,7 @@ pub(crate) struct Initialized {
|
||||
/// blocks) we will be too slow importing all votes from unfinalized chains on startup
|
||||
/// (dispute-coordinator gets killed because of unresponsiveness).
|
||||
///
|
||||
/// https://github.com/pezkuwichain/kurdistan-sdk/issues/168
|
||||
/// https://github.com/pezkuwichain/pezkuwi-sdk/issues/168
|
||||
///
|
||||
/// To resolve this, we limit the amount of votes imported at once to
|
||||
/// `CHAIN_IMPORT_MAX_BATCH_SIZE` and put the rest here for later processing.
|
||||
@@ -771,7 +771,7 @@ impl Initialized {
|
||||
.handle_import_statements(
|
||||
ctx,
|
||||
overlay_db,
|
||||
// TODO <https://github.com/pezkuwichain/kurdistan-sdk/issues/147>
|
||||
// TODO <https://github.com/pezkuwichain/pezkuwi-sdk/issues/147>
|
||||
MaybeCandidateReceipt::AssumeBackingVotePresent(candidate_hash),
|
||||
session,
|
||||
statements,
|
||||
|
||||
@@ -221,7 +221,7 @@ fn partitioning_happy_case() {
|
||||
// achieved with or without the 'help' of a double vote (a validator voting for and against at the
|
||||
// same time). This makes the test a bit pointless but anyway I'm leaving it here to make this
|
||||
// decision explicit and have the test code ready in case this behavior needs to be further tested
|
||||
// in the future. Link to the PR with the discussions: https://github.com/pezkuwichain/kurdistan-sdk/issues/177
|
||||
// in the future. Link to the PR with the discussions: https://github.com/pezkuwichain/pezkuwi-sdk/issues/177
|
||||
#[test]
|
||||
fn partitioning_doubled_onchain_vote() {
|
||||
let mut input = BTreeMap::<(SessionIndex, CandidateHash), DisputeStatus>::new();
|
||||
|
||||
@@ -416,7 +416,7 @@ fn note_provisionable_data(
|
||||
// parablocks once they are included. But we can do slightly better by
|
||||
// allowing disagreeing backers to record their disagreement and initiate a
|
||||
// dispute once the parablock in question has been included. This potential
|
||||
// change is tracked by: https://github.com/pezkuwichain/kurdistan-sdk/issues/140
|
||||
// change is tracked by: https://github.com/pezkuwichain/pezkuwi-sdk/issues/140
|
||||
ProvisionableData::Dispute(_, _) => {},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,5 +43,5 @@ another popular persistent shell, mosh, it allows scrollback.
|
||||
|
||||
[impl-guide]: https://docs.pezkuwichain.io/sdk/book/pvf-prechecking.html#summary
|
||||
[glossary]: https://docs.pezkuwichain.io/sdk/book/glossary.html
|
||||
[testing]: https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/doc/testing.md
|
||||
[testing]: https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/doc/testing.md
|
||||
[et]: https://github.com/MisterTea/EternalTerminal
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
//! reasons.
|
||||
//!
|
||||
//! Considering `io_uring`'s status discussed above, and that it very likely would get detected
|
||||
//! either by our [static analysis](https://github.com/pezkuwichain/kurdistan-sdk/issues/106) or by
|
||||
//! either by our [static analysis](https://github.com/pezkuwichain/pezkuwi-sdk/issues/106) or by
|
||||
//! testing, we think it is safe to block it.
|
||||
//!
|
||||
//! ## Consensus analysis
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//!
|
||||
//! Currently we are only logging these for the purposes of gathering data. In the future, we may
|
||||
//! use these stats to reject PVFs during pre-checking. See
|
||||
//! <https://github.com/pezkuwichain/kurdistan-sdk/issues/166#issuecomment-1381941762> for more
|
||||
//! <https://github.com/pezkuwichain/pezkuwi-sdk/issues/166#issuecomment-1381941762> for more
|
||||
//! background.
|
||||
|
||||
/// Module for the memory tracker. The memory tracker runs in its own thread, where it polls memory
|
||||
|
||||
@@ -394,7 +394,7 @@ where
|
||||
let metrics = self.metrics.clone();
|
||||
let (sender, receiver) = oneshot::channel();
|
||||
|
||||
// TODO: make the cache great again https://github.com/pezkuwichain/kurdistan-sdk/issues/159
|
||||
// TODO: make the cache great again https://github.com/pezkuwichain/pezkuwi-sdk/issues/159
|
||||
let request = match self.query_cache(relay_parent, request) {
|
||||
Some(request) => request,
|
||||
None => return,
|
||||
|
||||
@@ -31,7 +31,7 @@ automatically do so.
|
||||
|
||||
Related issues:
|
||||
|
||||
* <https://github.com/pezkuwichain/kurdistan-sdk/issues/153>
|
||||
* <https://github.com/pezkuwichain/pezkuwi-sdk/issues/153>
|
||||
|
||||
### Decision
|
||||
|
||||
|
||||
@@ -678,7 +678,7 @@ fn delay_reputation_change() {
|
||||
);
|
||||
}
|
||||
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/172#discussion_r547594835>
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/172#discussion_r547594835>
|
||||
///
|
||||
/// 1. Send a view update that removes block B from their view.
|
||||
/// 2. Send a message from B that they incur `COST_UNEXPECTED_MESSAGE` for, but then they receive
|
||||
@@ -782,7 +782,7 @@ fn spam_attack_results_in_negative_reputation_change() {
|
||||
/// Upon receiving them, they both will try to send the message each other.
|
||||
/// This test makes sure they will not punish each other for such duplicate messages.
|
||||
///
|
||||
/// See <https://github.com/pezkuwichain/kurdistan-sdk/issues/135>.
|
||||
/// See <https://github.com/pezkuwichain/pezkuwi-sdk/issues/135>.
|
||||
#[test]
|
||||
fn peer_sending_us_the_same_we_just_sent_them_is_ok() {
|
||||
let parent_hash = Hash::repeat_byte(0xFF);
|
||||
@@ -2361,7 +2361,7 @@ fn sends_assignments_even_when_state_is_approved_v2() {
|
||||
);
|
||||
}
|
||||
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/176>
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/176>
|
||||
///
|
||||
/// 1. Receive remote peer view update with an unknown head
|
||||
/// 2. Receive assignments for that unknown head
|
||||
@@ -4253,7 +4253,7 @@ fn subsystem_rejects_wrong_claimed_assignments() {
|
||||
/// assignment and Delay tranche assignments land on the same candidate. The delay tranche0 can be
|
||||
/// safely ignored and we don't need to gossip it however, the compact tranche0 assignment should be
|
||||
/// gossiped, because other candidates are included in it, this test makes sure this invariant is
|
||||
/// upheld, see https://github.com/pezkuwichain/kurdistan-sdk/issues/172#discussion_r557628699, for
|
||||
/// upheld, see https://github.com/pezkuwichain/pezkuwi-sdk/issues/172#discussion_r557628699, for
|
||||
/// this edge case.
|
||||
#[test]
|
||||
fn subsystem_accepts_tranche0_duplicate_assignments() {
|
||||
|
||||
@@ -85,7 +85,7 @@ const COST_APPARENT_FLOOD: Rep =
|
||||
///
|
||||
/// This is to protect from a single slow validator preventing collations from happening.
|
||||
///
|
||||
/// For considerations on this value, see: https://github.com/pezkuwichain/kurdistan-sdk/issues/148
|
||||
/// For considerations on this value, see: https://github.com/pezkuwichain/pezkuwi-sdk/issues/148
|
||||
const MAX_UNSHARED_UPLOAD_TIME: Duration = Duration::from_millis(150);
|
||||
|
||||
/// A timeout for resetting validators' interests in collations.
|
||||
|
||||
@@ -2366,7 +2366,7 @@ async fn handle_collation_fetch_response(
|
||||
"Request timed out"
|
||||
);
|
||||
// For now we don't want to change reputation on timeout, to mitigate issues like
|
||||
// this: https://github.com/pezkuwichain/kurdistan-sdk/issues/152
|
||||
// this: https://github.com/pezkuwichain/pezkuwi-sdk/issues/152
|
||||
Err(None)
|
||||
},
|
||||
Err(RequestError::NetworkError(err)) => {
|
||||
|
||||
@@ -86,7 +86,7 @@ const TRY_RERESOLVE_AUTHORITIES: Duration = Duration::from_secs(2);
|
||||
/// populated). Authority discovery on Kusama takes around 8 minutes, so warning after 10 minutes
|
||||
/// should be fine:
|
||||
///
|
||||
/// https://github.com/pezkuwichain/kurdistan-sdk/blob/main/bizinikiwi/client/authority-discovery/src/lib.rs#L88
|
||||
/// https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/bizinikiwi/client/authority-discovery/src/lib.rs#L88
|
||||
const LOW_CONNECTIVITY_WARN_DELAY: Duration = Duration::from_secs(600);
|
||||
|
||||
/// If connectivity is lower than this in percent, issue warning in logs.
|
||||
@@ -452,7 +452,7 @@ where
|
||||
|
||||
// First `maxValidators` entries are the teyrchain validators. We'll check
|
||||
// if our index is in this set to avoid searching for the keys.
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148
|
||||
if *index < teyrchain_validators_this_session {
|
||||
gum::trace!(target: LOG_TARGET, "We are now a teyrchain validator",);
|
||||
self.metrics.on_is_teyrchain_validator();
|
||||
@@ -796,7 +796,7 @@ async fn update_gossip_topology(
|
||||
let random_seed = {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
// TODO https://github.com/pezkuwichain/kurdistan-sdk/issues/156:
|
||||
// TODO https://github.com/pezkuwichain/pezkuwi-sdk/issues/156:
|
||||
// get the random seed from the `SessionInfo` instead.
|
||||
sender
|
||||
.send_message(RuntimeApiMessage::Request(
|
||||
|
||||
@@ -137,7 +137,7 @@ const POV_REQUEST_TIMEOUT_CONNECTED: Duration = Duration::from_millis(2000);
|
||||
/// We supply leniency because there are often large candidates and asynchronous
|
||||
/// backing allows them to be included over a longer window of time. Exponential back-off
|
||||
/// up to a maximum of 10 seconds would be ideal, but isn't supported by the
|
||||
/// infrastructure here yet: see https://github.com/pezkuwichain/kurdistan-sdk/issues/164
|
||||
/// infrastructure here yet: see https://github.com/pezkuwichain/pezkuwi-sdk/issues/164
|
||||
const ATTESTED_CANDIDATE_TIMEOUT: Duration = Duration::from_millis(2500);
|
||||
|
||||
/// We don't want a slow peer to slow down all the others, at the same time we want to get out the
|
||||
|
||||
@@ -483,7 +483,7 @@ pub(crate) async fn handle_network_update<Context>(
|
||||
state.unused_topologies.insert(*new_session_index, topology);
|
||||
}
|
||||
|
||||
// TODO [https://github.com/pezkuwichain/kurdistan-sdk/issues/165]
|
||||
// TODO [https://github.com/pezkuwichain/pezkuwi-sdk/issues/165]
|
||||
// technically, we should account for the fact that the session topology might
|
||||
// come late, and for all relay-parents with this session, send all grid peers
|
||||
// any `BackedCandidateInv` messages they might need.
|
||||
|
||||
@@ -624,7 +624,7 @@ pub struct Overseer<SupportsTeyrchains> {
|
||||
approval_voting_parallel: ApprovalVotingParallel,
|
||||
#[subsystem(GossipSupportMessage, sends: [
|
||||
NetworkBridgeTxMessage,
|
||||
NetworkBridgeRxMessage, // TODO <https://github.com/pezkuwichain/kurdistan-sdk/issues/160>
|
||||
NetworkBridgeRxMessage, // TODO <https://github.com/pezkuwichain/pezkuwi-sdk/issues/160>
|
||||
RuntimeApiMessage,
|
||||
ChainSelectionMessage,
|
||||
ChainApiMessage,
|
||||
|
||||
@@ -794,7 +794,7 @@ where
|
||||
let config = pezsc_consensus_grandpa::Config {
|
||||
// FIXME bizinikiwi#1578 make this available through chainspec
|
||||
// Grandpa performance can be improved a bit by tuning this parameter, see:
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/issues/157
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/issues/157
|
||||
gossip_duration: Duration::from_millis(1000),
|
||||
justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD,
|
||||
name: Some(name),
|
||||
|
||||
@@ -2081,7 +2081,7 @@ pub mod node_features {
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum FeatureIndex {
|
||||
/// Tells if tranch0 assignments could be sent in a single certificate.
|
||||
/// Reserved for: `<https://github.com/pezkuwichain/kurdistan-sdk/issues/99>`
|
||||
/// Reserved for: `<https://github.com/pezkuwichain/pezkuwi-sdk/issues/99>`
|
||||
EnableAssignmentsV2 = 0,
|
||||
/// This feature enables the extension of `BackedCandidate::validator_indices` by 8 bits.
|
||||
/// The value stored there represents the assumed core index where the candidates
|
||||
@@ -2146,7 +2146,7 @@ pub struct SchedulerParams<BlockNumber> {
|
||||
/// How many cores are managed by the coretime chain.
|
||||
pub num_cores: u32,
|
||||
/// Deprecated and no longer used by the runtime.
|
||||
/// Removal is tracked by <https://github.com/pezkuwichain/kurdistan-sdk/issues/98>.
|
||||
/// Removal is tracked by <https://github.com/pezkuwichain/pezkuwi-sdk/issues/98>.
|
||||
#[deprecated]
|
||||
pub max_availability_timeouts: u32,
|
||||
/// The maximum queue size of the pay as you go module.
|
||||
@@ -2159,7 +2159,7 @@ pub struct SchedulerParams<BlockNumber> {
|
||||
/// The minimum amount needed to claim a slot in the spot pricing queue.
|
||||
pub on_demand_base_fee: Balance,
|
||||
/// Deprecated and no longer used by the runtime.
|
||||
/// Removal is tracked by <https://github.com/pezkuwichain/kurdistan-sdk/issues/98>.
|
||||
/// Removal is tracked by <https://github.com/pezkuwichain/pezkuwi-sdk/issues/98>.
|
||||
#[deprecated]
|
||||
pub ttl: BlockNumber,
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ impl From<u32> for ChunkIndex {
|
||||
}
|
||||
}
|
||||
|
||||
// We should really get https://github.com/pezkuwichain/kurdistan-sdk/issues/133 going ..
|
||||
// We should really get https://github.com/pezkuwichain/pezkuwi-sdk/issues/133 going ..
|
||||
impl From<u32> for ValidatorIndex {
|
||||
fn from(n: u32) -> Self {
|
||||
ValidatorIndex(n)
|
||||
@@ -838,7 +838,7 @@ impl<N: Saturating + BaseArithmetic + Copy> GroupRotationInfo<N> {
|
||||
pub struct ScheduledCore {
|
||||
/// The ID of a para scheduled.
|
||||
pub para_id: Id,
|
||||
/// DEPRECATED: see: <https://github.com/pezkuwichain/kurdistan-sdk/issues/171>
|
||||
/// DEPRECATED: see: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/171>
|
||||
///
|
||||
/// Will be removed in a future version.
|
||||
pub collator: Option<CollatorId>,
|
||||
@@ -1536,7 +1536,7 @@ pub fn effective_minimum_backing_votes(
|
||||
/// Information about validator sets of a session.
|
||||
///
|
||||
/// NOTE: `SessionInfo` is frozen. Do not include new fields, consider creating a separate runtime
|
||||
/// API. Reasoning and further outlook [here](https://github.com/pezkuwichain/kurdistan-sdk/issues/167).
|
||||
/// API. Reasoning and further outlook [here](https://github.com/pezkuwichain/pezkuwi-sdk/issues/167).
|
||||
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(PartialEq))]
|
||||
pub struct SessionInfo {
|
||||
|
||||
@@ -168,7 +168,7 @@ impl PartialOrd for CommittedCandidateReceipt {
|
||||
impl Ord for CommittedCandidateReceipt {
|
||||
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
|
||||
// TODO: compare signatures or something more sane
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/issues/132
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/issues/132
|
||||
self.descriptor()
|
||||
.para_id
|
||||
.cmp(&other.descriptor().para_id)
|
||||
|
||||
+3
-3
@@ -65,13 +65,13 @@ Note however that, because not all validators in a group have to be actual backe
|
||||
the needed chunk. This in turn could lead to low throughput, as we have to wait for fetches to fail, before reaching a
|
||||
validator finally having our chunk. We do rank back validators not delivering our chunk, but as backers could vary from
|
||||
block to block on a perfectly legitimate basis, this is still not ideal. See issues
|
||||
[2509](https://github.com/pezkuwichain/kurdistan-sdk/issues/136) and
|
||||
[2512](https://github.com/pezkuwichain/kurdistan-sdk/issues/137) for more information.
|
||||
[2509](https://github.com/pezkuwichain/pezkuwi-sdk/issues/136) and
|
||||
[2512](https://github.com/pezkuwichain/pezkuwi-sdk/issues/137) for more information.
|
||||
|
||||
The current implementation also only fetches chunks for occupied cores in blocks in active leaves. This means though, if
|
||||
active leaves skips a block or we are particularly slow in fetching our chunk, we might not fetch our chunk if
|
||||
availability reached 2/3 fast enough (slot becomes free). This is not desirable as we would like as many validators as
|
||||
possible to have their chunk. See this [issue](https://github.com/pezkuwichain/kurdistan-sdk/issues/138) for more details.
|
||||
possible to have their chunk. See this [issue](https://github.com/pezkuwichain/pezkuwi-sdk/issues/138) for more details.
|
||||
|
||||
|
||||
### Serving
|
||||
|
||||
@@ -19,7 +19,7 @@ not being wasted by attackers. Communicating across this trust-boundary is the m
|
||||
Validation of candidates is a heavy task, and furthermore, the [`PoV`][PoV] itself is a large piece of data.
|
||||
Empirically, `PoV`s are on the order of 10MB.
|
||||
|
||||
> TODO: note the incremental validation function Ximin proposes at https://github.com/pezkuwichain/kurdistan-sdk/issues/130
|
||||
> TODO: note the incremental validation function Ximin proposes at https://github.com/pezkuwichain/pezkuwi-sdk/issues/130
|
||||
|
||||
As this network protocol serves as a bridge between collators and validators, it communicates primarily with one
|
||||
subsystem on behalf of each. As a collator, this will receive messages from the [`CollationGeneration`][CG] subsystem.
|
||||
|
||||
@@ -176,7 +176,7 @@ current authority set will overlap with the ones in the previous set and will be
|
||||
|
||||
Still, for maximum accountability we need to make sure a previous authority set can communicate votes to the next one,
|
||||
regardless of any chain: This is yet to be implemented see section "Resiliency" in dispute-distribution and
|
||||
[this](https://github.com/pezkuwichain/kurdistan-sdk/issues/144) ticket.
|
||||
[this](https://github.com/pezkuwichain/pezkuwi-sdk/issues/144) ticket.
|
||||
|
||||
## Coordinating Actual Dispute Participation
|
||||
|
||||
@@ -271,7 +271,7 @@ ordering as the priority one - by block heights of the relay parent, older block
|
||||
possibility not to be able to obtain the block number of the parent when we are inserting the dispute in the queue. To
|
||||
account for races, we will promote any existing participation request to the priority queue once we learn about an
|
||||
including block. NOTE: this is still work in progress and is tracked by [this
|
||||
issue](https://github.com/pezkuwichain/kurdistan-sdk/issues/161).
|
||||
issue](https://github.com/pezkuwichain/pezkuwi-sdk/issues/161).
|
||||
|
||||
### Abandoned Forks
|
||||
|
||||
@@ -468,7 +468,7 @@ finalized in the first place. Not allowing disputing already finalized blocks ac
|
||||
as it massively reduces the amount of candidates that can be disputed.
|
||||
|
||||
This makes attempts to overwhelm the system with disputes significantly harder and counter measures way easier. We can
|
||||
limit inclusion for example (as suggested [here](https://github.com/pezkuwichain/kurdistan-sdk/issues/162) in case of high
|
||||
limit inclusion for example (as suggested [here](https://github.com/pezkuwichain/pezkuwi-sdk/issues/162) in case of high
|
||||
dispute load. Another measure we have at our disposal is that on finality lag block production will slow down,
|
||||
implicitly reducing the rate of new candidates that can be disputed. Hence, the cutting-off of the unlimited candidate
|
||||
supply of already finalized blocks, guarantees the necessary DoS protection and ensures we can have measures in place to
|
||||
|
||||
@@ -202,7 +202,7 @@ the dispute-coordinator already knows about the dispute.
|
||||
|
||||
Goal 3 and 4 are obviously very related and both can easily be solved via rate
|
||||
limiting as we shall see below. Rate limits should already be implemented at the
|
||||
Bizinikiwi level, but [are not](https://github.com/pezkuwichain/kurdistan-sdk/issues/30)
|
||||
Bizinikiwi level, but [are not](https://github.com/pezkuwichain/pezkuwi-sdk/issues/30)
|
||||
at the time of writing. But even if they were, the enforced Bizinikiwi limits would
|
||||
likely not be configurable and thus would still be to high for our needs as we can
|
||||
rely on the following observations:
|
||||
@@ -246,7 +246,7 @@ This is probably an argument for not imposing a too low rate limit, although the
|
||||
issue is more general: Even without any rate limit, if an attacker generates
|
||||
disputes at a very high rate, nodes will be having trouble keeping participation
|
||||
up, hence the problem should be mitigated at a [more fundamental
|
||||
layer](https://github.com/pezkuwichain/kurdistan-sdk/issues/162).
|
||||
layer](https://github.com/pezkuwichain/pezkuwi-sdk/issues/162).
|
||||
|
||||
For nodes that have been offline for a while, the same argument as for session
|
||||
changes holds, but matters even less: We assume 2/3 of nodes to be online, so
|
||||
|
||||
@@ -11,7 +11,7 @@ limits the amount of messages sent and received to be an order of sqrt of the
|
||||
validators. Our neighbors in this graph will be forwarded to the network bridge
|
||||
with the `NetworkBridgeMessage::NewGossipTopology` message.
|
||||
|
||||
See https://github.com/pezkuwichain/kurdistan-sdk/issues/141 for more details.
|
||||
See https://github.com/pezkuwichain/pezkuwi-sdk/issues/141 for more details.
|
||||
|
||||
The gossip topology is used by teyrchain distribution subsystems,
|
||||
such as Bitfield Distribution, (small) Statement Distribution and
|
||||
|
||||
@@ -430,7 +430,7 @@ Implementation of the above design covers a few additional areas that allow for
|
||||
> This would guarantee determinism as different nodes can see different leaves, but this approach was leaving too
|
||||
> wide of a window because of Async-Backing. Relay Parent could have been significantly in the past and it would
|
||||
> give a lot of time for past session disputes to be spammed.
|
||||
1. Do not block finality for "disabled" disputes [#3358](https://github.com/pezkuwichain/kurdistan-sdk/issues/114)
|
||||
1. Do not block finality for "disabled" disputes [#3358](https://github.com/pezkuwichain/pezkuwi-sdk/issues/114)
|
||||
- Emergency fix to not block finality for disputes initiated only by disabled validators
|
||||
1. Re-enable small offender when approaching BZT (**Runtime**) #TODO
|
||||
- When BZT limit is reached and there are more offenders to be disabled re-enable the smallest offenders to disable
|
||||
|
||||
@@ -14,7 +14,7 @@ struct SessionInfo {
|
||||
///
|
||||
/// NOTE: There might be more authorities in the current session, than `validators` participating
|
||||
/// in teyrchain consensus. See
|
||||
/// [`max_validators`](https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148)..
|
||||
/// [`max_validators`](https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148)..
|
||||
///
|
||||
/// `SessionInfo::validators` will be limited to `max_validators` when set.
|
||||
validators: Vec<ValidatorId>,
|
||||
@@ -23,14 +23,14 @@ struct SessionInfo {
|
||||
/// NOTE: The first `validators.len()` entries will match the corresponding validators in
|
||||
/// `validators`, afterwards any remaining authorities can be found. This is any authorities not
|
||||
/// participating in teyrchain consensus - see
|
||||
/// [`max_validators`](https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148).
|
||||
/// [`max_validators`](https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148).
|
||||
#[cfg_attr(feature = "std", ignore_malloc_size_of = "outside type")]
|
||||
discovery_keys: Vec<AuthorityDiscoveryId>,
|
||||
/// The assignment keys for validators.
|
||||
///
|
||||
/// NOTE: There might be more authorities in the current session, than validators participating
|
||||
/// in teyrchain consensus. See
|
||||
/// [`max_validators`](https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148)..
|
||||
/// [`max_validators`](https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs#L148)..
|
||||
///
|
||||
/// Therefore:
|
||||
/// ```ignore
|
||||
|
||||
@@ -7,7 +7,7 @@ Types used within the runtime exclusively and pervasively.
|
||||
The internal-to-runtime configuration of the teyrchain host is kept in `struct HostConfiguration`. This is expected to
|
||||
be altered only by governance procedures or via migrations from the Pezkuwi-SDK codebase. The latest definition of
|
||||
`HostConfiguration` can be found in the project repo
|
||||
[here](https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs). Each
|
||||
[here](https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs). Each
|
||||
parameter has got a doc comment so for any details please refer to the code.
|
||||
|
||||
Some related parameters in `HostConfiguration` are grouped together so that they can be managed easily. These are:
|
||||
@@ -20,7 +20,7 @@ Check the definitions of these structs for further details.
|
||||
|
||||
### Configuration migrations
|
||||
Modifying `HostConfiguration` requires a storage migration. These migrations are located in the
|
||||
[`migrations`](https://github.com/pezkuwichain/kurdistan-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs)
|
||||
[`migrations`](https://github.com/pezkuwichain/pezkuwi-sdk/blob/main/pezkuwi/runtime/teyrchains/src/configuration.rs)
|
||||
subfolder of Pezkuwi-SDK repo.
|
||||
|
||||
## ParaInherentData
|
||||
|
||||
@@ -116,7 +116,7 @@ The main event loop of a collator node:
|
||||
---
|
||||
### Cross-chain Messaging
|
||||
|
||||
https://hackmd.io/ILoQltEISP697oMYe4HbrA?view https://github.com/pezkuwichain/kurdistan-sdk/issues/163
|
||||
https://hackmd.io/ILoQltEISP697oMYe4HbrA?view https://github.com/pezkuwichain/pezkuwi-sdk/issues/163
|
||||
|
||||
The biggest sub-project of the teyrchains roadmap - how messages are sent between teyrchains. This involves the
|
||||
state-machine ordering of incoming messages, protocols for fetching those messages, and node logic for persisting the
|
||||
|
||||
@@ -403,7 +403,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
/// Inserting arbitrarily causes a `DispatchError::DisallowedInsert` error.
|
||||
// With this restriction this function allows for O(1) complexity. It could easily be lifted, if
|
||||
// need be and in fact an implementation is available
|
||||
// [here](https://github.com/pezkuwichain/kurdistan-sdk/issues/107/commits/c0c23b01fd2830910cde92c11960dad12cdff398#diff-0c85a46e448de79a5452395829986ee8747e17a857c27ab624304987d2dde8baR386).
|
||||
// [here](https://github.com/pezkuwichain/pezkuwi-sdk/issues/107/commits/c0c23b01fd2830910cde92c11960dad12cdff398#diff-0c85a46e448de79a5452395829986ee8747e17a857c27ab624304987d2dde8baR386).
|
||||
// The problem is that insertion complexity then depends on the size of the existing queue,
|
||||
// which makes determining weights hard and could lead to issues like overweight blocks (at
|
||||
// least in theory).
|
||||
|
||||
@@ -135,7 +135,7 @@ pub struct HostConfiguration<BlockNumber> {
|
||||
/// revert [`validation_upgrade_delay`](Self::validation_upgrade_delay) many blocks back and
|
||||
/// still find the new code in the storage by hash.
|
||||
///
|
||||
/// [#4601]: https://github.com/pezkuwichain/kurdistan-sdk/issues/151
|
||||
/// [#4601]: https://github.com/pezkuwichain/pezkuwi-sdk/issues/151
|
||||
pub validation_upgrade_delay: BlockNumber,
|
||||
/// Asynchronous backing parameters.
|
||||
pub async_backing_params: AsyncBackingParams,
|
||||
@@ -513,20 +513,20 @@ pub mod pezpallet {
|
||||
|
||||
/// The in-code storage version.
|
||||
///
|
||||
/// v0-v1: <https://github.com/pezkuwichain/kurdistan-sdk/issues/174>
|
||||
/// v1-v2: <https://github.com/pezkuwichain/kurdistan-sdk/issues/175>
|
||||
/// v2-v3: <https://github.com/pezkuwichain/kurdistan-sdk/issues/178>
|
||||
/// v3-v4: <https://github.com/pezkuwichain/kurdistan-sdk/issues/180>
|
||||
/// v4-v5: <https://github.com/pezkuwichain/kurdistan-sdk/issues/182>
|
||||
/// + <https://github.com/pezkuwichain/kurdistan-sdk/issues/183>
|
||||
/// + <https://github.com/pezkuwichain/kurdistan-sdk/issues/181>
|
||||
/// v5-v6: <https://github.com/pezkuwichain/kurdistan-sdk/issues/179> (remove UMP dispatch queue)
|
||||
/// v6-v7: <https://github.com/pezkuwichain/kurdistan-sdk/issues/185>
|
||||
/// v7-v8: <https://github.com/pezkuwichain/kurdistan-sdk/issues/184>
|
||||
/// v8-v9: <https://github.com/pezkuwichain/kurdistan-sdk/issues/186>
|
||||
/// v9-v10: <https://github.com/pezkuwichain/kurdistan-sdk/issues/110>
|
||||
/// v10-11: <https://github.com/pezkuwichain/kurdistan-sdk/issues/100>
|
||||
/// v11-12: <https://github.com/pezkuwichain/kurdistan-sdk/issues/112>
|
||||
/// v0-v1: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/174>
|
||||
/// v1-v2: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/175>
|
||||
/// v2-v3: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/178>
|
||||
/// v3-v4: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/180>
|
||||
/// v4-v5: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/182>
|
||||
/// + <https://github.com/pezkuwichain/pezkuwi-sdk/issues/183>
|
||||
/// + <https://github.com/pezkuwichain/pezkuwi-sdk/issues/181>
|
||||
/// v5-v6: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/179> (remove UMP dispatch queue)
|
||||
/// v6-v7: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/185>
|
||||
/// v7-v8: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/184>
|
||||
/// v8-v9: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/186>
|
||||
/// v9-v10: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/110>
|
||||
/// v10-11: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/100>
|
||||
/// v11-12: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/112>
|
||||
const STORAGE_VERSION: StorageVersion = StorageVersion::new(12);
|
||||
|
||||
#[pezpallet::pezpallet]
|
||||
|
||||
@@ -194,7 +194,7 @@ pub trait DisputesHandler<BlockNumber: Ord> {
|
||||
) -> Result<(), ()> {
|
||||
// TODO: Consider trade-of to avoid `O(n * log(n))` average lookups of `included_state`
|
||||
// TODO: instead make a single pass and store the values lazily.
|
||||
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/150
|
||||
// TODO: https://github.com/pezkuwichain/pezkuwi-sdk/issues/150
|
||||
let n = statement_sets.len();
|
||||
|
||||
statement_sets.sort_by(dispute_ordering_compare::<Self, BlockNumber>);
|
||||
@@ -893,7 +893,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
BackersOnDisputes::<T>::remove_prefix(to_prune, None);
|
||||
|
||||
// This is larger, and will be extracted to the `shared` pezpallet for more proper
|
||||
// pruning. TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/145
|
||||
// pruning. TODO: https://github.com/pezkuwichain/pezkuwi-sdk/issues/145
|
||||
#[allow(deprecated)]
|
||||
Included::<T>::remove_prefix(to_prune, None);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
let random_seed = {
|
||||
let mut buf = [0u8; 32];
|
||||
// TODO: audit usage of randomness API
|
||||
// https://github.com/pezkuwichain/kurdistan-sdk/issues/139
|
||||
// https://github.com/pezkuwichain/pezkuwi-sdk/issues/139
|
||||
let (random_hash, _) = T::Randomness::random(&b"paras"[..]);
|
||||
let len = core::cmp::min(32, random_hash.as_ref().len());
|
||||
buf[..len].copy_from_slice(&random_hash.as_ref()[..len]);
|
||||
|
||||
@@ -398,7 +398,7 @@ pub(crate) enum PvfCheckCause<BlockNumber> {
|
||||
/// instead of its relay parent -- in order to keep PVF available in case of chain
|
||||
/// reversions.
|
||||
///
|
||||
/// See https://github.com/pezkuwichain/kurdistan-sdk/issues/151 for detailed explanation.
|
||||
/// See https://github.com/pezkuwichain/pezkuwi-sdk/issues/151 for detailed explanation.
|
||||
included_at: BlockNumber,
|
||||
/// Whether or not the upgrade should be enacted directly.
|
||||
///
|
||||
@@ -2080,7 +2080,7 @@ impl<T: Config> Pezpallet<T> {
|
||||
//
|
||||
// This is only an intermediate solution and should be fixed in foreseeable future.
|
||||
//
|
||||
// [soaking issue]: https://github.com/pezkuwichain/kurdistan-sdk/issues/146
|
||||
// [soaking issue]: https://github.com/pezkuwichain/pezkuwi-sdk/issues/146
|
||||
let validation_code =
|
||||
mem::replace(&mut genesis_data.validation_code, ValidationCode(Vec::new()));
|
||||
UpcomingParasGenesis::<T>::insert(&id, genesis_data);
|
||||
|
||||
@@ -427,7 +427,7 @@ impl XcmpMessageHandler for () {
|
||||
}
|
||||
|
||||
/// Validation parameters for evaluating the teyrchain validity function.
|
||||
// TODO: balance downloads (https://github.com/pezkuwichain/kurdistan-sdk/issues/131)
|
||||
// TODO: balance downloads (https://github.com/pezkuwichain/pezkuwi-sdk/issues/131)
|
||||
#[derive(PartialEq, Eq, Decode, Clone)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Encode))]
|
||||
pub struct ValidationParams {
|
||||
@@ -458,7 +458,7 @@ pub type HorizontalMessages =
|
||||
BoundedVec<OutboundHrmpMessage<Id>, ConstU32<MAX_HORIZONTAL_MESSAGE_NUM>>;
|
||||
|
||||
/// The result of teyrchain validation.
|
||||
// TODO: balance uploads (https://github.com/pezkuwichain/kurdistan-sdk/issues/131)
|
||||
// TODO: balance uploads (https://github.com/pezkuwichain/pezkuwi-sdk/issues/131)
|
||||
#[derive(PartialEq, Eq, Clone, Encode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Decode))]
|
||||
pub struct ValidationResult {
|
||||
|
||||
@@ -397,7 +397,7 @@ impl MultiLocation {
|
||||
target: &MultiLocation,
|
||||
context: InteriorMultiLocation,
|
||||
) -> Result<(), ()> {
|
||||
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/149 Optimize this.
|
||||
// TODO: https://github.com/pezkuwichain/pezkuwi-sdk/issues/149 Optimize this.
|
||||
|
||||
// 1. Use our `context` to figure out how the `target` would address us.
|
||||
let inverted_target = context.invert_target(target)?;
|
||||
|
||||
@@ -448,7 +448,7 @@ impl Reanchorable for Location {
|
||||
///
|
||||
/// Does not modify `self` in case of overflow.
|
||||
fn reanchor(&mut self, target: &Location, context: &InteriorLocation) -> Result<(), ()> {
|
||||
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/149 Optimize this.
|
||||
// TODO: https://github.com/pezkuwichain/pezkuwi-sdk/issues/149 Optimize this.
|
||||
|
||||
// 1. Use our `context` to figure out how the `target` would address us.
|
||||
let inverted_target = context.invert_target(target)?;
|
||||
|
||||
@@ -448,7 +448,7 @@ impl Reanchorable for Location {
|
||||
///
|
||||
/// Does not modify `self` in case of overflow.
|
||||
fn reanchor(&mut self, target: &Location, context: &InteriorLocation) -> Result<(), ()> {
|
||||
// TODO: https://github.com/pezkuwichain/kurdistan-sdk/issues/149 Optimize this.
|
||||
// TODO: https://github.com/pezkuwichain/pezkuwi-sdk/issues/149 Optimize this.
|
||||
|
||||
// 1. Use our `context` to figure out how the `target` would address us.
|
||||
let inverted_target = context.invert_target(target)?;
|
||||
|
||||
@@ -546,7 +546,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
// See issue <https://github.com/pezkuwichain/kurdistan-sdk/issues/155>
|
||||
// See issue <https://github.com/pezkuwichain/pezkuwi-sdk/issues/155>
|
||||
pub struct DenyReserveTransferToRelayChain;
|
||||
impl DenyExecution for DenyReserveTransferToRelayChain {
|
||||
fn deny_execution<RuntimeCall>(
|
||||
|
||||
@@ -328,7 +328,7 @@ fn query_response_elicits_handler() {
|
||||
/// Simulates a cross-chain message from Teyrchain to Teyrchain through Relay Chain
|
||||
/// that deposits assets into the reserve of the destination.
|
||||
/// Regression test for `DepositReserveAsset` changes in
|
||||
/// <https://github.com/pezkuwichain/kurdistan-sdk/issues/113>
|
||||
/// <https://github.com/pezkuwichain/pezkuwi-sdk/issues/113>
|
||||
#[test]
|
||||
fn deposit_reserve_asset_works_for_any_xcm_sender() {
|
||||
pezsp_tracing::try_init_simple();
|
||||
|
||||
Reference in New Issue
Block a user