**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
* #10576: refactor `sc-utils::notification` and `sc-client-api::notifications`, so that they use common subscribe/unsubscribe routines
* Add some docs. Reorganise `sc-utils::notification`
* `sc-clent-api::notifications` and `sc-utils::notification` — ensure the SubscriptionGuard is dropped before the Rx-channel
* `sc-utils::pubsub::SubscriptionGuard` make it a bit more ergonomic.
Let the `Rx` to be put inside of the `SubscriptionGuard`, so that the latter shall guarantee the order:
- first unsubscribe;
- then drop the `Rx`.
* Being less zealous with splitting the modules into little pieces
* rework pubsub: the concrete usage should only define a good registry type
* sc-client-api::notifications: make it comply with the reworked pubsub
* cargo fmt
* make sc-client-api tests work
* Address the review notes
* cargo fmt
* Describe the behaviour of pubsub registry
* Doc-comments for module `sc-utils::pubsub`
* Fix: it used to send notifications regardless of the filter setup during subscription
* `sc-client-api::StorageNotifications` the API does not have to require mut-self-reference.
As a result `sc-service::Client` does not have to wrap its `storage_notifications` into a Mutex.
* cargo fmt
* Several changes addressing the notes by @bckhr.
- Remove the `impl Default for StorageNotifications<Block>`;
- no need for groupping the `remove_from` and `listen_from` into a separate `helpers` module;
- remove unnecessary import `use registry::SubscribeOp`.
* Add a doc-comment to the `sc-client::notifications::SubscribeOp`
* As per @bkchr note on the unproven assertion: behave gracefully upon receiving a duplicate subscription-ID.
* sc-utils::pubsub: log when a registry yields an ID that does point to an existing sink
* `sc-utils::notifications`: payload materialized lazily
* Update Cargo.lock (after adding `log` as a dependency to the `sc-utils`)
* `sc-client-api::notifications`: introduce a struct (instead of a type def) for the notification message
* Get rid of `sc-utils::pubsub::Channel` trait (instead just use the `sc-utils::mpsc`)
* The SubsID is no more generic: the fact it is a `Copy` is known — no need to pass it by ref
* sc-utils::pubsub internals do not have to be generic over the channel type
* Rename Hub::dispatch into Hub::send
* That method was unnecessary (`SubscriberSink::render_notification`)
* cargo fmt
* No need for a separate UnsubscribeGuard type
* Ditch the type-def of SubsID in the sc-utils::pubsub, instead — just use the crate::id_sequence::SeqID
* Return the <Registry as Dispatch>::Ret when sending an item
* Make the `Hub<M, R>::lock_registry(...)` method more ergonomic
* cargo doc links
* cargo doc links
* Use a simpler name for the type
* cargo doc links
* Derive `Default` rather than implement it
* Derive `Default` rather than implement it
* Remove an unnecessary usage of type_name
* Define a more cautious order between sinks.remove->registry.unsubscribe and registry.subscribe->sinks.insert
* Hub: lock_registry_for_tests->map_registry_for_tests — a safer choice for a public API
* Replace Mutex over the shared Registry with a ReentrableMutex+RefCell
* sc-utils::pubsub: add tests for a panicking registry
* Add the missing copyright headers
* Arc<Vec<_>> -> Arc<[_]>
* beefy: add dummy latest_finalized() RPC
* beefy: rpc latest_best_beefy() using shared mem
* beefy: rpc populate latest_best_beefy()
* beefy: rpc handle readiness
* beefy: best block over channel - wip
Not working because channel can't be simply opened and receiver passed
to `rpc_extensions_builder` because `rpc_extensions_builder` has to be
`Fn` and not `FnOnce`... and and Receiver side of mpsc can't be cloned
yay!..
* beefy: make notification channels payload-agnostic
* beefy: use notification mechanism instead of custom channel
* beefy: add tracing key to notif channels
* sc-utils: add notification channel - wip
* beefy: use sc-utils generic notification channel
* grandpa: use sc-utils generic notification channel
* fix grumbles
* beefy-rpc: get best block header instead of number
* beefy-rpc: rename to `beefy_getFinalizedHead`
* fix nitpicks
* client-rpc-notifications: move generic Error from struct to fn
* beefy: use header from notification instead of getting from database
* beefy-rpc: get best block hash instead of header
* beefy-rpc: fix and improve latestHead test
* beefy-rpc: bubble up errors from rpc-handler instantiation
* update lockfile
* Apply suggestions from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* fix errors and warnings
* fix nit
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* sp-utils => sc-utils
* cargo fmt
* These files are now in the client so should be licensed as GPL3
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>