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
69937fda
Commit
69937fda
authored
Feb 04, 2019
by
Bastian Köcher
Committed by
asynchronous rob
Feb 04, 2019
Browse files
Update to latest substrate (#120)
parent
98203aab
Pipeline
#29780
passed with stages
in 13 minutes and 56 seconds
Changes
18
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
69937fda
This diff is collapsed.
Click to expand it.
availability-store/Cargo.toml
View file @
69937fda
...
...
@@ -8,7 +8,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
polkadot-primitives
=
{
path
=
"../primitives"
}
parking_lot
=
"0.4"
log
=
"0.3"
parity-codec
=
"
2.1
"
parity-codec
=
"
3.0
"
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
}
kvdb
=
{
git
=
"https://github.com/paritytech/parity-common"
,
rev
=
"616b40150ded71f57f650067fcbc5c99d7c343e6"
}
kvdb-rocksdb
=
{
git
=
"https://github.com/paritytech/parity-common"
,
rev
=
"616b40150ded71f57f650067fcbc5c99d7c343e6"
}
...
...
collator/Cargo.toml
View file @
69937fda
...
...
@@ -7,7 +7,7 @@ description = "Collator node implementation"
[dependencies]
futures
=
"0.1.17"
substrate-client
=
{
git
=
"https://github.com/paritytech/substrate"
}
parity-codec
=
"
2.1
"
parity-codec
=
"
3.0
"
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
}
polkadot-runtime
=
{
path
=
"../runtime"
,
version
=
"0.1"
}
polkadot-primitives
=
{
path
=
"../primitives"
,
version
=
"0.1"
}
...
...
consensus/Cargo.toml
View file @
69937fda
...
...
@@ -10,7 +10,7 @@ tokio = "0.1.7"
error-chain
=
"0.12"
log
=
"0.3"
exit-future
=
"0.1"
parity-codec
=
"
2.1
"
parity-codec
=
"
3.0
"
polkadot-availability-store
=
{
path
=
"../availability-store"
}
polkadot-parachain
=
{
path
=
"../parachain"
}
polkadot-primitives
=
{
path
=
"../primitives"
}
...
...
consensus/src/lib.rs
View file @
69937fda
...
...
@@ -83,7 +83,7 @@ use polkadot_primitives::parachain::{
AttestedCandidate
,
ParachainHost
,
Statement
as
PrimitiveStatement
};
use
primitives
::{
Ed25519AuthorityId
as
AuthorityId
,
ed25519
};
use
runtime_primitives
::
traits
::
ProvideRuntimeApi
;
use
runtime_primitives
::
{
traits
::
ProvideRuntimeApi
,
ApplyError
}
;
use
tokio
::
runtime
::
TaskExecutor
;
use
tokio
::
timer
::{
Delay
,
Interval
};
use
transaction_pool
::
txpool
::{
Pool
,
ChainApi
as
PoolChainApi
};
...
...
@@ -507,7 +507,7 @@ impl<C, TxApi> consensus::Proposer<Block> for Proposer<C, TxApi> where
type
Error
=
Error
;
type
Create
=
Either
<
CreateProposal
<
C
,
TxApi
>
,
future
::
FutureResult
<
Block
,
Error
>>
;
fn
propose
(
&
self
,
inherent_data
:
InherentData
)
->
Self
::
Create
{
fn
propose
(
&
self
,
inherent_data
:
InherentData
,
max_duration
:
Duration
)
->
Self
::
Create
{
const
ATTEMPT_PROPOSE_EVERY
:
Duration
=
Duration
::
from_millis
(
100
);
const
SLOT_DURATION_DENOMINATOR
:
u64
=
3
;
// wait up to 1/3 of the slot for candidates.
...
...
@@ -558,6 +558,8 @@ impl<C, TxApi> consensus::Proposer<Block> for Proposer<C, TxApi> where
believed_minimum_timestamp
:
believed_timestamp
,
timing
,
inherent_data
:
Some
(
inherent_data
),
// leave some time for the proposal finalisation
deadline
:
Instant
::
now
()
+
max_duration
-
max_duration
/
3
,
})
}
}
...
...
@@ -626,6 +628,7 @@ pub struct CreateProposal<C: Send + Sync, TxApi: PoolChainApi> {
timing
:
ProposalTiming
,
believed_minimum_timestamp
:
u64
,
inherent_data
:
Option
<
InherentData
>
,
deadline
:
Instant
,
}
impl
<
C
,
TxApi
>
CreateProposal
<
C
,
TxApi
>
where
...
...
@@ -637,8 +640,6 @@ impl<C, TxApi> CreateProposal<C, TxApi> where
use
client
::
block_builder
::
BlockBuilder
;
use
runtime_primitives
::
traits
::{
Hash
as
HashT
,
BlakeTwo256
};
const
MAX_TRANSACTIONS
:
usize
=
40
;
let
mut
inherent_data
=
self
.inherent_data
.take
()
.expect
(
"CreateProposal is not polled after finishing; qed"
);
inherent_data
.put_data
(
polkadot_runtime
::
PARACHAIN_INHERENT_IDENTIFIER
,
&
candidates
)
.map_err
(
ErrorKind
::
InherentError
)
?
;
...
...
@@ -653,18 +654,20 @@ impl<C, TxApi> CreateProposal<C, TxApi> where
}
let
mut
unqueue_invalid
=
Vec
::
new
();
let
mut
pending_size
=
0
;
let
ready_iter
=
self
.transaction_pool
.ready
();
for
ready
in
ready_iter
.take
(
MAX_TRANSACTIONS
)
{
let
encoded_size
=
ready
.data
.encode
()
.len
();
if
pending_size
+
encoded_size
>=
MAX_TRANSACTIONS_SIZE
{
break
for
ready
in
self
.transaction_pool
.ready
()
{
if
Instant
::
now
()
>
self
.deadline
{
debug!
(
"Consensus deadline reached when pushing block transactions, proceeding with proposing."
);
break
;
}
match
block_builder
.push
(
ready
.data
.clone
())
{
Ok
(())
=>
{
pending_size
+=
encoded_size
;
debug!
(
"[{:?}] Pushed to the block."
,
ready
.hash
);
}
Err
(
client
::
error
::
Error
(
client
::
error
::
ErrorKind
::
ApplyExtrinsicFailed
(
ApplyError
::
FullBlock
),
_
))
=>
{
debug!
(
"Block is full, proceed with proposing."
);
break
;
}
Err
(
e
)
=>
{
trace!
(
target
:
"transaction-pool"
,
"Invalid transaction: {}"
,
e
);
...
...
erasure-coding/Cargo.toml
View file @
69937fda
...
...
@@ -7,6 +7,6 @@ edition = "2018"
[dependencies]
polkadot-primitives
=
{
path
=
"../primitives"
}
reed-solomon-erasure
=
{
git
=
"https://github.com/paritytech/reed-solomon-erasure"
}
parity-codec
=
"
2.1
"
parity-codec
=
"
3.0
"
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
}
substrate-trie
=
{
git
=
"https://github.com/paritytech/substrate"
}
network/Cargo.toml
View file @
69937fda
...
...
@@ -10,8 +10,8 @@ parking_lot = "0.4"
polkadot-availability-store
=
{
path
=
"../availability-store"
}
polkadot-consensus
=
{
path
=
"../consensus"
}
polkadot-primitives
=
{
path
=
"../primitives"
}
parity-codec
=
"
2.1
"
parity-codec-derive
=
"
2.1
"
parity-codec
=
"
3.0
"
parity-codec-derive
=
"
3.0
"
substrate-network
=
{
git
=
"https://github.com/paritytech/substrate"
}
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
}
sr-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
}
...
...
parachain/Cargo.toml
View file @
69937fda
...
...
@@ -5,8 +5,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
description
=
"Types and utilities for creating and working with parachains"
[dependencies]
parity-codec
=
{
version
=
"
2.1
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
2.1
"
,
default-features
=
false
}
parity-codec
=
{
version
=
"
3.0
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
3.0
"
,
default-features
=
false
}
wasmi
=
{
version
=
"0.4.3"
,
optional
=
true
}
error-chain
=
{
version
=
"0.12"
,
optional
=
true
}
...
...
primitives/Cargo.toml
View file @
69937fda
...
...
@@ -6,8 +6,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]
serde
=
{
version
=
"1.0"
,
default-features
=
false
}
serde_derive
=
{
version
=
"1.0"
,
optional
=
true
}
parity-codec
=
{
version
=
"
2.1
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
2.1
"
,
default-features
=
false
}
parity-codec
=
{
version
=
"
3.0
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
3.0
"
,
default-features
=
false
}
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
}
substrate-client
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
}
sr-version
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
}
...
...
runtime/Cargo.toml
View file @
69937fda
...
...
@@ -11,8 +11,8 @@ serde = { version = "1.0", default-features = false }
serde_derive
=
{
version
=
"1.0"
,
optional
=
true
}
safe-mix
=
{
version
=
"1.0"
,
default-features
=
false
}
polkadot-primitives
=
{
path
=
"../primitives"
,
default-features
=
false
}
parity-codec
=
{
version
=
"
2.2
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
2.2
"
,
default-features
=
false
}
parity-codec
=
{
version
=
"
3.0
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
3.0
"
,
default-features
=
false
}
substrate-serializer
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
}
sr-std
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
}
sr-io
=
{
git
=
"https://github.com/paritytech/substrate"
,
default-features
=
false
}
...
...
runtime/src/lib.rs
View file @
69937fda
...
...
@@ -105,7 +105,7 @@ pub use balances::Call as BalancesCall;
pub
use
parachains
::{
Call
as
ParachainsCall
,
INHERENT_IDENTIFIER
as
PARACHAIN_INHERENT_IDENTIFIER
};
pub
use
sr_primitives
::{
Permill
,
Perbill
};
pub
use
timestamp
::
BlockPeriod
;
pub
use
srml_support
::
{
StorageValue
,
RuntimeMetadata
}
;
pub
use
srml_support
::
StorageValue
;
/// Runtime version.
pub
const
VERSION
:
RuntimeVersion
=
RuntimeVersion
{
...
...
runtime/wasm/Cargo.lock
View file @
69937fda
This diff is collapsed.
Click to expand it.
runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.compact.wasm
View file @
69937fda
No preview for this file type
runtime/wasm/target/wasm32-unknown-unknown/release/polkadot_runtime.wasm
View file @
69937fda
No preview for this file type
src/main.rs
View file @
69937fda
...
...
@@ -73,6 +73,7 @@ fn run() -> cli::error::Result<()> {
executable_name
:
"polkadot"
,
author
:
"Parity Team <admin@parity.io>"
,
description
:
"Polkadot Relay-chain Client Node"
,
support_url
:
"https://github.com/paritytech/polkadot/issues/new"
,
};
cli
::
run
(::
std
::
env
::
args
(),
Worker
,
version
)
}
statement-table/Cargo.toml
View file @
69937fda
...
...
@@ -4,7 +4,7 @@ version = "0.1.0"
authors
=
[
"Parity Technologies <admin@parity.io>"
]
[dependencies]
parity-codec
=
"
2.1
"
parity-codec-derive
=
"
2.1
"
parity-codec
=
"
3.0
"
parity-codec-derive
=
"
3.0
"
substrate-primitives
=
{
git
=
"https://github.com/paritytech/substrate"
}
polkadot-primitives
=
{
path
=
"../primitives"
}
test-parachains/adder/Cargo.toml
View file @
69937fda
...
...
@@ -6,6 +6,6 @@ description = "Test parachain which adds to a number as its state transition"
[dependencies]
polkadot-parachain
=
{
path
=
"../../parachain/"
,
default-features
=
false
}
parity-codec
=
{
version
=
"
2.1
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
2.1
"
,
default-features
=
false
}
parity-codec
=
{
version
=
"
3.0
"
,
default-features
=
false
}
parity-codec-derive
=
{
version
=
"
3.0
"
,
default-features
=
false
}
tiny-keccak
=
"1.4"
test-parachains/adder/collator/src/main.rs
View file @
69937fda
...
...
@@ -137,6 +137,7 @@ fn main() {
executable_name
:
"adder-collator"
,
description
:
"collator for adder parachain"
,
author
:
"parity technologies"
,
support_url
:
"https://github.com/paritytech/polkadot/issues/new"
,
}
);
...
...
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