* 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>
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.
Updated code related to deprecated warning on tracing-subscriber `scope()`
( See https://github.com/tokio-rs/tracing/issues/1429 )
* 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>
* Emit error when construct_runtime imports a non-existent Call part
* Reword and display pallet name when emitting part not found error
* Migrate decl_outer_dispatch to a proc macro
* Rename calls.rs to call.rs
* Create new construct_runtime_v2 macro
* Add UI test for importing non-existent call part in construct_runtime
* Emit error when construct_runtime imports a non-existent Config part
* Emit error when construct_runtime imports a non-existent Event part
* Migrate decl_outer_inherent to a proc macro
* Emit error when construct_runtime imports a non-existent Inherent part
* Migrate decl_outer_validate_unsigned to a proc macro
* Emit error when construct_runtime imports a non-existent ValidateUnsigned part
* impl for old macro
* fix line width
* add doc
* hide macroes and use unique counter everywhere
* Remove construct_runtime_v2
* Encapsulate pallet part check macros in a module
* Fix macro definitions in dummy part checker
* Tag ProvideInherent impl with #[pallet::inherent] properly for authorship pallet
* Remove Call part from pallets that do not define it
* Add Call part unit tests
* Remove undefined Call part import from offences pallet
* Add tests for expand_outer_inherent
* Remove Call part from pallets that do not define them
* Remove Call part imports from pallets that do not have it defined
* Remove Call part import of the offences pallet from grandpa pallet mocks
* Update frame/support/test/tests/pallet.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Remove Call part imports for pallets that do not define them
* Move inherent tests to inherent_expand
* Add unit tests for expand_outer_validate_unsigned
* Add newline at the end of file
* fix ui test
* Small prayer to RNGsus for fixing CI
* Remove Call part from construct_runtime for randomness collective flip pallet
* Remove Call part import for randomness collective flip pallet
* Summon Laplace's demon instead of praying to RNGsus
* Update test expectations
* fix ui test and make sure it's flaky
* Revert "fix ui test and make sure it's flaky"
This reverts commit 362b6881389c911ef8d9ef85d71c9463f5694b20.
* Comment out test instead of putting it in conditional compilation
* Update UI test expectations
* Update UI test expectations
* Emit error when construct_runtime imports a non-existent Origin part
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Denis P <denis.pisarev@parity.io>
* Remove `serde` requirement from FRAME macros
Currently there is some implicit requirement on `serde` being present in
the `Cargo.toml` of a pallet when `GenesisConfig` is used. This pr
removes this requirement by using the serde attribute `serde(crate = "..")`.
* build a unique reexport of serde in impl_opaque_keys, by abusing paste doc concatenation
* Optimize
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
* Use 'Pallet' struct in construct_runtime.
* Fix genesis and metadata macro.
* Fix 'Pallet' type alias.
* Replace 'Module' with 'Pallet' for all construct_runtime use cases.
* Replace more deprecated 'Module' struct.
* Bring back AllModules and AllPalletsWithSystem type, but deprecate them.
* Replace deprecated 'Module' struct from merge master.
* Minor fix.
* Fix UI tests.
* Revert UI override in derive_no_bound.
* Fix more deprecated 'Module' use from master branch.
* Fix more deprecated 'Module' use from master branch.
* Decouple the session validators from im-online
* .
* Add SessionInterface trait in im-online
Add ValidatorId in im-online Trait
Make im-online compile
Make substrate binary compile
* Fix merging issue
* Make all compile
* Fix tests
* Avoid using frame dep in primitives via pallet-session-common
* Merge ValidatorSet into SessionInterface trait
Wrap a few too long lines
Add some docs
* Move pallet-sesion-common into pallet-session
* Move SessionInterface to sp-session and impl it in session pallet
Ref https://github.com/paritytech/substrate/pull/7127#discussion_r494892472
* Split put historical::FullValidatorIdentification trait
* Fix line width
* Fix staking mock
* Fix session doc test
* Simplify <T as ValidatorIdentification<AccountId>>::ValidatorId as ValidatorId<T>
* Nits
* Clean up.
* Make it compile by commenting out report_offence_im_online bench
* Tests
* Nits
* Move OneSessionHandler to sp-session
* Fix tests
* Add some docs
* .
* Fix typo
* Rename to ValidatorSet::session_index()
* Add some more docs
* .
* Remove extra empty line
* Fix line width check
.
* Apply suggestions from code review
* Cleaup Cargo.toml
* Aura has migrated to Pallet now
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
* split authorities discovery keys for the current and next session
* Revert "split authorities discovery keys for the current and next session"
This reverts commit 0a40b8b4c14e85d95357a27f6db30199cbe0aa4d.
* pallet_authority_discovery: introduce a next_authorities method
* address feedback
* amend the doccomments
* Rename `ModuleToIndex` to `PalletRuntimeSetup`
Besides the renaming it also adds support getting the name of a pallet
as configured in the runtime.
* Rename it to `PalletInfo`
* Remove accidentally added files
* 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.
* frame/authority-discovery: Have authorities() return both current and next
Authority address lookups on the DHT happen periodically (every 10
mintues) and are rather slow (~10 seconds).
In order to smooth the transition period between two sessions, have the
runtime module return both the current as well as the next authority
set. Thereby the client authority module will:
1. Publish its addresses one session in advance.
2. Prefetch the addresses of authorities of the next session in advance.
* frame/authority-discovery: Deduplicate authority ids
* frame/authority-discovery: Don't dedup on_genesis authorities
* frame/authority-discovery: Remove mut and sort on comparison in tests
* frame/authority-discovery: Use BTreeSet for deduplication
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap
* Fixes and tests
* Don't set subs be re-registered.
Also allow subs to de-register themselves and collect the deposit.
Also allow individual registering and removal of subs.
* Make it build
* Update frame/identity/src/lib.rs
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* Tests
* Add benchmarks
* Add some reasonable weights
* Docs
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* Only check single extrinsics weight limit in validate_transaction.
* Add missing parameter to all pallets.
* Add tests, fix default configuration.
* Bump spec version.
* Use AvailableBlockRation to calculate MaxExtrinsicWeight
* Introduce `BlockExectionWeight` and `ExtrinsicBaseWeight`
* Add new traits everywhere
* Missed one update
* fix tests
* Update `check_weight` logic
* introduce `max_extrinsic_weight` function
* fix + add tests
* format nits
* remove println
* make test a bit more clear
* Remove minimum weight
* newlines left over from find/replace
* Fix test, improve clarity
* Fix executor tests
* Extrinsic base weight same as old `MINIMUM_WEIGHT`
* fix example test
* Expose constants
* Add test for full block with operational and normal
* Initiate test environment with `BlockExecutionWeight` weight
* format nit
* Update frame/system/src/lib.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Replace `TransactionBaseFee` with `ExtrinsicBaseWeight` (#5761)
* Replace `TransactionBaseFee` with `ExtrinsicBaseFee`
* Fix stuff
* Fix and make tests better
* Forgot to update this test
* Fix priority number in test
* Remove minimum weight from merge
* Fix weight in contracts
* remove `TransactionBaseFee` from contract tests
* Let `register_extra_weight_unchecked` go past `MaximumBlockWeight`
* address feedback
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>