- Jul 08, 2019
-
-
asynchronous rob authored
* on-disable primitives for engines * dispatch on-disabled digests from SRML consensus * bump runtime versions * use find_map
-
asynchronous rob authored
* skeleton for tracking historical sessions * refactor OpaqueKeys * some more skeleton work * adjust session to new OpaqueKeys API * further refactoring of key-type-ids * session gets validator ID parameter * run up against compiler * tweak staking to support new session changes * first run at child storage for deduplication * Make session use `AccountId` as `ValidatorId` * run up against child trie issues * switch to using normal trie but with a fixed prefix * clear out some println * add dedup test * flesh out historical module more * introduce ExposureOf for staking * test the historical module * WASM compiles * tests all compile * do some mock change * fix bulk of tests * fix staking tests * test obsolecence mechanic * Apply suggestions from code review Co-Authored-By: Bastian Köcher <[email protected]> * some more style nits * a couple more nits * tweak tries * fix typo thie -> this
-
- Jun 27, 2019
-
-
Bastian Köcher authored
* Add failing test case * move storage maps to blake2_128 (#2268) * remove default hash, introduce twox_128 and blake2 * use blake2_128 & create ext_blake2_128 * refactor code * add benchmark * factorize generator * fix * parameterizable hasher * some fix * fix * fix * fix * metadata * fix * remove debug print * map -> blake2_256 * fix test * fix test * Apply suggestions from code review Co-Authored-By: thiolliere <[email protected]> * impl twox 128 concat (#2353) * impl twox_128_concat * comment addressed * fix * impl twox_128->64_concat * fix test * Fix compilation and cleanup some docs * Lol * Remove traits from storage types that are not generic * Get instance test almost working as wanted * Make `srml-support-test` compile again :) * Fixes test of srml-support * Fix compilation * Break some lines * Remove incorrect macro match arm * Integrates review feedback * Update documentation * Fix compilation
-
- Jun 14, 2019
-
-
Gavin Wood authored
* Draft of new sessions * Reintroduce tuple impls * Move staking module to new session API * More work on staking and grandpa. * Use iterator to avoid cloning and tuple macro * Make runtime build again * Polish the OpaqueKeys devex * Move consensus logic into system & aura. * Fix up system module * Get build mostly going. Stuck at service.rs * Building again * Update srml/staking/src/lib.rs Co-Authored-By: DemiMarie-parity <[email protected]> * Refactoring out Consensus module, AuthorityIdOf, &c. * Refactored out DigestItem::AuthoritiesChanged. Building. * Remove tentative code * Remove invalid comment * Make Seal opaque and introduce nice methods for handling opaque items. * Start to use proper digest for Aura authorities tracking. * Fix up grandpa, remove system::Raw/Log * Refactor Grandpa to use new logging infrastructure. Also make authorityid/sessionkey static. Switch over to storing authorities in a straight Vec. * Building again * Tidy up some AuthorityIds * Expunge most of the rest of the AuthorityKey confusion. Also, de-generify Babe and re-generify Aura. * Remove cruft * Untangle last of the `AuthorityId`s. * Sort out finality_tracker * Refactor median getting * Apply suggestions from code review Co-Authored-By: Robert Habermeier <[email protected]> * Session tests works * Update core/sr-primitives/src/generic/digest.rs Co-Authored-By: DemiMarie-parity <[email protected]> * Session tests works * Fix for staking from @dvc94ch * log an error * fix test runtime build * Some test fixes * Staking mock update to new session api. * Fix build. * Move OpaqueKeys to primitives. * Use on_initialize instead of check_rotate_session. * Update tests to new staking api. * fixup mock * Fix bond_extra_and_withdraw_unbonded_works. * Fix bond_with_little_staked_value_bounded_by_slot_stake. * Fix bond_with_no_staked_value. * Fix change_controller_works. * Fix less_than_needed_candidates_works. * Fix multi_era_reward_should_work. * Fix nominating_and_rewards_should_work. * Fix nominators_also_get_slashed. * Fix phragmen_large_scale_test. * Fix phragmen_poc_works. * Fix phragmen_score_should_be_accurate_on_large_stakes. * Fix phragmen_should_not_overflow. * Fix reward_destination_works. * Fix rewards_should_work. * Fix sessions_and_eras_should_work. * Fix slot_stake_is_least_staked_validator. * Fix too_many_unbond_calls_should_not_work. * Fix wrong_vote_is_null. * Fix runtime. * Fix wasm runtime build. * Update Cargo.lock * Fix warnings. * Fix grandpa tests. * Fix test-runtime build. * Fix template node build. * Fix stuff. * Update Cargo.lock to fix CI * Re-add missing AuRa logs Runtimes are required to know about every digest they receive ― they panic otherwise. This re-adds support for AuRa pre-runtime digests. * Update core/consensus/babe/src/digest.rs Co-Authored-By: DemiMarie-parity <[email protected]> * Kill log trait and all that jazz. * Refactor staking tests. * Fix ci runtime wasm check. * Line length 120. * Make tests build again * Remove trailing commas in function declarations The `extern_functions!` macro doesn’t like them, perhaps due to a bug in rustc. * Fix type error * Fix compilation errors * Fix a test * Another couple of fixes * Fix another test * More test fixes * Another test fix * Bump runtime. * Wrap long line * Fix build, remove redundant code. * Issue to track TODO * Leave the benchmark code alone. * Fix missing `std::time::{Instant, Duration}` * Indentation * Aura ConsensusLog as enum
-
- May 29, 2019
-
-
DemiMarie-parity authored
* Introduce inherent digests * Implement inherent digests * fix silly error * Implementation of inherent digests in BABE All tests pass. There are still limitations: 1. The runtime strips out inherent digests, so BABE must re-add them. 2. The test runtime checks that it can re-compute all digests. It can’t, so I had to comment out that test. * Fix compilation and seal import Seals were not imported correctly: the pre-digest was imported twice, instead of both it and the seal being imported. Also, other parts of the code did not compile due to incomplete refactoring. * Remove bogus assertion * Fix testsuite compilation * Remove unused import * Fix compiler diagnostics * Add inherent digest parameters to block constructors This enforces that inherent digests are added first. * Fixup Cargo.lock * Fix build errors * Re-add an incorrectly removed import * Bump primitive-types version * Update Cargo.lock * Refactoring * Use inherent digests for AuRa They do reach the runtime, but get stripped. I have not figured out where. * Fix compilation errors * Fix compilation errors due to incorrect types * Fix whitespace Suggested-by: Tomasz Drwiega <[email protected]> * Add preamble Suggested-by: Tomasz Drwiega <[email protected]> * Fix silly compile error * Refactor pre-digest finding code into a separate function * Remove unwanted assertion It is too likely to bring down the entire blockchain. Suggested-by: Tomasz Drwiega <[email protected]> * Use `find_pre_digest` after runtime, too Also, use `Member` trait rather than rolling our own requirements. Suggested-by: Tomasz Drwiega <[email protected]> * Fix various warnings mostly due to upgrading the dependency on `error_chain`. * Pre-digests nearly complete This nearly completes the implementation of pre-runtime digests. * `Seal2` → `Seal` and fix test suite * Try to fix the storage error * Try to fix storage (again) * Fix tests * Hopefully finish pre-runtime digests The key is to pass *only* the pre-runtime digests to the runtime. The others must be stripped out by `initialize_block`. * Fix silly typo * Fix another silly mistake * Remove unnecessary filtering of BABE pre-digests We no longer get duplicate BABE pre-digests, so if they appear, the header should be rejected outright. * Update Cargo.lock files * Reformatting * Fix silly typo in inherent digest code Also, revert `error.rs` files that contained calls to the `error_chain!` macro. * Try to keep the runtime from stripping pre-digests Currently runs into the “Storage root must match that calculated” assertion. * Don’t compute storage root until storage changes are done. Also, fix a compilation error. * Fix compile-time error * Fix compilation errors * Fix more compile errors * Hopefully it compiles this time… * Fix compilation and add docs * Prevent BABE from adding duplicate pre-runtime digests Found by comparing with the AuRa code. I also did some refactoring. * Respond to review and fix some warnings * Delete some dead code introduced earlier * More dead code goes away * `ref mut` → `&mut` * Respond to review and fix some warnings * Fix compilation error * Remove unneeded `HashT` type parameter Suggested-by: Robert Habermeier <[email protected]> * Remove spurious #[allow(deprecated)] * Document inherent digest parameter to `build_block` * Delete `Simple` trait It wasn’t needed * delete wrongly added files * Fix trait bounds * Digest serialization tests I also did some reformatting and cleanup. * Apply suggestions from code review Reformatting Co-Authored-By: André Silva <[email protected]> * Swap two arguments to `propose` and `propose_with` Also, remove some needless unsafe code. * Remove bogus `#![allow(deprecated)]` annotations With the removal of the deprecated `Seal` variant, these are not needed. * Add a missing `#[allow(deprecated)]` in the AuRa tests * Fix silly compile error * Fix silly compiler error RLS did not tell me that I hadn’t fixed `babe/lib.rs`, so I missed it. * Fixes made automatically by Cargo
-
- May 22, 2019
-
-
Gavin Wood authored
* Start to remove the `As` bound on `SimpleArtithmetic` This just introduces standard numeric bounds, assuming a minimum of `u32`. Also included is a saturating from/into trait allowing ergonomic infallible conversion when you don't care if it saturates. * Remove As from Balances trait * Remove As from Aura module * Remove As from Babe module * Expunge `As` from contract * Council module * Democracy * Finality tracker * Grandpa * First bit of indices * indices * Line lengths * session * system * Staking * Square up all other uses of As. * RHD update * Fix build/test * Remove As trait * line widths * Remove final As ref * Update srml/staking/src/lib.rs Co-Authored-By: Bastian Köcher <[email protected]> * Update core/client/src/cht.rs Co-Authored-By: Bastian Köcher <[email protected]> * Update core/client/db/src/light.rs Co-Authored-By: Bastian Köcher <[email protected]> * Apply suggestions from code review Co-Authored-By: Bastian Köcher <[email protected]> * whitespace * Apply suggestions from code review Co-Authored-By: Bastian Köcher <[email protected]> Co-Authored-By: André Silva <[email protected]> * Bring back u32 check for number on CLI
-
- May 13, 2019
-
-
Sergei Pepyakin authored
* Sketch of indexed events. * Get EventIndex by holding another variable. * Add some docs. * Use DoubleMap to store reverse topic index * Implement StorageDoubleMap::append * Use append for EventTopics. * Refactor. * Avoid `mutate` * Docs. * Add topics to EventRecord * Update tests. * Rebuild. * Bump version. * Event topics test. * Mix in BlockNumber to distinguish updates * Fix srml-system test. * Post merge fixes. * Comments/TODO.
-
- Apr 23, 2019
-
-
Sergei Pepyakin authored
* core/primitives * sr-primitives * sr-primitives * srml-treasury * substrate-executor * substrate-keystore * network-libp2p * substrate-service * srml-system * substrate-rpc * sr-version * substrate-telemetry * substrate-test-runtime * substrate-transaction-pool * node-template-runtime * node-primitives * srml-consensus * srml-contract * srml-democracy * srml-finality-tracker * srml-grandpa * srml-metadata * srml-support * Clean * Update locks
-
- Mar 29, 2019
-
-
joe petrowski authored
* all the ise * forgot a misspelling * a few more replacements * bump impl * rollback and fixes * bump impl again * Add aliases for RPC * Update on_demand.rs
-
- Mar 26, 2019
-
-
thiolliere authored
* improve decl_storage instance doc * use decl_event doc accordignly * automate doc and while allow to extend it on event * some missed ones * Update srml/example/src/lib.rs Co-Authored-By: thiolliere <[email protected]> * Update srml/support/procedural/src/storage/transformation.rs
-
- Mar 22, 2019
-
-
cheme authored
-
- Mar 13, 2019
-
-
Gav Wood authored
* Rijig to Ristretto * Rebuild wasm * adds compatibility test with the wasm module * Add Ed25519-BIP39 support * Bump subkey version * Update CLI output * New keys. * Standard phrase/password/path keys. * Subkey uses S-URI for secrets * Move everything to use new HDKD crypto. * Test fixes * Ignore old test vector. * fix the ^^ old test vector. * Fix tests * Test fixes * Cleanups * Fix broken key conversion logic in grandpa CC @rphmeier * Remove legacy Keyring usage * Traitify `Pair` * Replace Ed25519AuthorityId with ed25519::Public * Expunge Ed25519AuthorityId type! * Replace Sr25519AuthorityId with sr25519::Public * Remove dodgy crypto type-punning conversions * Fix some tests * Avoid trait * Deduplicate DeriveJunction string decode * Remove cruft code * Fix test * Minor removals * Build fix * Subkey supports sign and verify * Inspect works for public key URIs * Remove more crypto type-punning * Fix typo * Fix tests
-
- Mar 06, 2019
-
-
Bastian Köcher authored
-
- Mar 05, 2019
-
-
asynchronous rob authored
Co-authored-by: André Silva <[email protected]> * skeleton for finality tracker * dispatch events when nothing finalized for a long time * begin integrating finality tracker into grandpa * add delay field to pending change * add has_api_with function to sr_version for querying APIs * partially integrate new force changes into grandpa * implement forced changes * get srml-grandpa compiling * Update core/finality-grandpa/src/authorities.rs Co-Authored-By: rphmeier <[email protected]> * Update core/finality-grandpa/src/authorities.rs Co-Authored-By: rphmeier <[email protected]> * Update core/finality-grandpa/src/authorities.rs Co-Authored-By: rphmeier <[email protected]> * remove explicit dependence on CoreApi * increase node runtime version * integrate grandpa forced changes into node runtime * add some tests to finality-tracker * integrate finality tracking into node-runtime * test forced-change logic * test forced changes in the authority-set handler * kill some unneeded bounds in client * test forced-changes in finality-grandpa and fix logic * build wasm and finality-tracker is no-std * restart voter on forced change * allow returning custom error type from lock_import_and_run * extract out most DB logic to aux_schema and use atomic client ops * unify authority set writing * implement set pausing * bump runtime version * note on DB when we pause. * core: grandpa: integrate forced changes with multiple pending standard changes * core: grandpa: fix AuthoritySet tests * runtime: bump impl_version * core: clear pending justification requests after forced change import * srml: finality-tracker: use FinalizedInherentData * core: log requests for clearing justification requests * core, node: update runtimes * core: grandpa: fix tests * core: grandpa: remove todos and add comments * core: grandpa: use has_api_with from ApiExt * core: fix tests * core: grandpa: remove unnecessary mut modifier * core: replace PostImportActions bitflags with struct * core: grandpa: restrict genesis on forced authority set change * core: grandpa: add more docs * core: grandpa: prevent safety violations in Environment::finalize_block * core: grandpa: register finality tracker inherent data provider * core: grandpa: fix tests * node: update runtime blobs * core: grandpa: remove outdated todo * core: aura: fix typo in log message * core: grandpa: check re-finalization is on canonical chain * srml: finality-tracker: fix initialization * node: update runtime wasm * srml: finality-tracker: don't re-initialize config keys
-
Hero Bird authored
* Make use of parity-codec "derive" crate feature * Bump impl_version * Update wasm files and Cargo.lock files * Transferred to parity_codec derive feature for the rest of the crates * Update wasm binaries and lock files * Update core and node wasm binaries
-
- Feb 13, 2019
-
-
Tomasz Drwięga authored
* Refactor decl_storage a bit to allow easier impl of linked map. * A bunch of refactorings for storage generation. - Rename StorageMap and ChildrenStorageMap to avoid confusion with generator::StorageMap. - Separate implementation from the procedural macro code to clean it up. - Make sure that genesis is initialised using the `StorageValue/StorageMap` generated implementations instead of going RAW. * WiP: Writing test. * Basic implementation. * Implement enumeration. * Fix non-std issues. * fix warning * Fix test-client. * Address review grumbles - part 1 * Avoid cloning the key, relax Storage requirements. * Rebuild runtime. * Remove dangling todo.
-
- Feb 11, 2019
-
-
Stanislav Tkach authored
-
- Jan 30, 2019
-
-
Benjamin Kampmann authored
Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.
-
- Jan 16, 2019
-
-
Gav Wood authored
* Indices module * Remove indices stuff from balances * Rejob node, move Lookup into system. * Fix up some modules. * Fix democracy tests * Fix staking tests * Fix more tests * Final test fixes * Bump runtime versions * Assets uses compact dispatchers * Contracts module uses indexed addressing * Democracy has more compact encoding * Example now demonstrates compact eencoding * Sudo uses indexed address * Upgrade key also uses indexed lookups * Assets more compact types. * Fix test * Rebuild runtime, whitespace * Remove TOODs * Remove TODOs * Add a couple of tests back to balances. * Update lib.rs * Update lib.rs
-
- Jan 08, 2019
-
-
* BlockAuthorityId convenience type * Rename AuthorityId -> Ed25519AuthorityId to make it more precise * Generalize AuthorityId up to substrate-client * Fix in client-db * rename: BlockAuthorityId -> AuthorityIdFor * typo: should be digest item * Fix test-runtime authorityId mismatch One states that AuthorityId is u64 while the other states that it's Ed25519AuthorityId. * Fix more u64 - Ed25519AuthorityId mismatch * Fix compile of most of the srml modules * Continue to pin aura and grandpa with ed25519 and fix compile * Add MaybeHash trait * Fix node-runtime compile * Fix network tests
-
- Dec 22, 2018
-
-
Bastian Köcher authored
* Make `deposit_event` work with none generic events `fn deposit_event() = default` will now be used for none generic events `fn deposit_event<T>() = default` is now for generic events. * Update wasm files * Fixes some spelling mistakes * Update wasm and fix new module
-
- Dec 10, 2018
-
-
Gav Wood authored
* Referendums only gett enacted after a delay; successful voters must lock funds up until enactment. * Build fixes. * Configurable council enact delay, fix test builds. * Fix spelling * Remove TODO
-
Bastian Köcher authored
If no return type is specified, `Result` is added and `Ok(())` is returned by default. Closes: #1182
-
- Dec 09, 2018
-
-
cheme authored
* `decl_storage` parsing of the macro (TODO change tool crate structure) * Start formatting, for now use inner macro. Still missing optional formating last part (genesis ...). * Calling extra genesis macro * decl_storage lines parsing. * genesis macro as quote (need some cleaning reorg) * dirty $crate substitute * proc crate reorg. * PR impl : skip usage of phantom data, it only applies in test and council (others required it). * Remaining macro of decl_storage, warning stringify behave sometime oddly. * Formatting code and some cleaning. * Include line parsing to main struct (cannot use existing macro anymore). * Remove genesis phantom data when there is already a field with type parameter. * Revert wasm files * Remove old version of `decl_storage`. * Fix false positive for phantom trait (additional type check on config build). * slight changes: - return token errors instead of panic - do not use useless intermediate vec * Update srml/support/procedural/tools/derive/src/lib.rs remove indent Co-Authored-By: cheme <[email protected]> * Switch iterations to fold, remove unused import.
-
- Nov 21, 2018
-
-
asynchronous rob authored
* add beginnings of SRML grandpa library * get srml-grandpa compiling * tests for srml-grandpa * add optional session integration to grandpa SRML * start integration into node runtime * Allow extracting pending change from header digest * Make it compile on wasm * make tests compile again * Move Authority Key fetching into service, simplify service factory construction * Generalize Authority Consensus Setup system * Add Authority Setup Docs * Allow CLI params to be extensible - move params to structopts - split parsing and default command execution - add custom config to node - extended parsing of custom config - extending params via structop's flatten * Minor fixes on cli extension params: - added docs - re-add actual app name, rather than node-name - make strategy and subcommand optional * better cli params * synchronize GRANDPA and normal node authorities * Implement grandpa::network for gossip consensus * run_grandpa in Node * Fix missed merge error * Integrate grandpa import queue * more specific type def * link up linkhalf and import block * make grandpa future send * get compiling * Fix new params convention and license header * get it running * rebuild node runtime WASM * change logging level * Update node/cli/src/params.rs Co-Authored-By: rphmeier <[email protected]> * Update node/cli/src/params.rs Co-Authored-By: rphmeier <[email protected]> * Update node/cli/src/lib.rs Co-Authored-By: rphmeier <[email protected]> * Update node/runtime/src/lib.rs Co-Authored-By: rphmeier <[email protected]> * Update node/cli/src/lib.rs Co-Authored-By: rphmeier <[email protected]> * Clean up and Fixme for mutable config * Move GrandpaService Integration into grandpa, feature gated but on per default * Fixing grandpa runtime module test * Update wasm runtime hashes for tests * GRANDPA: use post-header hash when logging scheduled changes * add an extra bit of logging to authorities * fixing missing constrain * remove old code * move `NewAuthorities` to an event in srml-grandpa * fix node-executor tests to use grandpa log * Remove GossipConsensus from tests, use newly provided sync-feature, fixes tests * Update to latest wasm runtimes * address grumbles * address grumbles * only derive deserialize when using std * Clean up use of Deserialize
-