Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to beyond alpha.7 #244

Closed
wants to merge 77 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
597b0c6
Dupe code from kitchen node
JoshOrndorff Apr 23, 2020
20708db
Seperate crate for sha3pow
JoshOrndorff Apr 23, 2020
0753545
Something compiles.
JoshOrndorff Apr 23, 2020
b85b6a2
Create a new runtime so this thing actually runs.
JoshOrndorff Apr 23, 2020
2c7f6b2
Remove commented babe code
JoshOrndorff Apr 23, 2020
de33a7f
Wire existing basic-pow node to newly-separated sha3pow crate.
JoshOrndorff Apr 23, 2020
e924938
Bring in complete sha3pow from utxo workshop, and adapt nodes to use it.
JoshOrndorff Apr 23, 2020
079b7de
Remove unnecessary trait bounds on Sha3Algorithm
JoshOrndorff Apr 23, 2020
72111c9
Writeups for basic-pow and sha3-pow-consensus
JoshOrndorff Apr 23, 2020
e9fbf0a
Merge branch 'master' into joshy-hybrid-consensus
JoshOrndorff Apr 24, 2020
850c48a
Minor fix & visible WIP note :)
jimmychu0807 Apr 24, 2020
ef169bf
update to custom Substrate branch to support justification import.
JoshOrndorff Apr 24, 2020
03593ec
standardize super runtime TODO How to remove the session key stuff fr…
JoshOrndorff May 2, 2020
f8f7cd5
Preserve babe-grandpa node and runtime. This will be a reipe about gr…
JoshOrndorff May 2, 2020
b462e71
standardize basic-pow node and prune pow-runtime
JoshOrndorff May 2, 2020
035eedb
Standardize weight-fee-runtime.
JoshOrndorff May 2, 2020
8062554
Move sum-storage to super-runtime and prune api-runtime
JoshOrndorff May 4, 2020
10fa739
Convert kitchen node to instant seal
JoshOrndorff May 4, 2020
54d756d
Add comment with hint about light client problem
JoshOrndorff May 4, 2020
3613fc2
Merge branch 'master' into joshy-standardize-runtimes
JoshOrndorff May 4, 2020
8305406
Fix minor type aggregation issue
JoshOrndorff May 4, 2020
86bc846
Convert rpc-node to instant seal
JoshOrndorff May 4, 2020
8871130
Only kitchen node supports ocw-runtime
JoshOrndorff May 4, 2020
2d91bde
Properly prune session keys from runtime
JoshOrndorff May 4, 2020
00002f0
Standardize ocw-runtime
JoshOrndorff May 4, 2020
383b0f1
Restore api-runtime
JoshOrndorff May 4, 2020
3037691
Standardize API Runtime
JoshOrndorff May 4, 2020
099484c
rename sum-storage-runtime-api It isn't _necessarily_ related to the rpc
JoshOrndorff May 4, 2020
021037b
Update runtime API writeup to reflect refactorings.
JoshOrndorff May 4, 2020
36a3382
Update nodes/babe-grandpa-node/Cargo.toml
JoshOrndorff May 7, 2020
9083d0c
Update runtimes/super-runtime/src/lib.rs
JoshOrndorff May 7, 2020
cc01394
Update nodes/babe-grandpa-node/Cargo.toml
JoshOrndorff May 7, 2020
45bde8a
Kitchen node compiles with light client. Also converted api-runtime a…
JoshOrndorff May 8, 2020
edcfee2
Add fixme annotation to light clients.
JoshOrndorff May 8, 2020
e174e67
Merge branch 'joshy-standardize-runtimes' of github.com:substrate-dev…
JoshOrndorff May 8, 2020
2c459ee
Clean kitchen node Cargo.toml
JoshOrndorff May 8, 2020
9d5f61a
Strip instant seal code from manual seal node
JoshOrndorff May 8, 2020
9e2ba3d
Update manual seal writeup
JoshOrndorff May 8, 2020
ebffaeb
Write up kitchen node
JoshOrndorff May 8, 2020
6bcfa86
Clarify language in api-runtime writeup
JoshOrndorff May 8, 2020
087f441
typo: because -> became
JoshOrndorff May 8, 2020
a8522cb
Replace TODO with comment in babe-grandpa node Cargo.toml
JoshOrndorff May 8, 2020
285d2ff
Remove some TODOs
JoshOrndorff May 8, 2020
b467961
bump deps, LongestChain, default weights
JoshOrndorff May 8, 2020
c6e0e84
changed append api
JoshOrndorff May 8, 2020
a2be10c
API Runtime Compiles
JoshOrndorff May 8, 2020
8f4c61a
Start working on OCW runtime and pallet
JoshOrndorff May 8, 2020
227388d
Super runtime compiles
JoshOrndorff May 8, 2020
9ee61df
Weight fee runtime and weight pallet compile. Both will eed another l…
JoshOrndorff May 8, 2020
81fa2b5
Babe-grandpa-untime compiles
JoshOrndorff May 8, 2020
9f1e87d
Merge branch 'master' into alpha.7
JoshOrndorff May 8, 2020
0f31fdc
re-apply dependency bumps (not sure where that work went)
JoshOrndorff May 8, 2020
464d2aa
Babe-grandpa-node compiles
JoshOrndorff May 8, 2020
7ec98f5
basic-pow compiles
JoshOrndorff May 8, 2020
df0b923
updated for alpha.7
jimmychu0807 May 10, 2020
3b048a5
it compiles!
jimmychu0807 May 10, 2020
5be531d
[wip] Fixing kitchen node compiler error
jimmychu0807 May 10, 2020
75f4a47
Upstream fix merged
JoshOrndorff May 11, 2020
00a4c11
Merge branch 'manual-seal-light-client' into alpha.7
JoshOrndorff May 11, 2020
ff3a7fe
minor fix to kitchen node text
JoshOrndorff May 11, 2020
fd823dd
bump dependencies and standardize format in all pallets' Cargo.toml f…
JoshOrndorff May 11, 2020
ee3baec
Bump deps in all runtimes TODO Babe grandpa runtime doesn't compile
JoshOrndorff May 11, 2020
8d33a16
Make Babe Grandpa Runtime Compile
JoshOrndorff May 11, 2020
1c187f3
Bump deps in all nodes and make them compile
JoshOrndorff May 11, 2020
af5b86d
Start updating tests
JoshOrndorff May 11, 2020
29f3732
fix charity tests
JoshOrndorff May 11, 2020
4093d17
Most tests are updated
JoshOrndorff May 11, 2020
04aa682
prune accidentally committed notes file
JoshOrndorff May 11, 2020
57a0b29
Start working on offchain-demo tests
JoshOrndorff May 11, 2020
e3f213c
Merge alpha.7 and start updating
JoshOrndorff May 11, 2020
3719d76
Rename to optional-grandpa-runtime, update deps, make compile
JoshOrndorff May 11, 2020
bb14b69
update optional-grandpa genesis
JoshOrndorff May 11, 2020
17efcb6
rename back to minimal grandpa runtime
JoshOrndorff May 11, 2020
17cc878
writeup hybrid consensus
JoshOrndorff May 12, 2020
e21793d
hybrid consensus is no longer wip
JoshOrndorff May 12, 2020
1ceb2a9
offchain-demo tests pass
jimmychu0807 May 12, 2020
5a19187
Merge branch 'master' into alpha.7
JoshOrndorff May 13, 2020
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
11 changes: 11 additions & 0 deletions pallets/offchain-demo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,28 @@ pub mod crypto {
use sp_runtime::{
app_crypto::{app_crypto, sr25519},
MultiSigner, MultiSignature,
traits::Verify,
};
use sp_core::sr25519::Signature as Sr25519Signature;

app_crypto!(sr25519, KEY_TYPE);

pub struct TestAuthId;
// implemented for ocw-runtime
impl frame_system::offchain::AppCrypto<MultiSigner, MultiSignature> for TestAuthId
{
type RuntimeAppPublic = Public;
type GenericSignature = sp_core::sr25519::Signature;
type GenericPublic = sp_core::sr25519::Public;
}

// implemented for mock runtime in test
impl frame_system::offchain::AppCrypto<<Sr25519Signature as Verify>::Signer, Sr25519Signature> for TestAuthId
{
type RuntimeAppPublic = Public;
type GenericSignature = sp_core::sr25519::Signature;
type GenericPublic = sp_core::sr25519::Public;
}
}

// Specifying serde path as `alt_serde`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is maybe some ticket system like JIRA or just you are using Issues from Github? I ask because I am curious where/how I find the description of the PR.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is at the top of this page. This particular PR is a weird one though. It contains a lot of changes from the base branch because this repo (the recipes) is in the process of adopting gitflow to manage PRs

Expand Down
28 changes: 20 additions & 8 deletions pallets/offchain-demo/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use frame_support::{
};
use sp_io::TestExternalities;
use sp_core::{
H256, sr25519,
H256,
sr25519::{self, Signature},
offchain::{OffchainExt, TransactionPoolExt,
testing::{self, PoolState, OffchainState},
},
Expand All @@ -18,7 +19,7 @@ use sp_core::{
};
use sp_runtime::{
testing::{Header, TestXt},
traits::{BlakeTwo256, IdentityLookup},
traits::{BlakeTwo256, IdentityLookup, Verify},
Perbill,
};

Expand Down Expand Up @@ -86,20 +87,31 @@ impl Trait for TestRuntime {
type UnsignedPriority = UnsignedPriority;
}

impl system::offchain::CreateTransaction<TestRuntime, TestExtrinsic> for TestRuntime {
type Public = sr25519::Public;
type Signature = sr25519::Signature;

fn create_transaction<TSigner: system::offchain::Signer<Self::Public, Self::Signature>> (
impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for TestRuntime where
Call<TestRuntime>: From<LocalCall>
{
fn create_transaction<C: frame_system::offchain::AppCrypto<Self::Public, Self::Signature>> (
call: Call<TestRuntime>,
_public: Self::Public,
_public: <Signature as Verify>::Signer,
_account: <TestRuntime as system::Trait>::AccountId,
index: <TestRuntime as system::Trait>::Index,
) -> Option<(Call<TestRuntime>, <TestExtrinsic as sp_runtime::traits::Extrinsic>::SignaturePayload)> {
Some((call, (index, ())))
}
}

impl frame_system::offchain::SigningTypes for TestRuntime {
type Public = <Signature as Verify>::Signer;
type Signature = Signature;
}

impl<C> frame_system::offchain::SendTransactionTypes<C> for TestRuntime where
Call<TestRuntime>: From<C>,
{
type OverarchingCall = Call<TestRuntime>;
type Extrinsic = TestExtrinsic;
}

pub type System = system::Module<TestRuntime>;
pub type OffchainDemo = Module<TestRuntime>;

Expand Down