@@ -28,19 +28,19 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.6",
|
||||
"@polkadot/api-derive": "1.16.0-beta.2",
|
||||
"@polkadot/keyring": "^2.10.1",
|
||||
"@polkadot/keyring": "^2.11.0-beta.2",
|
||||
"@polkadot/metadata": "1.16.0-beta.2",
|
||||
"@polkadot/rpc-core": "1.16.0-beta.2",
|
||||
"@polkadot/rpc-provider": "1.16.0-beta.2",
|
||||
"@polkadot/types": "1.16.0-beta.2",
|
||||
"@polkadot/types-known": "1.16.0-beta.2",
|
||||
"@polkadot/util": "^2.10.1",
|
||||
"@polkadot/util-crypto": "^2.10.1",
|
||||
"@polkadot/util": "^2.11.0-beta.2",
|
||||
"@polkadot/util-crypto": "^2.11.0-beta.2",
|
||||
"bn.js": "^5.1.2",
|
||||
"eventemitter3": "^4.0.4",
|
||||
"rxjs": "^6.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.10.1"
|
||||
"@polkadot/keyring": "^2.11.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import { AccountId, AccountIndex, Address, Balance, BalanceOf, BlockNumber, Call
|
||||
import { Period, Priority } from '@polkadot/types/interfaces/scheduler';
|
||||
import { Keys } from '@polkadot/types/interfaces/session';
|
||||
import { SocietyJudgement } from '@polkadot/types/interfaces/society';
|
||||
import { CompactAssignments, EraIndex, PhragmenScore, RewardDestination, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { CompactAssignments, ElectionSize, EraIndex, PhragmenScore, RewardDestination, ValidatorIndex, ValidatorPrefs } from '@polkadot/types/interfaces/staking';
|
||||
import { Key } from '@polkadot/types/interfaces/system';
|
||||
import { Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import { VestingInfo } from '@polkadot/types/interfaces/vesting';
|
||||
@@ -2363,45 +2363,22 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* minimized (to ensure less variance)
|
||||
*
|
||||
* # <weight>
|
||||
* E: number of edges. m: size of winner committee. n: number of nominators. d: edge degree
|
||||
* (16 for now) v: number of on-chain validator candidates.
|
||||
*
|
||||
* NOTE: given a solution which is reduced, we can enable a new check the ensure `|E| < n +
|
||||
* m`. We don't do this _yet_, but our offchain worker code executes it nonetheless.
|
||||
*
|
||||
* major steps (all done in `check_and_replace_solution`):
|
||||
*
|
||||
* - Storage: O(1) read `ElectionStatus`.
|
||||
* - Storage: O(1) read `PhragmenScore`.
|
||||
* - Storage: O(1) read `ValidatorCount`.
|
||||
* - Storage: O(1) length read from `SnapshotValidators`.
|
||||
*
|
||||
* - Storage: O(v) reads of `AccountId` to fetch `snapshot_validators`.
|
||||
* - Memory: O(m) iterations to map winner index to validator id.
|
||||
* - Storage: O(n) reads `AccountId` to fetch `snapshot_nominators`.
|
||||
* - Memory: O(n + m) reads to map index to `AccountId` for un-compact.
|
||||
*
|
||||
* - Storage: O(e) accountid reads from `Nomination` to read correct nominations.
|
||||
* - Storage: O(e) calls into `slashable_balance_of_vote_weight` to convert ratio to staked.
|
||||
*
|
||||
* - Memory: build_support_map. O(e).
|
||||
* - Memory: evaluate_support: O(E).
|
||||
*
|
||||
* - Storage: O(e) writes to `QueuedElected`.
|
||||
* - Storage: O(1) write to `QueuedScore`
|
||||
*
|
||||
* The weight of this call is 1/10th of the blocks total weight.
|
||||
* See `crate::weight` module.
|
||||
* # </weight>
|
||||
**/
|
||||
submitElectionSolution: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compactAssignments: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: PhragmenScore, era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
submitElectionSolution: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: PhragmenScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Unsigned version of `submit_election_solution`.
|
||||
*
|
||||
* Note that this must pass the [`ValidateUnsigned`] check which only allows transactions
|
||||
* from the local node to be included. In other words, only the block author can include a
|
||||
* transaction in the block.
|
||||
*
|
||||
* # <weight>
|
||||
* See `crate::weight` module.
|
||||
* # </weight>
|
||||
**/
|
||||
submitElectionSolutionUnsigned: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compactAssignments: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: PhragmenScore, era: EraIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
submitElectionSolutionUnsigned: AugmentedSubmittable<(winners: Vec<ValidatorIndex> | (ValidatorIndex | AnyNumber | Uint8Array)[], compact: CompactAssignments | { votes1?: any; votes2?: any; votes3?: any; votes4?: any; votes5?: any; votes6?: any; votes7?: any; votes8?: any; votes9?: any; votes10?: any; votes11?: any; votes12?: any; votes13?: any; votes14?: any; votes15?: any; votes16?: any } | string | Uint8Array, score: PhragmenScore, era: EraIndex | AnyNumber | Uint8Array, size: ElectionSize | { validators?: any; nominators?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
|
||||
/**
|
||||
* Schedule a portion of the stash to be unlocked ready for transfer out after the bond
|
||||
* period ends. If this leaves an amount actively bonded less than
|
||||
|
||||
Reference in New Issue
Block a user