Skip to content
  1. Apr 30, 2022
  2. Apr 07, 2022
  3. Feb 26, 2022
    • Davide Galassi's avatar
      Replace libsecp256k1 with secp256k1 (#10798) · 4aab84cc
      Davide Galassi authored
      * Replace libsecp256k1 with secp256k1
      
      * Wipe ecdsa secret key from memory on drop
      
      * Some comments for a known issue
      
      * Safer core crypto primitives `from_slice` constructor
      
      Previous version panics if slice lenght is not the expected one.
      
      * Unit test fix
      
      * Enable use of global secp256k1 context
      
      * Better comments for ecdsa `Pair` drop
      
      * Replace `libsecp256k1` with `seco256k1` in `beefy-mmr`
      
      Used to convert ecdsa public key to ETH address
      
      * Replace `libsecp256k1` with `secp256k1` in FRAME `contracts`benchmarks
      
      * Temporary rollback of `beefy-mmr` to libsecp256k1
      
      Check for detected build issues
      
      * Cargo fmt
      
      * Rollback of FRAME `contracts` benchmarks to `libsecp256k1`
      
      * Rollback for unrelated changes
      
      * Typo fix
      
      * Add comments for deprecated `ecdsa_verify` and `secp256k1_ecdsa_recover`
      4aab84cc
  4. Feb 09, 2022
    • Koute's avatar
      Add a new host function for reporting fatal errors; make WASM backtraces... · 9a31b2c3
      Koute authored
      Add a new host function for reporting fatal errors; make WASM backtraces readable when printing out errors (#10741)
      
      * Add a new host function for reporting fatal errors
      
      * Fix one of the wasmtime executor tests
      
      * Have `#[runtime_interface(wasm_only)]` actually mean WASM-only, and not no_std-only
      
      * Print out errors through `Display` instead of `Debug`
      
      * Switch one more trait to require `Error` for its error instead of only `Debug`
      
      * Align to review comments
      9a31b2c3
  5. Jan 03, 2022
  6. Dec 24, 2021
    • cheme's avatar
      Inner hashing of value in state trie (runtime versioning). (#9732) · 4c651637
      cheme authored
      
      
      * starting
      
      * Updated from other branch.
      
      * setting flag
      
      * flag in storage struct
      
      * fix flagging to access and insert.
      
      * added todo to fix
      
      * also missing serialize meta to storage proof
      
      * extract meta.
      
      * Isolate old trie layout.
      
      * failing test that requires storing in meta when old hash scheme is used.
      
      * old hash compatibility
      
      * Db migrate.
      
      * runing tests with both states when interesting.
      
      * fix chain spec test with serde default.
      
      * export state (missing trie function).
      
      * Pending using new branch, lacking genericity on layout resolution.
      
      * extract and set global meta
      
      * Update to branch 4
      
      * fix iterator with root flag (no longer insert node).
      
      * fix trie root hashing of root
      
      * complete basic backend.
      
      * Remove old_hash meta from proof that do not use inner_hashing.
      
      * fix trie test for empty (force layout on empty deltas).
      
      * Root update fix.
      
      * debug on meta
      
      * Use trie key iteration that do not include value in proofs.
      
      * switch default test ext to use inner hash.
      
      * small integration test, and fix tx cache mgmt in ext.
      test  failing
      
      * Proof scenario at state-machine level.
      
      * trace for db upgrade
      
      * try different param
      
      * act more like iter_from.
      
      * Bigger batches.
      
      * Update trie dependency.
      
      * drafting codec changes and refact
      
      * before removing unused branch no value alt hashing.
      more work todo rename all flag var to alt_hash, and remove extrinsic
      replace by storage query at every storage_root call.
      
      * alt hashing only for branch with value.
      
      * fix trie tests
      
      * Hash of value include the encoded size.
      
      * removing fields(broken)
      
      * fix trie_stream to also include value length in inner hash.
      
      * triedbmut only using alt type if inner hashing.
      
      * trie_stream to also only use alt hashing type when actually alt hashing.
      
      * Refactor meta state, logic should work with change of trie treshold.
      
      * Remove NoMeta variant.
      
      * Remove state_hashed trigger specific functions.
      
      * pending switching to using threshold, new storage root api does not
      make much sense.
      
      * refactoring to use state from backend (not possible payload changes).
      
      * Applying from previous state
      
      * Remove default from storage, genesis need a special build.
      
      * rem empty space
      
      * Catch problem: when using triedb with default: we should not revert
      nodes: otherwhise thing as trie codec cannot decode-encode without
      changing state.
      
      * fix compilation
      
      * Right logic to avoid switch on reencode when default layout.
      
      * Clean up some todos
      
      * remove trie meta from root upstream
      
      * update upstream and fix benches.
      
      * split some long lines.
      
      * UPdate trie crate to work with new design.
      
      * Finish update to refactored upstream.
      
      * update to latest triedb changes.
      
      * Clean up.
      
      * fix executor test.
      
      * rust fmt from master.
      
      * rust format.
      
      * rustfmt
      
      * fix
      
      * start host function driven versioning
      
      * update state-machine part
      
      * still need access to state version from runtime
      
      * state hash in mem: wrong
      
      * direction likely correct, but passing call to code exec for genesis
      init seem awkward.
      
      * state version serialize in runtime, wrong approach, just initialize it
      with no threshold for core api < 4 seems more proper.
      
      * stateversion from runtime version (core api >= 4).
      
      * update trie, fix tests
      
      * unused import
      
      * clean some TODOs
      
      * Require RuntimeVersionOf for executor
      
      * use RuntimeVersionOf to resolve genesis state version.
      
      * update runtime version test
      
      * fix state-machine tests
      
      * TODO
      
      * Use runtime version from storage wasm with fast sync.
      
      * rustfmt
      
      * fmt
      
      * fix test
      
      * revert useless changes.
      
      * clean some unused changes
      
      * fmt
      
      * removing useless trait function.
      
      * remove remaining reference to state_hash
      
      * fix some imports
      
      * Follow chain state version management.
      
      * trie update, fix and constant threshold for trie layouts.
      
      * update deps
      
      * Update to latest trie pr changes.
      
      * fix benches
      
      * Verify proof requires right layout.
      
      * update trie_root
      
      * Update trie deps to  latest
      
      * Update to latest trie versioning
      
      * Removing patch
      
      * update lock
      
      * extrinsic for sc-service-test using layout v0.
      
      * Adding RuntimeVersionOf to CallExecutor works.
      
      * fmt
      
      * error when resolving version and no wasm in storage.
      
      * use existing utils to instantiate runtime code.
      
      * Patch to delay runtime switch.
      
      * Revert "Patch to delay runtime switch."
      
      This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
      
      * useless closure
      
      * remove remaining state_hash variables.
      
      * Remove outdated comment
      
      * useless inner hash
      
      * fmt
      
      * fmt and opt-in feature to apply state change.
      
      * feature gate core version, use new test feature for node and test node
      
      * Use a 'State' api version instead of Core one.
      
      * fix merge of test function
      
      * use blake macro.
      
      * Fix state api (require declaring the api in runtime).
      
      * Opt out feature, fix macro for io to select a given version
      instead of latest.
      
      * run test nodes on new state.
      
      * fix
      
      * Apply review change (docs and error).
      
      * fmt
      
      * use explicit runtime_interface in doc test
      
      * fix ui test
      
      * fix doc test
      
      * fmt
      
      * use default for path and specname when resolving version.
      
      * small review related changes.
      
      * doc value size requirement.
      
      * rename old_state feature
      
      * Remove macro changes
      
      * feature rename
      
      * state version as host function parameter
      
      * remove flag for client api
      
      * fix tests
      
      * switch storage chain proof to V1
      
      * host functions, pass by state version enum
      
      * use WrappedRuntimeCode
      
      * start
      
      * state_version in runtime version
      
      * rust fmt
      
      * Update storage proof of max size.
      
      * fix runtime version rpc test
      
      * right intent of convert from compat
      
      * fix doc test
      
      * fix doc test
      
      * split proof
      
      * decode without replay, and remove some reexports.
      
      * Decode with compatibility by default.
      
      * switch state_version to u8. And remove RuntimeVersionBasis.
      
      * test
      
      * use api when reading embedded version
      
      * fix decode with apis
      
      * extract core version instead
      
      * test fix
      
      * unused import
      
      * review changes.
      
      Co-authored-by: default avatarkianenigma <[email protected]>
      4c651637
  7. Dec 13, 2021
  8. Dec 11, 2021
  9. Dec 03, 2021
  10. Nov 12, 2021
  11. Sep 24, 2021
    • Bastian Köcher's avatar
      Prepare UI tests for rust 1.55 (#9637) · 62187b59
      Bastian Köcher authored
      
      
      * Prepare UI tests for rust 1.54
      
      * Delete wrong_page.stderr
      
      * CI: run with a staging CI image
      
      * Revert "CI: run with a staging CI image"
      
      This reverts commit 66f5b00d14b50fd9d8fbf773f7e884f380697591.
      
      * CI: debug, again
      
      * LOG_TARGET is only used in std
      
      * Remove unnecessary unsafe
      
      * Fixes
      
      * Use correct rustc locally
      
      * FMT
      
      * Compile with benchmarking
      
      * Review feedback
      
      * Some ui tests
      
      * I know...
      
      * Fix wasm tests
      
      Co-authored-by: default avatarDenis P <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      62187b59
  12. 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
  13. Aug 11, 2021
  14. Jul 22, 2021
  15. 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
  16. Jun 23, 2021
  17. Jun 15, 2021
  18. Jun 04, 2021
  19. 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
  20. 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
  21. 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
  22. 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
  23. Mar 05, 2021
  24. Feb 22, 2021
  25. 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
  26. Dec 30, 2020
  27. Dec 11, 2020
  28. Dec 09, 2020
  29. Nov 28, 2020
  30. Oct 20, 2020
  31. 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
  32. 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
  33. 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
  34. Sep 10, 2020
  35. Jul 26, 2020
  36. 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
  37. Jul 11, 2020
  38. 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
  39. 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