Skip to content
  1. Aug 16, 2021
    • Trevor Arjeski's avatar
      RUSTSEC-2021-0076 bump libsecp256k1 (#9391) · d9f02296
      Trevor Arjeski authored
      * RUSTSEC-2021-0076 bump libsecp256k1
      
      libsecp256k1 allows overflowing signatures
      https://rustsec.org/advisories/RUSTSEC-2021-0076
      
      
      
      Changes were made to conform to libsecp256k1 version differences.
      
      Closes #9356
      
      * parse_standard_slice() -> parse_overflowing_slice()
      
      * Added v2 host function for ecdsa_verify
      
      * Add feature tag over helpers
      
      * Added ecdsa_verify v2 to test runner
      
      * PR feedback
      
      - Spaces -> tabs
      - renamed two helper functions
      
      * Fixed imports after rebasing
      
      * Bump rest of libsecp256k1 (and libp2p)
      
      libp2p also uses libsecp256k1 so it is required to be bumped too, along
      with all the version difference changes.
      
      * Add version2 for ecdsa pubkey recovery
      
      * libp2p rebase master fixes
      
      * Fix test panic when non Behaviour event is returned
      
      * Update bin/node/browser-testing/Cargo.toml
      
      * Update primitives/core/src/ecdsa.rs
      
      * Update primitives/core/src/ecdsa.rs
      
      * Update Cargo.lock
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      d9f02296
  2. Aug 11, 2021
  3. Jul 22, 2021
  4. Jul 21, 2021
    • Bastian Köcher's avatar
      Run cargo fmt on the whole code base (#9394) · 7b56ab15
      Bastian Köcher authored
      * Run cargo fmt on the whole code base
      
      * Second run
      
      * Add CI check
      
      * Fix compilation
      
      * More unnecessary braces
      
      * Handle weights
      
      * Use --all
      
      * Use correct attributes...
      
      * Fix UI tests
      
      * AHHHHHHHHH
      
      * 🤦
      
      * Docs
      
      * Fix compilation
      
      * 🤷
      
      * Please stop
      
      * 🤦
      
       x 2
      
      * More
      
      * make rustfmt.toml consistent with polkadot
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      7b56ab15
  5. Jun 23, 2021
  6. Jun 15, 2021
  7. Jun 04, 2021
  8. May 12, 2021
    • Sergey Pepyakin's avatar
      Embed runtime version as a custom section (#8688) · 0849bcce
      Sergey Pepyakin authored
      
      
      * emit a custom section from impl_runtime_apis!
      
      This change emits a custom section from the impl_runtime_apis! proc macro.
      
      Each implemented API will result to emitting a link section `runtime_apis`.
      During linking all sections with this name will be concatenated and
      placed into the final wasm binary under the same name.
      
      * Introduce `runtime_version` proc macro
      
      This macro takes an existing `RuntimeVersion` const declaration, parses
      it and emits the version information in form of a linking section.
      Ultimately such a linking section will result into a custom wasm
      section.
      
      * Parse custom wasm section for runtime version
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      * Fix sc-executor integration tests
      
      * Nits
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Refactor apis section deserialization
      
      * Fix version decoding
      
      * Reuse uncompressed value for CallInWasm
      
      * Log on decompression error
      
      * Simplify if
      
      * Reexport proc-macro from sp_version
      
      * Merge ReadRuntimeVersionExt
      
      * Export `read_embedded_version`
      
      * Fix test
      
      * Simplify searching for custom section
      
      Co-authored-by: default avatarDavid <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      0849bcce
  9. May 10, 2021
    • Sergey Pepyakin's avatar
      Make Allocator trait pub (#8777) · 6f9bc199
      Sergey Pepyakin authored
      We need this in order to be able to assemble more fine grained host
      function sets.
      
      E.g. we don't want to use `SubstrateHostFunctions` for PVF. We would
      better whitelist certain host functions. However, we cannot do that
      because we cannot refer to the `Allocator` runtime interface.
      
      I have not been able to find the reason why it wasn't made `pub` in the
      first place, but do not see any reason why not to.
      6f9bc199
  10. Apr 23, 2021
    • Bastian Köcher's avatar
      Use host max log level when initializing the `RuntimeLogger` (#8655) · 541692c4
      Bastian Köcher authored
      * Use host max log level when initializing the `RuntimeLogger`
      
      This should fix performance problems introduced by logging under certain
      circumstances. Before we always called into the host and the host was
      doing the log filtering, now as the correct max log level is set, we
      don't call into the host for every log line to check if it should be
      logged. However, we would still call into the host to determine if
      something should be logged when `something=trace` is given as we don't
      forward the log targets that are enabled.
      
      * Finish the pr
      541692c4
  11. Mar 10, 2021
    • Tomasz Drwięga's avatar
      Custom RPC for Merkle Mountain Range pallet (#8137) · f3d4355a
      Tomasz Drwięga authored
      * Add MMR custom RPC.
      
      * Change RuntimeApi to avoid hardcoding leaf type.
      
      * Properly implement the new RuntimeAPI and wire up RPC.
      
      * Extract Offchain DB as separate execution extension.
      
      * Enable offchain DB access for offchain calls.
      
      * Fix offchain_election tests.
      
      * Skip block initialisation for proof generation.
      
      * Fix integration test setup.
      
      * Fix offchain tests. Not sure how I missed them earlier 🤷.
      
      * Fix long line.
      
      * One more test missing.
      
      * Update mock for multi-phase.
      
      * Address review grumbbles.
      
      * Address review grumbles.
      
      * Fix line width of a comment
      f3d4355a
  12. Mar 05, 2021
  13. Feb 22, 2021
  14. Jan 04, 2021
    • Bastian Köcher's avatar
      Happy new year (#7814) · e3e651f7
      Bastian Köcher authored
      * Happy new year
      
      Updates the copyright years and fixes wrong license headers.
      
      * Fix the template
      
      * Split HEADER into HEADER-APACHE & HEADER-GPL
      e3e651f7
  15. Dec 30, 2020
  16. Dec 11, 2020
  17. Dec 09, 2020
  18. Nov 28, 2020
  19. Oct 20, 2020
  20. Oct 08, 2020
    • Rakan Alhneiti's avatar
      Async keystore + Authority-Discovery async/await (#7000) · 3aa4bfac
      Rakan Alhneiti authored
      
      
      * Asyncify sign_with
      
      * Asyncify generate/get keys
      
      * Complete BareCryptoStore asyncification
      
      * Cleanup
      
      * Rebase
      
      * Add Proxy
      
      * Inject keystore proxy into extensions
      
      * Implement some methods
      
      * Await on send
      
      * Cleanup
      
      * Send result over the oneshot channel sender
      
      * Process one future at a time
      
      * Fix cargo stuff
      
      * Asyncify sr25519_vrf_sign
      
      * Cherry-pick and fix changes
      
      * Introduce SyncCryptoStore
      
      * SQUASH ME WITH THE first commit
      
      * Implement into SyncCryptoStore
      
      * Implement BareCryptoStore for KeystoreProxyAdapter
      
      * authority-discovery
      
      * AURA
      
      * BABE
      
      * finality-grandpa
      
      * offchain-workers
      
      * benchmarking-cli
      
      * sp_io
      
      * test-utils
      
      * application-crypto
      
      * Extensions and RPC
      
      * Client Service
      
      * bin
      
      * Update cargo.lock
      
      * Implement BareCryptoStore on proxy directly
      
      * Simplify proxy setup
      
      * Fix authority-discover
      
      * Pass async keystore to authority-discovery
      
      * Fix tests
      
      * Use async keystore in authority-discovery
      
      * Rename BareCryptoStore to CryptoStore
      
      * WIP
      
      * Remote mutable borrow in CryptoStore trait
      
      * Implement Keystore with backends
      
      * Remove Proxy implementation
      
      * Fix service builder and keystore user-crates
      
      * Fix tests
      
      * Rework authority-discovery after refactoring
      
      * futures::select!
      
      * Fix multiple mut borrows in authority-discovery
      
      * Merge fixes
      
      * Require sync
      
      * Restore Cargo.lock
      
      * PR feedback - round 1
      
      * Remove Keystore and use LocalKeystore directly
      
      Also renamed KeystoreParams to KeystoreContainer
      
      * Join
      
      * Remove sync requirement
      
      * Fix keystore tests
      
      * Fix tests
      
      * client/authority-discovery: Remove event stream dynamic dispatching
      
      With authority-discovery moving from a poll based future to an `async`
      future Rust has difficulties propagating the `Sync` trade through the
      generated state machine.
      
      Instead of using dynamic dispatching, use a trait parameter to specify
      the DHT event stream.
      
      * Make it compile
      
      * Fix submit_transaction
      
      * Fix block_on issue
      
      * Use await in async context
      
      * Fix manual seal keystore
      
      * Fix authoring_blocks test
      
      * fix aura authoring_blocks
      
      * Try to fix tests for auth-discovery
      
      * client/authority-discovery: Fix lookup_throttling test
      
      * client/authority-discovery: Fix triggers_dht_get_query test
      
      * Fix epoch_authorship_works
      
      * client/authority-discovery: Remove timing assumption in unit test
      
      * client/authority-discovery: Revert changes to termination test
      
      * PR feedback
      
      * Remove deadcode and mark test code
      
      * Fix test_sync
      
      * Use the correct keyring type
      
      * Return when from_service stream is closed
      
      * Convert SyncCryptoStore to a trait
      
      * Fix line width
      
      * Fix line width - take 2
      
      * Remove unused import
      
      * Fix keystore instantiation
      
      * PR feedback
      
      * Remove KeystoreContainer
      
      * Revert "Remove KeystoreContainer"
      
      This reverts commit ea4a37c7d74f9772b93d974e05e4498af6192730.
      
      * Take a ref of keystore
      
      * Move keystore to dev-dependencies
      
      * Address some PR feedback
      
      * Missed one
      
      * Pass keystore reference - take 2
      
      * client/finality-grandpa: Use `Arc<dyn CryptoStore>` instead of SyncXXX
      
      Instead of using `SyncCryptoStorePtr` within `client/finality-grandpa`,
      which is a type alias for `Arc<dyn SyncCryptoStore>`, use `Arc<dyn
      CryptoStore>`. Benefits are:
      
      1. No additional mental overhead of a `SyncCryptoStorePtr`.
      
      2. Ability for new code to use the asynchronous methods of `CryptoStore`
      instead of the synchronous `SyncCryptoStore` methods within
      `client/finality-granpa` without the need for larger refactorings.
      
      Note: This commit uses `Arc<dyn CryptoStore>` instead of
      `CryptoStorePtr`, as I find the type signature more descriptive. This is
      subjective and in no way required.
      
      * Remove SyncCryptoStorePtr
      
      * Remove KeystoreContainer & SyncCryptoStorePtr
      
      * PR feedback
      
      * *: Use CryptoStorePtr whereever possible
      
      * *: Define SyncCryptoStore as a pure extension trait of CryptoStore
      
      * Follow up to SyncCryptoStore extension trait
      
      * Adjust docs for SyncCryptoStore as Ben suggested
      
      * Cleanup unnecessary requirements
      
      * sp-keystore
      
      * Use async_std::task::block_on in keystore
      
      * Fix block_on std requirement
      
      * Update primitives/keystore/src/lib.rs
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      * Fix wasm build
      
      * Remove unused var
      
      * Fix wasm compilation - take 2
      
      * Revert async-std in keystore
      
      * Fix indent
      
      * Fix version and copyright
      
      * Cleanup feature = "std"
      
      * Auth Discovery: Ignore if from_service is cloed
      
      * Max's suggestion
      
      * Revert async-std usage for block_on
      
      * Address PR feedback
      
      * Fix example offchain worker build
      
      * Address PR feedback
      
      * Update Cargo.lock
      
      * Move unused methods to test helper functions
      
      * Restore accidentally deleted cargo.lock files
      
      * Fix unused imports
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      3aa4bfac
  21. Sep 18, 2020
    • Benjamin Kampmann's avatar
      Tracing for wasm with bridging to native (#6916) · a9c73113
      Benjamin Kampmann authored
      
      
      * implement events handling, implement parent_id for spans & events
      
      * add events to sp_io::storage
      
      * update test
      
      * add tests
      
      * adjust limit
      
      * let tracing crate handle parent_ids
      
      * re-enable current-id tracking
      
      * add test for threads with CurrentSpan
      
      * fix log level
      
      * remove redundant check for non wasm traces
      
      * remove duplicate definition in test
      
      * Adding conditional events API
      
      * prefer explicit parent_id over current,
      
      enhance test
      
      * limit changes to client::tracing event implementation
      
      * remove From impl due to fallback required on parent_id
      
      * make tracing codecable
      
      * replace with global tracing
      
      * new tracing interface
      
      * impl TracingSubscriber in client
      
      * implement access to global TracingSubscriber from primitives
      
      * span for wasm
      
      * increment towards Wasm Tracing Subscriber implementation
      
      * increment, remove sp-tracing from runtime-interface
      
      * increment, it compiles
      
      * attained original functionality with new mechanism
      
      * implement remaining TracingSubscriber functions
      
      * remove spans from decl_module
      
      * add handling for encoded values
      
      * Revert "replace with global tracing"
      
      This reverts commit 8824a60deea54d9b437407a21c8ceaf6a1902ee5.
      
      * Wasm Side Tracing
      
      * tracing on wasm
      
      * enable tracing wasm on node-runtime
      
      * export all the macros in std
      
      * tracing subscriber on wasm-side only
      
      * pass spans and events over and record them
      
      * reactivate previous code and  cleanup
      
      * further cleaning up
      
      * extend the span macros, activate through executive
      
      * tracking the actual extrinsic, too
      
      * style
      
      * fixing tests
      
      * spaces -> tabs
      
      * attempting to reactivate params
      
      * activate our tests in CI
      
      * some passing
      
      * tests passing
      
      * with core lazy
      
      * global tracer for wasm side with pass over
      
      * fixing metadata referencing
      
      * remove const_fn feature requirement
      
      * reenable dispatch traces
      
      * reset client tracing
      
      * further cleaning up
      
      * fixing runtime-test
      
      * move tracing-build setup into runtime-test
      
      * Merge DebugWriter from tracing and frame-support, move to sp-std
      
      * remove dangling fixme
      
      * Docs for tracing primitives
      
      * cleaning up a bit more
      
      * Wasm interface docs
      
      * optimise docs.rs setup
      
      * adding tracing flags to uncomment
      
      * remove brace
      
      * fixing imports
      
      * fixing broken syntax
      
      * add required modules
      
      * nicer formatting
      
      * better target management
      
      * adding low level storage tracing events into frame
      
      * add custom Debug impl for WasmMetadata
      
      * cloning profiler
      
      * adding info about cloning profiler
      
      * using in-scope for within calls
      
      * proper time tracing, cleaning up println
      
      * allow to disable tracing on runtime_interface-macro
      
      * disable tracing for wasm-tracing-interface
      
      * simplify wasm-tracing-api
      
      * update client to new interface
      
      * fixing docs and tests for sp-tracing
      
      * update integration tests
      
      * re-activating enter_span
      
      * dropping FIXME, it's documented
      
      * fix formatting
      
      * fix formatting
      
      * fix imports
      
      * more debug info
      
      * inform wasm about it being disabled by returning 1
      
      * only one tracer, but enabled multi-all support
      
      * make trait pub again for tests
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      
      * fixing wasm doc tests for proper usage
      
      * remove unnecessary import
      
      * fixing formatting
      
      * minor style fixes
      
      * downgrading wabt
      
      * update error message for UI
      
      * Fix interface test
      
      * next attempt to fix macros
      
      * geee
      
      * revert tracing on hashed for future PR
      
      * remove local macros, use originals
      
      * we are able to convert to static items
      
      * implement more WasmValue types
      
      * adding support to convert str, debug and encoded values
      
      * more minor fixes
      
      * revert unsafe 'static making
      
      * fix indentation
      
      * remove commented lines
      
      * bump all them tracing versions
      
      * cleaning up docs and info
      
      * document new flag
      
      * the new layered system handles span cloning better
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDavid <[email protected]>
      
      Co-authored-by: default avatarMatt Rutherford <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      Co-authored-by: default avatarDavid <[email protected]>
      a9c73113
  22. Sep 12, 2020
    • Bastian Köcher's avatar
      Fix `storage::read` (#7084) · 9a69be05
      Bastian Köcher authored
      * Fix `storage::read`
      
      It should return the length of the storage item after the given offset.
      Before it returned always the length of the full storage item.
      
      * Fix tests
      9a69be05
  23. Sep 10, 2020
  24. Jul 26, 2020
  25. 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
  26. Jul 11, 2020
  27. Jun 23, 2020
    • 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
  28. Jun 18, 2020
    • 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
  29. May 28, 2020
    • Bernhard Schuster's avatar
      offchain storage lock (#6010) · 95d73994
      Bernhard Schuster authored
      
      
      * feat/offchain/storage: add remove interface method
      
      * feat/offchain/storeage: add remote to StorageValueRef
      
      * feat/offchain/storage: add storage lock
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * refactor/offchain/storage/lock: introduce `Lockable` trait part 1 of 2
      
      * chore/offchain/rename: _remove -> clean
      
      * feat/offchain/storage/lock: add TimeAndBlock based part 2 of 2
      
      * fix/offchain/storage/lock: block and time expiry must be && not ||
      
      * chore/offchain/storage: minor fmt doc comments
      
      * doc/comment: prefer markdown emphasis over CAPS
      
      * doc/comment: rewrap multiline module level docs
      
      * doc/comment: rephrase
      
      * impl sleep_until and use the actual time for the test env
      
      * feat/test: add more tests, ignore some sample impl doctests
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      * doc/comment: better description
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      
      * chore/storage: lifetime cleanup
      
      * fix/cleanup: trait bounds, cargo-spellcheck + extra explanations
      
      * fix/doc: periods +-
      
      * fix/review: Apply suggestions from code review
      
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      
      * cleanup: remove explicit lifetime bound, copy -> clone
      
      * fix/review: make trait Lockable contain only static, try_lock should not return Err(Option<L>),
      
      * chore/lifetimes: remove a couple of lifetime bounds which the compiler can figure out
      
      * refactor: migrate to an instant based
      
      * fix/feedback: fix, reduce, rename, docs update pending
      
      * docs/reword: adjust to changed code
      
      * fix/offchain/testing: timestamp and sleep_until shall not block
      
      * chore/lines: lines must < 100 chars
      
      * fix/docs: add missing pub field doc comments
      
      * refactor/x: try_lock does not need to return an Option<_>
      
      * refactor/simplify: a better way of waiting for a lock to resolve
      
      * docs: consistency
      
      * fix/line: < 100
      
      * fix/doctest/use: avoid crate::
      
      * fix/doctest: *
      
      * fix/review: remove unused trait bound
      
      * fix/review: pretty by const fn
      
      * fix/review: reduce default timeout to 20s
      
      * docs: grammar
      
      * fix/review: add with_block_deadline
      
      * doc: revamp BlockNumberProvider documentation to be less frame centric
      
      * chore: fmt
      
      * docs: add missing doc comment
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      Co-authored-by: default avatarNikolay Volf <[email protected]>
      95d73994
  30. May 21, 2020
  31. May 15, 2020
  32. May 05, 2020
  33. Apr 27, 2020
  34. Apr 24, 2020
  35. Apr 23, 2020
  36. Apr 20, 2020
  37. Apr 16, 2020
    • Nikolay Volf's avatar
      Batch signature verification (#5023) · 372f8b2c
      Nikolay Volf authored
      
      
      * create parallel tasks extension
      
      * make type system happy
      
      * basic externalities
      
      * test for dynamic extensions
      
      * batching test
      
      * remove premature verify_batch
      
      * shnschnorrkel batch
      
      * alter test
      
      * shnschnorrkel test
      
      * executive batching
      
      * some docs
      
      * also multi/any signatgures
      
      * error propagation
      
      * styling
      
      * make verification extension optional
      
      * experimental ed25519 parallelization
      
      * some merge fallout
      
      * utilize task executor
      
      * merge fallout
      
      * utilize task executor more
      
      * another merge fallout
      
      * feature-gate sp-io
      
      * arrange toml
      
      * fix no-std
      
      * sr25519 batching and refactoring
      
      * add docs
      
      * fix name
      
      * add newline
      
      * fix block import test
      
      * long sr25519 test
      
      * blocking instead of parking
      
      * move everything in crypto
      
      * return batch_verify to check :)
      
      * use condvars
      
      * use multi-threaded executor for benches
      
      * don't call via host interface
      
      * try no spawning
      
      * add true
      
      * cleanup
      
      * straighten batching
      
      * remove signature check from this test (?)
      
      * remove now pointless test
      
      * remove another now useless test
      
      * fix warnings
      
      * Revert "remove another now useless test"
      
      This reverts commit bbdec24bb67ed4373072daef7c863e1a8825bd8b.
      
      * rethink the sp-io-part
      
      * Revert "remove now pointless test"
      
      This reverts commit 4d553066322e65782264caa6053d4cd5538df977.
      
      * fix wording
      
      * add  wording
      
      * add todo and fix
      
      * return check and fix
      
      * add logging in sp-io
      
      * Update primitives/io/src/batch_verifier.rs
      
      Co-Authored-By: default avatarcheme <[email protected]>
      
      * address review and use std condvar
      
      * account for early exit
      
      * address reivew
      
      * address review
      
      * more suggestions
      
      * add docs for batch verification
      
      * remove unused
      
      * more review suggestions
      
      * move to sp-runtime
      
      * add expects
      
      * remove blocks
      
      * use entry
      
      * Update primitives/io/src/batch_verifier.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/externalities/src/extensions.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * update overlooked note
      
      * remove stupid return
      
      * Update primitives/io/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * Update primitives/io/src/lib.rs
      
      Co-Authored-By: default avatarBastian Köcher <[email protected]>
      
      * fix wording
      
      * bump spec_version
      
      Co-authored-by: default avatarcheme <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      372f8b2c
  38. Mar 30, 2020
    • Rakan Alhneiti's avatar
      Introduce `sign_with` method in keystore (#4925) · e17a23e9
      Rakan Alhneiti authored
      
      
      * Add KEY_KIND_ID to the public trait
      
      This change is being introduced for the purpose of identifying a public
      key with it's identifier and algorithm "kind".
      
      * Use `sign_with` as implemented in BareCryptoStore
      
      * Implement `sign_with` in sc_keystore
      
      * Fix inconsistencies, use *_KIND_ID in sp_core testing
      
      * Rename KeyKindId to CryptoTypeId
      
      * Remove pair-returning functions from BareCryptoStore trait
      
      * Define CryptoTypeId in app-crypto macros
      
      * Add functions to get keys supported by keystore
      
      * Fix sign_with signature to include CryptoTypePublicPair
      
      * Add `sign_with_any` and `sign_with_all`
      
      * Use keystore.sign_with in auth_discovery
      
      * Rename get_supported_keys -> supported_keys
      
      * Added headers to function docstrings
      
      * Use chain instead of extending a temp vector
      
      * Fixed some code formatting
      
      * Restrict size of CryptoTypeId
      
      This is to be able to use Encode/Decode derives and the overcome having
      the size being unknown at compile-time.
      
      * Implement sign_with in the trait itself
      
      * Remove whitespace
      
      * Use key_type also as a CryptoTypeId in app_crypto macros
      
      * Rename `get_keys` to `keys` in BareCryptoStore
      
      * Remove usage of key_pair funcs in tests
      
      * Adjust docstring for *_CYPTO_ID constants
      
      * Fix failures
      
      * Simplify mapping on keys
      
      * Remove one let
      
      * Fixed typo
      
      * PR feedback
      
      * remove whitespace
      
      * Zip keys and signatures
      
      * Use into_iter & remove cloned
      
      * Pass index to MissingSignature
      
      * Use typed errors instead of strings for BareCryptoStore
      
      * Implement Debug for trait error
      
      * Use hashsets for better performance for supported_keys
      
      * Make sure keys are inserted into the keystore
      
      * Make sign_with_all return type consistent with `sign_with`
      
      * Rename Error to BareCryptoStoreError
      
      * Rename CRYPT_TYPE_ID -> CRYPTO_ID
      
      * Remove unnecessary CRYPTO_ID declaration in Public trait
      
      * Convert pub key to CryptoTypePublicPair
      
      * Fix use
      
      * Fix code style
      
      * Implement From on CryptoTypePublicPair in app_crypto macros
      
      * Change CryptoTypePublicPair to a struct
      
      * Implement Display on CryptoTypePublicPair
      
      * Pass CryptoTypePublicPair to MissingSignature error
      
      * Adjust docs according to function signature
      
      * Unify keys implementation
      
      * Fix RPC author tests
      
      * Fix stackoverflow
      
      * Tabify spaces
      
      * Pass KeyTypeId to error for easier debugging
      
      * Fix asserts
      
      * Use ToHex to format public key
      
      * Use constants from sp_core
      
      * Rename testing KeyTypeId constants
      
      * Please compiler
      
      * Restore KeyTypeId names
      
      apparently, they're not only used in tests
      
      * Use BareCryptoStoreError instead of String
      
      * Document return value
      
      * Fix borrow check
      
      * Convert to hashset internally
      
      * WIP - iter_keys
      
      * Return raw_public_keys
      
      * Address PR feedback
      
      * Address PR Feedback
      
      * Fix hexdisplay import error
      
      * Update primitives/core/src/traits.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      e17a23e9