- May 21, 2021
-
-
thiolliere authored
* fix bounded vec doc and unsafe * fix btree map and set and tests * introduce weak_bounded_vec and StorageTryAppend * fix tests and reorganize tests * improve doc * add doc * Update frame/support/src/storage/weak_bounded_vec.rs Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> * fix inner doc Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>
-
- May 20, 2021
-
-
Keith Yeung authored
* Make #[pallet::hooks] optional * Make #[pallet::call] optional * Remove unused imports * Update UI test expectations * Update UI test expectations * Remove unnecessary HooksDef::empty method * Remove unnecessary CallDef::empty method * Clarify what would happen when no call or hooks are specified in a pallet
-
- May 19, 2021
-
-
thiolliere authored
* implement named generic for storages * fix error message on unexpected name for generic
-
- May 17, 2021
-
-
KingFishDev authored
-
thiolliere authored
* implement max_values + storages info * some formatting + doc * rename StoragesInfo -> PalletStorageInfo * merge both StorageInfoTrait and PalletStorageInfo I think it is more future proof. In the future some storage could make use of multiple prefix. Like one to store how much value has been inserted, etc... * Update frame/support/procedural/src/storage/parse.rs Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> * Update frame/support/procedural/src/storage/storage_struct.rs Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> * Fix max_size using hasher information hasher now expose `max_len` which allows to computes their maximum len. For hasher without concatenation, it is the size of the hash part, for hasher with concatenation, it is the size of the hash part + max encoded len of the key. * fix tests * fix ui tests Co-authored-by: Peter Goodspeed-Niklaus <[email protected]>
-
Keith Yeung authored
* Use StorageNMap for Approvals in assets pallet * Use EncodeLike on HashKeyPrefix trait bounds * Add comments clarifying AccountId roles * Properly document the keys in the Approvals storage * Fix line width
-
- May 14, 2021
-
-
Keith Yeung authored
* Implement StorageNMap * Change copyright date to 2021 * Rewrite keys to use impl_for_tuples instead of recursion * Implement prefix iteration on StorageNMap * Implement EncodeLike for key arguments * Rename KeyGenerator::Arg to KeyGenerator::KArg * Support StorageNMap in decl_storage and #[pallet::storage] macros * Use StorageNMap in assets pallet * Support migrate_keys in StorageNMap * Reduce line characters on select files * Refactor crate imports in decl_storage macros * Some more line char reductions and doc comment update * Update UI test expectations * Revert whitespace changes to untouched files * Generate Key struct instead of a 1-tuple when only 1 pair of key and hasher is provided * Revert formatting changes to unrelated files * Introduce KeyGeneratorInner * Add tests for StorageNMap in FRAMEv2 pallet macro * Small fixes to unit tests for StorageNMap * Bump runtime metadata version * Remove unused import * Update tests to use runtime metadata v13 * Introduce and use EncodeLikeTuple as a trait bound for KArg * Add some rustdocs * Revert usage of StorageNMap in assets pallet * Make use of ext::PunctuatedTrailing * Add rustdoc for final_hash * Fix StorageNMap proc macro expansions for single key cases * Create associated const in KeyGenerator for hasher metadata * Refactor code according to comments from Basti * Add module docs for generator/nmap.rs * Re-export storage::Key as NMapKey in pallet prelude * Seal the EncodeLikeTuple trait * Extract sealing code out of key.rs Co-authored-by: Shawn Tabrizi <[email protected]>
-
- May 10, 2021
-
-
Shaun Wang authored
* Add arithmetic dispatch errors. * Replace custom overflow errors. * Replace custom underflow and division by zero errors. * Replace overflow/underflow in token error. * Add token and arithmetic errors in dispatch error equality test. * Trigger CI.
-
Peter Goodspeed-Niklaus authored
* Add `BoundedBTreeSet` Part of https://github.com/paritytech/substrate/issues/8719 * fix copy-pasta errors Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
-
- May 07, 2021
-
-
Peter Goodspeed-Niklaus authored
* requiring users to maintain an unchecked invariant is unsafe * relax trait restrictions on BoundedVec<T, S> A normal `Vec<T>` can do many things without any particular trait bounds on `T`. This commit relaxes the bounds on `BoundedVec<T, S>` to give it similar capabilities.
-
Peter Goodspeed-Niklaus authored
* impl #[derive(MaxEncodedLen)] for structs * impl #[derive(MaxEncodedLen)] for enums, unions * break long comments onto multiple lines * add doc for public item * add examples to macro documentation * move MaxEncodedLen macro docs, un-ignore doc-tests
-
- May 06, 2021
-
-
Peter Goodspeed-Niklaus authored
* Add `BoundedBTreeMap` to `frame_support::storage` Part of https://github.com/paritytech/substrate/issues/8719. * max_encoded_len will never encode length > bound * requiring users to maintain an unchecked invariant is unsafe * only impl debug when std * add some marker traits * add tests
-
Peter Goodspeed-Niklaus authored
-
- May 04, 2021
-
-
Peter Goodspeed-Niklaus authored
* implement BoundedEncodedLen * update header * update imports * use impl_for_tuples instead of a custom macro * remove redundant where clause Co-authored-by: Bastian Köcher <[email protected]> * impl for Compact<T> * impl BoundedEncodedLen for BoundedVec (#8727) * impl BoundedEncodedLen for bool * explicitly implement BoundedEncodedLen for each Compact form Turns out that u16 doesn't play nicely with the pattern; those values take two extra bytes, where all other cases take one. :( * rename BoundedEncodedLen -> MaxEncodedLen * add tests of compact encoded length Co-authored-by: Bastian Köcher <[email protected]>
-
Shawn Tabrizi authored
* improve bounded vec api * Update frame/support/src/storage/bounded_vec.rs Co-authored-by: Guillaume Thiolliere <[email protected]> * Update frame/support/src/storage/bounded_vec.rs * Update frame/support/src/storage/bounded_vec.rs Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- May 03, 2021
-
-
Bastian Köcher authored
* Lol * Yeah * Moare * adaasda * Convert AURA to new pallet macro * AURA: Switch to `CurrentSlot` instead of `LastTimestamp` This switches AURA to use `CurrentSlot` instead of `LastTimestamp`. * Add missing file * Update frame/aura/src/migrations.rs Co-authored-by: André Silva <[email protected]> * Remove the runtime side provide inherent code * Use correct weight * Add TODO * Remove the Inherent from AURA *
🤦 * Remove unused stuff * Update primitives authorship * Fix babe inherent data provider * Fix consensus-uncles * Fix BABE * Do some further changes to authorship primitives... :D * More work * Make it compile the happy path * Make it async! * Take hash * More stuff * Hacks * Revert "Hacks" This reverts commit cfffad88668cfdebf632a59c4fbfada001ef8251. * Fix * Make `execute_block` return the final block header * Move Aura digest stuff * Make it possible to disable equivocation checking * Fix fix fix * Some refactorings * Comment * Fixes fixes fixes * More cleanups * Some love * Better love * Make slot duration being exposed as `Duration` to the outside * Some slot info love * Add `build_aura_worker` utility function * Copy copy copy * Some stuff * Start fixing pow * Fix pow * Remove some bounds * More work * Make grandpa work * Make slots use `async_trait` * Introduce `SharedData` * Add test and fix bugs * Switch to `SharedData` * Make grandpa tests working * More Babe work * Make grandpa work * Introduce `SharedData` * Add test and fix bugs * Switch to `SharedData` * Make grandpa tests working * More Babe work * Make it async * Fix fix * Use `async_trait` in sc-consensus-slots This makes the code a little bit easier to read and also expresses that there can always only be one call at a time to `on_slot`. * Make grandpa tests compile * More Babe tests work * Fix network test * Start fixing service test * Finish service-test * Fix sc-consensus-aura * Fix fix fix * More fixes * Make everything compile *yeah* * Make manual-seal compile * More fixes * Start fixing Aura * Fix Aura tests * Fix Babe tests * Make everything compile * Move code around and switch to async_trait * Fix Babe * Docs docs docs * Move to FRAME * Fix fix fix * Make everything compile * Last cleanups * Fix integration test * Change slot usage of the timestamp * We really need to switch to `impl-trait-for-tuples` * Update primitives/inherents/src/lib.rs Co-authored-by: André Silva <[email protected]> * Update primitives/inherents/src/lib.rs Co-authored-by: André Silva <[email protected]> * Update primitives/inherents/src/lib.rs Co-authored-by: André Silva <[email protected]> * Some extra logging * Remove dbg! * Update primitives/consensus/common/src/import_queue/basic_queue.rs Co-authored-by: André Silva <[email protected]> Co-authored-by: André Silva <[email protected]>
-
- May 02, 2021
-
-
Gavin Wood authored
-
- Apr 28, 2021
-
-
Gavin Wood authored
* Remove unneeded `Ord` bound from All * Fixes * Contains supports tuples
-
- Apr 27, 2021
-
-
Gavin Wood authored
* Introduce macro for building Contains impl based on a match * Fixes
-
- Apr 23, 2021
-
-
François Garillot authored
* Simplify some Option / Result / ? operator patterns When those match a combinator exactly. Tool-aided by [comby-rust](https://github.com/huitseeker/comby-rust). * adjust after review * adjust post-review
-
- Apr 19, 2021
-
-
thiolliere authored
* generate accessor to PalletInfo information on pallet placeholder * remove unused * use trait, and add tests * less verbose doc * add PalletInfoAccess to prelude for ease usage
-
- Apr 17, 2021
-
-
thiolliere authored
-
- Apr 16, 2021
-
-
Bastian Köcher authored
* Remove `serde` requirement from FRAME macros Currently there is some implicit requirement on `serde` being present in the `Cargo.toml` of a pallet when `GenesisConfig` is used. This pr removes this requirement by using the serde attribute `serde(crate = "..")`. * build a unique reexport of serde in impl_opaque_keys, by abusing paste doc concatenation * Optimize Co-authored-by: thiolliere <[email protected]>
-
Kian Paimani authored
* prototype for shawn * Clean and document it * Add more docs * Move imports * Some changes for easier compat. * revert exmaple pallet * rename * BoundedVec for AccountLocks (#8580) * Example with balances * Fix tests * Make it indexable * fix * Fix tests * fix test * Fix collective as well * Fix test * Update frame/support/src/storage/mod.rs Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> * Repot and add for value * Add for map and double map * Final touches. * Update frame/support/src/storage/bounded_vec.rs Co-authored-by: Guillaume Thiolliere <[email protected]> * Add a few more tests * Add import Co-authored-by: Peter Goodspeed-Niklaus <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
-
- Apr 13, 2021
-
-
Chris D'Costa authored
-
thiolliere authored
* impl * fix tests * impl in execute_block * fix tests * add a test in frame-executive * fix some panic warning * use trait to get call from extrinsic * remove unused * fix test * fix testing * fix tests * return index of extrinsic on error * fix test * Update primitives/inherents/src/lib.rs Co-authored-by: Kian Paimani <[email protected]> * address comments rename trait, and refactor * refactor + doc improvment * fix tests Co-authored-by: Kian Paimani <[email protected]>
-
- Apr 12, 2021
-
-
Bastian Köcher authored
Make it work with different kinds of parameter types when `static` is one of them.
-
- Apr 10, 2021
-
-
Gavin Wood authored
* IsInVec * Purify `Contains`, introduce SortedMembers
-
- Apr 09, 2021
-
-
Gavin Wood authored
* Backing/GetBacking: Abstraction over pluralistic origins for XCM. * Update frame/support/src/traits/misc.rs Co-authored-by: Kian Paimani <[email protected]> * Update frame/support/src/traits/misc.rs Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
-
Xavier Lau authored
* `ModuleId` to `PalletId` - part of #8372 * fix doc * move `PalletId` to `frame-support` * fix compile * fix tests * `ModuleId` to `PalletId` * subcommand `moduleid` to `palletid`
-
- Apr 08, 2021
-
-
Gavin Wood authored
* Allow lossless matching for Origin Without these changes, it's difficult/impossible to not lose any filters when making fine-grained matches against origin. * whilespace * Apply suggestions from code review Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Kian Paimani authored
* Add DefaultNoBound * Add tests * Fix
-
- Apr 07, 2021
-
-
Shawn Tabrizi authored
* Add an index to the Instance trait * Update frame/support/procedural/src/storage/instance_trait.rs
-
- Apr 01, 2021
-
-
Keith Yeung authored
* Make use of PrefixIterator underneath Storage[Key]Iterator * Add ChildTriePrefixIterator and methods * Add documentation on ChilTriePrefixIterator fields * Deprecate Storage[Key]Iterator API instead of removing them * Allow fetching for the prefix as an option for ChildTriePrefixIterator * Rename prefix_fetch to fetch_previous_key * fix implementation + test * make gitdiff better * Add test for storage_iter and storage_key_iter Co-authored-by: thiolliere <[email protected]>
-
- Mar 30, 2021
-
-
Kian Paimani authored
* helper macro to create storage types on the fly * Update frame/support/src/lib.rs Co-authored-by: Alexander Popiak <[email protected]> * update lock * fix test; * Fix line width Co-authored-by: Alexander Popiak <[email protected]>
-
- Mar 28, 2021
-
-
Gavin Wood authored
* Reservable, Transferrable Fungible(s), plus adapters. * Repot into new dir * Imbalances for Fungibles * Repot and balanced fungible. * Clean up names and bridge-over Imbalanced. * Repot frame_support::trait. Finally. * Make build. * Docs * Good errors * Fix tests. Implement fungible::Inspect for Balances. * Implement additional traits for Balances. * Revert UI test "fixes" * Fix UI error * Fix UI test * More work on fungibles * Fixes * More work. * Update lock * Make fungible::reserved work for Balances * Introduce Freezer to Assets, ready for a reserve & locks pallet. Some renaming/refactoring. * Cleanup errors * Imbalances working with Assets * Test for freezer. * Grumbles * Grumbles * Fixes * Extra "side-car" data for a user's asset balance. * Fix * Fix test * Fixes * Line lengths * Comments * Update frame/assets/src/tests.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Update frame/support/src/traits/tokens/fungibles.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Update frame/assets/src/lib.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Update frame/support/src/traits/tokens/fungible.rs Co-authored-by: Shawn Tabrizi <[email protected]> * Introduce `transfer_reserved` * Rename fungible Reserve -> Hold, add flag structs * Avoid the `melted` API - its too complex and gives little help * Repot Assets pallet Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Mar 27, 2021
-
-
Gavin Wood authored
* Reservable, Transferrable Fungible(s), plus adapters. * Repot into new dir * Imbalances for Fungibles * Repot and balanced fungible. * Clean up names and bridge-over Imbalanced. * Repot frame_support::trait. Finally. * Make build. * Docs * Good errors * Fix tests. Implement fungible::Inspect for Balances. * Implement additional traits for Balances. * Revert UI test "fixes" * Fix UI error * Fix UI test * Fixes * Update lock * Grumbles * Grumbles * Fixes Co-authored-by: Bastian Köcher <[email protected]>
-
- Mar 25, 2021
-
-
thiolliere authored
-
- Mar 24, 2021
-
-
Falco Hirschenberger authored
* Check `unreserve` and `transfer` returnvalues in debug code fixes #8106 * few more Co-authored-by: Shawn Tabrizi <[email protected]>
-
- Mar 23, 2021
-
-
thiolliere authored
* span in hooks * add span for dispatchable * Update frame/support/src/lib.rs * Update frame/support/src/lib.rs Co-authored-by: David <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: David <[email protected]>
-