We currently use a bit of a hack in `.cargo/config` to make sure that
clippy isn't too annoying by specifying the list of lints.
There is now a stable way to define lints for a workspace. The only down
side is that every crate seems to have to opt into this so there's a
*few* files modified in this PR.
Dependencies:
- [x] PR that upgrades CI to use rust 1.74 is merged.
---------
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
Using taplo, fixes all our broken and inconsistent toml formatting and
adds CI to keep them tidy.
If people want we can customise the format rules as described here
https://taplo.tamasfe.dev/configuration/formatter-options.html
@ggwpez, I suggest zepter is used only for checking features are
propagated, and leave formatting for taplo to avoid duplicate work and
conflicts.
TODO
- [x] Use `exclude = [...]` syntax in taplo file to ignore zombienet
tests instead of deleting the dir
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
The `xcm` crate was renamed to `staging-xcm` to be able to publish it to
crates.io as someone as squatted `xcm`. The problem with this rename is
that the `TypeInfo` includes the crate name which ultimately lands in
the metadata. The metadata is consumed by downstream users like
`polkadot-js` or people building on top of `polkadot-js`. These people
are using the entire `path` to find the type in the type registry. Thus,
their code would break as the type path would now be [`staging_xcm`,
`VersionedXcm`] instead of [`xcm`, `VersionedXcm`]. This pull request
fixes this by renaming the path segment `staging_xcm` to `xcm`.
This requires: https://github.com/paritytech/scale-info/pull/197
---------
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* wip
* remove index in lieu of nonce
* wip
* remove accountnonce in lieu of nonce
* add minor improvement
* rebase and merge conflicts
* add serde_full feature flag
add serde_full to sp_runtime
add space to toml
add serde_full to application-crypto
add serde_full to arithmetic
fix arithmetic
add serde full to beefy
add serde full to consensus
add serde_full to core
add serdefull to finality grandpa
add serde_full to several primitives crates
make rpc no_std compatible
add scale info to runtime
make serializer no_std compatible
add serde full to storage
add full serde to version
add serde full to weights
add all serde_full features
add . to comment
add missing impl-serde
fix no-std build
fix build
add full_crypto to serde_full
serde_full also implements crypto
full_serde does not work with full_crytpo. needs std
no no_std serde impl possible
also for crypto std is necessary
no serde full for application crypto
fix arithmetic
fix tomls
fix some things
impl fmt for Signature
add serialize to Public
add impl_maybe_marker_serde_full
fix sp-application-crypto toml
add serde feature flag
fix clippy
fix toml grandpa
fix grandpa
rename if_std to if_serde
keystore is not no_std compatible
make keystore vrf no_std compatible
fix nopos-elections
fix rpc
fix serializer
fix test-primitives
fix version
add comment
add serde full only import for format string
remove all(serde_full and full_crypot) as serde_full enforces full_crypto
make comment better readable
even better comment
clean up rpc toml
clean up toml
clean up serializer toml
clean up storage toml
fix std build
update .lock
fix sp-version
move sp_std import
test extern crate alloc
replace sp_std with core
add missing core
sp_core: serde feature do not enforce full crypto
application-crypto: serde feature do not enforce full crypto
rename serde_full to serde
add dep:serde and alloc to default feature
add full_crypto and remove unnecessary debu/fmt impls for serde
update comment
remove obolsete change in display AccountId32
remove extra changes
minimize diff
revert keystore changes
remove std from keystore
remove full-crypto feature
fix serde import
fix comment
fix feature = serde
* rename serde_full to serde
* move #[doc(hidden)] back
* remove feature = full crypto require frm MultiSigner
* reorder serde and scale_info import
* fix bs58 missing alloc import in serde feature
* add `from_string` to serde feature and add unimplemented
* remove serde feature from fixed_point display
* Remove serde/alloc
Co-authored-by: Davide Galassi <davxy@datawok.net>
* Update primitives/consensus/babe/Cargo.toml
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/arithmetic/src/fixed_point.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* revert `from_string`fixed impl back to std only
* remove duplicate runtime string impl
* use sp_std::alloc
* remove no_std compatible rpc
* remove no_std compatibility from serializer
* rename mpl_maybe_marker_serde to std_or_serde
* update .lock
* add sp-std to executor
* fix sp-std import
* fix sp_std::format import
* use crate import
* add serde feature
* Update primitives/core/src/lib.rs
---------
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Bastian Köcher <git@kchr.de>
* impl_runtime_apis: Generate getters for `metadata_at` functions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* runtime: Implement new `Metadata` runtime trait
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* runtime: Move `metadata_at` functions to construct_runtime macro
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* contruct_runtime: Use `OpaqueMetadata` from hidden imports
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Add tests for the new API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Helper to extract documentation literals
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Helper to filter all `cfg` attributes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Generate documentation getters for metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Avoid trait collision with snake case methods
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* proc-macro/tests: Check doc getters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Generate metadata for runtime methods
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/api: Export scale-info and frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Generate metadata for runtime traits
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/runtime: Expose metadata v15 internally
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* test: Use metadata v15 from `lexnv/md_v15_test` branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Generate crate access one module up
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Implement `runtime_metadata` for mocks and tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Fix warnings
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Add no-docs flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Adjust more tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Check runtime metadata correctness
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/benchmarking: Adjust benchmarks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/benchmarks: Adjust more benchmarks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/api: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/proc-macro: Generate runtime metadata on the `decl_runtime_apis`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Abuse Deref to resolve `runtime_metadata`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "frame: Implement `runtime_metadata` for mocks and tests"
This reverts commit b7f41aa189218589392a6e713ea9488e93c4db45.
Revert "frame: Adjust more tests"
This reverts commit 3cba5982c7f45552e76335e96c430aecbc42d8c6.
Revert "frame/benchmarking: Adjust benchmarks"
This reverts commit 60b382ada486c791ffceeb65da587e949b90ec5d.
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Revert "frame/benchmarks: Adjust more benchmarks"
This reverts commit eb75c477179b1a27347a5554c5732ef26a00d7e8.
* primitives/proc-macro: Remove unused imports and function
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Adjust runtime metadata test
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/tests: Remove doc getter test
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/support: Enable `no-metadata-docs` feature from `sp-api`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/tests: Add `TypeInfo` for test::extrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/api: Expose scale-info and frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame-metadata to include v15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix merge conflicts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata_ir: Add IR for runtime API metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/metadata_ir: Convert IR to V15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/api: Collect IR metadata for runtime API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/api: Move `metadata_ir` from frame/support
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame/tests: Adjust `metadata_versions` test
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/runtime_metadata: Exclude default type parameters from methods
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/src/metadata_ir/types.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/src/metadata_ir/mod.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/utils.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* primitives: Fix build
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives/metadata-ir: Move IR to dedicated crate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Reexport metadata-ir and frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* frame: Use apis field instead of runtime
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Better documentation for the `Deref` abstraction
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ui-tests: Check empty `impl_runtime_apis`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Remove unneeded bounds on generic params
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Rename `collect_where_bounds` to `get_argument_type_param`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Generate crate access per fn call
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "primitives: Remove unneeded bounds on generic params"
This reverts commit 5178e38cf21cfb481156eefd628d62989201d59a.
* metadata-ir: Add no-std
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* primitives: Adjust where bounds
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Change `frame-metadata` branch to "origin/main"
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update to `main` from origin
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame-metadata to crates.io v15.1
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "ui-tests: Check empty `impl_runtime_apis`"
This reverts commit cf78a7190ad9cba3c3bb2e78dc3d0dc382b2fea9.
* Move ui test to primitives/ui
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update frame/support/test/tests/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update primitives/api/proc-macro/src/runtime_metadata.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Test already covered by `empty_impl_runtime_apis_call.stderr`
This reverts commit 3bafb294cbe9745569bf5e5a1a2e6b4a4c1aadc5.
* Retriger CI
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Import `TokenStream` as `TokenStream2`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Change copyright year to 2023 from 2022
* Fix incorrect update of copyright year
* Remove years from copy right header
* Fix remaining files
* Fix typo in a header and remove update-copyright.sh
* only check std
* add default-features=false
* Revert "add default-features=false"
This reverts commit bc9453757a1df670f418a2d57ee4ce203425ab1b.
* missing features only to non-optional
* Upgraded dependencies
* Adapting code to scale v3
* Empty commit to trigger CI
* Triggering CI
* Fixing UI test
* Remove superfluous dev-dep added by #9228
* Cryout for CI
* Introduce `SecretUri`
* `inspect-key`: Adds support for `expect-public`
`expect-public` can be used to check that a given secret uri corresponds to the given public key.
This is mainly useful when the secret uri is protected by a password and a new derived account
should be generated. With `--expect-public` the user can pass the public key/account-id of the
"base" secret uri aka the one without any derivation to ensure the correct password was inserted.
* Fixes
* 🤦
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Review feedback
* FMT
* Bump the versions
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* 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: André Silva <andrerfosilva@gmail.com>
* mark template and utils as non-publish
* switch to development version for testing
* activate unleash check
* maybe if I disable all rules...
* Fix isolated compilation of `max-encoded-len-derive` with `syn`
error[E0369]: binary operation `==` cannot be applied to type `syn::Path`
--> src/lib.rs:88:29
|
88 | .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate))
| --------- ^^ ----------------------------------- _
| |
| syn::Path
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.
Error: could not compile `max-encoded-len-derive`
* WIP: bump changes crates since v3 tag to next breaking
cargo unleash version bump-breaking --changed-since v3.0.0
cargo unleash version set-pre dev --changed-since v3.0.0
FIXME: Don't modify crates that are not yet released, e.g.
`max-encoded-len-derive`
* Update lockfile
* WIP: Bump sp-transaction-pool as well
* WIP: Bump sp-offchain as well
* WIP: Bump frame-system-rpc-runtime-api as well
* WIP: Bump sp-authority-discovery as well
* Manually deactivate dev-deps before `cargo unleash check`
Otherwise we run into `Cycle detected` error.
* Bump sp-consensus-slots
* Add missing Cargo.lock change
* Bump sp-consensus-vrf as well
* Bump sp-keyring as well
* Bump sp-consensus-pow as well
* Try to speed up the `unleash-check` job
Previously, the job took 106 minutes - let's see if explicitly
specifying a `CARGO_TARGET_DIR` will help
* fixup: Ensure the temp target dir exists for unleash check
* Bump pallet-transaction-payment-rpc-runtime-api as well
Needed for Polkadot
* Bump pallet-transaction-payment-rpc as well
Needed for Polkadot
* Try updating crates after patching in the Polkadot CI job
* Use another approach to update patched Substrate crates
* Try to update all sp-core versions in Polkadot CI job
* Simplify sp-core version checking
* Apply another shellcheck lint
* Just do the simplest thing I guess
* Welp don't do --offline then
* Clean up `unleash-check` job triggers
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* Fix a note in unleash-check cache step
* Add a note about temporary optimization in cargo-unleash
* Pin a newer version of cargo-unleash
Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* bump a bunch of deps in parity-common
* primitive-types 0.10.0
* update Cargo.lock
* downgrade a few more
* this is unlikely to help
* try something
* Checkmate, Atheists!
* upgrade a few dependencies
* make it compile at the expense of duplicate deps
* fix web-wasm and a warning
* introduce activate-wasm-bindgen-features crate
* Revert "introduce activate-wasm-bindgen-features crate"
This reverts commit 5a6e41e683f8a4844c0a735dcd08caabb2313f11.
* add getrandom feature to sc-consensus-aura
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap