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
44 commits
Select commit Hold shift + click to select a range
0b6f313
System.BlockHash
gavofyork Mar 11, 2020
051967a
Fix hash
gavofyork Mar 11, 2020
5fb1aeb
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 11, 2020
3921666
Introduce K/V iteration in all _concat maps
gavofyork Mar 11, 2020
a926a45
Build fixes
gavofyork Mar 11, 2020
e73f349
Ensure migration happens in correct order
gavofyork Mar 11, 2020
1e8230d
Staking.*
gavofyork Mar 12, 2020
855f20e
Vesting.* Offences.*
gavofyork Mar 12, 2020
d195330
Democracy.*
gavofyork Mar 12, 2020
cc6a4d0
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 12, 2020
c82856e
Babe.* Collective.*
gavofyork Mar 12, 2020
13ad20c
Grandpa.*
gavofyork Mar 12, 2020
bdde997
Assets.* Benchmark.* Contracts.* Elections.* Asset.* Nicks.*
gavofyork Mar 12, 2020
2cbc09e
ImOnline.*
gavofyork Mar 12, 2020
182ec5a
Treasury.*
gavofyork Mar 12, 2020
c573e56
Recovery.*
gavofyork Mar 12, 2020
cf69961
Final bits.
gavofyork Mar 12, 2020
c03a485
Docs
gavofyork Mar 12, 2020
0e3d187
Fix one test
gavofyork Mar 12, 2020
990e972
Fix test
gavofyork Mar 12, 2020
4e2acc9
All passing except the UI tests
gavofyork Mar 12, 2020
1c73a1f
Remove linked_map part 1
gavofyork Mar 12, 2020
5108dc9
Remove linked_map
gavofyork Mar 12, 2020
11a8b94
Some iterator utils for double maps.
gavofyork Mar 12, 2020
d14ba60
Remove old migrations
gavofyork Mar 12, 2020
becb495
Introduce tombstone for LinkedMap type
gavofyork Mar 13, 2020
fb97b30
Migration for genesis hash
gavofyork Mar 13, 2020
7ee5cee
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 15, 2020
0d95a1e
Fix build
gavofyork Mar 15, 2020
1e52937
Fix hash
gavofyork Mar 15, 2020
869b18f
Rename Map is_linked -> unused, keeping backwards compat (#5256)
jacogr Mar 16, 2020
9eb0ea3
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 16, 2020
f4e3c00
Update frame/balances/src/lib.rs
gavofyork Mar 16, 2020
43f3fb0
Update frame/elections/src/lib.rs
gavofyork Mar 16, 2020
3e50210
Remove old migration code.
gavofyork Mar 16, 2020
c90efd0
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 16, 2020
fbbcf01
Update frame/system/src/lib.rs
gavofyork Mar 16, 2020
84af903
Update bin/node/runtime/src/lib.rs
gavofyork Mar 16, 2020
9bcf544
Merge branch 'gav-refactor-hashing' of github.com:paritytech/substrat…
gavofyork Mar 16, 2020
12382d8
Fix hash
gavofyork Mar 16, 2020
07e3361
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 16, 2020
e971241
Merge remote-tracking branch 'origin/master' into gav-refactor-hashing
gavofyork Mar 16, 2020
a2ca4ea
fix session migration
rphmeier Mar 16, 2020
c34e064
Fix watning
gavofyork Mar 16, 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
Assets.* Benchmark.* Contracts.* Elections.* Asset.* Nicks.*
Also introduce real account list
  • Loading branch information
gavofyork committed Mar 12, 2020
commit bdde99745eeaaed32bf8d87bfd9c94fab56f2279
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.

4 changes: 2 additions & 2 deletions frame/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ decl_error! {
decl_storage! {
trait Store for Module<T: Trait> as Assets {
/// The number of units of assets held by any given account.
Balances: map hasher(blake2_256) (T::AssetId, T::AccountId) => T::Balance;
Balances: map hasher(blake2_128_concat) (T::AssetId, T::AccountId) => T::Balance;
/// The next asset identifier up for grabs.
NextAssetId get(fn next_asset_id): T::AssetId;
/// The total unit supply of an asset.
TotalSupply: map hasher(blake2_256) T::AssetId => T::Balance;
TotalSupply: map hasher(twox_64_concat) T::AssetId => T::Balance;
}
}

Expand Down
6 changes: 3 additions & 3 deletions frame/benchmark/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ pub trait Trait: system::Trait {
decl_storage! {
trait Store for Module<T: Trait> as Benchmark {
MyMemberList: Vec<T::AccountId>;
MyMemberMap: map hasher(blake2_256) T::AccountId => bool;
MyMemberMap: map hasher(blake2_128_concat) T::AccountId => bool;
MyValue: u32;
MyMap: map hasher(blake2_256) u32 => u32;
MyDoubleMap: double_map hasher(blake2_256) u32, hasher(blake2_256) u32 => u32;
MyMap: map hasher(twox_64_concat) u32 => u32;
MyDoubleMap: double_map hasher(twox_64_concat) u32, hasher(identity) u32 => u32;
}
}

Expand Down
6 changes: 3 additions & 3 deletions frame/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,13 +929,13 @@ decl_storage! {
/// Current cost schedule for contracts.
CurrentSchedule get(fn current_schedule) config(): Schedule = Schedule::default();
/// A mapping from an original code hash to the original code, untouched by instrumentation.
pub PristineCode: map hasher(blake2_256) CodeHash<T> => Option<Vec<u8>>;
pub PristineCode: map hasher(identity) CodeHash<T> => Option<Vec<u8>>;
/// A mapping between an original code hash and instrumented wasm code, ready for execution.
pub CodeStorage: map hasher(blake2_256) CodeHash<T> => Option<wasm::PrefabWasmModule>;
pub CodeStorage: map hasher(identity) CodeHash<T> => Option<wasm::PrefabWasmModule>;
/// The subtrie counter.
pub AccountCounter: u64 = 0;
/// The code associated with a given account.
pub ContractInfoOf: map hasher(blake2_256) T::AccountId => Option<ContractInfo<T>>;
pub ContractInfoOf: map hasher(twox_64_concat) T::AccountId => Option<ContractInfo<T>>;
/// The price of one unit of gas.
GasPrice get(fn gas_price) config(): BalanceOf<T> = 1.into();
}
Expand Down
8 changes: 4 additions & 4 deletions frame/elections/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,16 @@ decl_storage! {
// [`all_approvals_of`]. Furthermore, each vector of scalars is chunked with the cap of
// `APPROVAL_SET_SIZE`.
pub ApprovalsOf get(fn approvals_of):
map hasher(blake2_256) (T::AccountId, SetIndex) => Vec<ApprovalFlag>;
map hasher(twox_64_concat) (T::AccountId, SetIndex) => Vec<ApprovalFlag>;
/// The vote index and list slot that the candidate `who` was registered or `None` if they
/// are not currently registered.
pub RegisterInfoOf get(fn candidate_reg_info):
map hasher(blake2_256) T::AccountId => Option<(VoteIndex, u32)>;
map hasher(blake2_128_concat) T::AccountId => Option<(VoteIndex, u32)>;
/// Basic information about a voter.
pub VoterInfoOf get(fn voter_info):
map hasher(blake2_256) T::AccountId => Option<VoterInfo<BalanceOf<T>>>;
map hasher(twox_64_concat) T::AccountId => Option<VoterInfo<BalanceOf<T>>>;
/// The present voter list (chunked and capped at [`VOTER_SET_SIZE`]).
pub Voters get(fn voters): map hasher(blake2_256) SetIndex => Vec<Option<T::AccountId>>;
pub Voters get(fn voters): map hasher(twox_64_concat) SetIndex => Vec<Option<T::AccountId>>;
/// the next free set to store a voter in. This will keep growing.
pub NextVoterSet get(fn next_nonfull_voter_set): SetIndex = 0;
/// Current number of Voters.
Expand Down
10 changes: 5 additions & 5 deletions frame/generic-asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,26 +439,26 @@ decl_storage! {
pub TotalIssuance get(fn total_issuance) build(|config: &GenesisConfig<T>| {
let issuance = config.initial_balance * (config.endowed_accounts.len() as u32).into();
config.assets.iter().map(|id| (id.clone(), issuance)).collect::<Vec<_>>()
}): map hasher(blake2_256) T::AssetId => T::Balance;
}): map hasher(twox_64_concat) T::AssetId => T::Balance;

/// The free balance of a given asset under an account.
pub FreeBalance:
double_map hasher(blake2_256) T::AssetId, hasher(twox_128) T::AccountId => T::Balance;
double_map hasher(twox_64_concat) T::AssetId, hasher(blake2_128_concat) T::AccountId => T::Balance;

/// The reserved balance of a given asset under an account.
pub ReservedBalance:
double_map hasher(blake2_256) T::AssetId, hasher(twox_128) T::AccountId => T::Balance;
double_map hasher(twox_64_concat) T::AssetId, hasher(blake2_128_concat) T::AccountId => T::Balance;

/// Next available ID for user-created asset.
pub NextAssetId get(fn next_asset_id) config(): T::AssetId;

/// Permission options for a given asset.
pub Permissions get(fn get_permission):
map hasher(blake2_256) T::AssetId => PermissionVersions<T::AccountId>;
map hasher(twox_64_concat) T::AssetId => PermissionVersions<T::AccountId>;

/// Any liquidity locks on some account balances.
pub Locks get(fn locks):
map hasher(blake2_256) T::AccountId => Vec<BalanceLock<T::Balance>>;
map hasher(blake2_128_concat) T::AccountId => Vec<BalanceLock<T::Balance>>;

/// The identity of the asset which is the one that is designated for the chain's staking system.
pub StakingAssetId get(fn staking_asset_id) config(): T::AssetId;
Expand Down
2 changes: 1 addition & 1 deletion frame/nicks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub trait Trait: frame_system::Trait {
decl_storage! {
trait Store for Module<T: Trait> as Sudo {
/// The lookup table for names.
NameOf: map hasher(blake2_256) T::AccountId => Option<(Vec<u8>, BalanceOf<T>)>;
NameOf: map hasher(twox_64_concat) T::AccountId => Option<(Vec<u8>, BalanceOf<T>)>;
}
}

Expand Down
1 change: 0 additions & 1 deletion frame/system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ sp-runtime = { version = "2.0.0-alpha.2", default-features = false, path = "../.
sp-version = { version = "2.0.0-alpha.2", default-features = false, path = "../../primitives/version" }
frame-support = { version = "2.0.0-alpha.2", default-features = false, path = "../support" }
impl-trait-for-tuples = "0.1.3"
hex-literal = "0.2.1"

[dev-dependencies]
criterion = "0.2.11"
Expand Down
Loading