* Replace `RollingSessionWindow` with `RuntimeInfo` - initial commit
* Fix tests in import
* Fix the rest of the tests
* Remove dead code
* Fix todos
* Simplify session caching
* Comments for `SessionInfoProvider`
* Separate `SessionInfoProvider` from `State`
* `cache_session_info_for_head` becomes freestanding function
* Remove unneeded `mut` usage
* fn session_info -> fn get_session_info() to avoid name clashes. The function also tries to initialize `SessionInfoProvider`
* Fix SessionInfo retrieval
* Code cleanup
* Don't wrap `SessionInfoProvider` in an `Option`
* Remove `earliest_session()`
* Remove pre-caching -> wip
* Fix some tests and code cleanup
* Fix all tests
* Fixes in tests
* Fix comments, variable names and small style changes
* Fix a warning
* impl From<SessionWindowSize> for NonZeroUsize
* Fix logging for `get_session_info` - remove redundant logs and decrease log level to DEBUG
* Code review feedback
There is a deny(clippy::dbg_macro) in the crate root, so newer
Clippy fails here since tests use dbg.
But dbg in tests are fine IMHO.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* test that successfully verify self-generated proof
* verify proof result on all unpaused nodes
* tighten interface: reuse connection
* generate the proof on arbitrary node
* s/stub-name/validator
seems this doesn't pass some regex
* rename script
* add basic mmr-leaves test
* documentation formatting
* check lower bound on mmr leaves
* test beefy rpc: finalized heads match
* test mmr api: stateless proofs
* set lower bound on number of leaves
* change leaves in proof generation
* remove TODOs
* cleanup: consistently ignore zndsl name arg
* refactor: simplify returns
Co-authored-by: Serban Iorga <serban@parity.io>
* lax finalized head test
Co-authored-by: Adrian Catangiu <adrian@parity.io>
* fixup! refactor: simplify returns
* refactor out getApis
Co-authored-by: Serban Iorga <serban@parity.io>
* split out paused validator from group
* refactor: don't ignore node arg
don't randomize selection of proof generating / finalized head
retrieving node, but use the node arg for this.
* only check min block height, not relative
Co-authored-by: Adrian Catangiu <adrian@parity.io>
* verify finalized heads share same canonical chain
picks the node with the highest finalized head, gets its blockchain
headers since genesis, and verifies that all other nodes' finalized
heads are in said blockchain.
* fixup! split out paused validator from group
Co-authored-by: Serban Iorga <serban@parity.io>
---------
Co-authored-by: Serban Iorga <serban@parity.io>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
* companion for #13384
* adjust parsing RPC address from process output
* update rpc cli
* update lockfile for {"substrate"}
* bump zombienet v1.3.48
* bump zombienet version
* allow zombienet-tests-misc-upgrade-node to fail
* add comment and issue link to allowed_failure
* grumbles: disable failed job
* disabled the correct test
---------
Co-authored-by: parity-processbot <>
Co-authored-by: Javier Viola <javier@parity.io>
* add swapped event to registrar
* check swapped event on integration test
* check for swapped event in paras_registrar swap tests
* cargo +nightly fmt --all
* add test for para to para swap
* make paraId event consistent
* cargo +nightly fmt
* Draft remote account converter
* Tests and doc comments
* Adapt naming, tests fix
* Try with prefix in account
* Revert "Try with prefix in account"
This reverts commit 461759794cc9f59f768aad0e0899df6dc8cba747.
* Adapt code and test to review suggestions
* adapt to take into account parent in conversion
* fix: docs
* fix: try doc fix v2
* Pass `SessionInfo` directly to `CandidateEnvironment::new` otherwise it should be an async function
* Replace calls to `RollingSessionWindow` with `RuntimeInfo`
Adjust `dispute-coordinator` initialization to use `RuntimeInfo`
* Modify `dispute-coordinator` initialization
* Pass `Hash` to `process_on_chain_votes` so that `RuntimeInfo` calls can be made
Remove some fixmes
* Pass `Hash` to `handle_import_statements` to perform `RuntimeInfo` calls
* remove todo comments
* Remove `error` from `Initialized`
Rework new session handling code
* Remove db code which is no longer used
* Update stale comment and remove unneeded type specification
* Cache SessionInfo on startup
* Use `DISPUTE_WINDOW` from primitives
* Fix caching in `process_active_leaves_update`
* handle_import_statements: leaf_hash -> block_hash
* Restore `ensure_available_session_info`
* Don't interrupt `process_on_chain_votes` if SessionInfo can't be fetched
* Small style improvements in logging
* process_on_chain_votes: leaf_hash -> block_hash
* Restore `note_earliest_session` - it is required to prune disputes and votes
* Cache new sessions only when there is an actual session change
* Fix tests
* `CandidateEnvironment::new` gets `session_idx` and fetches SessionInfo by itself to avoid the invariant where the input SessionIndex and SessionInfo parameters don't match
* Fix handling of missing session info
* Move sessions caching in `handle_startup` and fix tests
* Load `relay_parent` from db in `handle_import_statements` instead of passing it as a parameter via two functions
* Don't do two db reads
* Fix the twisted logic in `handle_import_statements`
* fixup
* Small style fix
* Decrease log levels for caching errors to debug and fix a typo
* Update outdated comment
* Remove `ensure_available_session_info`
* Load relay parent from db in `process_on_chain_votes`
* Revert "Load relay parent from db in `process_on_chain_votes`"
This reverts commit 978ad4f223d517faa7a7fbad96e3f8de4fa17501.
* Keep track of highest seen session and last session cached without gaps.
* Apply suggestions from code review
Co-authored-by: ordian <write@reusable.software>
* Handle session caching failure on startup correctly
* Update node/core/dispute-coordinator/src/initialized.rs
Co-authored-by: ordian <write@reusable.software>
* Simplify session caching retries
* Update stale comment
* Fix lower bound calculation for session caching
---------
Co-authored-by: ordian <write@reusable.software>