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
40 commits
Select commit Hold shift + click to select a range
993e5f6
adding unleash to ci (#5020)
gnunicorn Feb 25, 2020
a64dd52
Fix: CI failing for some CLI tests (#5043)
cecton Feb 25, 2020
ab8da74
aura: remove unused tx pool (#5046)
andresilva Feb 25, 2020
b874cb2
Extend rust nightly detection in `wasm-builder` (#5021)
bkchr Feb 25, 2020
063c0c3
Add steps setting to benchmarking CLI (#5033)
seerscode Feb 25, 2020
71d10b4
Remove indices from node-template (#5025)
shawntabrizi Feb 25, 2020
88b03c9
Fix documentation for "BlockBuilder::push_trusted" (#5051)
NikVolf Feb 25, 2020
504478a
do not check unleash on every PR, only master and tags (#5054)
gnunicorn Feb 25, 2020
7c75157
prepare version to alpha.1 (#5055)
gnunicorn Feb 25, 2020
48150f2
Sync: validate block responses for required data (#5052)
arkpar Feb 25, 2020
7fff6cb
Make these chainspecs fields private (#5031)
tomaka Feb 26, 2020
78224bd
Fix dockerfile (#5059)
chevdor Feb 26, 2020
4d61dc7
Adds documentation for `wipe` and `commit` (#5053)
bkchr Feb 26, 2020
bad1280
Fix the issue with `trybuild`'s `ui` tests (#4992)
TriplEight Feb 26, 2020
0f4f9d7
Activate publishing of draft releases... (#5062)
s3krit Feb 26, 2020
5b41575
Fix/div by zero (#5041)
cowboy-bebug Feb 26, 2020
2afecf8
set missing metadata fields, prepping alpha.2 (#5067)
gnunicorn Feb 26, 2020
d81f60e
Fix revalidation not revalidating multiple times (#5065)
NikVolf Feb 27, 2020
6e6d06c
removes use of sc_client::Client from sc_finality_grandpa (#5030)
seunlanlege Feb 27, 2020
06fae63
Remove deprecated host functions (#5038)
bkchr Feb 27, 2020
8c22368
removes use of sc_client::Client from sc_basic_authorship (#5050)
seunlanlege Feb 27, 2020
850ffec
pallet-transaction-payment clean up (#5070)
pepyakin Feb 27, 2020
e769ac4
*: Rename prometheus-exporter crate to substrate-prometheus-end… (#5076)
mxinden Feb 27, 2020
f41677d
rename `browser-utils` to `substrate-browser-utils` (#5079)
expenses Feb 27, 2020
013c1ee
prepping for Alpha.3 (#5080)
gnunicorn Feb 27, 2020
6653f4b
Propagate DispatchError for benchmarks. (#5075)
seerscode Feb 28, 2020
6b27391
Add options to overwrite range bounds in benchmark command. (#5072)
seerscode Feb 28, 2020
b5ec7d4
Update yamux to version 0.4.4. (#5086)
twittner Feb 28, 2020
29cee59
Remove more instances of futures01 (#4633)
expenses Feb 28, 2020
3beb09d
Make export blocks default to json on stdout (#5090)
pscott Mar 2, 2020
675f6b0
Offence reporting returns a result (#5082)
montekki Mar 2, 2020
1808b93
Update to libp2p 0.16.2 (#5088)
tomaka Mar 2, 2020
65ad8e9
Remove request ID from the new protocol (#5049)
tomaka Mar 2, 2020
7e383ed
Make sure we remove a peer on disconnect in gossip (#5104)
bkchr Mar 2, 2020
9fb3a7f
Expose `state-db` memory info (#5110)
bkchr Mar 3, 2020
798390f
Change extrinsic_count to extrinsic_index in pallet-utility (#5044)
joepetrowski Mar 3, 2020
a201f34
Add more metrics to prometheus (#5034)
expenses Mar 3, 2020
870540b
Update to SCALE 1.2.0 (#5113)
bkchr Mar 3, 2020
75116bd
Lazy payouts (#4474)
gavofyork Mar 3, 2020
01aebec
impl on_runtime_upgrade
gui1117 Mar 3, 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
Prev Previous commit
Next Next commit
Remove indices from node-template (#5025)
* Remove indices from node-template

* Use identity lookup instead

* Bump impl

* clean cargo.toml
  • Loading branch information
shawntabrizi authored Feb 25, 2020
commit 71d10b4564d1ffcb74ee8058c76d7f279a8a3842
1 change: 0 additions & 1 deletion Cargo.lock

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

11 changes: 4 additions & 7 deletions bin/node-template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use sp_core::{Pair, Public, sr25519};
use node_template_runtime::{
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
IndicesConfig, SudoConfig, SystemConfig, WASM_BINARY, Signature
SudoConfig, SystemConfig, WASM_BINARY, Signature
};
use sp_consensus_aura::sr25519::{AuthorityId as AuraId};
use grandpa_primitives::{AuthorityId as GrandpaId};
Expand Down Expand Up @@ -127,21 +127,18 @@ fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
code: WASM_BINARY.to_vec(),
changes_trie_config: Default::default(),
}),
indices: Some(IndicesConfig {
indices: vec![],
}),
balances: Some(BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k|(k, 1 << 60)).collect(),
}),
sudo: Some(SudoConfig {
key: root_key,
}),
aura: Some(AuraConfig {
authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
}),
grandpa: Some(GrandpaConfig {
authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),
}),
sudo: Some(SudoConfig {
key: root_key,
}),
}
}

Expand Down
2 changes: 0 additions & 2 deletions bin/node-template/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ aura = { version = "2.0.0-dev", default-features = false, package = "pallet-aura
balances = { version = "2.0.0-dev", default-features = false, package = "pallet-balances", path = "../../../frame/balances" }
frame-support = { version = "2.0.0-dev", default-features = false, path = "../../../frame/support" }
grandpa = { version = "2.0.0-dev", default-features = false, package = "pallet-grandpa", path = "../../../frame/grandpa" }
indices = { version = "2.0.0-dev", default-features = false, package = "pallet-indices", path = "../../../frame/indices" }
randomness-collective-flip = { version = "2.0.0-dev", default-features = false, package = "pallet-randomness-collective-flip", path = "../../../frame/randomness-collective-flip" }
sudo = { version = "2.0.0-dev", default-features = false, package = "pallet-sudo", path = "../../../frame/sudo" }
system = { version = "2.0.0-dev", default-features = false, package = "frame-system", path = "../../../frame/system" }
Expand Down Expand Up @@ -49,7 +48,6 @@ std = [
"frame-executive/std",
"frame-support/std",
"grandpa/std",
"indices/std",
"randomness-collective-flip/std",
"serde",
"sp-api/std",
Expand Down
26 changes: 4 additions & 22 deletions bin/node-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sp_runtime::{
impl_opaque_keys, MultiSignature,
};
use sp_runtime::traits::{
BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount
BlakeTwo256, Block as BlockT, IdentityLookup, Verify, ConvertInto, IdentifyAccount
};
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
Expand Down Expand Up @@ -132,7 +132,7 @@ impl system::Trait for Runtime {
/// The aggregated dispatch type that is available for extrinsics.
type Call = Call;
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
type Lookup = Indices;
type Lookup = IdentityLookup<AccountId>;
/// The index type for storing how many extrinsics an account has signed.
type Index = Index;
/// The index type for blocks.
Expand Down Expand Up @@ -177,23 +177,6 @@ impl grandpa::Trait for Runtime {
type Event = Event;
}

parameter_types! {
/// How much an index costs.
pub const IndexDeposit: u128 = 100;
}

impl indices::Trait for Runtime {
/// The type for recording indexing into the account enumeration. If this ever overflows, there
/// will be problems!
type AccountIndex = AccountIndex;
/// The ubiquitous event type.
type Event = Event;
/// The currency type.
type Currency = Balances;
/// How much an index costs.
type Deposit = IndexDeposit;
}

parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
Expand Down Expand Up @@ -250,21 +233,20 @@ construct_runtime!(
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{Module, Call, Config, Storage, Event<T>},
RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
Timestamp: timestamp::{Module, Call, Storage, Inherent},
Aura: aura::{Module, Config<T>, Inherent(Timestamp)},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
Indices: indices::{Module, Call, Storage, Event<T>, Config<T>},
Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},
TransactionPayment: transaction_payment::{Module, Storage},
Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},
// Used for the module template in `./template.rs`
TemplateModule: template::{Module, Call, Storage, Event<T>},
RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
}
);

/// The address format for describing accounts.
pub type Address = <Indices as StaticLookup>::Source;
pub type Address = AccountId;
/// Block header type as expected by this runtime.
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// Block type as expected by this runtime.
Expand Down
2 changes: 1 addition & 1 deletion frame/indices/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl<T: Trait> StaticLookup for Module<T> {
type Source = address::Address<T::AccountId, T::AccountIndex>;
type Target = T::AccountId;

fn lookup(a: Self::Source) -> Result<T::AccountId, LookupError> {
fn lookup(a: Self::Source) -> Result<Self::Target, LookupError> {
Self::lookup_address(a).ok_or(LookupError)
}

Expand Down