diff --git a/docs/METHODS_EVENTS.md b/docs/METHODS_EVENTS.md index 456a5cd620..bd667d4401 100644 --- a/docs/METHODS_EVENTS.md +++ b/docs/METHODS_EVENTS.md @@ -17,6 +17,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[indices](#indices)** +- **[offences](#offences)** + - **[session](#session)** - **[staking](#staking)** @@ -169,6 +171,14 @@ ___ ___ +### offences + +▸ **Offence**(`Kind`, `OpaqueTimeSlot`) +- **summary**: There is an offence reported of the given `kind` happened at the `session_index` and (kind-specific) time slot. This event is not deposited for duplicate slashes. + +___ + + ### session ▸ **NewSession**(`SessionIndex`) @@ -179,15 +189,15 @@ ___ ### staking -▸ **OfflineSlash**(`AccountId`, `Balance`) -- **summary**: One validator (and its nominators) has been slashed by the given amount. - -▸ **OfflineWarning**(`AccountId`, `u32`) -- **summary**: One validator (and its nominators) has been given an offline-warning (it is still within its grace). The accrued number of slashes is recorded, too. +▸ **OldSlashingReportDiscarded**(`SessionIndex`) +- **summary**: An old slashing report from a prior era was discarded because it could not be processed. ▸ **Reward**(`Balance`) - **summary**: All validators have been rewarded by the given balance. +▸ **Slash**(`AccountId`, `Balance`) +- **summary**: One validator (and its nominators) has been slashed by the given amount. + ___ diff --git a/docs/METHODS_EXTRINSICS.md b/docs/METHODS_EXTRINSICS.md index 2c12ca09cd..dd53928187 100644 --- a/docs/METHODS_EXTRINSICS.md +++ b/docs/METHODS_EXTRINSICS.md @@ -214,7 +214,7 @@ ___ ### imOnline -▸ **heartbeat**(heartbeat: `Heartbeat`, _signature: `AuthoritySignature`) +▸ **heartbeat**(heartbeat: `Heartbeat`, signature: `AuthoritySignature`) ___ @@ -253,9 +253,6 @@ ___ ▸ **setInvulnerables**(validators: `Vec`) - **summary**: Set the validators who cannot be slashed (if any). -▸ **setOfflineSlashGrace**(new: `Compact`) -- **summary**: Set the offline slash grace period. - ▸ **setPayee**(payee: `RewardDestination`) - **summary**: (Re-)set the payment target for a controller. Effects will be felt at the beginning of the next era. The dispatch origin for this call must be _Signed_ by the controller, not the stash. # - Independent of the arguments. Insignificant complexity. - Contains a limited number of reads. - Writes are limited to the `origin` account key. # diff --git a/docs/METHODS_STORAGE.md b/docs/METHODS_STORAGE.md index c16ef29a18..c2ebe6b832 100644 --- a/docs/METHODS_STORAGE.md +++ b/docs/METHODS_STORAGE.md @@ -21,6 +21,8 @@ _The following sections contain Storage methods are part of the default Substrat - **[indices](#indices)** +- **[offences](#offences)** + - **[session](#session)** - **[staking](#staking)** @@ -71,6 +73,9 @@ ___ ▸ **epochStartSlot**(): `u64` - **summary**: Slot at which the current epoch started. It is possible that no block was authored at the given slot and the epoch change was signalled later than this. +▸ **initialized**(): `Option` +- **summary**: Temporary value (cleared at block finalization) which is true if per-block initialization has already been called for current block. + ▸ **nextRandomness**(): `[u8;32]` - **summary**: Next epoch randomness. @@ -305,6 +310,20 @@ ___ ___ +### offences + +▸ **concurrentReportsIndex**(`Kind, OpaqueTimeSlot`): `Vec` +- **summary**: A vector of reports of the same kind that happened at the same time slot. + +▸ **reports**(`ReportIdOf`): `Option` +- **summary**: The primary structure that holds all offence records keyed by report identifiers. + +▸ **reportsByKindIndex**(`Kind`): `Bytes` +- **summary**: Enumerates all reports of a kind along with the time they happened. All reports are sorted by the time of offence. Note that the actual type of this mapping is `Vec`, this is because values of different types are not supported at the moment so we are doing the manual serialization. + +___ + + ### session ▸ **changed**(): `bool` @@ -354,6 +373,9 @@ ___ ▸ **currentEraStartSessionIndex**(): `SessionIndex` - **summary**: The session index at which the current era started. +▸ **eraSlashJournal**(`EraIndex`): `Vec` +- **summary**: All slashes that have occurred in a given era. + ▸ **forceEra**(): `Forcing` - **summary**: True if the next session change will be a new era regardless of index. @@ -369,20 +391,11 @@ ___ ▸ **nominators**(`AccountId`): `(Vec, Linkage)` - **summary**: The map from nominator stash key to the set of stash keys of all validators to nominate. -▸ **offlineSlash**(): `Perbill` -- **summary**: Slash, per validator that is taken for the first time they are found to be offline. - -▸ **offlineSlashGrace**(): `u32` -- **summary**: Number of instances of offline reports before slashing begins for validators. - ▸ **payee**(`AccountId`): `RewardDestination` - **summary**: Where the reward payment should be made. Keyed by stash. -▸ **recentlyOffline**(): `Vec<(AccountId,BlockNumber,u32)>` -- **summary**: Most recent `RECENT_OFFLINE_COUNT` instances. (Who it was, when it was reported, how many instances they were offline for). - -▸ **slashCount**(`AccountId`): `u32` -- **summary**: The number of times a given validator has been reported offline. This gets decremented by one each era that passes. +▸ **slashRewardFraction**(): `Perbill` +- **summary**: The percentage of the slash that is distributed to reporters. The rest of the slashed value is handled by the `Slash`. ▸ **slotStake**(): `BalanceOf` - **summary**: The amount of balance actively at stake for each validator slot, currently. This is used to derive rewards and punishments. diff --git a/lerna.json b/lerna.json index db4109337d..934d491237 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ "packages": [ "packages/*" ], - "version": "0.90.0-beta.60" + "version": "0.90.0-beta.61" } diff --git a/package.json b/package.json index 7929875b04..24769a13c4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "private": true, "engines": { "yarn": "^1.10.1" diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index ef94d422f8..193448bda3 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-contract", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Interfaces for interacting with contracts and contract ABIs", "main": "index.js", "keywords": [ @@ -27,6 +27,6 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme", "dependencies": { "@babel/runtime": "^7.5.5", - "@polkadot/types": "^0.90.0-beta.60" + "@polkadot/types": "^0.90.0-beta.61" } } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index d7c3ebb8e5..490cbf9cd0 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-derive", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Common functions used across Polkadot, derived from RPC calls and storage queries.", "main": "index.js", "keywords": [ @@ -28,8 +28,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme", "dependencies": { "@babel/runtime": "^7.5.5", - "@polkadot/api": "^0.90.0-beta.60", - "@polkadot/types": "^0.90.0-beta.60" + "@polkadot/api": "^0.90.0-beta.61", + "@polkadot/types": "^0.90.0-beta.61" }, "devDependencies": { "@polkadot/keyring": "^1.1.1" diff --git a/packages/api-metadata/package.json b/packages/api-metadata/package.json index 732a6a2c93..f5a40f879b 100644 --- a/packages/api-metadata/package.json +++ b/packages/api-metadata/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-metadata", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Helpers to extract information from runtime metadata", "main": "index.js", "publishConfig": { @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme", "dependencies": { "@babel/runtime": "^7.5.5", - "@polkadot/types": "^0.90.0-beta.60", + "@polkadot/types": "^0.90.0-beta.61", "@polkadot/util": "^1.1.1", "@polkadot/util-crypto": "^1.1.1" }, diff --git a/packages/api/package.json b/packages/api/package.json index e0b8b525ba..de00f51f02 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Promise and RxJS wrappers around the Polkadot JS RPC", "main": "index.js", "keywords": [ @@ -27,11 +27,11 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme", "dependencies": { "@babel/runtime": "^7.5.5", - "@polkadot/api-derive": "^0.90.0-beta.60", - "@polkadot/api-metadata": "^0.90.0-beta.60", - "@polkadot/rpc-core": "^0.90.0-beta.60", - "@polkadot/rpc-provider": "^0.90.0-beta.60", - "@polkadot/types": "^0.90.0-beta.60", + "@polkadot/api-derive": "^0.90.0-beta.61", + "@polkadot/api-metadata": "^0.90.0-beta.61", + "@polkadot/rpc-core": "^0.90.0-beta.61", + "@polkadot/rpc-provider": "^0.90.0-beta.61", + "@polkadot/types": "^0.90.0-beta.61", "@polkadot/util-crypto": "^1.1.1" }, "devDependencies": { diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index d1e6d74d6c..a71353f951 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-core", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "A JavaScript wrapper for the Polkadot JsonRPC interface", "main": "index.js", "keywords": [ @@ -27,9 +27,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme", "dependencies": { "@babel/runtime": "^7.5.5", - "@polkadot/jsonrpc": "^0.90.0-beta.60", - "@polkadot/rpc-provider": "^0.90.0-beta.60", - "@polkadot/types": "^0.90.0-beta.60", + "@polkadot/jsonrpc": "^0.90.0-beta.61", + "@polkadot/rpc-provider": "^0.90.0-beta.61", + "@polkadot/types": "^0.90.0-beta.61", "@polkadot/util": "^1.1.1", "rxjs": "^6.5.2" } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 567546c942..31ff86d80c 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-provider", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Transport providers for the API", "main": "index.js", "keywords": [ @@ -27,7 +27,7 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme", "dependencies": { "@babel/runtime": "^7.5.5", - "@polkadot/api-metadata": "^0.90.0-beta.60", + "@polkadot/api-metadata": "^0.90.0-beta.61", "@polkadot/util": "^1.1.1", "@polkadot/util-crypto": "^1.1.1", "@types/nock": "^10.0.3", diff --git a/packages/type-jsonrpc/package.json b/packages/type-jsonrpc/package.json index cd30808be9..93ac2ea72e 100644 --- a/packages/type-jsonrpc/package.json +++ b/packages/type-jsonrpc/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/jsonrpc", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Method definitions for the Polkadot RPC layer", "main": "index.js", "publishConfig": { diff --git a/packages/types/package.json b/packages/types/package.json index 048a0596c0..e7db97f435 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/types", - "version": "0.90.0-beta.60", + "version": "0.90.0-beta.61", "description": "Implementation of the Parity codec", "main": "index.js", "keywords": [