mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 18:01:07 +00:00
81d8a5d01d
* Initial work on exposing pre-runtime digests
This provides the primitive API, as well as exposing it from BABE.
* Initial work on using pre-digests in runtimes
This includes both code to expose them from `srml_system`, as well as
using it in (currently dead) code in `srml_babe`.
* Bump `{spec,impl}_version`
* Add `u64_backend` feature to curve25519-dalek
Otherwise, it errors out at compile-time.
* Bump `Cargo.lock`
* Do not depend on the schnorrkel crate in the runtime
The schnorrkel crate does not work on `#![no_std]`, but the runtime only
needs constants from it. This adds our own definitions of those
constants, and checks them for correctness at compile-time.
* Actually implement storage of VRF outputs
* Trivial formatting change
* Provide a `hash_randomness` function in BABE
for processing VRF outputs.
* Implement a basic randomness generating function
It just XORs the VRF outputs together.
* Actually implement on-chain randomness
Blake2b is used for hashing.
* Update dependencies
* Run `cargo update` where needed
* Re-add a newline at EOF
* Remove broken and unsafe code
XOR is not a hash function, and must not be used as such. The
implementation was also needlessly unsafe.
* Run `cargo update` where needed
* Remove spurious dependency
* Document security guarantees of BABE randomness
* Add a `RandomnessBeacon` trait
* Document `RandomnessBeacon::random`
* Fix silly compile error (unexpected type arguments)
* Fix BABE randomness
* Implement `FindAuthor` for `babe::Module`
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>
* Respond to suggestions from code review and fix bugs
* Store an authority index, not the authority itself.
* Avoid unnecessary decoding.
* Implement relative slots and BABE randomness fully and correctly.
* Remove spurious dependency
* Fix error reported by rust-analyzer
* Update Cargo.lock files
* `wrapping_add` → `checked_add`
The epoch index will not overflow. Panic if it does.
* Move randomness documentation to trait
* Fix compile error in test suite
* Explain 2^64 limit
Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>
76 lines
2.1 KiB
TOML
76 lines
2.1 KiB
TOML
[package]
|
|
name = "substrate-primitives"
|
|
version = "2.0.0"
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
edition = "2018"
|
|
|
|
[dependencies]
|
|
rstd = { package = "sr-std", path = "../sr-std", default-features = false }
|
|
parity-codec = { version = "4.1.1", default-features = false, features = ["derive"] }
|
|
rustc-hex = { version = "2.0", default-features = false }
|
|
serde = { version = "1.0", optional = true, features = ["derive"] }
|
|
twox-hash = { version = "1.2.0", optional = true }
|
|
byteorder = { version = "1.3.1", default-features = false }
|
|
primitive-types = { version = "0.4.0", default-features = false, features = ["codec"] }
|
|
impl-serde = { version = "0.1", optional = true }
|
|
wasmi = { version = "0.4.3", optional = true }
|
|
hash-db = { version = "0.12", default-features = false }
|
|
hash256-std-hasher = { version = "0.12", default-features = false }
|
|
ed25519-dalek = { version = "1.0.0-pre.1", optional = true }
|
|
base58 = { version = "0.1", optional = true }
|
|
blake2-rfc = { version = "0.2.18", optional = true }
|
|
schnorrkel = { version = "0.1.1", optional = true }
|
|
rand = { version = "0.6", optional = true }
|
|
sha2 = { version = "0.8", optional = true }
|
|
substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39", optional = true }
|
|
tiny-bip39 = { version = "0.6.1", optional = true }
|
|
hex = { version = "0.3", optional = true }
|
|
regex = { version = "1.1", optional = true }
|
|
num-traits = { version = "0.2", default-features = false }
|
|
|
|
[dev-dependencies]
|
|
substrate-serializer = { path = "../serializer" }
|
|
pretty_assertions = "0.6"
|
|
hex-literal = "0.2"
|
|
rand = "0.6"
|
|
criterion = "0.2"
|
|
|
|
[[bench]]
|
|
name = "benches"
|
|
harness = false
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = [
|
|
"wasmi",
|
|
"primitive-types/std",
|
|
"primitive-types/serde",
|
|
"primitive-types/byteorder",
|
|
"primitive-types/rustc-hex",
|
|
"primitive-types/libc",
|
|
"impl-serde",
|
|
"parity-codec/std",
|
|
"hash256-std-hasher/std",
|
|
"hash-db/std",
|
|
"rstd/std",
|
|
"serde",
|
|
"rustc-hex/std",
|
|
"twox-hash",
|
|
"blake2-rfc",
|
|
"ed25519-dalek",
|
|
"hex",
|
|
"base58",
|
|
"substrate-bip39",
|
|
"tiny-bip39",
|
|
"serde",
|
|
"byteorder/std",
|
|
"rand",
|
|
"sha2",
|
|
"schnorrkel",
|
|
"regex",
|
|
"num-traits/std",
|
|
]
|