- Jan 25, 2023
-
-
Bastian Köcher authored
* CI: Rewrite `check-each-crate` in python This is a much better readable version of the script and it should also work on Macos and not siltently fail ;) * Fix dumb bugs and print everything to stderr * Don't buffer Python output *
🤦 *🤦 🤦 * Use check all until we have more macos runners * Update scripts/ci/gitlab/check-each-crate.py Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update scripts/ci/gitlab/pipeline/test.yml Co-authored-by: Vladimir Istyufeev <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> -
Sasha Gryaznov authored
* Add upfront weight of merkle trie proofs for storage reading functions * drive-by fixes
-
Alexander Theißen authored
* Deprecate random interface * Revert change to runtime file * Fix docs * Fix tests * Rename to not_deprecated * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <[email protected]> * Deprecate `set_rent_allowance` Co-authored-by: Sasha Gryaznov <[email protected]>
-
Davide Galassi authored
* Detect and correct epoch-index for skipped epochs * Code refactory * Epoch index should be also be fixed for secondary claims with VRF * Fix typo * Make clippy happy * Fix typo * Trigger pipeline
-
Bastian Köcher authored
* pallet-assets: Rename `total_supply` to `amount` We are actually passing the `amount` on assets being minted and not the total supply. Closes: https://github.com/paritytech/substrate/issues/13210 * ".git/.scripts/commands/fmt/fmt.sh" * Fix compilation * FMT Co-authored-by: command-bot <>
-
- Jan 24, 2023
-
-
Arkadiy Paronyan authored
-
Michal Kucharczyk authored
-
Brian Anderson authored
-
Alejandro Martinez Andres authored
* LOG_TARGET const * fmt
-
Michal Kucharczyk authored
* service: storage monitor added Storage monitor added. It uses `notify` create to get notifications about any changes to monitored path (which is database path). Notifications are consumed in essential task which terminates when available storage space drops below given threshold. Closes: #12399 * Cargo.lock updated * misspell * fs events throttling added * minor updates * filter out non mutating events * misspell * ".git/.scripts/commands/fmt/fmt.sh" * Update client/service/src/storage_monitor.rs Co-authored-by: Anton <[email protected]> * storage-monitor crate added * cleanup: configuration + service builder * storage_monitor in custom service (wip) * copy-paste bad desc fixed * notify removed * storage_monitor added to node * fix for clippy * publish = false * Update bin/node/cli/src/command.rs Co-authored-by: Dmitry Markin <[email protected]> * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * crate name: storage-monitor -> sc-storage-monitor * error handling improved * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * publish=false removed Co-authored-by: command-bot <> Co-authored-by: Anton <[email protected]> Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Michal Kucharczyk authored
* BlockId removal: refactor: CallExecutor trait It changes the arguments of CallExecutor methods: - `call`, 'contextual_call', 'runtime_version', 'prove_execution' from: `BlockId<Block>` to: `Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <>
-
- Jan 23, 2023
-
-
Muharem Ismailov authored
-
Roman Useinov authored
* [Fix] CountedMap::set now takes Counter into account * introduce tests for StorageMap
-
Koute authored
-
Bastian Köcher authored
* Rename `*-private-ipv4` to `*-private-ip` CLI args Renames the `*-private-ipv4` to `*-private-ip` in the CLI interface. The old names are staying as alias, thus it will not break for anyone. Besides that it also fixes the naming in the rest of the code. * FMT
-
Sam Johnson authored
* add stub for new benchmark macro * benchmark syntax * add #[extrinsic call] separator * parse #[benchmark] item as a function * proper emission of error when #[extrinsic_call] annotation is missing * clean up * enclosing module via benchmarks! { } working * use an attribute macro on the module instead of benchmarks! { } * cargo fmt * working component implementation * WIP * working * add syntax for Linear<A, B> * parsing of param ranges (still need to build tuple though) * params parsing WIP * clean up (don't need extrinsic call name) * use proper Result syntax for BenchmarkDef parsing * proper parsing of Linear<0, 1> style args * successfully parse and make use of linear component ranges
💥 * rename support variable => home because eventually will be moved * compile-time check that param range types implement ParamRange * switch to using balances as example, failing on instance pallet * successfully set up __origin and __call with balances💥 * clean up * use a module * don't need a variable for transfer * rename benchmark_transfer -> transfer because no longer conflicts * clean up * working with transfer_increasing_users as well💥 * re-add BareBlock * add comments for undocumented structs+functions+traits * refactor in preparation for removing module requirements * switch to a block instead of a module * use the outer macro pattern to to enable #[benchmarks] aggregation * successfully generate SelectedBenchmark💥 * implement components for SelectedBenchmark * implement instance for SelectedBenchmark * properly track #[extra] * working impl for fn benchmarks() * run_benchmarks WIP * finish run_benchmark! impl💥 * import balances transfer_best_case benchmark * import transfer_keep_alive balances pallet benchmark * import set_balance_creating balances pallet benchmark * import set_balance_killing balances pallet benchmark * import force_transfer balances pallet benchmark * add #[extra] annotation and docs to transfer_increasing_users * import transfer_all balances pallet benchmark * import force_unreserve balances pallet benchmark * prepare to implement impl_benchmark_test_suite! * ensure tests cover #[extra] before and after #[benchmark] tag * refactor * clean up * fix * move to outer * switch to benchmarks/instance_benchmarks * test impl almost done, strange compiler error * benchmark test suites working💥 * clean up * add stub and basic parsing for where_clause * working except where clause and extrinsic calls containing method chains * assume option (2) for now wrt https://github.com/paritytech/substrate/pull/12924#issuecomment-1372938718 * clean up * switch to attribute-style * properly handle where clauses * fix subtle missing where clause, now just MessageQueue issues * fix block formatting in message-queue pallet * switch to block vs non-block parsing of extrinsic call * working now but some benchmark tests failing * message-queue tests working (run order issue fixed)🎉 * add comments and internal docs for fame_support_procedural::benchmark * fix license years * docs for lib.rs * add docs to new support procedural macros * don't allow #[benchmark] outside of benchmarking module * add docs * use benchmark(extra, skip_meta) style args * update docs accordingly * appease clippy * bump ci * add notes about `extra` and `skip_meta` * fix doc tests * re-run CI * use `ignore` instead of `no_run` on doc examples * bump CI * replace some if-lets with if-elses * more refactoring of if-let statements * fix remaining if-lets in BenchmarkDef::from() * fix if-lets in benchmarks() * fix remaining if-lets, use nested find_map for extrinsic call * switch to use #[extrinsic_call] or #[block] situationally * refactor ExtrinsicCallDef => BenchmarkCallDef * update docs with info about #[block] * add macro stub for #[extrinsic_call] * fix docs and add stub for #[block] as well * remove unused extern crate line * fix clippy nits * Use V2 bench syntax in pallet-example-basic Just testing the dev-ex... Signed-off-by: Oliver Tale-Yazdi <[email protected]> * carry over comment * use curly-brace style for impl_benchmark_test_suite! * remove unneeded parenthesis * proper handling of _() extrinsic call style * add docs for _() syntax * fix crate access * simplify keyword access Co-authored-by: Keith Yeung <[email protected]> * simplify module content destructuring Co-authored-by: Keith Yeung <[email protected]> * fix crate access "frame_benchmarking" => "frame-benchmarking", compiles * use _() extrinsic call syntax where possible in balances * simplify attr.path.segments.last() Co-authored-by: Keith Yeung <[email protected]> * fix compile error being suppressed * simplify extrinsic call keyword parsing Co-authored-by: Keith Yeung <[email protected]> * use ? operator instead of return None Co-authored-by: Keith Yeung <[email protected]> * rename generics => type_use_generics rename full_generics => type_impl_generics * simplify extrinsic call extraction with transpose * bump CI * nit * proper handling of too many + too few block/extrinsic call annotations * change to B >= A Co-authored-by: Oliver Tale-Yazdi <[email protected]> * remove unneeded ignore Co-authored-by: Oliver Tale-Yazdi <[email protected]> * remove another ignore Co-authored-by: Oliver Tale-Yazdi <[email protected]> * add ui tests * use _() style extrinsic call on accumulate_dummy Co-authored-by: Oliver Tale-Yazdi <[email protected]> * add range check to ParamRange * ui test for bad param ranges * fix failing example * add ignore back to other failing example * tweak expr_call span Co-authored-by: Keith Yeung <[email protected]> * fix typo * eliminate a match Co-authored-by: Keith Yeung <[email protected]> * change pub fn benchmarks to return Result<TokenStream> * fix origin error span * more informative error for invalid benchmark parameter name * fix spans on a few benchmark errors * remove unneeded clone * refactor inner loop of benchmark function parsing * preserve mod attributes * refactor outer loop of benchmark def parsing code, greatly simplified * simplify to use a ? operator when parsing benchmark attr path * fix another ? operator * further simplify benchmark function attr parsing with more ? ops * refactor extrinsic call handling to use if let rather than match * replace is_ok => is_err Co-authored-by: Keith Yeung <[email protected]> * re-use name during expansion of benchmark def * remove unneeded clone * fix span for origin missing error * fix missing semi Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: parity-processbot <>
-
- Jan 22, 2023
-
-
zjb0807 authored
* improve debug info in assert_has_event and assert_last_event * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 21, 2023
-
-
Bastian Köcher authored
The `authoring_blocks` test of BABE was calculating the slot based on the timestamp it sometimes failed in CI. The problem is that we combine all the notifications and authoring futures in one big future. This one big future may first polls one authoring future to build a block. Then it polls all notification futures again to import the block. Then some other authoring future is polled and builds on the imported block using the same slot and making the import fail. The solution is that we just artificially increase the slot to make the test work.
-
Oliver Tale-Yazdi authored
* Move slow hardware warning print logic to CLI Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Bastian Köcher <[email protected]> * fmt Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 20, 2023
-
-
Oliver Tale-Yazdi authored
Signed-off-by: Oliver Tale-Yazdi <[email protected]> Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
Sergej Sakac authored
* move Metric * run hardware bench if validiator flag is being used * fix rustdoc & update node-template * fix * unused improt * warn * move Requirement * bench_result * ensure_requirements * make the code compile * check if authority * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * nit fixes * warning signs * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
Bastian Köcher authored
When running with `--no-private-ipv4` the node should not trying to connect to any private ip addresses. With the switch to libp2p this behavior was broken. Part of this version upgrade was the following pr: https://github.com/libp2p/rust-libp2p/pull/2995. This pr changed the default cache size of `libp2p-identity` from `0` aka disabled to `100`. Together with our implementation that was calling into `identity` to request addresses for a given peer. Before the switch to libp2p 0.50.0 this was returning zero addresses, but now with the cache enabled it started to return addresses. This pr fixes this by only letting discovery return addresses for a peer. It also ensures that we filter private addresses if requested. The cache is also disabled to restore the previous caching behavior, but it will actually not be called anymore.
-
Marcin S. authored
* Fix potential huge allocation as a result of `validate_block` output * Address review comments; add more tests * Update client/executor/wasmtime/src/runtime.rs * Remove unnecessary comments Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 19, 2023
-
-
Michal Kucharczyk authored
* txpool: LOG_TARGET const added part of: #12873 * LOG_TARGET added to tests mod * txpool::api for api * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <>
-
Alexander Theißen authored
-
Gavin Wood authored
* Make DispatchError impl MEL * Upgrade SCALE codec to support `codec(skip)` for MEL Co-authored-by: Bastian Köcher <[email protected]>
-
Sebastian Kunert authored
* Worker * Reorganize and unpin onnotification drop * Pin in state-db, pass block number * Pin blocks in blockchain db * Switch to reference counted LRU * Disable pinning when we keep all blocks * Fix pinning hint for state-db * Remove pinning from backend layer * Improve readability * Add justifications to test * Fix justification behaviour * Remove debug prints * Convert channels to tracing_unbounded * Add comments to the test * Documentation and Cleanup * Move task start to client * Simplify cache * Improve test, remove unwanted log * Add tracing logs, remove expect for block number * Cleanup * Add conversion method for unpin handle to Finalitynotification * Revert unwanted changes * Improve naming * Make clippy happy * Fix docs Co-authored-by: Michal Kucharczyk <[email protected]> * Use `NumberFor` instead of u64 in API * Hand over weak reference to unpin worker task * Unwanted * &Hash -> Hash * Remove number from interface, rename `_unpin_handle`, LOG_TARGET * Move RwLock one layer up * Apply code style suggestions * Improve comments * Replace lru crate by schnellru * Only insert values for pinned items + better docs * Apply suggestions from code review Co-authored-by: Bastian Köcher <[email protected]> * Improve comments, log target and test Co-authored-by: Michal Kucharczyk <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
Tsvetomir Dimitrov authored
* Expose `UnknownBlock` error via `ApiError` In [certain cases](https://github.com/paritytech/polkadot/issues/5885) a runtime api is called for an unknown block. For example a block which is already pruned or on an abandon fork. In such cases the correct error is returned but it is wrapped in `ApiError::Application` and the only way to figure out what is the problem is to inspect the actual message in the error. In polkadot for example this usually happens when the runtime api version is being queried. It's beneficial to be able to clearly separate such errors so i that when they occur the client side can handle them more gracefully. E.g. log less stressful error message than `State already discarded for BlockId` or cancel any pending work related on this block. * Update primitives/api/src/lib.rs Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 18, 2023
-
-
Sasha Gryaznov authored
* integrity test for MaxCodeLen and CallStack::len() * integrity test for MaxDebugBufferLen * addressed review comments * fix append_debug_buffer() * ci fix * updated code_len_limit formula after further discussion * enlarged mem safe margin after discussion * +doc to Config trait associated types * Apply suggestions from code review Co-authored-by: Alexander Theißen <[email protected]> * more lil fixes from code review feedback * lowered max call depth to satisfy mem limits * fix node runtime pallet params to satisfy integrity check * fix max call depth value calc Co-authored-by: Alexander Theißen <[email protected]>
-
Michal Kucharczyk authored
* zobmienet tests are not supposed to fail * Update scripts/ci/gitlab/pipeline/zombienet.yml Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Alexander Samusev <[email protected]>
-
Sasha Gryaznov authored
* update RuntimeCosts to Weights V2, update tests * improve docs * clearer naming and docs to compat_weight helper * Apply suggestions from code review Co-authored-by: Alexander Theißen <[email protected]> * save before master merge * HostFnWeights to Weight * added to_weight! macro * Apply suggestions from code review Co-authored-by: Alexander Theißen <[email protected]> * RuntimeCosts::ChainExtension to weight_v2 * chain extension to weight v2 Co-authored-by: Alexander Theißen <[email protected]>
-
Koute authored
* Have `KeyIterator` clone the `prefix` it receives * Stream keys in `storage_size` RPC and add a runtime limit * Update client/rpc/Cargo.toml Co-authored-by: Bastian Köcher <[email protected]> * Update client/rpc/src/state/utils.rs Co-authored-by: Bastian Köcher <[email protected]> * Rename the types to signify that the cancellation is due to a timeout * Move the test into a `mod tests` * Add a comment regarding `biased` in `tokio::select` * Make the `clone` explicit when calling `KeyIterator::{new, new_child}` Co-authored-by: Bastian Köcher <[email protected]>
-
- Jan 17, 2023
-
-
Bastian Köcher authored
The macros in frame-benchmarking relied on having all the macros imported, which isn't a behavior for a proper macro :D This pr fixes this by making all internal macro usages absolute.
-
Squirrel authored
* break out moch runtimes to separate files * tranaction-payment: break out tests & mock runtime to separate files
-
Davide Galassi authored
Refactory of `next_slot` method * Prevents slot worker exit if inherent data provider creation fails * Failure is not possible anymore * Fix potential failure after warp-sync where block headers of not already downloaded blocks are used by the inherent data provider
-
Gavin Wood authored
* Keep funds with receipt holder * Counterpart is optional * Use named reserves * Tests * Benchmarks * Fixes * Update frame/nis/src/lib.rs Co-authored-by: Keith Yeung <[email protected]> * Update frame/nis/src/lib.rs Co-authored-by: Keith Yeung <[email protected]> * Update frame/nis/src/lib.rs * Update frame/nis/src/lib.rs * Update frame/nis/src/tests.rs * Update frame/nis/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/nis/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/nis/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Update frame/nis/src/lib.rs * Update frame/nis/src/lib.rs * Update frame/nis/src/lib.rs * Update frame/nis/src/lib.rs * Formatting Co-authored-by: Keith Yeung <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
-
Anton authored
* join dns with another instance of WS transport Secure Websocket transport needs unresolved addresses, so we join DNS transport with yet another instance of Websocket transport. Closes #12024 * WSS transport itself need to wrap DNS transport in order to resolve addresses before passing them down to TCP transport Refs https://github.com/libp2p/rust-libp2p/issues/3330 * reverse order * simplify code: remove WS from WSS inner DNS transport * remove the 2nd instance of WS transport
-
- Jan 16, 2023
-
-
Michal Kucharczyk authored
* txpool: don't maintain the pool during major sync Fix shall prevent from wasting the CPU during the major sync. No actions are actually required in transaction pool during the major sync. Fixes: #12903 * passing sync_oracle to maintain method * fixed: builder, txpool tests * do not maintain tx-pool if node gone out of sync * EnactmentAction: all logic moved to EnactmentState Tests to be done. * maintain guard logic moved directly to MaintainedTransactionPool * minor fixes * EnactmentAction: all logic moved to EnactmentState (again) * SyncOracle fixes here and there * Update client/transaction-pool/src/enactment_state.rs Co-authored-by: Bastian Köcher <[email protected]> * Update client/transaction-pool/src/enactment_state.rs Co-authored-by: Bastian Köcher <[email protected]> * sync_oracle removed * spelling + fmt + doc * Review suggestions applied * log::info -> debug * Update client/transaction-pool/src/enactment_state.rs Co-authored-by: Bastian Köcher <[email protected]> * ".git/.scripts/commands/fmt/fmt.sh" Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <[email protected]>
-
JP authored
* more improvements for the crate publishing pipeline * move default definitions to the publish-crates script * add script to check the crate publishing pipeline at the start * fix yaml references * move more variables to .crates-publishing-pipeline * separate .crates-publishing-pipeline from .crates-publishing-variables * clean up redundant and unused code
-
Bastian Köcher authored
* pallet-offences-benchmarking: Box events in verify Events in frame are represented by an enum in the pallet and the runtime. The size of an enum in Rust depends on the size of biggest variant. This means we always need to allocate memory for the biggest variant when allocating memory for an event. The offences benchmarking is verifying the benchmarking results by checking the events. To check the events it is generating all the expected events. With the recent changes in Polkadot the events are too big and lead to issues when running this verify functions. The solution is to box each event, as the vector holding all the events will then only need to hold fat pointers * expected events, instead of size_of(event) * expected events. This issue isn't a problem in production, as we never read the events on chain. When we are reading the events, it is done in an offchain context and they are only decoded one by one. Besides that this also enables the benchmarking verification for everyone running these benchmarks. * FMT * Disable checking again
-