Parachain auctions (#239)

* Slots module

* Integrate slots

* More drafting

* Minor updates

* Update parachains to use trati

* More build fixes

* Full code now compiles

* Add renew bid function

* Implement calculate_winner

* Warning remove

* Update gitignore

* Test framework

* Tests

* Further testing

* More tests, new parameterisation.

* Fix and new test

* Thread-safe tests

* Test off-boarding and a fix.

* Test onboarding

* Allow late onboarding.

* Another test and fix

* Avoid println in nostd

* Compact representation of paraids

* Introduce documentation.

* Introduce events.

* Additional test and fix

* Additional test

* Tidy up line lengths.

* Remove printlns

* Use later substrate utils.

* Fix build/test

* Make slots work with latest substrate

* Update runtime/src/slot_range.rs

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

* Update runtime/src/slots.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update runtime/src/slots.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* Polish logic

* Rewind to earlier substrate master

* Remove dead code.
This commit is contained in:
Gavin Wood
2019-05-25 13:34:23 +02:00
committed by GitHub
parent 10ae8d48f5
commit 32f9519743
11 changed files with 1936 additions and 238 deletions
+2 -1
View File
@@ -50,6 +50,7 @@ impl EcdsaSignature {
r[64] = self.2 as u8;
r
}
#[cfg(test)]
pub fn from_blob(blob: &[u8; 65]) -> Self {
let mut r = Self([0u8; 32], [0u8; 32], 0);
r.0[..].copy_from_slice(&blob[0..32]);
@@ -148,7 +149,7 @@ mod tests {
use tiny_keccak::keccak256;
use super::*;
use sr_io::{self as runtime_io, with_externalities};
use sr_io::with_externalities;
use substrate_primitives::{H256, Blake2Hasher};
use codec::{Decode, Encode};
// The testing primitives are very useful for avoiding having to work with signatures