**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.~~
* 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
* Removed assumptions about ancestry from fork tree prune method
* Tests improvement
* Fork tree prune refactory
* Code refactory
* Correctly handle borderline, but legit, case
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Removed duplicated test
---------
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Remove all not required nodes from the epoch-changes tree
Some outdated nodes were left there because of the predicate
* Test to excercise the fix
* Add a fork on genesis to the test
* Fix typo in comments
* First rough draft for BABE revert
* Proper babe revert test
* Cleanup
* Test trivial cleanup
* Fix to make clippy happy
* Check polkadot companion
* Check cumulus companion
* Remove babe's blocks weight on revert
* Handle "empty" blockchain edge case
* Run companions
* Simplify the filter predicate
* Saturating sub is not required
* Run pipeline
* Run pipeline again...
The babe `authoring_blocks` test was flaky because it could happen that
we imported the first block multiple times. This lead to import the
genesis epoch multiples times. `EpochChanges` was assuming that
importing a genesis epoch while there was already an imported epoch
means that there is a "gap". However, this wasn't true as we just
imported 2 genesis epochs. The bug is solved by checking that the
already imported epochs are not all genesis epochs.
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>
* Make grandpa work
* Introduce `SharedData`
* Add test and fix bugs
* Switch to `SharedData`
* Make grandpa tests working
* More Babe work
* Make it async
* Fix fix
* Use `async_trait` in sc-consensus-slots
This makes the code a little bit easier to read and also expresses that
there can always only be one call at a time to `on_slot`.
* Make grandpa tests compile
* More Babe tests work
* Fix network test
* Start fixing service test
* Finish service-test
* Fix sc-consensus-aura
* Fix fix fix
* More fixes
* Make everything compile *yeah*
* Fix build when we have Rust 1.51
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/common/src/shared_data.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/babe/src/tests.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/babe/src/tests.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Fix warning
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* 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>
* babe: support online configuration upgrades
* Switch to use NextConfigDescriptor instead of changing runtime interface
* Fix tests
* epoch-changes: map function that allows converting with different epoch types
* Add migration script for the epoch config change
* Fix migration tests
* Fix migration: Epoch should be EpochV0
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com>
* Fix new epochChanges version
* Fix unused imports
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* fork-tree: prune returns all pruned node data
* epoch-changes: split EpochHeader vs epoch data
* EpochChanges::viable_epoch and add missing comments
* Incoperate the new epoch_changes interface for BABE
* Fix BABE tests
* Fix fork-tree pruning issue
* Fix tests
* Fix pruning algorithm
* fork-tree: implement map function for mapping one value type to another
* Add migration script for new epoch changes scheme
* Update utils/fork-tree/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Update client/consensus/slots/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Remove authorities_len.is_none check, which is duplicate of unwrap_or(false)
* Update client/consensus/epochs/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* Update client/consensus/epochs/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* No trailing ; for return statement
* Use VERSION_KEY for migration
* Fix issues that removed nodes are not properly added into removed list
* Add comments indicating end_slot is non-inclusive
* fork-tree: use &mut F for map type declaration
* Add tests for v0 epoch_changes migration
* Fix babe RPC tests
Co-authored-by: André Silva <andre.beat@gmail.com>
* Init epoch changes module
* Initial integration of new epoch changes module for BABE
* Fix all initial compile errors
* rename: digest -> digests
* Fix babe tests
* Bump impl_version
* Fix more test issues
* Remove test flag for tree
It unfortunately won't work for multiple crates.
* Update cargo lock
* Fix duplicate parking_lot version
* Add missing license header