1. Feb 19, 2020
    • Bastian Köcher's avatar
      Consolidate frame benchmarking into a frame crate (#4977) · c077a2b5
      Bastian Köcher authored
      This prs cleans up some of the frame benchmarking stuff:
      - Move CLI into `frame-benchmarking-cli`. No frame related CLI should
      exists in the default Substrate CLI.
      - Move all traits and types related to frame benchmarking into the
      `frame-benchmarking` trait. Frame types should be isolated in Frame.
      c077a2b5
  2. Feb 18, 2020
    • Tomasz Drwięga's avatar
      Inspection extension to node CLI (#4697) · d9952dd5
      Tomasz Drwięga authored
      * Initial inspect.
      
      * WiP
      
      * Add parsing tests.
      
      * Finalize CLI.
      
      * Update to latest substrate.
      
      * Remove unused imports.
      
      * Support ImportParams as well, to get the right pruning setting.
      
      * Mention in docs that hash is no 0x.
      
      * Move bytes above extrinsics.
      
      * Switch to fill helper from sc_cli.
      
      * Remove overwrite.
      
      * Fix error.
      
      * Fix error message.
      
      * Remove extra allow.
      
      * init_config
      d9952dd5
  3. Feb 17, 2020
  4. Feb 14, 2020
    • Gavin Wood's avatar
      Composite accounts (#4820) · 29454c30
      Gavin Wood authored
      
      
      * Basic account composition.
      
      * Add try_mutate_exists
      
      * De-duplicate
      
      * Refactor away the UpdateBalanceOutcome
      
      * Expunge final UpdateBalanceOutcome refs
      
      * Refactor transfer
      
      * Refactor reservable currency stuff.
      
      * Test with the alternative setup.
      
      * Fixes
      
      * Test with both setups.
      
      * Fixes
      
      * Fix
      
      * Fix macros
      
      * Make indices opt-in
      
      * Remove CreationFee, and make indices opt-in.
      
      * Fix construct_runtime
      
      * Fix last few bits
      
      * Fix tests
      
      * Update trait impls
      
      * Don't hardcode the system event
      
      * Make tests build and fix some stuff.
      
      * Pointlessly bump runtime version
      
      * Fix benchmark
      
      * Another fix
      
      * Whitespace
      
      * Make indices module economically safe
      
      * Migrations for indices.
      
      * Fix
      
      * Whilespace
      
      * Trim defunct migrations
      
      * Remove unused storage item
      
      * More contains_key fixes
      
      * Docs.
      
      * Bump runtime
      
      * Remove unneeded code
      
      * Fix test
      
      * Fix test
      
      * Update frame/balances/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Fix ED logic
      
      * Repatriate reserved logic
      
      * Typo
      
      * Fix typo
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Update frame/system/src/lib.rs
      
      Co-Authored-By: default avatarShawn Tabrizi <[email protected]>
      
      * Last few fixes
      
      * Another fix
      
      * Build fix
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarJaco Greeff <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      29454c30
  5. Feb 13, 2020
  6. Feb 12, 2020
    • Max Inden's avatar
      client/network-gossip: Integrate GossipEngine tasks into Future impl (#4767) · e1668c2a
      Max Inden authored
      `GossipEngine` spawns two tasks, one for a periodic tick, one to forward
      messages from the network to subscribers. These tasks hold an `Arc` to a
      `GossipEngineInner`.
      
      To reduce the amount of shared ownership (locking) this patch integrates
      the two tasks into a `Future` implementation on the `GossipEngine`
      struct. This `Future` implementation can now be called from a single
      owner, e.g. the `finality-grandpa` `NetworkBridge`.
      
      As a side effect this removes the requirement on the `network-gossip`
      crate to spawn tasks and thereby removes the requirement on the
      `finality-grandpa` crate to spawn any tasks.
      
      This is part of a greater effort to reduce the number of owners of
      components within `finality-grandpa`, `network` and `network-gossip` as
      well as to reduce the amount of unbounded channels. For details see
      d4fbb897, f0c18520 and 5afc7777.
      e1668c2a
  7. Feb 11, 2020
  8. Feb 10, 2020
    • Ashley's avatar
      Fix timer panics in the wasm light client (#4561) · ae03ee91
      Ashley authored
      * Make WASM browser thing compile
      
      * Fix
      
      * updated exit-future (github repo)
      
      * Switch to broadcast crate
      
      * Migrate client/cli
      
      * Switch exit-future to modernize branch
      
      * Small changes
      
      * Switch to cargo version and fix fg tests
      
      * fix basic-authorship
      
      * Fix crash on grafana macro
      
      * Fix grafana macro
      
      * Switch node python version
      
      * Disable record_metrics_slice in grafana macro on wasm
      
      * Update client/grafana-data-source/src/lib.rs
      
      * Revert "Update client/grafana-data-source/src/lib.rs"
      
      This reverts commit 888009a8.
      
      * Add wasm support for state machine
      
      * Switch to my own libp2p version
      
      * Revert "Switch to my own libp2p version"
      
      This reverts commit ce613871.
      
      * Revert "Add wasm support for state machine"
      
      This reverts commit de7eaa06
      
      .
      
      * Add sc-browser
      
      * Squash
      
      * remove sc-browser
      
      * Fix keystore on wasm
      
      * stubs for removed functions to make env compatible with old runtimes
      
      * Add test (that doesn't work)
      
      * Fix build scripts
      
      * Revert basic-authorship due to no panics
      
      * Revert cli/informant
      
      * Revert consensus
      
      * revert offchain
      
      * Update utils/browser/Cargo.toml
      
      Co-Authored-By: default avatarBenjamin Kampmann <[email protected]>
      
      * export console functions
      
      * Add new chainspec
      
      * Fix ws in chain spec
      
      * revert chainspec
      
      * Fix chainspec
      
      * Use an Option<PathBuf> in keystore instead of cfg flags
      
      * Remove crud
      
      * Only use wasm-timer for instant and systemtime
      
      * Remove telemetry changes
      
      * Assuming this is ok
      
      * Add a KeystoreConfig
      
      * Add stubs back in
      
      * Update libp2p
      
      * Revert "Add stubs back in"
      
      This reverts commit 4690cf18.
      
      * Remove commented js again
      
      * Bump kvdb-web version
      
      * Fix cli
      
      * Switch branch on futures-timer
      
      * Fix tests
      
      * Remove sc-client test build in check-web-wasm because there isn't a good way to build futures-timer with wasm-bindgen support in the build
      
      * Remove more things ^^
      
      * Switch branch on futures-timer back
      
      * Put DB io stats behind a cfg flag
      
      * Fix things
      
      * Don't timeout transports on wasm
      
      * Update branch of futures-timer and fix bad merge
      
      * Spawn informant
      
      * Fix network test
      
      * Fix delay resets
      
      * Changes
      
      * Fix tests
      
      * use wasm_timer for transaction pool
      
      * Fixes
      
      * Switch futures-timer to crates
      
      * Only diagnose futures on native
      
      * Fix sc-network-test tests
      
      * Select log level in js
      
      * Fix syncing ;^)
      
      * Allow disabling colours in the informant
      
      * Use OutputFormat enum for informant
      
      * MallocSizeOf impl on transaction pool broke stuff because wasm_timer::Instant doesnt impl it so just revert the transaction pool to master
      
      * Update futures-diagnose
      
      * Revert "MallocSizeOf impl on transaction pool broke stuff because wasm_timer::Instant doesnt impl it so just revert the transaction pool to master"
      
      This reverts commit baa4ffc9
      
      .
      
      * Pass whole chain spec in start_client
      
      * Get Instant::now to work in transaction pool again
      
      * Informant dep reordering
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarSvyatoslav Nikolsky <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      Co-authored-by: default avatarDemi Obenour <[email protected]>
      ae03ee91
  9. Feb 07, 2020
  10. Feb 06, 2020
    • Wei Tang's avatar
      babe: pass epoch data via intermediates (#4807) · dec1bb7d
      Wei Tang authored
      * babe: pass epoch data via intermediates
      
      * Switch to use Box<dyn Any> for intermediates
      
      * Set intermediate.epoch to be Option
      
      * Fix proposer should put out an empty intermediate
      
      * Remove unnecessary encode/decode
      
      * Add EpochData to block_import_params in slot worker
      
      * Fix aura compile
      
      * Fix integration test
      dec1bb7d
    • Cecile Tonglet's avatar
      CLI improvements & fixes (#4812) · 099cd0f2
      Cecile Tonglet authored
      These are a few changes I missed during the refactoring.
      
      1. Initialization issue and boilerplate
      
          Most importantly: part of the `Configuration` initialization was done in `sc_cli::init`. This means the user can not benefit from this initialization boilerplate if they have multiple `Configuration` since `sc_cli::init` can only be called once.
      
      2. Boilerplate for `VersionInfo` and `Configuration`
      
          I'm also answering to the critic of @bkchr on the initialization using version: https://github.com/paritytech/substrate/pull/4692/files/bea809d4c14a2ede953227ac885e3b3f9771c548#r372047238 This will allow initializing a `Configuration` and provide the version by default.
      
      3. Loading the `chain_spec` explicitly
      
          In the past it was done automatically but in some cases we want to delay this. I moved the code to `Configuration.load_spec()` so it can be called later on. `chain_spec` can also be written directly to the `Configuration` without using this `load_spec` helper.
      
      4. [deleted]
      
      5. Fixing issue that prevents the user to override the port
      
          In the refactoring I introduced a bug by mistake that could potentially prevent the CLI user to override the ports if defaults where provided for these ports (only on cumulus).
      
      6. Change task_executor from Box to Arc
      
          This is useful for cumulus where we have 2 nodes with 2 separate Configuration that need to spawn tasks to the same runtime.
      
      7. Renamed TasksExecutorRequired to TaskExecutor
      
          For consistency.
      
      This is related to https://github.com/paritytech/cumulus/issues/24
      
      This is the continuation (and hopefully the end of) #4692 
      099cd0f2
    • Marcio Diaz's avatar
      faf608ee
  11. Feb 01, 2020
    • Gavin Wood's avatar
      Don't attempt to upgrade balances module on chain start (#4802) · de2ffd93
      Gavin Wood authored
      * Introduce vesting to node, debug message for upgrades and fix them
      
      * Bump spec version
      de2ffd93
    • Gavin Wood's avatar
      Refactor the balances module (#4649) · 3c80891f
      Gavin Wood authored
      
      
      * Initially scoping out of the problem
      
      * Remove need for exiry in balance locks.
      
      * Remove expiry from locks.
      
      * Remove supefluous balance test
      
      * Amalgamate pieces of balance module
      
      * Split out vesting
      
      * Fix tests
      
      * Fixes for vesting.
      
      * Docs.
      
      * Weight docs.
      
      * Refactor things in terms of set_balances.
      
      * Switch out ED to be free + reserved.
      
      * Remove on_free_balance_zero and some docs.
      
      * Build fixes
      
      * Update frame/vesting/src/lib.rs
      
      Co-Authored-By: default avatarXiliang Chen <[email protected]>
      
      * Update frame/vesting/src/lib.rs
      
      Co-Authored-By: default avatarXiliang Chen <[email protected]>
      
      * Migration
      
      * Remove superfluous code.
      
      * Test fixes
      
      * Fix some tests
      
      * Fix repatriate reserve
      
      * Fixes
      
      * Add test for migration
      
      * Final cleanups
      
      * Fix
      
      * Indentation.
      
      * Undo unneeded referencing
      
      * Bump runtime version
      
      * Fixes
      
      Co-authored-by: default avatarXiliang Chen <[email protected]>
      3c80891f
  12. Jan 31, 2020
  13. Jan 30, 2020
    • Cecile Tonglet's avatar
      CLI API refactoring and improvement (#4692) · 26e37ff6
      Cecile Tonglet authored
      It changes the way we extended the CLI functionalities of substrate to allow more flexibility. (If this was not clear, here is another version: it changes the `sc_cli` API to allow more flexibility).
      
      This touches a few important things:
       - the startup of the async task with tokei:
          This was in node and node-template and I moved it to substrate. The idea is to have 1 time the code that handles unix signals (SIGTERM and SIGINT) properly. It is however possible to make this more generic to wait for a future instead and provide only a helper for the basic handling of SIGTERM and SIGINT.
       - increased the version of structopt and tokei
       - no more use of structopt internal's API
       - less use of generics
      
      Related to #4643 and https://github.com/paritytech/cumulus/pull/42: the implementation of "into_configuration" and "get_config" are similar but with better flexibility so it is now possible in cumulus to have the command-line arguments only of the run command for polkadot if we want
      
      Related to https://github.com/paritytech/cumulus/issues/24 and https://github.com/paritytech/cumulus/issues/34 : it will now be possible to make a configuration struct for polkadot with some overrides of the default parameters much more easily.
      26e37ff6
  14. Jan 29, 2020
  15. Jan 27, 2020
    • Web3 Philosopher's avatar
      Manual Seal (#4143) · 03ffa5a5
      Web3 Philosopher authored
      
      
      * instant/manual seal
      
      unbounded queues are evil
      
      Apply suggestions from code review
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      add fork tests, docs, remove todos
      
      moar docs
      
      Update client/consensus/manual-seal/src/rpc.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      remove unbound generic, parameter, docs, deps, code style changes
      
      Apply suggestions from code review
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      code style chnges
      
      remove unused deps, remove dep renames, check if block is empty before importing, use ? for error propagation
      
      fix tests
      
      log errors for instant seal
      
      use debug
      
      code style changes, updated copyright dates
      
      use txpool::Pool instead of BasicPool, code style changes
      
      fixed tests
      
      * fix tests
      
      * requested changes from review
      
      * check inherents len
      
      * rebase
      03ffa5a5
  16. Jan 24, 2020
    • Ashley's avatar
      Switch GrandPa to std futures (replaces #3909) (#4612) · fca8058f
      Ashley authored
      
      
      * Switch GrandPa to new futures
      
      * Work on making tests work
      
      * until_imported tests working again
      
      * Work on switching tests to stable futures
      
      * Modifications
      
      * Re-add test as #[ignore]
      
      * Don't ignore
      
      * Add manual unpins
      
      * Remove Header import
      
      * Return concrete Sink type
      
      * Switch to crates.io finality-grandpa version
      
      * Remove use statement that slipped in
      
      * Fix some nitpicks
      
      * Remove unpin from i
      
      * Fixed typo
      
      * Move futures01 to dev-deps
      
      * Fix nitpicks
      
      * Update client/finality-grandpa/src/communication/mod.rs
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * nitpicking
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      fca8058f
    • Nikolay Volf's avatar
      Refactor tx-pool maintenance and other high-level api (#4629) · e5fed334
      Nikolay Volf authored
      * Reduction.
      
      * Reformation.
      
      * add locked timer stuff
      
      * fix issues and introduce full pool
      
      * arrange together
      
      * fix benches
      
      * fix new_light
      
      * Add revalidation test case
      
      * review fixes
      
      * review fixes
      
      * use just ready future
      
      * address review
      e5fed334
  17. Jan 23, 2020
  18. Jan 21, 2020
    • Pierre Krieger's avatar
      Pass an executor through the Configuration (#4688) · 6ee1244e
      Pierre Krieger authored
      * Pass an executor through the Configuration
      
      * Make tasks_executor mandatory
      
      * Fix tests
      6ee1244e
    • Bastian Köcher's avatar
      Make debug builds more usable (#4683) · cb9c1818
      Bastian Köcher authored
      * Make debug builds more usable
      
      This pr makes debug builds more usable in terms of `cargo run -- --dev`.
      
      1. `--dev` activates `--execution native`, iff `--execution` is not
      given or no sub `--execution-*` is given.
      2. It was probably a mistake to compile WASM in debug for a debug build.
      So, we now build the WASM binary always as `release` (if not requested
      differently by the user). So, we trade compilation time for a better
      debug experience.
      
      * Make sure we only overwrite default values
      
      * Make it work
      
      * Apply suggestion
      cb9c1818
  19. Jan 20, 2020
  20. Jan 17, 2020
  21. Jan 16, 2020
  22. Jan 15, 2020
  23. Jan 14, 2020
    • Ashley's avatar
      Update the service to std futures (#4447) · 410ce114
      Ashley authored
      * Switch service to futures03
      
      * Fix tests
      
      * Fix service test and cli
      
      * Re-add Executor trait to SpawnTaskHandle
      
      * Fix node-service
      
      * Update babe
      
      * Fix browser node
      
      * Update aura
      
      * Revert back to tokio-executor to fix runtime panic
      
      * Add todo item
      
      * Fix service tests again
      
      * Timeout test futures
      
      * Fix tests
      
      * nits
      
      * Fix service test
      
      * Remove zstd patch
      
      * Re-add futures01 to aura and babe tests as a dev-dep
      
      * Change failing test to tee
      
      * Fix node
      
      * Upgrade tokio
      
      * fix society
      
      * Start switching grandpa to stable futures
      
      * Revert "Start switching grandpa to stable futures"
      
      This reverts commit 9c197634
      
      .
      
      * Fix utils
      
      * Revert substrate service test
      
      * Revert gitlab
      
      Co-authored-by: default avatarthiolliere <[email protected]>
      410ce114
  24. Jan 10, 2020
    • Bastian Köcher's avatar
      Remove requirement on `Hash = H256`, make `Proposer` return `StorageChanges` and `Proof` (#3860) · 4ed0ad6f
      Bastian Köcher authored
      
      
      * Extend `Proposer` to optionally generate a proof of the proposal
      
      * Something
      
      * Refactor sr-api to not depend on client anymore
      
      * Fix benches
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Apply suggestions from code review
      
      * Introduce new `into_storage_changes` function
      
      * Switch to runtime api for `execute_block` and don't require `H256`
      anywhere in the code
      
      * Put the `StorageChanges` into the `Proposal`
      
      * Move the runtime api error to its own trait
      
      * Adds `StorageTransactionCache` to the runtime api
      
      This requires that we add `type NodeBlock = ` to the
      `impl_runtime_apis!` macro to work around some bugs in rustc :(
      
      * Remove `type NodeBlock` and switch to a "better" hack
      
      * Start using the transaction cache from the runtime api
      
      * Make it compile
      
      * Move `InMemory` to its own file
      
      * Make all tests work again
      
      * Return block, storage_changes and proof from Blockbuilder::bake()
      
      * Make sure that we use/set `storage_changes` when possible
      
      * Add test
      
      * Fix deadlock
      
      * Remove accidentally added folders
      
      * Introduce `RecordProof` as argument type to be more explicit
      
      * Update client/src/client.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Update primitives/state-machine/src/ext.rs
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * Integrates review feedback
      
      * Remove `unsafe` usage
      
      * Update client/block-builder/src/lib.rs
      
      Co-Authored-By: default avatarBenjamin Kampmann <[email protected]>
      
      * Update client/src/call_executor.rs
      
      * Bump versions
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      4ed0ad6f
  25. Jan 09, 2020
    • Pierre Krieger's avatar
      Update networking code to libp2p 0.14 (#4383) · 1ec08e88
      Pierre Krieger authored
      * Entirely update substrate-telemetry to futures 0.3
      
      * Add a Closed error
      
      * Update to libp2p 0.14
      
      * More work
      
      * More work
      
      * More work
      
      * More work
      
      * Fix warnings
      
      * Remove unwrap()
      
      * Work on tests fixing
      
      * Fix network tests
      
      * Fix external network tests
      
      * Update libp2p and restore Yamux in discovery test
      
      * Ignore DNS if initializatio nfails
      
      * Restore variables ordering
      
      * Forgot browser-utils
      
      * Fix downfall after merge
      
      * Fix tests
      1ec08e88
  26. Jan 07, 2020
  27. Jan 06, 2020