mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-13 13:55:51 +00:00
b74353d3e9
We witnessed really poor performance on Rococo, where we ended up with 50 on-demand cores. This was due to the fact that for each core the full queue was processed. With this change full queue processing will happen way less often (most of the time complexity is O(1) or O(log(n))) and if it happens then only for one core (in expectation). Also spot price is now updated before each order to ensure economic back pressure. TODO: - [x] Implement - [x] Basic tests - [x] Add more tests (see todos) - [x] Run benchmark to confirm better performance, first results suggest > 100x faster. - [x] Write migrations - [x] Bump scale-info version and remove patch in Cargo.toml - [x] Write PR docs: on-demand performance improved, more on-demand cores are now non problematic anymore. If need by also the max queue size can be increased again. (Maybe not to 10k) Optional: Performance can be improved even more, if we called `pop_assignment_for_core()`, before calling `report_processed` (Avoid needless affinity drops). The effect gets smaller the larger the claim queue and I would only go for it, if it does not add complexity to the scheduler. --------- Co-authored-by: eskimor <eskimor@no-such-url.com> Co-authored-by: antonva <anton.asgeirsson@parity.io> Co-authored-by: command-bot <> Co-authored-by: Anton Vilhelm Ásgeirsson <antonva@users.noreply.github.com> Co-authored-by: ordian <write@reusable.software>
67 lines
3.7 KiB
Rust
67 lines
3.7 KiB
Rust
// Copyright (C) Parity Technologies (UK) Ltd.
|
|
// This file is part of Polkadot.
|
|
|
|
// Polkadot is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// Polkadot is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//! Polkadot types shared between the runtime and the Node-side code.
|
|
|
|
#![warn(missing_docs)]
|
|
#![cfg_attr(not(feature = "std"), no_std)]
|
|
|
|
// `v6` is currently the latest stable version of the runtime API.
|
|
pub mod v6;
|
|
|
|
// The 'staging' version is special - it contains primitives which are
|
|
// still in development. Once they are considered stable, they will be
|
|
// moved to a new versioned module.
|
|
pub mod vstaging;
|
|
|
|
// `runtime_api` contains the actual API implementation. It contains stable and
|
|
// unstable functions.
|
|
pub mod runtime_api;
|
|
|
|
// Current primitives not requiring versioning are exported here.
|
|
// Primitives requiring versioning must not be exported and must be referred by an exact version.
|
|
pub use v6::{
|
|
async_backing, byzantine_threshold, check_candidate_backing, collator_signature_payload,
|
|
effective_minimum_backing_votes, executor_params, metric_definitions, slashing,
|
|
supermajority_threshold, well_known_keys, AbridgedHostConfiguration, AbridgedHrmpChannel,
|
|
AccountId, AccountIndex, AccountPublic, ApprovalVote, AssignmentId, AsyncBackingParams,
|
|
AuthorityDiscoveryId, AvailabilityBitfield, BackedCandidate, Balance, BlakeTwo256, Block,
|
|
BlockId, BlockNumber, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash,
|
|
CandidateIndex, CandidateReceipt, CheckedDisputeStatementSet, CheckedMultiDisputeStatementSet,
|
|
CollatorId, CollatorSignature, CommittedCandidateReceipt, CompactStatement, ConsensusLog,
|
|
CoreIndex, CoreState, DisputeState, DisputeStatement, DisputeStatementSet, DownwardMessage,
|
|
EncodeAs, ExecutorParam, ExecutorParamError, ExecutorParams, ExecutorParamsHash,
|
|
ExplicitDisputeStatement, GroupIndex, GroupRotationInfo, Hash, HashT, HeadData, Header,
|
|
HorizontalMessages, HrmpChannelId, Id, InboundDownwardMessage, InboundHrmpMessage, IndexedVec,
|
|
InherentData, InvalidDisputeStatementKind, Moment, MultiDisputeStatementSet, Nonce,
|
|
OccupiedCore, OccupiedCoreAssumption, OutboundHrmpMessage, ParathreadClaim, ParathreadEntry,
|
|
PersistedValidationData, PvfCheckStatement, PvfExecKind, PvfPrepKind, RuntimeMetricLabel,
|
|
RuntimeMetricLabelValue, RuntimeMetricLabelValues, RuntimeMetricLabels, RuntimeMetricOp,
|
|
RuntimeMetricUpdate, ScheduledCore, ScrapedOnChainVotes, SessionIndex, SessionInfo, Signature,
|
|
Signed, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SignedStatement,
|
|
SigningContext, Slot, UncheckedSigned, UncheckedSignedAvailabilityBitfield,
|
|
UncheckedSignedAvailabilityBitfields, UncheckedSignedStatement, UpgradeGoAhead,
|
|
UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode,
|
|
ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, ValidityAttestation,
|
|
ValidityError, ASSIGNMENT_KEY_TYPE_ID, LEGACY_MIN_BACKING_VOTES, LOWEST_PUBLIC_ID,
|
|
MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE, MAX_POV_SIZE, MIN_CODE_SIZE,
|
|
ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE, ON_DEMAND_MAX_QUEUE_MAX_SIZE, PARACHAINS_INHERENT_IDENTIFIER,
|
|
PARACHAIN_KEY_TYPE_ID,
|
|
};
|
|
|
|
#[cfg(feature = "std")]
|
|
pub use v6::{AssignmentPair, CollatorPair, ValidatorPair};
|