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
0a1c99f2
Unverified
Commit
0a1c99f2
authored
Mar 30, 2020
by
Bastian Köcher
Committed by
GitHub
Mar 30, 2020
Browse files
Upgrade bitvec and parity-scale-codec (#947)
parent
2aa46b7e
Pipeline
#85513
passed with stages
in 25 minutes and 26 seconds
Changes
20
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
0a1c99f2
...
...
@@ -379,9 +379,13 @@ checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead"
[[package]]
name = "bitvec"
version = "0.1
5.2
"
version = "0.1
7.4
"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6"
checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c"
dependencies = [
"either",
"radium",
]
[[package]]
name = "blake2"
...
...
@@ -3845,9 +3849,9 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
version = "1.
2
.0"
version = "1.
3
.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "
f509c5e67ca0605ee17dcd3f91ef41cadd685c75a298fb6261b781a5acb3f910
"
checksum = "
329c8f7f4244ddb5c37c103641027a76c530e65e8e4b8240b29f81ea40508b17
"
dependencies = [
"arrayvec 0.5.1",
"bitvec",
...
...
@@ -4791,6 +4795,12 @@ dependencies = [
"proc-macro2 1.0.9",
]
[[package]]
name = "radium"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac"
[[package]]
name = "rand"
version = "0.3.23"
...
...
availability-store/Cargo.toml
View file @
0a1c99f2
...
...
@@ -14,7 +14,7 @@ log = "0.4.8"
futures
=
"0.3.4"
tokio
=
{
version
=
"0.2.13"
,
features
=
["rt-core"]
}
exit-future
=
"0.2.0"
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
features
=
["derive"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
features
=
["derive"]
}
sc-network
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
consensus_common
=
{
package
=
"sp-consensus"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
client
=
{
package
=
"sc-client-api"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
...
...
collator/Cargo.toml
View file @
0a1c99f2
...
...
@@ -24,7 +24,7 @@ polkadot-service = { path = "../service" }
log
=
"0.4.8"
tokio
=
"0.2.13"
futures-timer
=
"2.0"
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
}
[dev-dependencies]
keyring
=
{
package
=
"sp-keyring"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
erasure-coding/Cargo.toml
View file @
0a1c99f2
...
...
@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
primitives
=
{
package
=
"polkadot-primitives"
,
path
=
"../primitives"
}
reed_solomon
=
{
package
=
"reed-solomon-erasure"
,
git
=
"https://github.com/paritytech/reed-solomon-erasure"
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
sp-core
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
trie
=
{
package
=
"sp-trie"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
derive_more
=
"0.15.0"
network/Cargo.toml
View file @
0a1c99f2
...
...
@@ -14,7 +14,7 @@ av_store = { package = "polkadot-availability-store", path = "../availability-st
polkadot-validation
=
{
path
=
"../validation"
}
polkadot-primitives
=
{
path
=
"../primitives"
}
polkadot-erasure-coding
=
{
path
=
"../erasure-coding"
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
sc-network
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sc-network-gossip
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-core
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
...
...
parachain/Cargo.toml
View file @
0a1c99f2
...
...
@@ -6,7 +6,7 @@ description = "Types and utilities for creating and working with parachains"
edition
=
"2018"
[dependencies]
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
[
"derive"
]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
[
"derive"
]
}
derive_more
=
{
version
=
"0.99.2"
,
optional
=
true
}
serde
=
{
version
=
"1.0.102"
,
default-features
=
false
,
features
=
[
"derive"
],
optional
=
true
}
sp-std
=
{
package
=
"sp-std"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
...
...
primitives/Cargo.toml
View file @
0a1c99f2
...
...
@@ -6,7 +6,7 @@ edition = "2018"
[dependencies]
serde
=
{
version
=
"1.0.102"
,
optional
=
true
,
features
=
["derive"]
}
parity-scale-codec
=
{
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
[
"bit-vec"
,
"derive"
]
}
parity-scale-codec
=
{
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
[
"bit-vec"
,
"derive"
]
}
primitives
=
{
package
=
"sp-core"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
inherents
=
{
package
=
"sp-inherents"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
application-crypto
=
{
package
=
"sp-application-crypto"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
...
...
@@ -17,7 +17,7 @@ sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master
runtime_primitives
=
{
package
=
"sp-runtime"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
polkadot-parachain
=
{
path
=
"../parachain"
,
default-features
=
false
}
trie
=
{
package
=
"sp-trie"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
bitvec
=
{
version
=
"0.1
5.2
"
,
default-features
=
false
,
features
=
["alloc"]
}
bitvec
=
{
version
=
"0.1
7.4
"
,
default-features
=
false
,
features
=
["alloc"]
}
babe
=
{
package
=
"pallet-babe"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
,
default-features
=
false
}
[dev-dependencies]
...
...
primitives/src/parachain.rs
View file @
0a1c99f2
...
...
@@ -626,7 +626,7 @@ pub struct AttestedCandidate {
/// Validity attestations.
pub
validity_votes
:
Vec
<
ValidityAttestation
>
,
/// Indices of the corresponding validity votes.
pub
validator_indices
:
BitVec
<
bitvec
::
cursor
::
LittleEndian
,
u8
>
,
pub
validator_indices
:
BitVec
<
bitvec
::
order
::
Lsb0
,
u8
>
,
}
impl
AttestedCandidate
{
...
...
rpc/Cargo.toml
View file @
0a1c99f2
...
...
@@ -14,4 +14,4 @@ sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
txpool-api
=
{
package
=
"sp-transaction-pool"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
frame-rpc-system
=
{
package
=
"substrate-frame-rpc-system"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
pallet-transaction-payment-rpc
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
}
runtime/common/Cargo.toml
View file @
0a1c99f2
...
...
@@ -5,8 +5,8 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition
=
"2018"
[dependencies]
bitvec
=
{
version
=
"0.1
5.2
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
bitvec
=
{
version
=
"0.1
7.4
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
log
=
{
version
=
"0.3.9"
,
optional
=
true
}
rustc-hex
=
{
version
=
"2.0.1"
,
default-features
=
false
}
serde
=
{
version
=
"1.0.102"
,
default-features
=
false
}
...
...
runtime/common/src/attestations.rs
View file @
0a1c99f2
...
...
@@ -168,7 +168,7 @@ impl<T: Trait> Module<T> {
let
attesting_indices
=
head
.validator_indices
.iter
()
.enumerate
()
.filter
(|(
_
,
bit
)|
*
bit
)
.filter
(|(
_
,
bit
)|
*
*
bit
)
.inspect
(|
&
(
auth_index
,
_
)|
{
if
let
Some
(
stash_id
)
=
validators
.get
(
auth_index
)
{
valid
.push
(
stash_id
.clone
());
...
...
runtime/common/src/parachains.rs
View file @
0a1c99f2
...
...
@@ -964,7 +964,7 @@ impl<T: Trait> Module<T> {
for
(
vote_index
,
(
auth_index
,
_
))
in
candidate
.validator_indices
.iter
()
.enumerate
()
.filter
(|(
_
,
bit
)|
*
bit
)
.filter
(|(
_
,
bit
)|
*
*
bit
)
.enumerate
()
{
let
validity_attestation
=
match
candidate
.validity_votes
.get
(
vote_index
)
{
...
...
@@ -1200,7 +1200,7 @@ mod tests {
use
sp_trie
::
NodeCodec
;
use
sp_runtime
::{
impl_opaque_keys
,
Perbill
,
curve
::
PiecewiseLinear
,
testing
::
{
Header
}
,
Perbill
,
curve
::
PiecewiseLinear
,
testing
::
Header
,
traits
::{
BlakeTwo256
,
IdentityLookup
,
SaturatedConversion
,
OpaqueKeys
,
...
...
runtime/kusama/Cargo.toml
View file @
0a1c99f2
...
...
@@ -6,8 +6,8 @@ edition = "2018"
build
=
"build.rs"
[dependencies]
bitvec
=
{
version
=
"0.1
5.2
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
bitvec
=
{
version
=
"0.1
7.4
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
log
=
{
version
=
"0.3.9"
,
optional
=
true
}
rustc-hex
=
{
version
=
"2.0.1"
,
default-features
=
false
}
serde
=
{
version
=
"1.0.102"
,
default-features
=
false
}
...
...
runtime/polkadot/Cargo.toml
View file @
0a1c99f2
...
...
@@ -6,7 +6,7 @@ edition = "2018"
build
=
"build.rs"
[dependencies]
bitvec
=
{
version
=
"0.1
5.2
"
,
default-features
=
false
,
features
=
["alloc"]
}
bitvec
=
{
version
=
"0.1
7.4
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.2.0"
,
default-features
=
false
,
features
=
["derive"]
}
log
=
{
version
=
"0.3.9"
,
optional
=
true
}
rustc-hex
=
{
version
=
"2.0.1"
,
default-features
=
false
}
...
...
runtime/test-runtime/Cargo.toml
View file @
0a1c99f2
...
...
@@ -6,8 +6,8 @@ edition = "2018"
build
=
"build.rs"
[dependencies]
bitvec
=
{
version
=
"0.1
5.2
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
bitvec
=
{
version
=
"0.1
7.4
"
,
default-features
=
false
,
features
=
["alloc"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
log
=
{
version
=
"0.3.9"
,
optional
=
true
}
rustc-hex
=
{
version
=
"2.0.1"
,
default-features
=
false
}
serde
=
{
version
=
"1.0.102"
,
default-features
=
false
}
...
...
service/Cargo.toml
View file @
0a1c99f2
...
...
@@ -49,7 +49,7 @@ babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/par
sp-block-builder
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
pallet-transaction-payment-rpc-runtime-api
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
system_rpc_runtime_api
=
{
package
=
"frame-system-rpc-runtime-api"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
}
sp-session
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
sp-offchain
=
{
package
=
"sp-offchain"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
prometheus-endpoint
=
{
package
=
"substrate-prometheus-endpoint"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
...
...
statement-table/Cargo.toml
View file @
0a1c99f2
...
...
@@ -5,6 +5,6 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition
=
"2018"
[dependencies]
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
sp-core
=
{
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
primitives
=
{
package
=
"polkadot-primitives"
,
path
=
"../primitives"
}
test-parachains/adder/Cargo.toml
View file @
0a1c99f2
...
...
@@ -8,7 +8,7 @@ build = "build.rs"
[dependencies]
parachain
=
{
package
=
"polkadot-parachain"
,
path
=
"../../parachain/"
,
default-features
=
false
,
features
=
[
"wasm-api"
]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
tiny-keccak
=
"1.5.0"
dlmalloc
=
{
version
=
"0.1.3"
,
features
=
[
"global"
]
}
...
...
validation/Cargo.toml
View file @
0a1c99f2
...
...
@@ -12,7 +12,7 @@ tokio = { version = "0.2.13", features = ["rt-core", "blocking"] }
derive_more
=
"0.14.1"
log
=
"0.4.8"
exit-future
=
"0.2.0"
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
1
.0"
,
default-features
=
false
,
features
=
["derive"]
}
codec
=
{
package
=
"parity-scale-codec"
,
version
=
"1.
3
.0"
,
default-features
=
false
,
features
=
["derive"]
}
availability_store
=
{
package
=
"polkadot-availability-store"
,
path
=
"../availability-store"
}
parachain
=
{
package
=
"polkadot-parachain"
,
path
=
"../parachain"
}
polkadot-primitives
=
{
path
=
"../primitives"
}
...
...
@@ -30,7 +30,7 @@ sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "mast
block-builder
=
{
package
=
"sc-block-builder"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
trie
=
{
package
=
"sp-trie"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
runtime_primitives
=
{
package
=
"sp-runtime"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
bitvec
=
{
version
=
"0.1
5.2
"
,
default-features
=
false
,
features
=
["alloc"]
}
bitvec
=
{
version
=
"0.1
7.4
"
,
default-features
=
false
,
features
=
["alloc"]
}
runtime_babe
=
{
package
=
"pallet-babe"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
babe-primitives
=
{
package
=
"sp-consensus-babe"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
keystore
=
{
package
=
"sc-keystore"
,
git
=
"https://github.com/paritytech/substrate"
,
branch
=
"master"
}
...
...
validation/src/shared_table/mod.rs
View file @
0a1c99f2
...
...
@@ -549,7 +549,7 @@ impl SharedTable {
validity_votes
.sort_by
(|(
id1
,
_
),
(
id2
,
_
)|
id1
.cmp
(
id2
));
let
mut
validator_indices
=
bitvec!
[
bitvec
::
cursor
::
LittleEndian
,
u8
;
bitvec
::
order
::
Lsb0
,
u8
;
0
;
validity_votes
.last
()
.map
(|(
i
,
_
)|
i
+
1
)
.unwrap_or_default
()
];
...
...
Ghost User
@ghost
mentioned in commit
68deba84
·
Mar 30, 2020
mentioned in commit
68deba84
mentioned in commit 68deba841f133b71ff6e4f713eaae5b1ba94c364
Toggle commit list
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