- Aug 27, 2019
-
-
Arkadiy Paronyan authored
* Fixed uncle pruning * Version bump
-
Bastian Köcher authored
* Make sure that `on_before_session_ending` is called * Move the call above the validtor set being set * Bump spec_version
-
Pierre Krieger authored
* Move Service::new to a macro * Move function calls to macros * Extract offchain_workers and start_rpc in separate function In follow-up commits, we want to be able to directly call maintain_transaction_pool, offchain_workers, and start_rpc, without having to implement the Components trait. This commit is a preliminary step: we extract the code to freestanding functions. * Introduce an AbstractService trait * Introduce NewService as an implementation detail of Service * Implement traits on NewService instead Instead of implementing AbstractService, Future, and Executor on Service, we implement them on NewService instead. The implementations of AbstractService, Future, and Executor on Service still exist, but they just wrap to the respective implementations for NewService. * Move components creation back to macro invocation Instead of having multiple $build_ parameters passed to the macro, let's group them all into one. This change is necessary for the follow-up commits, because we are going to call new_impl! only after all the components have already been built. * Add a $block parameter to new_impl This makes it possible to be explicit as what the generic parameter of the NewServiceis, without relying on type inference. * Introduce the ServiceBuilder struct Introduces a new builder-like ServiceBuilder struct that creates a NewService. * Macro-ify import_blocks, export_blocks and revert_chain Similar to the introduction of new_impl!, we extract the actual code into a macro, letting us get rid of the Components and Factory traits * Add export_blocks, import_blocks and revert_chain methods on ServiceBuilder Can be used as a replacement for the chain_ops::* methods * Add run_with_builder Instead of just run, adds run_with_builder to ParseAndPrepareExport/Import/Revert. This lets you run these operations with a ServiceBuilder instead of a ServiceFactory. * Transition node and node-template to ServiceBuilder * Transition transaction-factory to the new service factory This is technically a breaking change, but the transaction-factory crate is only ever used from within substrate-node, which this commit updates as well. * Remove old service factory * Adjust the AbstractService trait to be more usable We slightly change the trait bounds in order to make all the methods usable. * Make substrate-service-test compile * Fix the node-cli tests * Remove the old API * Remove the components module * Fix indentation on chain_ops * Line widths * Fix bad line widths commit * Line widths again
🤦 * Fix the sync test * Apply suggestions from code review Co-Authored-By: Gavin Wood <[email protected]> * Address some concerns * Remove TelemetryOnConnect * Remove informant::start * Update jsonrpc * Rename factory to builder * Line widths😩 -
Tomasz Drwięga authored
* Introduce capabilities filtering for calls. * Bump impl version. * Allow RichOffchainCall to only read offchain db. * Fix code. * Panic on invalid calls. * Merge execution contexts and expose capabilities. * Fix repr * Re-enable keystore for offchain calls.
-
- Aug 25, 2019
-
-
Xiliang Chen authored
* add Copy to Moment type * bump version * add Copy to support::Traits::Time::Moment and removed few clones
-
- Aug 24, 2019
-
-
Gavin Wood authored
* Allow root to force transfers * Bump version * Avoid changing pre-existing encodings
-
Kian Paimani authored
* Remove bogus constants. * Bump.
-
asynchronous rob authored
* introduce some type aliases for round and set-id * overhaul session "changed" flag and document better * do_initialize in BABE when getting new session * grandpa module tracks set IDs * update runtime versions * doc comment -> comment * Include docs fixes from Gav Co-Authored-By: Gavin Wood <[email protected]> * some more review changes * fix srml-grandpa compilation
-
thiolliere authored
* fix linkedmap swap * version bump
-
- Aug 21, 2019
-
-
Jim Posen authored
* Add ability to destroy a contract in the overlay. * Don't allow contracts to be destroyed in recursive execution. * Tests for contract self-destruction. * Don't allow constructor to exit with insufficient balance. * Remove dead code. * Bump node runtime spec version.
-
- Aug 20, 2019
-
-
asynchronous rob authored
-
Max Inden authored
In order to have authorities (validators) discover each other, they need to publish their public addresses by their ip address on the Kademlia Dht indexed by their public key. This payload needs to be signed by a key identifying them as a valid authority. Code inside `/core` does not know the current set of authorities nor can it assume what kind of cryptography primitives are currently in use. Instead it can retrieve its public key and the current set of authorities from the runtime and have it sign and verify Dht payloads. This commit enables code in `/core` to do so by introducing a srml module and runtime api to: 1. Retrieve own public key. 2. Retrieve public keys of current authority set. 3. Sign a Dht payload. 4. Verify a Dht payload. This commit makes the logic from the previous commit (`core/consensus/common/primitives.ConsensusApi`) 444bf719 obsolete and thus removes it.
-
Tomasz Drwięga authored
* Allow RPCs to be customized. * Implement node-rpc extensions. * Working on a test. * Add node-testing crate. * Fix genesis test config * Fix nonce lookups. * Clean up. * Fix expected block type. * Make the RPC extension function optional. * Fix service doc test. * Bump jsonrpc. * Bump client version. * Update Cargo.lock * Update jsonrpc. * Fix build. * Remove unused imports. * Fix signed extra. * Post merge clean up. * Fix tests. * Patch hashmap-core. * Fix build. * Fix build. * Remove hashmap_core patches.
-
- Aug 19, 2019
-
-
cheme authored
* Update trie crate to non hashmap_core one. * bump runtime impl.
-
Bastian Köcher authored
* Do not call externalities without `Ext` being set * Fix compare and set * Bump runtime version. * Bump hashmap_core
-
Michael Müller authored
* Introduce srml/scored-pool * Bump impl_version * Apply suggestions from code review Co-Authored-By: Bastian Köcher <[email protected]> * Remove unnecessary pub use * Remove unnecessary import * Adapt to InitializeMembers * Bump impl_version * Implement remarks (shortens code) * Improve complexity of score() Search and remove and search again for the new spot and insert then => O(2LogN). * Get rid of a clone() * Reduce complexity of issue_candidacy() * Add CandidateScored event + Improve comments * Fix naming * Use Lookup instead of AccountId as param * Use set_members_sorted instead of computing diff * Remove function which is only used during genesis * Get rid of rev() by changing sort order of Pool * Rename issue_candidacy to submit_candidacy * Shorten code * Remove find_in_pool() and have transactor submit index * Remove unnecessary dependency * Improve error messages * Improve naming * Improve comments * Make code clearer wrt which receiver to invoke * Adapt to new system trait * Refactor to request CandidateDeposit only once * Refactor to request Pool only once * Improve structure and comments
-
Gautam Dhameja authored
* Make node-template in sync with node. * Update service.rs * Updated babe constants. * Added SignedExtra for CheckVersion in node-template and subkey. * Added CheckVersion SignedExtra for node. * Fixed tests. * Try fix integration test. * Attempt 2 at fixing integration test. * Update node-template/runtime/src/lib.rs
-
- Aug 18, 2019
-
-
Gavin Wood authored
* Signed transactions now has affinity with runtime versions * Bump runtime version
-
- Aug 17, 2019
-
-
Kian Paimani authored
* Fix how we treat loser candidates. * Bump. * Improve doc. * Update srml/elections/src/lib.rs * Fix test
-
- Aug 16, 2019
-
-
Tomasz Drwięga authored
* Remove offline slashing logic from staking. * Initial version of reworked offence module, can report offences * Clean up staking example. * Commit SlashingOffence * Force new era on slash. * Add offenders in the SlashingOffence trait. * Introduce the ReportOffence trait. * Rename `Offence`. * Add on_before_session_ending handler. * Move offence related stuff under sr-primitives. * Fix cargo check. * Import new im-online implementation. * Adding validator count to historical session storage as it's needed for slash calculations * Add a comment about offence. * Add BabeEquivocationOffence * GrandpaEquivocationOffence * slash_fraction and fix * current_era_start_session_index * UnresponsivnessOffence * Finalise OnOffenceHandler traits, and stub impl for staking. * slash_fraction doesn't really need &self * Note that offenders count is greater than 0 * Add a test to ensure that I got the math right * Use FullIdentification in offences. * Use FullIndentification. * Hook up the offences module. * Report unresponsive validators * Make sure eras have the same length. * Slashing and rewards. * Fix compilation. * Distribute rewards. * Supply validators_count * Use identificationTuple in Unresponsivness report * Fix merge. * Make sure we don't slash if amount is zero. * We don't return an error from report_offence anymo * We actually can use vec! * Prevent division by zero if the reporters is empty * offence_forces_new_era/nominators_also_get_slashed * advance_session * Fix tests. * Update srml/staking/src/lib.rs Co-Authored-By: Robert Habermeier <[email protected]> * slashing_performed_according_exposure * Check that reporters receive their slice. * Small clean-up. * invulnerables_are_not_slashed * Minor clean ups. * Improve docs. * dont_slash_if_fraction_is_zero * Remove session dependency from offences. * Introduce sr-staking-primitives * Move offence under sr_staking_primitives * rename session_index * Resolves todos re using SessionIndex * Fix staking tests. * Properly scale denominator. * Fix UnresponsivnessOffence * Fix compilation. * Tests for offences. * Clean offences tests. * Fix staking doc test. * Bump spec version * Fix aura tests. * Fix node_executor * Deposit an event on offence. * Fix compilation of node-runtime * Remove aura slashing logic. * Remove HandleReport * Update docs for timeslot. * rename with_on_offence_fractions * Add should_properly_count_offences * Replace ValidatorIdByIndex with CurrentElectedSet ValidatorIdByIndex was querying the current_elected set in each call, doing loading (even though its from cache), deserializing and cloning of element. Instead of this it is more efficient to use `CurrentElectedSet`. As a small bonus, the invariant became a little bit easier: now we just rely on the fact that `keys` and `current_elected` set are of the same length rather than relying on the fact that `validator_id_by_index` would work similar to `<[T]>::get`. * Clarify babe equivocation * Fix offences. * Rename validators_count to validator_set_count * Fix squaring. * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: Gavin Wood <[email protected]> * Docs for CurrentElectedSet. * Don't punish only invulnerables * Use `get/insert` instead of `mutate`. * Fix compilation * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: Gavin Wood <[email protected]> * Update srml/offences/src/lib.rs Co-Authored-By: Robert Habermeier <[email protected]> * Update srml/im-online/src/lib.rs Co-Authored-By: joe petrowski <[email protected]> * Update srml/im-online/src/lib.rs Co-Authored-By: joe petrowski <[email protected]> * Update srml/im-online/src/lib.rs Co-Authored-By: joe petrowski <[email protected]> * Update srml/babe/src/lib.rs Co-Authored-By: joe petrowski <[email protected]> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <[email protected]> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <[email protected]> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <[email protected]> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <[email protected]> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <[email protected]> * Add aura todo. * Allow multiple reports for single offence report. * Fix slash_fraction calculation. * Fix typos. * Fix compilation and tests. * Fix staking tests. * Update srml/im-online/src/lib.rs Co-Authored-By: Logan Saether <[email protected]> * Fix doc on time_slot * Allow slashing only on current era (#3411) * only slash in current era * prune journal for last era * comment own_slash * emit an event when old slashing events are discarded * Pave the way for pruning * Address issues. * Try to refactor collect_offence_reports * Other fixes. * More fixes.
-
* node: update staging testnet authorities * node: update flaming fir chain spec
-
André Silva authored
-
André Silva authored
* babe: initial implementation of secondary slots * babe: validate secondary slot author * babe: implement weight based fork choice * babe: remove unused * aura: cleanup unused imports * babe: pass in parent weight when authoring and verifying * babe: use epoch randomness for picking secondary slot authors * babe: fix tests * babe: fix wasm build * babe: node-side code for disabling secondary slots * babe: allow enabling/disabling secondary slots from runtime * babe: fix test * babe: use blake2_256 for secondary slot assignment * babe: run block initialization in should_end_session * node: increase slot duration to 6s * babe: add docs * node: bump spec_version * Apply suggestions from code review Co-Authored-By: joe petrowski <[email protected]> * babe: simplify secondary slot assignment calculation * babe: remove unnecessary comment * node: bump spec_version * babe: fix bad merge
-
Tomasz Drwięga authored
* Verify signature and session index during apply phase of im-online. * Bump impl_version. * Add docs to SignedExtension
-
Svyatoslav Nikolsky authored
* value ranges in consensus cache * skip values in cache * read epoch0 + epoch1 data from genesis in babe * sync authorities + session validators at genesis * removed some debug printlns * fixed cache encoding * Revert "skip values in cache" This reverts commit ce451c32. * Revert "value ranges in consensus cache" This reverts commit 9062f943 . * get rid of cache::AUTHORITIES in Babe * cleaning up * cleaning up * update spec version * lost changes * fixed tests * Update node/runtime/src/lib.rs Co-Authored-By: DemiMarie-parity <[email protected]> * fix once-per-block condition * fix standalone babe + temp_storage in BuildGenesis * fix benhes compilation * fixed comment * re-added light nodes to integration tests * finalize_with_ancestors from extra_requests * post-merge fix * aaand removed debug code * (another one) * fix warn in logs (do not call ForkTree::finalize twice for the same block) * sync digest.next_authorities with actual next authorities * more docs * reverting all commits affecting storage * also remove keys from babe trait * fixed warnings * post-merge fixes * reverted some redundant changes * reverted more changes
-
* session: add handler for genesis session * node: bump spec version * aura: handle on_genesis_session * srml: make sure we don't re-initialize genesis authorities * session: fix mock * node: remove genesis authorities from chain spec * staking: fix mock * srml: don't initialize genesis authorities twice * aura: don't reinitialize genesis authorities * aura: fix runtime_io dependency * Bump runtime
-
André Silva authored
* im-online: use new session keys (not upcoming session) * node: bump spec_version * im-online: rename on_new_session queued validator set parameter
-
- Aug 15, 2019
-
-
asynchronous rob authored
* remove weighting and staking dependency in BABE * bump spec version * Update Cargo.toml * Update lock * Fix warnings.
-
- Aug 13, 2019
-
-
Michael Müller authored
* Fix whitespacing * Replace configurable fields with default values * Bump version * Apply suggestions from code review Co-Authored-By: Bastian Köcher <[email protected]> * Fix more whitespacing * Fix style
-
Marcio Diaz authored
* Add transaction pool to babe import queue * Add transaction pool to Babe check header * Fix tests * Add tx pool to Aura import_queue * Fix tests, node-template * Add comments regarding unused _transaction_pool * Make tx pool optional in check_header
-
- Aug 12, 2019
-
-
Gavin Wood authored
* Forcing can be on or off. * Add a testcase.
-
Gav Wood authored
-
Jim Posen authored
* srml-contracts: Rename ext_scratch_copy to ext_scratch_read. This is to disambiguate from the next ext_scratch_write function. * Remove unnecessary OutputBuf and EmptyOutputBuf. * Replace VmExecError with a result type of custom structs. * Do not drop the scratch buffer on traps and regular returns. This just reduces the number of allocations required during nested contract calls and instantiations. * Semantics for returning a status code and data from contract calls. * Remove CallReceipt and InstantiateReceipt. With forthcoming changes to return data from instantiate calls, the two types of receipts become very similar to each other and to ExecReturnValue. Instead, replace them with ExecReturnValue and a regular 2-tuple in the case of instantiation. * Modify contract function signatures to allow returning status codes. * Introduce ext_sandbox_write runtime function. * Test all the things. * Bump node runtime spec version. * Style fixes.
-
* node: exit on GRANDPA voter or BABE authoring error * node: exit process with non-zero return code when service fails * service: rename infallible task to essential task * service: revert field name changes * core: fix service testnet
-
- Aug 11, 2019
-
-
Pierre Krieger authored
* Refactor `parse_and_execute` Adds a new function named `parse_and_prepare`, which prepares the environment and parses the command. Contrary to `parse_and_execute`, `parse_and_prepare` returns a struct that permis the user to execute the command, as opposed to execute it itself. `parse_and_execute` has been modified to use `parse_and_prepare` internally. * Embed dispatch functions directly into run() After the previous commit, we now have a lot of functions whose only one is to call other functions. And these other functions are called only from one location. Let's merge these two for clarity. * Deprecate parse_and_execute and replace it in node and node-template * Apply suggestions from code review Co-Authored-By: Bastian Köcher <[email protected]>
-
Gavin Wood authored
* Scale trait and move to u32 blocknumbers. * Fixes * Cleanups * Update node/runtime/src/lib.rs Co-Authored-By: Bastian Köcher <[email protected]> * Fix up some of the factory stuff. * Update core/sr-primitives/src/traits.rs Co-Authored-By: Shawn Tabrizi <[email protected]> * Move Nonce/Index to u32 (#3361) * Force a non-borked version of upstream crate * Line lengths and runtime version bump
-
- Aug 09, 2019
-
-
-
André Silva authored
-
Bastian Köcher authored
* Implement `is_validator` for offchain-workers * Introduce `--no-validator` flag * Don't run babe/grandpa/im-online when `--no-validator` is given * Fixes compilation * Bump spec version * Improve error handling in executor * Add missing extern function * Revert making error public * Remove `--no-validator` CLI
-