1. Jul 08, 2020
  2. Jul 07, 2020
  3. Jul 04, 2020
    • André Silva's avatar
      babe: report equivocations (#6362) · 18334ee1
      André Silva authored
      * slots: create primitives crate for consensus slots
      
      * offences: add method to check if an offence is unknown
      
      * babe: initial equivocation reporting implementation
      
      * babe: organize imports
      
      * babe: working equivocation reporting
      
      * babe: add slot number to equivocation proof
      
      * session: move duplicate traits to session primitives
      
      * babe: move equivocation stuff to its own file
      
      * offences: fix test
      
      * session: don't have primitives depend on frame_support
      
      * babe: use opaque type for key owner proof
      
      * babe: cleanup client equivocation reporting
      
      * babe: cleanup equivocation code in pallet
      
      * babe: allow sending signed equivocation reports
      
      * node: fix compilation
      
      * fix test compilation
      
      * babe: return bool on check_equivocation_proof
      
      * babe: add test for equivocation reporting
      
      * babe: add more tests
      
      * babe: add test for validate unsigned
      
      * babe: take slot number in generate_key_ownership_proof API
      
      * babe: add benchmark for equivocation proof checking
      
      * session: add benchmark for membership proof checking
      
      * offences: fix babe benchmark
      
      * babe: add weights based on benchmark results
      
      * babe: adjust weights after benchmarking on reference hardware
      
      * babe: reorder checks in check_and_report_equivocation
      18334ee1
  4. Jul 03, 2020
  5. Jul 02, 2020
  6. Jul 01, 2020
    • cheme's avatar
      Restrict `Protected` to some heap types. (#6471) · 8ef1ac0e
      cheme authored
      * Restrict `Protected` to some heap types.
      
      * Comment abut Protected usage.
      
      * Remove Protected from crypto, use secrecy crate for existing uses.
      
      * use a parse function
      
      * fix error convert
      
      * Rename and move secretY string function.
      
      * std result
      8ef1ac0e
    • David's avatar
      Fix mocking multiple http calls in the same function call (#6510) · d855a5e9
      David authored
      
      
      * Fix mocking multiple http calls in the same function call
      
      Fixes an issue where a function call would perform more than one http request and wait for each to complete before proceeding. The `RequestId` comes from the length of the `requests` collection in the `OffchainState` and if a request is completed before the next one starts it will be removed and the "next expected" will be off by one. This PR tries to fix that by using a request counter that tracks how many requests have been performed so that we can `remove()` items from the `expected_requests` at the right index.
      
      I suspect that this is a sub-optimal soluton and perhaps requests and their mocks should live side by side in the same collection, e.g. in a tuple of `(PendingRequest, Option<ExpectedRequest>)`.
      
      * Update primitives/core/src/offchain/testing.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Update primitives/core/src/offchain/testing.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Panic on overflow
      
      * Update primitives/core/src/offchain/testing.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Use a Deque and push/pop expected requests
      
      * fix test
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      d855a5e9
  7. Jun 30, 2020
    • André Silva's avatar
      grandpa: minor cleanups in communication module (#6371) · 996a86ca
      André Silva authored
      * grandpa: replace Result<(), ()> with Option<()>
      
      * grandpa: replace &Option<T> with Option<&T>
      
      * grandpa: cleanup local id and keystore usages
      
      * grandpa: return bool on check_message_signature
      
      * grandpa: fix erroneous log message on startup
      
      * grandpa: fix test
      996a86ca
    • Bastian Köcher's avatar
      Support synching of blocks that are not `new_best` (#6508) · e8f90186
      Bastian Köcher authored
      * Start
      
      * Remove debug println
      
      * Add tests
      e8f90186
    • Ashley's avatar
      Remove the service, replacing it with a struct of individual chain components (#6352) · ec2ab797
      Ashley authored
      * WIP
      
      * Making progress
      
      * Almost ready
      
      * Get service tests compiling
      
      * Fix node screenshot
      
      * Line widths
      
      * Fix node cli tests
      
      * Fix node cli warning
      
      * ChainComponents -> ServiceComponents, fix tests
      
      * make spawn_handle public
      
      * Remove spawnnamed impl for taskmanager
      
      * Move the keep alive stuff to the task manager
      
      * Move the telemetry, base path, rpc keep_alive to the service builder
      
      * Make the task manager keep alive an internal detail
      
      * Rewrite the browser start_client future
      
      * Remove run_node etc
      
      * Revert my personal changes to browser-demo/build.sh
      
      * use |config|
      
      * Add a runtime_version function to SubstrateCli
      
      * Reexport role and runtime version from sc cli
      
      * Update Cargo.lock
      
      * runtime_version -> native_runtime_version
      
      * Pass chain spec to native_runtime_version for polkadot
      
      * Fix line widths
      
      * Traitify ServiceComponents Client
      ec2ab797
    • Bastian Köcher's avatar
      Fix tx-pool returning the same transaction multiple times (#6535) · 4eaea348
      Bastian Köcher authored
      
      
      * Fix tx-pool returning the same transaction multiple times
      
      This fixes a bug that lead to returning the same transaction multiple
      times when iterating the `ready` iterator. Internally the transaction
      was kept in the `best` list and could be duplicated in that list be
      re-inserting it again. This `best` list is using a `TransactionRef`
      which internally uses a `insertion_id`. This `insertion_id` could lead
      to the same transaction being inserted multiple times into the `best`
      list.
      
      * Update client/transaction-pool/src/testing/pool.rs
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      4eaea348
    • Toralf Wittner's avatar
      Update to libp2p v0.20.1 (#6465) · fd55c45a
      Toralf Wittner authored
      
      
      * Update to libp2p-0.20.0
      
      * Update to `libp2p-0.20.1`.
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      fd55c45a
  8. Jun 26, 2020
  9. Jun 25, 2020
  10. Jun 24, 2020
  11. Jun 23, 2020
    • Cecile Tonglet's avatar
      Ensure the listen addresses are consistent with the transport (#6436) · d59281fa
      Cecile Tonglet authored
      * Initial commit
      
      Forked at: 0c42ceda
      
      
      No parent branch.
      
      * Ensure the listen addresses are consistent with the transport
      
      * Update client/network/src/error.rs
      
      * Update client/network/src/service.rs
      
      * Better implementation
      
      * Fix bad previous impl
      
      * add boot_nodes
      
      * reserved nodes
      
      * test boot nodes
      
      * reserved nodes tests
      
      * add public_addresses and make specific error type
      
      * Update client/network/src/error.rs
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      d59281fa
    • Max Inden's avatar
      client/network/service: Add primary dimension to connection metrics (#6472) · 4c03656a
      Max Inden authored
      * client/network/service: Add primary dimension to connection metrics
      
      Two nodes can be interconnected via one or more connections. The first
      of those connections is called the primary connection.
      
      This commit adds another dimension to the
      `sub_libp2p_connections_{closed,opened}_total` metrics to differentiate
      primary and non-primary connections being opened / closed.
      
      By intuition more than one connection between two nodes is rare.
      Tracking the fact whether a connection is primary or not will help prove
      or disprove this intuition.
      
      * .maintain/monitoring: Ensure to sum over all connections_closed variants
      
      * client/network/service: Rename is_primary to is_first
      
      * client/network/service: Split by metric name with two additional metrics
      
      * Revert ".maintain/monitoring: Ensure to sum over all connections_closed variants"
      
      This reverts commit 2d2f93e4.
      
      * client/network/service: Remove labels from distinct metrics
      4c03656a
    • Ashley's avatar
      Fix the browser node and ensure it doesn't colour the informant output (#6457) · ad7b5ef7
      Ashley authored
      * Fix browser informant
      
      * Fix documentation
      
      * Add an informant_output_format function to the cli config
      
      * Wrap informant output format in an option
      
      * Revert batch verifier
      
      * Remove wasm-timer from primitives io cargo lock
      
      * Drop informant_output_format function
      
      * derive debug for output format
      ad7b5ef7
    • Cecile Tonglet's avatar
      impl Debug for sc_service::Configuration (#6400) · 6221146c
      Cecile Tonglet authored
      * Initial commit
      
      Forked at: d735e4d0
      
      
      No parent branch.
      
      * Make sc_service::Configuration derive Debug
      
      * Replace task_executor fn's input by proper TaskExecutor type (cleaner)
      
      * impl From<Fn> for TaskExecutor
      
      * Update client/cli/src/runner.rs
      
      * Add some doc, examples and tests
      
      * Replace Deref by fn spawn as suggested
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      6221146c
    • pscott's avatar
      Optimize offchain worker api by re-using http-client (#6454) · fed834c8
      pscott authored
      * Fix typo in offchain's docs
      
      * Use Self keyword in AsyncApi::new()
      
      * Move httpclient to be part of OffchainWorkers to optimize block import
      
      * Fix compilation errors for tests
      
      * Add wrapper struct for HyperClient
      
      * Use lazy_static share SharedClient amongst OffchainWorkers. Remove the need to raise the fd limit
      
      * Revert "Use lazy_static share SharedClient amongst OffchainWorkers. Remove the need to raise the fd limit"
      
      This reverts commit 7af97498.
      
      * Add lazy_static for tests
      fed834c8
    • Roman Borschel's avatar
      Avoid panic on dropping a `sc_network::service::out_events::Receiver`. (#6458) · 19826b97
      Roman Borschel authored
      * Avoid panic on dropping a `Receiver`.
      
      * CI
      19826b97
  12. Jun 22, 2020
  13. Jun 21, 2020
  14. Jun 19, 2020
  15. Jun 18, 2020
    • Pierre Krieger's avatar
      7a4bd762
    • Rakan Alhneiti's avatar
      Babe VRF Signing in keystore (#6225) · 9b08492e
      Rakan Alhneiti authored
      * Introduce trait
      
      * Implement VRFSigner in keystore
      
      * Use vrf_sign from keystore
      
      * Convert output to VRFInOut
      
      * Simplify conversion
      
      * vrf_sign secondary slot using keystore
      
      * Fix RPC call to claim_slot
      
      * Use Public instead of Pair
      
      * Check primary threshold in signer
      
      * Fix interface to return error
      
      * Move vrf_sign to BareCryptoStore
      
      * Fix authorship_works test
      
      * Fix BABE logic leaks
      
      * Acquire a read lock once
      
      * Also fix RPC acquiring the read lock once
      
      * Implement a generic way to construct VRF Transcript
      
      * Use make_transcript_data to call sr25519_vrf_sign
      
      * Make sure VRFTranscriptData is serializable
      
      * Cleanup
      
      * Move VRF to it's own module
      
      * Implement & test VRF signing in testing module
      
      * Remove leftover
      
      * Fix feature requirements
      
      * Revert removing vec macro
      
      * Drop keystore pointer to prevent deadlock
      
      * Nitpicks
      
      * Add test to make sure make_transcript works
      
      * Fix mismatch in VRF transcript
      
      * Add a test to verify transcripts match in babe
      
      * Return VRFOutput and VRFProof from keystore
      9b08492e