mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 00:47:55 +00:00
impl Randomness trait for Babe and remove unused RandomBeacon trait (#4886)
* impl Randomness trait for Babe and remove unused RandomBeacon trait * bump runtime version
This commit is contained in:
committed by
GitHub
parent
0d45d12e3f
commit
ea69238d03
@@ -476,22 +476,6 @@ sp_core::impl_maybe_marker!(
|
||||
trait MaybeMallocSizeOf: parity_util_mem::MallocSizeOf;
|
||||
);
|
||||
|
||||
/// A type that provides a randomness beacon.
|
||||
pub trait RandomnessBeacon {
|
||||
/// Returns 32 bytes of random data. The output will change eventually, but
|
||||
/// is not guaranteed to be different between any two calls.
|
||||
///
|
||||
/// # Security
|
||||
///
|
||||
/// This MUST NOT be used for gambling, as it can be influenced by a
|
||||
/// malicious validator in the short term. It MAY be used in many
|
||||
/// cryptographic protocols, however, so long as one remembers that this
|
||||
/// (like everything else on-chain) is public. For example, it can be
|
||||
/// used where a number is needed that cannot have been chosen by an
|
||||
/// adversary, for purposes such as public-coin zero-knowledge proofs.
|
||||
fn random() -> [u8; 32];
|
||||
}
|
||||
|
||||
/// A type that can be used in runtime structures.
|
||||
pub trait Member: Send + Sync + Sized + Debug + Eq + PartialEq + Clone + 'static {}
|
||||
impl<T: Send + Sync + Sized + Debug + Eq + PartialEq + Clone + 'static> Member for T {}
|
||||
|
||||
Reference in New Issue
Block a user