Define macro that generates tests for set_owner() and set_operating_mode()
in order to avoid duplicate code.
Signed-off-by: Serban Iorga <serban@parity.io>
* switch to gav-xcm-v3 branch (wip)
* add comment
* play with CI
* keep playing with CI
* play with CI
* trigger CI
* Revert "trigger CI"
This reverts commit fc35ac648fe6a3ea8e710a2e07dfee7d8762c6c4.
* fix(spellcheck): test of fixing
* fix(hunspell): improved many typos etc.
* fix(hunspell): all errors solved
* fix(hunspell): extended scope of files - the build should fail
* Return error code.
* Fix spelling, sort dictionary.
* fix(hunspell): added fix to gitlabs check
* fix(typo): one typo and test of verification on github
* fix(typo): one typo
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
* Support moar validators.
* Update weights script.
* Use correct type for benchmarking accounts
* Use package name instead of manifest path
Co-authored-by: Hernando Castano <hernando@hcastano.com>
* Use more accurate weight calculation in declared weight
* Remove session length and validator set size config constants
* Remove config params from mock
* Allow specifying total number of votes-ancestries per justification
* Change limits used during benchmarking
* Regenerate weights
* Use simplified weight annotation
* Remove comment
* Address leftover TODO
* Prevent possible divide by zero errors
* Use correct argument order in weight declaration
* Add benchmarking skeleton
* Allow runtime to indicate concrete header type for benches
* Set up skeleton for benchmark tests
* Play around with mutating bench header
* Create a working test for benchmarking
* Add benches related to enacting authority set changes
* Add bench for checking effect of prec-commits/vote ancestries
* Use new `no_std` test utils in benchmarks
* Support pallet instances in benchmarking
* Use correct benchmarking instance macro
* Add instance to runtime benchmark helper impl
* Start using new justification creation API
* Allow mock header's number to be specified
* Set up benches with correct fork/depth parameters
* Use new pallet name during runtime bench setup
* Use correct `set_id` in tests
* Limit number of forks as workaround to get tests passing
* Use number of authorities which matches number of forks
* Make sure test post-conditions are checked properly
* Only read `CurrentAuthoritySet` from storage once
* Add combined benchmark for `submit_finality_proof`
* Add bench test
* Introduce config bounds related to justification verification
* Use config consts from pallet in benchmarking
* Return data relevant to benchmarks from helper functions
* Annotate `submit_finality_proof` with autogenerated weights
* Return actual weight after call execution
* Ignore Clippy warnings in bench template
* Update benchmark template
* Use `test-utils` to create test headers
* Clarify that helper is only for messages benches
* Add more documentation to benches
* Update TODOs
* Clarify return types in comment
* Fix pallet name post-merge
* Update NOTE to a TODO item
* Indicate that Config params are max values, not actual values
* Change Config validator count type to be `u32`
* Return decoded justification instead of fields
* Add missing trait bounds for tests
* Correctly issue weight refund
Thanks for spotting this Tomek!
* Update comment
* Add note about SESSION_LENGTH
* Fix benchmarking code
* Allow creation of authority lists with any number of authorities
* Move keyring helpers into their own module
* Add helper for generating list of test accounts
* Fix import names in tests
* Rename Keyring trait to Signer
* Get list of accounts in a more functional way
* Clarify meaning of `test_keyring` return type
* Use concrete test account type instead of generics
* Make sure voter set contains all authorities which signed off on pre-commits
* Add way to create tunable GRANDPA justifications
* Use new function in tests
* Allow multiple authorities on a single fork
* Only store pre-commit targets instead of full ancestry chains
* Rename precommit_header to be more generic
* Push new digest item instead of overriding entire digest
* Ensure that we generate chains with non-zero length
* Extract justification creation parameters into struct
* Appease Clippy
* Use `sp-application-crypto` when generating test justifications
* Try to justifications tests compiling
* Try using `ed25519_dalek` for justification creation
* Small cleanup
* Correctly generate a Keypair
The public key didn't correspond to what would be derived
with the given private key.
* Remove enum index hack
* Clean up test account helper functions
* Fix tests in `pallet-finality-verifier`
* Get `pallet-substrate-bridge` tests compiling again
* Use the correct keyring in justification tests
* Clean up Keyring related code a bit
* Appease Clippy
* Remove unused import
* Use keyring variants directly
* Remove unecessary From implementation
* Move justification module to header-chain primitives crate
* Get justification module compiling in new location
* Get justification module tests compiling
* Use justification code from `header-chain` crate
Mostly compiles, having issues with std/test feature flags across crates.
* Move some code around
* Move justification tests to integration testing crate
* Add `test-utils` crate
* Remove tests and test-helper module from justification code
* Use `test-utils` in Substrate bridge pallet tests
* Remove `sp-keyring` related code from `pallet-substrate-bridge`
* Remove `helpers` module from `pallet-substrate-bridge`
* Add some documentation
* Add more documentation
* Fix typo
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
**Update:** Pushed additional changes based on the review comments.
**This pull request fixes various spelling mistakes in this
repository.**
Most of the changes are contained in the first **3** commits:
- `Fix spelling mistakes in comments and docs`
- `Fix spelling mistakes in test names`
- `Fix spelling mistakes in error messages, panic messages, logs and
tracing`
Other source code spelling mistakes are separated into individual
commits for easier reviewing:
- `Fix the spelling of 'authority'`
- `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`
- `Fix the spelling of 'prev_enqueud_messages'`
- `Fix the spelling of 'endpoint'`
- `Fix the spelling of 'children'`
- `Fix the spelling of 'PenpalSiblingSovereignAccount'`
- `Fix the spelling of 'PenpalSudoAccount'`
- `Fix the spelling of 'insufficient'`
- `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`
- `Fix the spelling of 'subtracted'`
- `Fix the spelling of 'CandidatePendingAvailability'`
- `Fix the spelling of 'exclusive'`
- `Fix the spelling of 'until'`
- `Fix the spelling of 'discriminator'`
- `Fix the spelling of 'nonexistent'`
- `Fix the spelling of 'subsystem'`
- `Fix the spelling of 'indices'`
- `Fix the spelling of 'committed'`
- `Fix the spelling of 'topology'`
- `Fix the spelling of 'response'`
- `Fix the spelling of 'beneficiary'`
- `Fix the spelling of 'formatted'`
- `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`
- `Fix the spelling of 'succeeded'`
- `Fix the spelling of 'reopened'`
- `Fix the spelling of 'proposer'`
- `Fix the spelling of 'InstantiationNonce'`
- `Fix the spelling of 'depositor'`
- `Fix the spelling of 'expiration'`
- `Fix the spelling of 'phantom'`
- `Fix the spelling of 'AggregatedKeyValue'`
- `Fix the spelling of 'randomness'`
- `Fix the spelling of 'defendant'`
- `Fix the spelling of 'AquaticMammal'`
- `Fix the spelling of 'transactions'`
- `Fix the spelling of 'PassingTracingSubscriber'`
- `Fix the spelling of 'TxSignaturePayload'`
- `Fix the spelling of 'versioning'`
- `Fix the spelling of 'descendant'`
- `Fix the spelling of 'overridden'`
- `Fix the spelling of 'network'`
Let me know if this structure is adequate.
**Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
`Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
as it is.
~~**Note:** In some places the term `Receival` is used to refer to
message reception, IMO `Reception` is the correct word here, but I left
it as it is.~~
~~**Note:** In some places the term `Overlayed` is used instead of the
more acceptable version `Overlaid` but I also left it as it is.~~
~~**Note:** In some places the term `Applyable` is used instead of the
correct version `Applicable` but I also left it as it is.~~
**Note:** Some usage of British vs American english e.g. `judgement` vs
`judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
are both present in different places, but I suppose that's
understandable given the number of contributors.
~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
triggers errors in CI when I make changes to it, so I left it as it
is.~~
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>