* Fix node lookup on fork-tree after a warp-sync
After a warp-sync, the error condition was triggered by the absence
of the parent node of the first imported block.
The previous lookup implementation was traversing the tree using a
recursive **post-order** DFS, this technique doesn't trigger the issue.
In the last iterative implementation we were using a BFS instead.
* Added internal doc warning
* Small optimization
* Specify post-order DFS in the comment
* Iterative version of some fork-tree methods
* Prune doesn't require its generic args to be 'clone'
* Fork-tree import and drain-filter iterative implementations
* Fork-tree map iterative implementation
* Optimization of some operations, e.g. rebalance only when required
* Destructuring assignments not supported yet by stable rustc 1.57
* Safe implementation of 'map' and 'drain_filter' methods
* Remove dummy comment
* Trigger CI pipeline
* Test map for multi-root fork-tree and refactory of `find_node_index_where`
* Fix find node index with predicate
* Nits
* Tree traversal algorithm is not specified
* Move unspecified tree traversal warning to 'map'
* Immutable 'drain_filter' predicate
* Apply suggestions from code review
* Remove double mapping
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* 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...
* 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
* 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>
* 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.
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap
* Version bump
* Split generate_changelog.sh into separate script
Can be run in the format `generate_changelog.sh $previous_version $version`.
* remove early exit from publish_draft_release.sh
* adding changelog
* ci: change last_github_release to also find pre-releases
Co-authored-by: Martin Pugh <pugh@s3kr.it>
* 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>
This updates `parity-scale-codec` to `1.2.0`, which includes multiple
performance improvements and a fix that bounds the capacity of a vector
at decoding.
* setting first batch of descriptions
* fix what I just broke
* next batch
* and pallets, too
* last batch
* set cargo.lock
* keep'em dev-deps
* bump version to alpha.2