Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ddorgan
polkadot
Commits
47828402
Unverified
Commit
47828402
authored
Dec 09, 2019
by
Gavin Wood
Committed by
GitHub
Dec 09, 2019
Browse files
Bump Substrate, add Identity module (#676)
* Bump Substrate, add Identity module * Bump Substrate again
parent
ca8d5c54
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
47828402
This diff is collapsed.
Click to expand it.
runtime/Cargo.toml
View file @
47828402
...
...
@@ -27,7 +27,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", default-features =
sp-serializer
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
sp-session
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
version
=
{
package
=
"sp-version"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
tx-pool-api
=
{
package
=
"sp-transaction-pool-
runtime-
api"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
tx-pool-api
=
{
package
=
"sp-transaction-pool-api"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
block-builder-api
=
{
package
=
"sp-block-builder"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
authority-discovery
=
{
package
=
"pallet-authority-discovery"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
...
...
@@ -42,6 +42,7 @@ elections-phragmen = { package = "pallet-elections-phragmen", git = "https://git
executive
=
{
package
=
"frame-executive"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
finality-tracker
=
{
package
=
"pallet-finality-tracker"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
grandpa
=
{
package
=
"pallet-grandpa"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
features
=
["migrate-authorities"]
,
branch
=
"polkadot-master"
}
identity
=
{
package
=
"pallet-identity"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
im-online
=
{
package
=
"pallet-im-online"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
indices
=
{
package
=
"pallet-indices"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
membership
=
{
package
=
"pallet-membership"
,
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
,
branch
=
"polkadot-master"
}
...
...
@@ -103,6 +104,7 @@ std = [
"executive/std"
,
"finality-tracker/std"
,
"grandpa/std"
,
"identity/std"
,
"im-online/std"
,
"indices/std"
,
"membership/std"
,
...
...
runtime/src/lib.rs
View file @
47828402
...
...
@@ -97,7 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name
:
create_runtime_str!
(
"kusama"
),
impl_name
:
create_runtime_str!
(
"parity-kusama"
),
authoring_version
:
2
,
spec_version
:
10
29
,
spec_version
:
10
30
,
impl_version
:
0
,
apis
:
RUNTIME_API_VERSIONS
,
};
...
...
@@ -552,6 +552,27 @@ impl nicks::Trait for Runtime {
type
MaxLength
=
MaxLength
;
}
parameter_types!
{
// KUSAMA: can be probably be reduced for mainnet
// Minimum 100 bytes/KSM deposited (1 CENT/byte)
pub
const
BasicDeposit
:
Balance
=
1000
*
DOLLARS
;
// 258 bytes on-chain
pub
const
FieldDeposit
:
Balance
=
250
*
DOLLARS
;
// 66 bytes on-chain
pub
const
SubAccountDeposit
:
Balance
=
200
*
DOLLARS
;
// 53 bytes on-chain
pub
const
MaximumSubAccounts
:
u32
=
100
;
}
impl
identity
::
Trait
for
Runtime
{
type
Event
=
Event
;
type
Currency
=
Balances
;
type
Slashed
=
Treasury
;
type
BasicDeposit
=
BasicDeposit
;
type
FieldDeposit
=
FieldDeposit
;
type
SubAccountDeposit
=
SubAccountDeposit
;
type
MaximumSubAccounts
=
MaximumSubAccounts
;
type
RegistrarOrigin
=
collective
::
EnsureProportionMoreThan
<
_1
,
_2
,
AccountId
,
CouncilCollective
>
;
type
ForceOrigin
=
collective
::
EnsureProportionMoreThan
<
_1
,
_2
,
AccountId
,
CouncilCollective
>
;
}
construct_runtime!
{
pub
enum
Runtime
where
Block
=
Block
,
...
...
@@ -599,7 +620,11 @@ construct_runtime! {
Registrar
:
registrar
::{
Module
,
Call
,
Storage
,
Event
,
Config
<
T
>
},
// Simple nicknames module.
// KUSAMA: Remove before mainnet
Nicks
:
nicks
::{
Module
,
Call
,
Storage
,
Event
<
T
>
},
// Less simple identity module.
Identity
:
identity
::{
Module
,
Call
,
Storage
,
Event
<
T
>
},
}
}
...
...
@@ -678,7 +703,7 @@ sp_api::impl_runtime_apis! {
}
}
impl
tx_pool_api
::
TaggedTransactionQueue
<
Block
>
for
Runtime
{
impl
tx_pool_api
::
runtime_api
::
TaggedTransactionQueue
<
Block
>
for
Runtime
{
fn
validate_transaction
(
tx
:
<
Block
as
BlockT
>
::
Extrinsic
)
->
TransactionValidity
{
Executive
::
validate_transaction
(
tx
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment