- Dec 19, 2019
-
-
Bastian Köcher authored
* Make `decl_error!` errors usable This pr implements support for returning errors of different pallets in a pallet. These errors need to be declared with `decl_error!`. The pr changes the following: - Each dispatchable function now returns a `DispatchResult` which is an alias for `Result<(), DispatchError>`. - `DispatchError` is an enum that has 4 variants: - `Other`: For storing string error messages - `CannotLookup`: Variant that is returned when something returns a `sp_runtime::LookupError` - `BadOrigin`: Variant that is returned for any kind of bad origin - `Module`: The error of a specific module. Contains the `index`, `error` and the `message`. The index is the index of the module in `construct_runtime!`. `error` is the index of the error in the error enum declared by `decl_error!`. `message` is the message to the error variant (this will not be encoded). - `construct_runtime!` now creates a new struct `ModuleToIndex`. This struct implements the trait `ModuleToIndex`. - `frame_system::Trait` has a new associated type: `ModuleToIndex` that expects the `ModuleToIndex` generated by `construct_runtime!`. - All error strings returned in any module are being converted now to `DispatchError`. - `BadOrigin` is the default error returned by any type that implements `EnsureOrigin`. * Fix frame system benchmarks
-
- Dec 18, 2019
-
-
Leo Arias authored
-
Wei Tang authored
pallet-evm: default implementation for FeeCalculator and ConvertAccountId and separate gas price (#4424) * Default implementation for FeeCalculator and ConvertAccountId and separate gas price * Styling fixes and some docs addition * TruncateConvertAccountId -> HashTruncateConvertAccountId * Fix compile
-
Shawn Tabrizi authored
* Update assets to `decl_error` * Update aura to `decl_error` * Update authority discovery to `decl_error` * Update collective to `decl_error` * Update evm to `decl_error!` * Fix error with replace * Revert "Update authority discovery to `decl_error`" This reverts commit 26e8f3c56656963d847e984c6f2c8e1f88014899. * Revert "Update aura to `decl_error`" This reverts commit 8f17c44ca8375a4a755710aaab7ad4d9522c4376. * Update democracy to `decl_error` * Update finality-tracker to `decl_error` * Update grandpa to `decl_error` * `assert` to `ensure` in dispatchable function
-
Gavin Wood authored
* Remove incorrect assumption that runners-up were sorted by account * Fix * Update lib.rs
-
- Dec 17, 2019
-
-
joe petrowski authored
-
Shawn Tabrizi authored
* Dust moves from reserved <-> free if below ED * Add dust information to `ReapedAccount` event * Introduce `BalanceSet` event * More cleanly written `set_balance` logic
-
Benjamin Kampmann authored
* clean up cargo.toml syntax * bumping versions to 2.0 * bump networking to 0.8 * move consensus down to 0.8 * bump consensus pallets to 0.8.0, too * Upping babe and aura pallets * add remaining, missing version definitions * missed some
-
Niklas Adolfsson authored
* rewrite me * [cli]: make `BlockNumber` generic * cleanup
-
Bastian Köcher authored
* Fix contruct_runtime * Update lib.rs * Update event.rs * Update event.rs * Update event.rs * Update event.rs * Update event.rs * Update event.rs * Update event.rs Back to where we started * Update chain_spec.rs * Update genesis.rs * Fix it properly
-
Gavin Wood authored
* Fix naming of utility crate (it's a legit pallet) * Additional bits
-
Stanislav Tkach authored
-
Stanislav Tkach authored
-
thiolliere authored
-
- Dec 16, 2019
-
-
Shawn Tabrizi authored
* Make sudo use `decl_error` * copy pasta error * Update to use `as_str` * Add doc * Add back `decl_error`
-
Tomasz Drwięga authored
* Rename: Phase 1. * Unify codec. * Fixing: Phase 2 * Fixing: Phase 3. * Fixing: Phase 4. * Fixing: Phase 5. * Fixing: Phase 6. * Fixing: Phase 7. * Fixing: Phase 8. Tests * Fixing: Phase 9. Tests!!! * Fixing: Phase 10. Moar tests! * Finally done! * More fixes. * Rename primitives:: to sp_core:: * Apply renames in finality-grandpa. * Fix benches. * Fix benches 2. * Revert node-template. * Fix frame-system in our modules.
-
Gavin Wood authored
* Updates; not yet tested. * Fix and add tests * Add test * Update a few comments
-
Gavin Wood authored
* Remove proposal when it is refused. * Fix build, add test
-
- Dec 15, 2019
-
-
asynchronous rob authored
* fix srml-support compilation * babe: exponential backoff on missed blocks.
-
- Dec 14, 2019
-
-
cheme authored
* In progress, runtime io must switch to future proof root + child_specific (unique id) + u32 type. * Switch interface, sr-io seems ok, rpc could use similar interface to sr-io, genesis json broken if there is child trie in existing encoding genesis. * test from previous implementation. * fix proving test. * Restore Keyspacedb from other branch, only apply to child trie. * Removing unneeded child_info from child root (child info are stored if things changed, otherwhise the root does not change). * Switch rpc to use same format as ext: more future proof. * use root from child info for trie backend essence. * Breaking long lines. * Update doc and clean pr a bit. * fix error type * Restore removed doc on merge and update sr-io doc. * Switch child storage api to use directly unique id, if managed id where to be put in place, the api will change at this time. * Clean deprecated host interface from child. * Removing assertion on child info (can fail depending on root memoization). * merging child info in the overlay when possible. * child iteration by prefix using child_info. * Using ChainInfo in frame support. ChainInfo gets redesign to avoid buffers allocation on every calls. * Add length of root to the data of child info. * comments * Encode compact. * Remove child info with root. * Fix try_update condition. * Comment Ext child root caching. * Replace tuples by struct with field * remove StorageTuple alias. * Fix doc tests, and remove StorageOverlay and ChildStorageOverlay aliases.
-
- Dec 13, 2019
-
-
Weiliang Li authored
* update comments in authority discovery * Update lib.rs
-
- Dec 12, 2019
-
-
Gavin Wood authored
* Allow owner of a preimage to reap it a little while before everyone else. * Revamp DispatchQueue to make reaping safer * Remove commented code * Update frame/democracy/src/lib.rs Co-Authored-By: Shawn Tabrizi <[email protected]> * Update docs
-
- Dec 11, 2019
-
-
Bastian Köcher authored
-
Benjamin Kampmann authored
* client/rpc/api -> client/rpc-api * client/util/wasm-builder-runner -> utils/wasm-builder-runner * client/grafana-data-source -> utils/grafana-data-source * test/utils -> test-utils * fix moved path * Update Cargo.lock * Update Cargo.lock
-
Gavin Wood authored
* Allow referendums to begin out of order * Make `inject_referendum` infallible * Merge remote-tracking branch 'origin/gav-verified-id' into gav-verified-id # Conflicts: # frame/identity/src/lib.rs * Renames.
-
Marcio Diaz authored
-
Marcio Diaz authored
* Fix token economics url. Co-Authored-By: Bastian Köcher <[email protected]>
-
Benjamin Kampmann authored
* sr-arithmetic -> arithmetic * sr-sandbox -> sandbox * primitives/sr-staking-primitives -> primitives/staking * primitives/sr-version -> primitives/version * primitives/block-builder/runtime-api -> primitives/block-builder
-
Jake Naviasky authored
-
- Dec 10, 2019
-
-
joe petrowski authored
-
Benjamin Kampmann authored
* move application-crypto tests into seperate crate * Fix crate name, update script and add docs * pressing 'save' helps * remove useless lines * adding header * split into actual modules
-
Benjamin Kampmann authored
* move benches into tests, ignore non-passing doctests * Rename sr-api folder * Move test-primitives to primitives, use that for sp-api doctests
-
Weiliang Li authored
* primitives/sr-io -> primitives/io * fix * rename * runtime-io -> sp-io * git mv * fix ci * remove package name * fix * fix * try minimizing diff * try minimizing diff again * try minimizing diff again
-
Tomasz Drwięga authored
* Remove warnings when compiling runtime. * Remove dispatch::Result imports. * Add missing imports. * Fix missing vecs. #4333 * Fix oom function. * Remove superfluous import. * More warnings.
-
Weiliang Li authored
* primitives/sr-std -> primitives/std * fix * fix conflict * rstd -> sp-std * git mv * fix review * fix merge
-
- Dec 09, 2019
-
-
thiolliere authored
* Introduce storage_next allowing iteration. (without childtries) * Implement prefixed storage * impl cache in client_storage_cache (needs test) * switch overlay change to btreemap * Revert "impl cache in client_storage_cache" This reverts commit c91a4848916eba87184b3dc4722cea81aec9339d. the storage cache cannot be used this way * Revert "Implement prefixed storage" This reverts commit 4931088126a427082d7310ed7e83b8eea966bc20. * Impl StoragePrefixedMap for all map storages * remove comment * Move all overlays to BTreeMap * btreemap iteration improvment * impl for child tries * impl tests for childs * fix * remove cache comment * Fix grumble
-
Marcio Diaz authored
* Limit number of uncles that can be provided. * Check length of uncles vector on inherent. * Set fatal error to true for too many uncles. * Take max uncles in create_inherent.
-
Gavin Wood authored
* Initial prototype * Work on test harness. * Minor removal * Add some tests * Fix tests * More tests * Final tests * General documentation * Function-level docs. * Function-level docs. * Identity fields. * Fix dependency * Docs * Spelling nits * Address grumbles.
-
Weiliang Li authored
* primitives/sr-primitives -> primitives/runtime * update
-
- Dec 07, 2019
-
-
thiolliere authored
-