Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
3832fc23
Commit
3832fc23
authored
May 07, 2019
by
Stanislav Tkach
Committed by
asynchronous rob
May 07, 2019
Browse files
Use authorities from Authorities runtime API, not Core (#248)
parent
834d5dcf
Pipeline
#37039
passed with stages
in 17 minutes
Changes
6
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
3832fc23
...
@@ -2273,6 +2273,7 @@ dependencies = [
...
@@ -2273,6 +2273,7 @@ dependencies = [
"polkadot-runtime 0.1.0",
"polkadot-runtime 0.1.0",
"polkadot-validation 0.1.0",
"polkadot-validation 0.1.0",
"substrate-client 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-client 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-authorities 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-keyring 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-keyring 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-primitives 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-primitives 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
...
@@ -2459,6 +2460,7 @@ dependencies = [
...
@@ -2459,6 +2460,7 @@ dependencies = [
"substrate-client 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-client 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-aura 1.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-aura 1.1.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-aura-primitives 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-aura-primitives 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-authorities 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-common 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-consensus-common 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-finality-grandpa 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-finality-grandpa 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-inherents 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
"substrate-inherents 1.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-master)",
...
...
collator/Cargo.toml
View file @
3832fc23
...
@@ -9,6 +9,7 @@ futures = "0.1.17"
...
@@ -9,6 +9,7 @@ futures = "0.1.17"
substrate-client
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-client
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
parity-codec
=
"3.0"
parity-codec
=
"3.0"
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-consensus-authorities
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
polkadot-runtime
=
{
path
=
"../runtime"
,
version
=
"0.1"
}
polkadot-runtime
=
{
path
=
"../runtime"
,
version
=
"0.1"
}
polkadot-primitives
=
{
path
=
"../primitives"
,
version
=
"0.1"
}
polkadot-primitives
=
{
path
=
"../primitives"
,
version
=
"0.1"
}
polkadot-cli
=
{
path
=
"../cli"
}
polkadot-cli
=
{
path
=
"../cli"
}
...
...
collator/src/lib.rs
View file @
3832fc23
...
@@ -48,6 +48,7 @@ extern crate futures;
...
@@ -48,6 +48,7 @@ extern crate futures;
extern
crate
substrate_client
as
client
;
extern
crate
substrate_client
as
client
;
extern
crate
parity_codec
as
codec
;
extern
crate
parity_codec
as
codec
;
extern
crate
substrate_primitives
as
primitives
;
extern
crate
substrate_primitives
as
primitives
;
extern
crate
substrate_consensus_authorities
as
consensus_authorities
;
extern
crate
tokio
;
extern
crate
tokio
;
extern
crate
polkadot_cli
;
extern
crate
polkadot_cli
;
...
@@ -75,11 +76,12 @@ use polkadot_primitives::parachain::{
...
@@ -75,11 +76,12 @@ use polkadot_primitives::parachain::{
self
,
BlockData
,
DutyRoster
,
HeadData
,
ConsolidatedIngress
,
Message
,
Id
as
ParaId
,
Extrinsic
,
self
,
BlockData
,
DutyRoster
,
HeadData
,
ConsolidatedIngress
,
Message
,
Id
as
ParaId
,
Extrinsic
,
PoVBlock
,
PoVBlock
,
};
};
use
polkadot_cli
::{
PolkadotService
,
CustomConfiguration
,
CoreApi
,
ParachainHost
};
use
polkadot_cli
::{
PolkadotService
,
CustomConfiguration
,
ParachainHost
};
use
polkadot_cli
::{
Worker
,
IntoExit
,
ProvideRuntimeApi
,
TaskExecutor
};
use
polkadot_cli
::{
Worker
,
IntoExit
,
ProvideRuntimeApi
,
TaskExecutor
};
use
polkadot_network
::
validation
::{
ValidationNetwork
,
SessionParams
};
use
polkadot_network
::
validation
::{
ValidationNetwork
,
SessionParams
};
use
polkadot_network
::
NetworkService
;
use
polkadot_network
::
NetworkService
;
use
tokio
::
timer
::
Timeout
;
use
tokio
::
timer
::
Timeout
;
use
consensus_authorities
::
AuthoritiesApi
;
pub
use
polkadot_cli
::
VersionInfo
;
pub
use
polkadot_cli
::
VersionInfo
;
pub
use
polkadot_network
::
validation
::
Incoming
;
pub
use
polkadot_network
::
validation
::
Incoming
;
...
...
validation/Cargo.toml
View file @
3832fc23
...
@@ -27,6 +27,7 @@ srml-aura = { git = "https://github.com/paritytech/substrate", branch = "polkado
...
@@ -27,6 +27,7 @@ srml-aura = { git = "https://github.com/paritytech/substrate", branch = "polkado
substrate-client
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-client
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-trie
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-trie
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
sr-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
sr-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-consensus-authorities
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
[dev-dependencies]
[dev-dependencies]
substrate-keyring
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
substrate-keyring
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"polkadot-master"
}
validation/src/attestation_service.rs
View file @
3832fc23
...
@@ -30,13 +30,13 @@ use std::sync::Arc;
...
@@ -30,13 +30,13 @@ use std::sync::Arc;
use
client
::{
error
::
Result
as
ClientResult
,
BlockchainEvents
,
ChainHead
,
BlockBody
};
use
client
::{
error
::
Result
as
ClientResult
,
BlockchainEvents
,
ChainHead
,
BlockBody
};
use
client
::
block_builder
::
api
::
BlockBuilder
;
use
client
::
block_builder
::
api
::
BlockBuilder
;
use
client
::
blockchain
::
HeaderBackend
;
use
client
::
blockchain
::
HeaderBackend
;
use
client
::
runtime_api
::
Core
;
use
primitives
::
ed25519
;
use
primitives
::
ed25519
;
use
futures
::
prelude
::
*
;
use
futures
::
prelude
::
*
;
use
polkadot_primitives
::{
Block
,
BlockId
};
use
polkadot_primitives
::{
Block
,
BlockId
};
use
polkadot_primitives
::
parachain
::{
CandidateReceipt
,
ParachainHost
};
use
polkadot_primitives
::
parachain
::{
CandidateReceipt
,
ParachainHost
};
use
extrinsic_store
::
Store
as
ExtrinsicStore
;
use
extrinsic_store
::
Store
as
ExtrinsicStore
;
use
runtime_primitives
::
traits
::{
ProvideRuntimeApi
,
Header
as
HeaderT
};
use
runtime_primitives
::
traits
::{
ProvideRuntimeApi
,
Header
as
HeaderT
};
use
consensus_authorities
::
AuthoritiesApi
;
use
tokio
::
runtime
::
TaskExecutor
;
use
tokio
::
runtime
::
TaskExecutor
;
use
tokio
::
runtime
::
current_thread
::
Runtime
as
LocalRuntime
;
use
tokio
::
runtime
::
current_thread
::
Runtime
as
LocalRuntime
;
...
@@ -114,7 +114,7 @@ pub(crate) fn start<C, N, P>(
...
@@ -114,7 +114,7 @@ pub(crate) fn start<C, N, P>(
<
C
::
Collation
as
IntoFuture
>
::
Future
:
Send
+
'static
,
<
C
::
Collation
as
IntoFuture
>
::
Future
:
Send
+
'static
,
P
:
BlockchainEvents
<
Block
>
+
ChainHead
<
Block
>
+
BlockBody
<
Block
>
,
P
:
BlockchainEvents
<
Block
>
+
ChainHead
<
Block
>
+
BlockBody
<
Block
>
,
P
:
ProvideRuntimeApi
+
HeaderBackend
<
Block
>
+
Send
+
Sync
+
'static
,
P
:
ProvideRuntimeApi
+
HeaderBackend
<
Block
>
+
Send
+
Sync
+
'static
,
P
::
Api
:
ParachainHost
<
Block
>
+
Core
<
Block
>
+
BlockBuilder
<
Block
>
,
P
::
Api
:
ParachainHost
<
Block
>
+
BlockBuilder
<
Block
>
+
AuthoritiesApi
<
Block
>
,
N
:
Network
+
Send
+
Sync
+
'static
,
N
:
Network
+
Send
+
Sync
+
'static
,
N
::
TableRouter
:
Send
+
'static
,
N
::
TableRouter
:
Send
+
'static
,
<
N
::
BuildTableRouter
as
IntoFuture
>
::
Future
:
Send
+
'static
,
<
N
::
BuildTableRouter
as
IntoFuture
>
::
Future
:
Send
+
'static
,
...
...
validation/src/lib.rs
View file @
3832fc23
...
@@ -51,6 +51,7 @@ extern crate substrate_consensus_aura as aura;
...
@@ -51,6 +51,7 @@ extern crate substrate_consensus_aura as aura;
extern
crate
substrate_consensus_aura_primitives
as
aura_primitives
;
extern
crate
substrate_consensus_aura_primitives
as
aura_primitives
;
extern
crate
substrate_finality_grandpa
as
grandpa
;
extern
crate
substrate_finality_grandpa
as
grandpa
;
extern
crate
substrate_transaction_pool
as
transaction_pool
;
extern
crate
substrate_transaction_pool
as
transaction_pool
;
extern
crate
substrate_consensus_authorities
as
consensus_authorities
;
#[macro_use]
#[macro_use]
extern
crate
error_chain
;
extern
crate
error_chain
;
...
@@ -72,7 +73,6 @@ use aura::SlotDuration;
...
@@ -72,7 +73,6 @@ use aura::SlotDuration;
use
client
::{
BlockchainEvents
,
ChainHead
,
BlockBody
};
use
client
::{
BlockchainEvents
,
ChainHead
,
BlockBody
};
use
client
::
blockchain
::
HeaderBackend
;
use
client
::
blockchain
::
HeaderBackend
;
use
client
::
block_builder
::
api
::
BlockBuilder
as
BlockBuilderApi
;
use
client
::
block_builder
::
api
::
BlockBuilder
as
BlockBuilderApi
;
use
client
::
runtime_api
::
Core
;
use
codec
::
Encode
;
use
codec
::
Encode
;
use
extrinsic_store
::
Store
as
ExtrinsicStore
;
use
extrinsic_store
::
Store
as
ExtrinsicStore
;
use
parking_lot
::
Mutex
;
use
parking_lot
::
Mutex
;
...
@@ -87,6 +87,7 @@ use runtime_primitives::{traits::{ProvideRuntimeApi, Header as HeaderT}, ApplyEr
...
@@ -87,6 +87,7 @@ use runtime_primitives::{traits::{ProvideRuntimeApi, Header as HeaderT}, ApplyEr
use
tokio
::
runtime
::
TaskExecutor
;
use
tokio
::
runtime
::
TaskExecutor
;
use
tokio
::
timer
::{
Delay
,
Interval
};
use
tokio
::
timer
::{
Delay
,
Interval
};
use
transaction_pool
::
txpool
::{
Pool
,
ChainApi
as
PoolChainApi
};
use
transaction_pool
::
txpool
::{
Pool
,
ChainApi
as
PoolChainApi
};
use
consensus_authorities
::
AuthoritiesApi
;
use
attestation_service
::
ServiceHandle
;
use
attestation_service
::
ServiceHandle
;
use
futures
::
prelude
::
*
;
use
futures
::
prelude
::
*
;
...
@@ -468,7 +469,7 @@ impl<C, N, P, TxApi> ProposerFactory<C, N, P, TxApi> where
...
@@ -468,7 +469,7 @@ impl<C, N, P, TxApi> ProposerFactory<C, N, P, TxApi> where
<
C
::
Collation
as
IntoFuture
>
::
Future
:
Send
+
'static
,
<
C
::
Collation
as
IntoFuture
>
::
Future
:
Send
+
'static
,
P
:
BlockchainEvents
<
Block
>
+
ChainHead
<
Block
>
+
BlockBody
<
Block
>
,
P
:
BlockchainEvents
<
Block
>
+
ChainHead
<
Block
>
+
BlockBody
<
Block
>
,
P
:
ProvideRuntimeApi
+
HeaderBackend
<
Block
>
+
Send
+
Sync
+
'static
,
P
:
ProvideRuntimeApi
+
HeaderBackend
<
Block
>
+
Send
+
Sync
+
'static
,
P
::
Api
:
ParachainHost
<
Block
>
+
Core
<
Block
>
+
BlockBuilder
Api
<
Block
>
,
P
::
Api
:
ParachainHost
<
Block
>
+
BlockBuilderApi
<
Block
>
+
Authorities
Api
<
Block
>
,
N
:
Network
+
Send
+
Sync
+
'static
,
N
:
Network
+
Send
+
Sync
+
'static
,
N
::
TableRouter
:
Send
+
'static
,
N
::
TableRouter
:
Send
+
'static
,
<
N
::
BuildTableRouter
as
IntoFuture
>
::
Future
:
Send
+
'static
,
<
N
::
BuildTableRouter
as
IntoFuture
>
::
Future
:
Send
+
'static
,
...
...
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