Skip to content
  1. Jul 12, 2020
    • Bastian Köcher's avatar
      Make signature batching use specialized methods (#6616) · 8ab23faf
      Bastian Köcher authored
      It was a mistake to use the `*_verify` methods for signature batching.
      This pr move the signature batching into their own functions. This is
      required, because otherwise transaction signature verification infers
      with other signature verifications.
      
      This pr also temporarily disables signature batching. The functionality
      stays, but we need to make sure that all nodes have the new runtime
      interface, before we can bring back signature batching.
      8ab23faf
  2. Jul 11, 2020
  3. Jul 10, 2020
  4. Jul 09, 2020
  5. Jul 08, 2020
  6. Jul 07, 2020
  7. Jul 04, 2020
    • André Silva's avatar
      babe: report equivocations (#6362) · a9c21b8b
      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
      a9c21b8b
  8. Jul 03, 2020
  9. Jul 02, 2020
    • Bastian Köcher's avatar
      Move `create_inherents` into the block-builder (#6553) · 4f7f312b
      Bastian Köcher authored
      
      
      * Move `create_inherents` into the block-builder
      
      This moves the `create_inherents` call into the block-builder. This has
      the advantage that `create_inherents` will be able to reuse the same
      context that will be used when applying the extrinsics and we also save
      one call to `on_initialize`. To make sure that `create_inherents` does
      not modify any state, we execute it in a transaction that is
      rolled-back after doing the runtime call.
      
      * Feedback and build fix
      
      * Update primitives/runtime/src/lib.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * Update client/block-builder/src/lib.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      4f7f312b
    • pscott's avatar
      Update SubstrateCli to return String (#6550) · 540ae1c1
      pscott authored
      
      
      * Update SubstrateCli to return String
      
      * Add default implementation for executable_name()
      
      * Use display instead of PathBuf
      
      * Get file_name in default impl of executable_name
      
      * Remove String::from and use .into()
      
      * Use default impl for executable_name()
      
      * Use .as_str() and remove useless .to_string()
      
      * Update only sp-io when running companion build
      
      * Remove unneeded update of sp-io in CI
      
      Co-authored-by: default avatarCecile Tonglet <[email protected]>
      540ae1c1
  10. Jul 01, 2020
    • cheme's avatar
      Restrict `Protected` to some heap types. (#6471) · 424d5c72
      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
      424d5c72
    • David's avatar
      Fix mocking multiple http calls in the same function call (#6510) · d73de3be
      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]>
      d73de3be
  11. Jun 30, 2020
  12. Jun 26, 2020
  13. Jun 25, 2020
  14. Jun 24, 2020
  15. Jun 23, 2020
    • Ashley's avatar
      Fix the browser node and ensure it doesn't colour the informant output (#6457) · d976f712
      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
      d976f712
    • Bastian Köcher's avatar
      Fix `sp-api` handling of multiple arguments (#6484) · 6647a42a
      Bastian Köcher authored
      With the switch to `decode_all_with_depth_limit` we silently broken
      support for functions with multiple arguments. The old generated code
      tried to decode each parameter separately, which does not play well with
      `decode_all`.
      
      This pr adds a test to ensure that this does not happen again and fixes
      the bug by decoding everything at once by wrapping it into tuples.
      6647a42a
    • Cecile Tonglet's avatar
      impl Debug for sc_service::Configuration (#6400) · 63793c8b
      Cecile Tonglet authored
      * Initial commit
      
      Forked at: 252416d3
      
      
      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]>
      63793c8b
    • Alexander Theißen's avatar
      Implement nested storage transactions (#6269) · bb2df212
      Alexander Theißen authored
      
      
      * Add transactional storage functionality to OverlayChanges
      
      A collection already has a natural None state. No need to
      wrap it with an option.
      
      * Add storage transactions runtime interface
      
      * Add frame support for transactions
      
      * Fix committed typo
      
      * Rename 'changes' variable to 'overlay'
      
      * Fix renaming change
      
      * Fixed strange line break
      
      * Rename clear to clear_where
      
      * Add comment regarding delete value on mutation
      
      * Add comment which changes are covered by a transaction
      
      * Do force the arg to with_transaction return a Result
      
      * Use rust doc comments on every documentable place
      
      * Fix wording of insert_diry doc
      
      * Improve doc on start_transaction
      
      * Rename value to overlayed in close_transaction
      
      * Inline negation
      
      * Improve wording of close_transaction comments
      
      * Get rid of an expect by using get_or_insert_with
      
      * Remove trailing whitespace
      
      * Rename should to expected in tests
      
      * Rolling back a transaction must mark the overlay as dirty
      
      * Protect client initiated storage tx from being droped by runtime
      
      * Review nits
      
      * Return Err when entering or exiting runtime fails
      
      * Documentation fixup
      
      * Remove close type
      
      * Move enter/exit runtime to excute_aux in the state-machine
      
      * Rename Discard -> Rollback
      
      * Move child changeset creation to constructor
      
      * Move child spawning into the closure
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Fixup for code suggestion
      
      * Unify re-exports
      
      * Rename overlay_changes to mod.rs and move into subdir
      
      * Change proof wording
      
      * Adapt a new test from master to storage-tx
      
      * Suggestions from the latest round of review
      
      * Fix warning message
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      bb2df212
  16. Jun 20, 2020
  17. Jun 19, 2020
  18. Jun 18, 2020
    • Rakan Alhneiti's avatar
      Babe VRF Signing in keystore (#6225) · d25f460b
      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
      d25f460b
    • mattrutherford's avatar
      Runtime interface to add support for tracing from wasm (#6381) · 74a989f3
      mattrutherford authored
      
      
      * Add span recording to tracing implementation
      
      * Add tracing proxy
      
      * switch to rustc_hash::FxHashMap
      
      * Replace lazy_static and hashmap with thread_local and vec.
      
      * fix marking valid span as invalid while removing invalid spans
      
      * refactor, add wasm_tracing module in `support`
      
      * update registered spans
      
      * tidy up
      
      * typos
      
      * refactor
      
      * update flag name to signal lost trace - `is_valid_trace`
      
      * update flag name to signal lost trace - `is_valid_trace`
      
      * update docs
      
      * update docs
      
      * Use tracing Field recording to store the actual `name` and `target`
      from wasm traces.
      
      * fix debug log in subscriber + small refactor
      
      * add tests
      
      * handle misuse in case trying to exit span not held
      
      * Implement filter for wasm traces, simplify field recording for primitive types
      
      * remove superfluous warning
      
      * update docs
      
      * Update primitives/tracing/src/proxy.rs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * update docs, apply suggestions
      
      * move Proxy from thread_local to `Extension`, rename macro
      
      * fix test
      
      * unify native & wasm span macro calls
      
      * implement wasm tracing control facility in primitives and frame
      
      * add cli flag `--wasm-tracing`
      
      * fix
      
      * switch to `Option<u4>` (possible performance degradation), switch
      to static mut bool
      
      * performance improvement using u64 vs Option<u64>
      
      * performance improvement moving concat to client
      
      * update docs
      
      * Update client/cli/src/params/import_params.rs
      
      Co-authored-by: default avatarCecile Tonglet <[email protected]>
      
      * performance improvement
      
      * Revert "performance improvement"
      
      This reverts commit 55ff8817a86302cd93bb6197eb4ca5bc7f4fb524.
      
      * small refactor
      
      * formatting
      
      * bump impl_version
      
      * Update client/cli/src/config.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * update docs
      
      * small fixes, remove pub static
      
      * nit
      
      * add integration tests and refactor Subscriber
      
      * tests
      
      * revert formatting
      
      * try fix test that works locally but not in CI
      
      * try fix test that works locally but not in CI
      
      * debug test that works locally but not in CI
      
      * fix test that works locally but not in CI
      
      * remove pub visibility from bool in runtime
      
      * make TracingSpanGuard #[cfg(not(feature = "std"))], update docs, comments
      
      * make TracingProxy drop implementation conditional on !empty state
      
      * add docs for TraceHandler
      
      * remove blank line
      
      * update expect message
      
      * update tests
      
      * rename cli option to tracing_enable_wasm
      
      * rename cli option to tracing_enable_wasm
      
      * fix
      
      * ensure wasm-tracing features are wasm only
      
      * bump impl_version
      
      * bump impl_version
      
      * add `"pallet-scheduler/std"` to `[features]` `std` in node/runtime
      
      * refactor service to remove sp_tracing dependency
      
      * refactor: line width, trait bounds
      
      * improve LogTraceHandler output
      
      * fix test
      
      * improve tracing log output
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * swap wasm indication from trace name to a separate value
      
      * Update client/tracing/src/lib.rs
      
      * add docs
      
      * remove runtime features
      
      remove wasm_tracing option from CLI
      
      remove wasm_tracing flag from ProfilingSubscriber
      
      Co-authored-by: default avatarMatt Rutherford <[email protected]>
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarCecile Tonglet <[email protected]>
      74a989f3
    • Arkadiy Paronyan's avatar
      Allow empty values in the storage (#6364) · f05ae63a
      Arkadiy Paronyan authored
      * Allow empty values in the storage
      
      * Bump trie-bench
      
      * Bump trie-bench
      f05ae63a
    • Shaopeng Wang's avatar
      a43a755a
  19. Jun 17, 2020
  20. Jun 16, 2020