Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a83059a
Completely rework dispatch mechanism into something modular.
gavofyork Mar 13, 2018
82a178d
Council vote tests.
gavofyork Mar 13, 2018
1d28d9a
Fix tests.
gavofyork Mar 13, 2018
69c88c3
whitespace.
gavofyork Mar 13, 2018
b12a708
Fix demo runtime tests.
gavofyork Mar 14, 2018
e48e86d
Merge branch 'gav-demo' into gav-dispatch
gavofyork Mar 14, 2018
8e3cc51
Fix up tests.
gavofyork Mar 14, 2018
53e2fdf
Merge branch 'gav-demo' into gav-dispatch
gavofyork Mar 14, 2018
27ecd6f
Merge branch 'master' into gav-dispatch
gavofyork Mar 14, 2018
5eca74a
Remove dead code.
gavofyork Mar 14, 2018
5d5f194
Initial util code for random beacon
gavofyork Mar 14, 2018
7cece3b
Merge branch 'master' into gav-dispatch
gavofyork Mar 14, 2018
8c2396d
Timestamp uses new storage API.
gavofyork Mar 14, 2018
6b6c240
Move over system module to new API.
gavofyork Mar 14, 2018
a79dab2
Much nicer storage API, moved over staking module.
gavofyork Mar 15, 2018
1fd6b3e
More refactoring.
gavofyork Mar 15, 2018
51b4a8c
Democracy uses new storage API.
gavofyork Mar 15, 2018
8ada9f7
Council uses new RPC.
gavofyork Mar 16, 2018
c4f5f42
Fix more tests.
gavofyork Mar 16, 2018
d11f5ca
Use match for Id
gavofyork Mar 16, 2018
53eb893
Merge branch 'gav-storage-revamp' into gav-random-beacon
gavofyork Mar 16, 2018
d228593
Generic mix.
gavofyork Mar 16, 2018
a90fbe3
Integrate random beacon
gavofyork Mar 16, 2018
d352727
Update binaries.
gavofyork Mar 16, 2018
19f7258
Fixes relating to with_ext removal.
gavofyork Mar 16, 2018
ff2fa3c
Remove dead code.
gavofyork Mar 16, 2018
c674963
Rework mixer into an iterator adaptor.
gavofyork Mar 17, 2018
c49d8a9
Merge branch 'master' into gav-random-beacon
gavofyork Mar 19, 2018
74a59b9
Link to paper.
gavofyork Mar 19, 2018
23ca1b2
Algorithm cleanups
gavofyork Mar 19, 2018
1bb150b
Merge and fix test.
gavofyork Mar 19, 2018
2e9fa09
Docs.
gavofyork Mar 19, 2018
e4c2b27
Fix typo.
gavofyork Mar 19, 2018
90dd1a5
rename
gavofyork Mar 19, 2018
f197714
Fix tests.
gavofyork Mar 19, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Completely rework dispatch mechanism into something modular.
Not yet complete but 75% there.
  • Loading branch information
gavofyork committed Mar 13, 2018
commit a83059a95b61ad60e2e7204df51b35009463740c
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions demo/primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use primitives::bytes;
use primitives::H256;
use rstd::vec::Vec;
use codec::{Input, Slicable};
use transaction::UncheckedTransaction;

pub use primitives::block::Id;

Expand All @@ -31,9 +30,6 @@ pub type Number = u64;
/// Hash used to refer to a block hash.
pub type HeaderHash = H256;

/// Hash used to refer to a transaction hash.
pub type TransactionHash = H256;

/// Execution log (event)
#[derive(PartialEq, Eq, Clone)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
Expand Down Expand Up @@ -69,35 +65,6 @@ impl Slicable for Digest {
}
}

/// The block "body": A bunch of transactions.
pub type Body = Vec<UncheckedTransaction>;

/// A block on the chain.
#[derive(PartialEq, Eq, Clone)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
pub struct Block {
/// The block header.
pub header: Header,
/// All relay-chain transactions.
pub transactions: Body,
}

impl Slicable for Block {
fn decode<I: Input>(input: &mut I) -> Option<Self> {
let (header, transactions) = try_opt!(Slicable::decode(input));
Some(Block { header, transactions })
}

fn encode(&self) -> Vec<u8> {
let mut v = Vec::new();

v.extend(self.header.encode());
v.extend(self.transactions.encode());

v
}
}

/// Header for a block.
#[derive(PartialEq, Eq, Clone)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
Expand Down
4 changes: 1 addition & 3 deletions demo/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ macro_rules! try_opt {
}

pub mod block;
pub mod transaction;

pub use self::block::{Header, Block, Log, Digest};
pub use self::block::{Header, Log, Digest};
pub use self::block::Number as BlockNumber;
pub use self::transaction::{Transaction, UncheckedTransaction, Function, Proposal, VoteThreshold};

/// Alias to Ed25519 pubkey that identifies an account on the relay chain. This will almost
/// certainly continue to be the same as the substrate's `AuthorityId`.
Expand Down
Loading