1. Jun 09, 2020
  2. Jun 08, 2020
    • Benjamin Kampmann's avatar
      Intent to release rc3 (#6290) · e287915e
      Benjamin Kampmann authored
      e287915e
    • Hernando Castano's avatar
      Use Subscription Manager from `jsonrpc-pubsub`: The Sequel (#6254) · 3cb05a1e
      Hernando Castano authored
      
      
      * Bump jsonrpc pubsub, core, http, and ws
      
      Right now these are the packages which _need_ to be updated
      so I can just the latest `jsonrpc-pubsub` code. Once a release
      it cut upstream the rest of the dependencies should be updated
      as well.
      
      * Use jsonrpc-pubsub's SubscriptionManager
      
      This places sc-rpc-api::Subscriptions
      
      * Bump jsonrpc-core outside of sc-rpc-*
      
      * Update client/rpc tests
      
      Right now one of the `author` tests is failing, I
      need to think a bit about how best to fix it.
      
      * Remove Subscriptions manager
      
      There's no need for this implementation since we're
      using the one from `jsonrpc-pubsub` now
      
      * Fix author RPC test
      
      This test used to check for a numerial subscription ID,
      whereas now it uses a string based ID which is the default
      provided by `jsonrpc-pubsub`'s subscription manager.
      
      * Remove unused NumericIdProvider
      
      * Add missing bracket
      
      Removed one too many with that last one, lol
      
      * Bump `jsonrpc` to v14.2
      
      There's an exception though. `jsonrpc-derive` cannot be bumped
      past v14.0.5 just yet since it has a dependency on `quote` pinned
      to v1.0.1. This means that at the moment it won't build on Substrate
      since it's using v1.0.3.
      
      * Track `jsonrpc-derive` master branch
      
      * Bump `quote` version to v1.0.6
      
      * Bump `jsonrpc-derive` to v14.2.1
      
      This includes support for `quote` v1.0.6
      
      * Use exact version for jsonrpc crates
      
      Doing this to make sure any updates in jsonrpc don't
      accidently trickle down to Polkadot.
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      3cb05a1e
    • Bastian Köcher's avatar
      Fix transaction pruning in tx-pool (#6276) · 9fe0da54
      Bastian Köcher authored
      The `tree_route` generated by the import notification is only from the
      old best block to the new best parent. This means, it does not contain
      the new best block in `enacted()`. We need to prune the transactions of
      the new best block "manually" to fix this bug.
      
      Besides that, this pr also changed the `id` parameter of the `NewBlock`
      chain event to `hash`. The hash of a block is unique in contrast to the
      block number. (Block id can either be number or hash)
      9fe0da54
  3. Jun 05, 2020
  4. Jun 04, 2020
    • André Silva's avatar
      bf9e58cd
    • Hernando Castano's avatar
      Use Subscription Manager from `jsonrpc-pubsub` (#6208) · f028a509
      Hernando Castano authored
      * Bump jsonrpc pubsub, core, http, and ws
      
      Right now these are the packages which _need_ to be updated
      so I can just the latest `jsonrpc-pubsub` code. Once a release
      it cut upstream the rest of the dependencies should be updated
      as well.
      
      * Use jsonrpc-pubsub's SubscriptionManager
      
      This places sc-rpc-api::Subscriptions
      
      * Bump jsonrpc-core outside of sc-rpc-*
      
      * Update client/rpc tests
      
      Right now one of the `author` tests is failing, I
      need to think a bit about how best to fix it.
      
      * Remove Subscriptions manager
      
      There's no need for this implementation since we're
      using the one from `jsonrpc-pubsub` now
      
      * Fix author RPC test
      
      This test used to check for a numerial subscription ID,
      whereas now it uses a string based ID which is the default
      provided by `jsonrpc-pubsub`'s subscription manager.
      
      * Remove unused NumericIdProvider
      
      * Add missing bracket
      
      Removed one too many with that last one, lol
      
      * Bump `jsonrpc` to v14.2
      
      There's an exception though. `jsonrpc-derive` cannot be bumped
      past v14.0.5 just yet since it has a dependency on `quote` pinned
      to v1.0.1. This means that at the moment it won't build on Substrate
      since it's using v1.0.3.
      
      * Track `jsonrpc-derive` master branch
      
      * Bump `quote` version to v1.0.6
      
      * Bump `jsonrpc-derive` to v14.2.1
      
      This includes support for `quote` v1.0.6
      f028a509
  5. May 27, 2020
  6. May 26, 2020
  7. May 25, 2020
  8. May 22, 2020
    • pscott's avatar
      Add JSON format to import blocks and set it as default (#5816) · 9aa7b8f8
      pscott authored
      
      
      * Add BlockStream Enum and utility fn
      
      * WIP: Modify import closure to work with BlockStream
      
      * Fix trait bounds
      
      * Working prototype
      
      * Revamp block importing
      
      * Add export_import_flow tests
      
      * Add comments and clean code
      
      * Add more comments in the import fn
      
      * Add link code to import function
      
      * Add condition when returning Ready(Ok(()) to make sure we've imported every block
      
      * Add check for imported blocks in JSON case
      
      * Use rest pattern
      
      * Fix compilation error for undeclared variable
      
      * Add polling and waker before pending
      
      * Print read_block_count instead of count
      
      * Simplify binary cli option with structopt
      
      * Update test to reflect changes in CLI api
      
      * Change Stream to take SignedBlock<B> instead of B
      
      * Add comments to BlockStream
      
      * Move out logic to smaller functions for clearer code
      
      * Remove result over import_blocks return type
      
      * Check for error in command output rather than simply checking command exit status
      
      * Revamp export/import/revert testing
      
      * Fix minor typos and formatting errors
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Remove unnecessary if condition in terminating condition
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Explicit error instead of returning it as a string
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Pass BlockStream to log_importing_status_updates and simplify matching arms for block stream
      
      * Use .contains() instead of regex match
      
      * Line break in match block; return future::ready instead of poll_fn
      
      * Update Cargo.lock
      
      * Add check so that queue doesn't grow too big
      
      * Use Iterator instead of Stream
      
      * Remove allow dead_code
      
      * Remove outdated comments
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Return Errors instead of logging them
      
      * Simplify match arms
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Remove check before terminating block import
      
      * Apply suggestions from code review
      
      * Check that queue is not full BEFORE calling
      
      * Revert "Remove check before terminating block import"
      
      This reverts commit 377823c0
      
      .
      
      * Improve unit tests to make sure we actually import blocks
      
      * Remove Unpin implementation for BlockIter
      
      * Add prototype of enum for ImportStates
      
      * Add working prototype for StateMachine
      
      * Add comments for clearer code
      
      * Add sleep before calling Waker when waiting for import queue
      
      * Add Speedometer
      
      * add dbg!(&log) for test debugging
      
      * Fix lines with more than 100 cols
      
      * Fix regex capture for test
      
      * Update regexes to take to capture the whole number
      
      * Rename Cmd to Command
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      
      * Actually rename Cmd to Command
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      
      * Fix compilation errors for tests
      
      * Fix compilation errors from code review suggestion
      
      * Update bin/node/cli/tests/export_import_flow.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      9aa7b8f8
  9. May 21, 2020
    • André Silva's avatar
      babe: treat epoch_authorship RPC method as unsafe (#6069) · 14d89b7b
      André Silva authored
      * service: pass DenyUnsafe to rpc extensions
      
      * node: add DenyUnsafe to rpc full node dependencies
      
      * client: fix whitespace in rpc policy file
      
      * babe: treat epochAuthorship rpc method as unsafe
      
      * babe: add test for unsafe rpc method
      
      * babe: rename babe rpc handler
      
      * service: traitify rpc extension builder
      
      * service: make the rpc extensions builder api non-breaking
      
      * service: revert changes from light node rpc extensions builder
      
      * node: remove unnecessary type in service creation
      
      * service: cleanup with_rpc_extensions implementation
      
      * service: add missing docs to RpcExtensionBuilder
      14d89b7b
  10. May 18, 2020
  11. May 16, 2020
  12. May 15, 2020
  13. May 14, 2020
  14. May 13, 2020
    • Bastian Köcher's avatar
      Handle clap errors manually and don't reset `SIGPIPE` (#6012) · 525dc61d
      Bastian Köcher authored
      Instead of resetting `SIGPIPE` to the system default handler, we now
      handle a clap error manually and ignore any error when writing to
      `stdout`/`stderr`. In this way, the node does not silently stops when it
      encounters a `SIGPIPE` in normal mode and we still support piping of the
      cli output.
      525dc61d
  15. May 06, 2020
    • André Silva's avatar
      grandpa: report equivocations (#3868) · a2512e83
      André Silva authored
      * session: runtime api for generating session membership proofs
      
      * grandpa: add runtime api for creating equivocation report txs
      
      * grandpa: submit signed equivocation report transactions
      
      * grandpa: use proper equivocation report type
      
      * grandpa: report equivocations
      
      * grandpa: validate equivocation proof
      
      * grandpa: update to finality-grandpa 0.9.1
      
      * grandpa: fix encoding of session membership proof
      
      * grandpa: initialize set id session mapping for genesis session
      
      * grandpa: fix bug in set_id session validation
      
      * fix compilation
      
      * cleanup from merge conflicts
      
      * cleanup crate tomls
      
      * grandpa: refactor equivocation handling to separate trait
      
      * node-template: fix compilation
      
      * fix test compilation
      
      * bump finality-grandpa to v0.10.2
      
      * rpc: fix runtime version test
      
      * CHERRY-PICK #4200: Add documentation to SubmitSignedTransaction and actually make it work
      
      Squashed commit of the following:
      
      commit dc8d71c3
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 16:29:33 2019 +0100
      
          Split the method to avoid confusing type error message.
      
      commit 0c4c0378
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 16:19:55 2019 +0100
      
          Make accounts optional, fix logic.
      
      commit d715f645
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 10:06:20 2019 +0100
      
          Remove warning.
      
      commit 3f38218a
      Merge: f85b8903 368318c9
      Author: Tomasz Drwięga <[email protected]>
      Date:   Tue Dec 3 07:08:05 2019 +0100
      
          Merge branch 'master' into td-signed-transactions
      
      commit f85b8903
      Merge: f8c95403 d8d5da2c
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Dec 2 13:57:25 2019 +0100
      
          Merge branch 'master' into td-signed-transactions
      
      commit f8c95403
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:34:52 2019 +0100
      
          Forgotten import.
      
      commit a645b90d
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:32:10 2019 +0100
      
          Fix naming and bounds.
      
      commit bc28c605
      Author: Tomasz Drwięga <[email protected]>
      Date:   Mon Nov 25 17:01:05 2019 +0100
      
          Add documentation to signed transactions and actually make them work.
      
      * grandpa: skip block initialization on report submission method
      
      * primitives: allow transaction pool access by default for offchain calls
      
      * grandpa: unused parameters
      
      * grandpa: remove unused method
      
      * grandpa: enable equivocation reporting
      
      * grandpa: add workaround for parameter encoding
      
      * grandpa: fix localized_payload calls in tests
      
      * fix submit_report_equivocation_extrinsic in runtimes
      
      * node: fix submit transaction test compilation
      
      * node: bump spec_version
      
      * rpc: fix api version test
      
      * grandpa: allow custom equivocation offence type
      
      * grandpa: add test for authorities::next_change_height
      
      * grandpa: cleanup report_equivocation function
      
      * node: move reporting app crypto to node-primitives
      
      * grandpa: move equivocation traits to own module
      
      * grandpa: rename app-crypto crate import
      
      * grandpa: export equivocation types
      
      * node: bump spec_version
      
      * grandpa: rename EquivocationReport to EquivocationProof
      
      * grandpa: add missing docs to primitives
      
      * grandpa: add missing docs to equivocation
      
      * node: fix compilation
      
      * grandpa: add missing docs to pallet
      
      * node: bump spec_version
      
      * fix whitespace
      
      * grandpa: return error on offence reporting
      
      * grandpa: expose session and validator count in proofs through traits
      
      * grandpa: use strong key in module KeyOwnerProofSystem
      
      * grandpa: move key ownership proof to grandpa runtime api
      
      * grandpa: remove unnecessary cloning when checking equivocation proof
      
      * grandpa: make report_equivocation a method in Environment
      
      * support: implement KeyOwnerProofSystem for ()
      
      * grandpa: move KeyOwnerProofSystem to module trait
      
      * test-utils: fix runtime compilation
      
      * grandpa: fix test compilation
      
      * grandpa: fix test compilation after merge
      
      * grandpa: simplify transaction submission types
      
      * grandpa: validate equivocation report in signed extension
      
      * client: fix test
      
      * node: use ValidateEquivocationReport signed extension
      
      * grandpa: expose key ownership proof under opaque type
      
      * grandpa: better docs on key ownership proofs
      
      * grandpa: add note about signed extension
      
      * grandpa: add ValidateEquivocationReport::new
      
      * grandpa: remove skip_initialize_block from runtime api
      
      * grandpa: use new offchain transaction submission API
      
      * grandpa: take set_id in generate_key_ownership_proof
      
      * grandpa: update to finality-grandpa v0.12.2
      
      * grandpa: cleanup usages of AuthoritySet::current
      
      * grandpa: fix test
      
      * grandpa: add mocking utilities for equivocation reporting
      
      * grandpa: add test for equivocation reporting
      
      * grandpa: move SetIdSession initialization
      
      * grandpa: add more tests
      
      * node: enable historical session manager
      
      * node: bump spec_version
      
      * node: use strong key types in KeyOwnerProofSystem definitions
      
      * grandpa: export GrandpaEquivocationOffence type
      a2512e83
  16. May 05, 2020
  17. May 04, 2020
    • Jon Häggblad's avatar
      Expose GRANDPA round state through RPC (#5375) · c0ccc24d
      Jon Häggblad authored
      
      
      * grandpa: wire up basic RPC call
      
      * grandpa: make it compile against GRANDPA with expose round state
      
      * grandpa: use shared voter state to expose RPC endpoint
      
      * grandpa: restructure into nested structs
      
      * grandpa: return background rounds too
      
      * grandpa: return error when endpoint not ready
      
      * grandpa: collect grandpa rpc deps
      
      * grandpa: decide to use concrete AuthorityId in finality-grandpa-rpc
      
      * grandpa: remove unncessary type annotation
      
      * grandpa: move error code to const
      
      * grandpa: remove unnecessary WIP comment
      
      * grandpa: remove Id type parameter for SharedVoterState
      
      * grandpa: update tests to add shared_voter_state in parameters
      
      * grandpa: remove old deprecated test
      
      * grandpa: fix getting the correct set_id
      
      * grandpa: make SharedVoterState a struct
      
      * grandpa: wrap shared_voter_state in rpc_setup
      
      * grandpa: replace spaces with tabs
      
      * grandpa: limit RwLock write attempt to 1 sec
      
      * grandpa: add missing doc comments and remove some pub
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      Co-Authored-By: default avatarHernando Castano <[email protected]>
      
      * grandpa: update function name call after change in finality-grandpa
      
      * grandpa: group pub use and only export voter::report
      
      * grandpa: add missing docs
      
      * grandpa: extract out structs used for json serialization
      
      * grandpa: stick to u32 for fields intended for js
      
      * grandpa: move Error type to its own file
      
      * grandpa: group pub use better
      
      * Apply code review suggestion
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * grandpa: use correct version of finality-granpda in rpc crate
      
      * grandpa: add back basic rpc unit test
      
      * grandpa: replace SharedVoterState::new() with empty()
      
      * node: cleanup grandpa::SharedVoterState usage in macro
      
      * grandpa: remove VoterState error variant
      
      * grandpa: enable missing futures compat feature
      
      * grandpa: fix typo in error variant
      
      * grandpa: remove test_utils
      
      * grandpa: allow mocking rpc handler components
      
      * grandpa: rename serialized to report in rpc module
      
      * grandpa: add proper test for RPC
      
      * grandpa: update to finality-grandpa v0.12.1
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      Co-authored-by: default avatarDemi Obenour <[email protected]>
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarHernando Castano <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      c0ccc24d
    • Bastian Köcher's avatar
      Expose that `BasicQueue` expects blocking spawn (#5860) · 30394132
      Bastian Köcher authored
      * Expose that `BasicQueue` expects blocking spawn
      
      Up to now `BasicQueue` expected a closure that to spawn a `Future`.
      This was expected to be a closure that spawns a blocking future.
      However, this wasn't documented anywhere. This pr introduces a new trait
      `SpawnBlocking` that exposes this requirement to the outside.
      
      * Feedback
      30394132
    • ddorgan's avatar
      Update chain spec for flaming fir 7 (#5882) · 8c2ff695
      ddorgan authored
      * Update chain spec for flaming fir 7
      
      * Update sudo key
      
      * Use fir7 for protocol
      
      * Bump spec version
      
      * Revert sudo change
      
      * Rebuilt spec after all the changes. Flaming fir has been reset with this.
      8c2ff695
  18. Apr 29, 2020
  19. Apr 28, 2020
    • Web3 Philosopher's avatar
      Move sc-client into sc-service (#5502) · fc6d55c9
      Web3 Philosopher authored
      * Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api
      
      * move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa
      
      * drop sc-service from sc-rpc
      
      * drop sc-service from sc-consensus-aura
      
      * drop sc-client from manual-seal and babe
      
      * drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli
      
      * drop sc-client from bin/node and bin/node-template
      
      * drop sc-client
      
      * fix tests
      
      * remove check -p sc-client from gitlab.yml
      
      * fix warnings
      
      * fixes ui test
      
      * fix light client tests
      
      * adds associated Client type to AbstractService
      
      * adds UsageProvider to Client
      
      * fixed ui test, again
      
      * tried and failed to get node-cli to compile for wasm
      
      * thanks to tomaka for helping me get node-cli to compile for wasmm
      
      * ui test pls pas 🙏🏾
      
      
      
      * all tests passing 🪄
      
      * no_run documentation code
      
      * rm -f documentation code
      
      * ClientProvider
      
      * fix mega trait
      
      * move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client
      
      * adds license to sc-consensus
      
      Co-authored-by: default avatarBenjamin Kampmann <[email protected]>
      fc6d55c9
  20. Apr 24, 2020
  21. Apr 23, 2020
  22. Apr 22, 2020
  23. Apr 20, 2020
  24. Apr 17, 2020
  25. Apr 16, 2020
    • Max Inden's avatar
      client/authority-discovery: Allow to be run by sentry node (#5568) · 75134a2f
      Max Inden authored
      
      
      * client/authority-discovery: Allow to be run by sentry node
      
      When run as a sentry node, the authority discovery module does not
      publish any addresses to the dht, but still discovers validators and
      sentry nodes of validators.
      
      * client/authority-discovery/src/lib: Wrap lines at 100 characters
      
      * client/authority-discovery: Remove TODO and unused import
      
      * client/authority-discovery: Pass role to new unit tests
      
      * client/authority-discovery: Apply suggestions
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      * bin/node/cli/src/service: Use expressions instead of statements
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      75134a2f
  26. Apr 15, 2020