Working towards migrating the `parity-bridges-common` repo inside
`polkadot-sdk`. This PR upgrades some dependencies in order to align
them with the versions used in `parity-bridges-common`
Related to
https://github.com/paritytech/parity-bridges-common/issues/2538
This PR removes sp-std crate from substrate/primitives sub-directories.
For now crates that have `pub use` of sp-std or export macros that would
necessitate users of the macros to `extern crate alloc` have been
excluded from this PR.
There should be no breaking changes in this PR.
---------
Co-authored-by: Koute <koute@users.noreply.github.com>
Lifting some more dependencies to the workspace. Just using the
most-often updated ones for now.
It can be reproduced locally.
```sh
# First you can check if there would be semver incompatible bumps (looks good in this case):
$ zepter transpose dependency lift-to-workspace --ignore-errors syn quote thiserror "regex:^serde.*"
# Then apply the changes:
$ zepter transpose dependency lift-to-workspace --version-resolver=highest syn quote thiserror "regex:^serde.*" --fix
# And format the changes:
$ taplo format --config .config/taplo.toml
```
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
First in a series of PRs that reduces our use of sp-std with a view to
deprecating it.
This is just looking at /substrate and moving some of the references
from `sp-std` to `core`.
These particular changes should be uncontroversial.
Where macros are used `::core` should be used to remove any ambiguity.
part of https://github.com/paritytech/polkadot-sdk/issues/2101
I have a use case that for safety requires all contained data structures
to be `#[repr(C)]` or `#[repr(transparent)]` and it seemed like
non-invasive change.
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>
* 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>
* Experiments with common equivocation trait
* Improved equivocation trait
* Fix grandpa equivocation implementation
* Remove some cruft
* Remove some more cruft
* More generic naming
* Simplification of offences manipilation
* More refactory
* Some prograss with the encapsulation of offence report system
* Finally unit type works as a universal null report system
* Align substrate node code
* Further simplification
* Fix test utils
* Remove not required associated type
* Fix benches
* Rollback to prev field name
* Box big params
* Fix typo
* Remove new tag computation
* Remove default implementations
* Better docs
* Return 'Result' instead of bool
* Change offence report system return types
* Some renaming and documentation
* Improve documentation
* More abstract offence report system
* Rename 'consume_evidence' to 'process_evidence'
* Further docs refinements
* Doc for dummy offence report
* Fix rustdoc
* Fix after master merge
* Apply code review suggestions
* Improve docs
* 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
* 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
* Migrate Aura pallet to BoundedVec
Implementing issue #8629
* Fixed aura tests after BoundedVec change
* Moved Vec to BoundedVec in authority-discovery
* Merging into the main branch
* Added MaxEncodedLen to crypto
Need this without full_crypto to be able to add generate_store_info
* Add generate_store_info for aura
* Adding changes to Slot to add MaxEncodedLen
* Adding generate_store_info to authority discovery
* fmt
* removing panics in runtime if vec size too large
* authority-discovery: Remove panics in runtime
Can happen if vec size is too large, so truncate the vec in that case
* Adding logging when I truncate Vecs
* Got the sign the other way around
* Reverting pallet_aura changes
This is already being addressed by PR #9371
* Change BoundedVec to WeakBoundedVec
More robust implementation following @thiolliere recommendation.
Co-authored-by: Shawn Tabrizi <shawntabrizi@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>
* Introduce a `Slot` type
Instead of having some type definition that only was used in half of the
code or directly using `u64`, this adds a new unit type wrapper `Slot`.
This makes it especially easy for the outside api to know what type is
expected/returned.
* Change epoch duratioC
* rename all instances of slot number to slot
* Make the constructor private
Co-authored-by: André Silva <andrerfosilva@gmail.com>
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Revert stuff that shouldn't have been committed
* Revert stuff that shouldn't have been committed
* Fix parent relative link generation
* Manually remove this incorrect link for now.
* init_logger: switch from log-based to tracing-based and add compatibility layer
* Move tracing profiling subscriber related config realization
* sp-tracing: change profiling to be a layer instead of a subscriber
* Enable profiling layer in cli
* Change all test env_logger init to sp_tracing::try_init_simple
* Remove all local env_logger dependency
* Add missing tracing-subscriber dependency
* frame-sudo: fix tests
* frame-support: fix tests
* Fix frame/pallet and executor tests
* Fix the remaining tests
* Use subscriber's try_init as recommended by @davidbarsky
* Be explict that the tracing-log feature is needed
* Set subscriber writer to stderr
* Shorter line width
* Update cargo lock tracing version
* Fix sc_tracing crate compile
* Fix sc_authority_discovery crate test
* unremove default-features
* Leave enabled to default true
* Warn if global default cannot be set
* Fix unused import
* Remove unused PROXY_TARGET
* Change all reference from rc5 to rc6
* Change all reference of rc2 to rc6
* Fix styling
* Fix typo
* make logger init error'ing
* re-fixing the test issue
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap
* slots: create primitives crate for consensus slots
* offences: add method to check if an offence is unknown
* babe: initial equivocation reporting implementation
* babe: organize imports
* babe: working equivocation reporting
* babe: add slot number to equivocation proof
* session: move duplicate traits to session primitives
* babe: move equivocation stuff to its own file
* offences: fix test
* session: don't have primitives depend on frame_support
* babe: use opaque type for key owner proof
* babe: cleanup client equivocation reporting
* babe: cleanup equivocation code in pallet
* babe: allow sending signed equivocation reports
* node: fix compilation
* fix test compilation
* babe: return bool on check_equivocation_proof
* babe: add test for equivocation reporting
* babe: add more tests
* babe: add test for validate unsigned
* babe: take slot number in generate_key_ownership_proof API
* babe: add benchmark for equivocation proof checking
* session: add benchmark for membership proof checking
* offences: fix babe benchmark
* babe: add weights based on benchmark results
* babe: adjust weights after benchmarking on reference hardware
* babe: reorder checks in check_and_report_equivocation