* guide: max_validators
* guide: new approach
* restrict validators based on configurable max
* add some tests
* fix wasm build (Vec)
* clean up warnings
* add logging
* set validator indices in tests as well
* fix common tests
* Update runtime/parachains/src/util.rs
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Andronik Ordian <write@reusable.software>
* add tracing to approval voting
* notify if session info is not working
* add dispute period to chain specs
* propagate genesis session to parachains runtime
* use `on_genesis_session`
* protect against zero cores in computation
* tweak voting rule to be based off of best and add logs
* genesis configuration should use VRF slots only
* swallow more keystore errors
* add some docs
* make validation-worker args non-optional and update clap
* better tracing for bitfield signing and provisioner
* pass amount of bits in bitfields to inclusion instead of recomputing
* debug -> warn for some logs
* better tracing for availability recovery
* a little av-store tracing
* bridge: forward availability recovery messages
* add missing try_from impl
* some more tracing
* improve approval distribution tracing
* guide: hold onto pending approval messages until NewBlocks
* Hold onto pending approval messages until NewBlocks
* guide: adjust comment
* process all actions for one wakeup at a time
* vec
* fix network bridge test
* replace randomness-collective-flip with Babe
* remove PairNotFound
* initial implementation of lifecycles and upgrades
* clean up a bit
* fix doc comment
* more rigid lifecycle checks
* include paras which are transitioning, and lifecycle query
* format guide
* update api
* update guide
* explicit outgoing state, fix genesis
* handle outgoing with transitioning paras
* do not include transitioning paras in identifier
* Update roadmap/implementers-guide/src/runtime/paras.md
* Update roadmap/implementers-guide/src/runtime/paras.md
* Update roadmap/implementers-guide/src/runtime/paras.md
* Apply suggestions from code review
* Use matches macro
* Correct terms
* Apply suggestions from code review
* actions queue
* Revert "actions queue"
This reverts commit b2e9011ec8937d6c73e99292416c9692aeb30f73.
* collapse onboarding state
* starting actions queue
* consolidate actions queue
* schedule para initialize result
* more actions queue for upgrade/downgrade
* clean up with fully implemented actions queue
* fix tests
* fix scheduler tests
* fix hrmp tests
* fix test
* doc fixes
* fix hrmp test w/ valid para
* Update paras.md
* fix paras registrar
* Update propose_parachain.rs
* fix merge
* Introduce "shared" module
* fix rococo build
* fix up and use shared
* guide updates
* add shared config to common tests
* add shared to test-runtime
* remove println
* fix note
Co-authored-by: Gavin Wood <gavin@parity.io>
* REVERT: comment out graphviz
* rewrite most of protocol-disputes
* write about conclusion and chain selection
* tie back in overview
* basic disputes module
* guide: InclusionInherent -> ParaInherent
* language
* add ParaInherentData type
* plug parainherentdata into provisioner
* provide_multi_dispute
* tweak
* inclusion pipeline logic for disputes
* be clearer about signature checking
* reject backing of disputed blocks
* some type rejigging
* known-disputes runtime API
* wire up inclusion
* Revert "REVERT: comment out graphviz"
This reverts commit 66203e362f7872cb413d258f74634a0aad70302b.
* timeouts
* include in initialization order
* address grumbles
* grab guide updates from approval-voting branch
* focus on control flow and behavior, not functions
* add approval voting preamble info
* tabs -> spaces
* Cont.: Implement the state root obtaining during inclusion
During inclusion now we obtain the storage root by passing it through
the inclusion_inherent.
* Fix tests
* Bump rococo spec version
* Reorder the parent header into the end
of the inclusion inherent.
When the parent header is in the beginning, it shifts the other two
fields, so that a previous version won't be able to decode that. If
we put the parent header in the end, the other two fields will stay
at their positions, thus make it possible to decode with the previous
version.
That allows us to perform upgrade of rococo runtime without needing of
simultanuous upgrade of nodes and runtime, or restart of the network.
* Squash a stray tab
* guide: add candidate information to OccupiedCore
* add descriptor and hash to occupied core type
* guide: add candidate hash to inclusion
* runtime: return candidate info in core state
* bitfield signing: stop querying runtime as much
* minimize going to runtime in availability distribution
* fix availability distribution tests
* guide: remove para ID from Occupied core
* get all crates compiling
* plumbing for rewarding backers
* give validators reward points for participating
* fix tests
* add bitfield rewarding
* add mocks for backing rewards
* add testing for backing & availability rewards
* implement RewardValidators on top of staking
* add to test-runtime and rococo
* add to test-runtime & rococo
* point to source on rewards values
* fix common tests
* do not reward availability anymore
* Guide: Split router module in guide.
Now we have: DMP, UMP and Router module.
* Add a glossary entry for what used to be called Router
* Extract DMP
* Extract UMP
* Extract HRMP
* Switch over to new modules
* Router: goodbye sweet prince
* Link to messaging overview for details.
* Update missed rococo and test runtimes.
* Commit destroyed by rebase changes
* Don't deprecate Router but rather make it a meta-project
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* Fix typos suggestion
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* Fix repetition in the impl guide
* Clarify that processed_downward_messages has the u32 type
* Remove the router subdir.
* Deabbreviate DMP,UMP,HRMP
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* HRMP: Update the impl guide
* HRMP: Incorporate the channel notifications into the guide
* HRMP: Renaming in the impl guide
* HRMP: Constrain the maximum number of HRMP messages per candidate
This commit addresses the HRMP part of https://github.com/paritytech/polkadot/issues/1869
* XCM: Introduce HRMP related message types
* HRMP: Data structures and plumbing
* HRMP: Configuration
* HRMP: Data layout
* HRMP: Acceptance & Enactment
* HRMP: Test base logic
* Update adder collator
* HRMP: Runtime API for accessing inbound messages
Also, removing some redundant fully-qualified names.
* HRMP: Add diagnostic logging in acceptance criteria
* HRMP: Additional tests
* Self-review fixes
* save test refactorings for the next time
* Missed a return statement.
* a formatting blip
* Add missing logic for appending HRMP digests
* Remove the channel contents vectors which became empty
* Tighten HRMP channel digests invariants.
* Apply suggestions from code review
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* Remove a note about sorting for channel id
* Add missing rustdocs to the configuration
* Clarify and update the invariant for HrmpChannelDigests
* Make the onboarding invariant less sloppy
Namely, introduce `Paras::is_valid_para` (in fact, it already is present
in the implementation) and hook up the invariant to that.
Note that this says "within a session" because I don't want to make it
super strict on the session boundary. The logic on the session boundary
should be extremely careful.
* Make `CandidateCheckContext` use T::BlockNumber for hrmp_watermark
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* Take 2 at the upward messages
* Trying to restore stuff from unsuccesful rebase
* Fix whitespace
* Clean up
* Change rustdoc to comment
* Pivot to a less stricter, w.r.t. to acceptance, model
* Rename `max_upward_message_num_per_candidate`
* Update docs for DownwardMessage
* Apply suggestions from code review
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
* Rephrase "Dispatchable objects ready to ..."
* Finish the sentence
* Add a note about imprecision of the current weight formula
* Elaborate on potential use-cases for the upward message kinds.
* s/later/below
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
* guide: validation data refactoring
* address grumbles from review
* Update roadmap/implementers-guide/src/types/candidate.md
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* last comments from review
Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* First stab at downward messages.
That also includes a notion of horizontal messages.
* Add some structure to the router.
* Update `ValidationOutputs`
* Add `processed_downward_messages` to `ValidationOutputs`.
Forgot to check that in.
* s/AccountId/ParaId
* DownwardMessage::ParachainSpecfic
* s/ensure_horizontal_messages_fits/ensure_horizontal_messages_fit
* Clarify that Router called for each candidate
* Update the preamble for Router.
* Rewrite the relay-chain extrinsic routines
* Update gloassary
* Add DMP to the glossary
* If the queue is empty, `processed_downward_messages` can be 0
* WIP
* Add condemned list
* Pivot to message-storing channel based HRMP
* Finished draft
* Tidy up
* Remove a duplicate glossary entry
* Fix typo
* Fix wording to emphasize that the channel is unidirectional
* Proper decrement `HrmpOpenChannelRequestCount`
* Add a comment for `HrmpOpenChannelRequestCount`.
* Remove old configuration values.
* Be more specific about the para{chain,thread} hrmp chan limits.
* Fix indentation so the lists are rendendered properly
* "to answer **the**" question instead of "a"
* Add a missing call to `check_processed_downward_messages`
* Clean more stuff during offboarding
* Fix typo
* Fix typo for the config
* Add a call to `prune_dmq`
* Add explicit invariants for ingress/egress indexes
* Add comments for the sender/reciever deposit config fields
* Document various fields and structs in Router module
* More docs
* Missing docs in Candidate.md
* Tabs to spaces in router.md
* Apply Rob's suggestion
* Add the hrmp_ prefix to the router messages
* Those are entry points
* Use SessionIndex type for the `age` field
* Use a struct to represent `HrmpChannelId`
* Put only MQCs into the LocalValidationData
* Close request can be initiated by the runtime directly
* Close request can be initiated by the runtime directly
* tabs/spaces
* Maintain the list of the outgoing paras in Router
* Update roadmap/implementers-guide/src/runtime/inclusion.md
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
* fix typo
* Remove an unnecessary pair of code quotes
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
* Add notes about contextual execution
* Clarify that `validation_data_hash` consists of global and local data
* Update roadmap/implementers-guide/src/runtime/inclusion.md
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Incorporate rphmeier's suggestion.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* rename GlobalValidationSchedule to GlobalValidationData
* guide: update candidate descriptor to contain validation data hash
* guide: add note in inclusion module about checking validation data hash
* primitives: update CandidateDescriptor to contain new hash
* fix payload computation
* add helpers for computing validation data to runtime modules
* guide: note routines
* inclusion: check validation data hash and fix local_validation_data bug
* add a case to candidate_checks and improve that test substantially
* bump versions
* address review comments
* add a test for including code upgrade
* bump kusama version
* bump westend & polkadot versions
* create a README on Runtime APIs
* add ParaId type
* write up runtime APIs
* more preamble
* rename
* rejig runtime APIs
* add occupied_since to `BlockNumber`
* skeleton crate for runtime API subsystem
* improve group_for_core
* improve docs on availability cores runtime API
* guide: freed -> free
* add primitives for runtime APIs
* create a v1 ParachainHost API trait
* guide: make validation code return `Option`al.
* skeleton runtime API helpers
* make parachain-host runtime-generic
* skeleton for most runtime API implementation functions
* guide: add runtime API helper methods
* implement new helpers of the inclusion module
* guide: remove retries check, as it is unneeded
* implement helpers for scheduler module for Runtime APIs
* clean up `validator_groups` implementation
* implement next_rotation_at and last_rotation_at
* guide: more helpers on GroupRotationInfo
* almost finish implementing runtime APIs
* add explicit block parameter to runtime API fns
* guide: generalize number parameter
* guide: add group_responsible to occupied-core
* update primitives due to guide changes
* finishing touches on runtime API implementation; squash warnings
* break out runtime API impl to separate file
* add tests for next_up logic
* test group rotation info
* point to filed TODO
* remove unused TODO [now]
* indentation
* guide: para -> para_id
* rename para field to para_id for core meta
* remove reference to outdated AvailabilityCores type
* add an event in `inclusion` for candidates being included or timing out
* guide: candidate events
* guide: adjust language
* Candidate events type from guide and adjust inclusion event
* implement `candidate_events` runtime API
* fix runtime test compilation
* max -> min
* fix typos
* guide: add `RuntimeAPIRequest::CandidateEvents`
* inclusion: split PendingAvailability storage into descriptor and commitments
* inclusion: fix tests
* implementers-guide: update CandidatePendingAvailability type
* inclusion: simplify process_candidates a bit
* implementers-guide: more updates to the inclusion module
* inclusion: fix copy-paste errors in tests
* inclusion: revert some of the changes
* inclusion: lazy commitments loading and a test
* guide: revert enact_candidate changes
* inclusion: test process_bitfield for no commitments
* Grammar
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>