* update provisioner subsystem
Closes#1143
* update with answers to the questions posed by previous todos
* add misbehavior reports, disputes to provisioner messages
* expand on the protocol
* updates per code review
* mention C and M labels in contributing guide
* update PR template with more specific instructions
* update PR template with updated label rules and contributing guide link
* update contibuting guide
This pr fixes a bug with the transaction pool not sending certain events
like finalized and also fixes the order of events. The problem with the
finalized event was that we did not extracted pruned extrinsics if there
were not ready transactions in the pool. However this is wrong, if we
have a re-org, a tx is clearly not ready anymore and we still need to
send a pruned event for it because it is in a new block included. This
also lead to sending "ready" events and tx being re-validated. The
listener also only send the "finalized" event if it has seen a block as
being included, which did not happen before with the old code.
The second fix of the pr is the order of events. If we prune and retract the
same transaction in the same block, we first need to send the "retract"
event and after that the "pruned" event, because finalization takes
longer and this would lead to the UI showing "retract" while it actually
is included.
* client: use appropriate ExecutionContext for sync/import
* client: remove dead code
* client: ExecutionContext: distinguish between own and foreign imports
* client: fix cli parameter doc
* Revert "client: ExecutionContext: distinguish between own and foreign imports"
This reverts commit 0fac11520704c364a82432c5b927e987ba043cdb.
* primitives: add docs for ExecutionContext
* cli: execution strategy docs
* cli: use different execution context for importing block on validator
* cli: remove defaults from execution context flags
* Adds support for storage parameter types
This pr adds a new parameter types type, the storage parameter types.
This parameter type supports loading the value from the storage or
returning the given default value.
* Use twox_128
* Update docs
* Update frame/support/src/lib.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
* New service initial commit
* More separation of the new and old services
* Fix review comments
* Adds polkadot.json
* Fix browser build
* Remove unused import
* Update node/service/src/lib.rs
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
* Remove duplicate json files
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
* scheduler module skeleton
* update scheduler skeleton to match latest version of guide
* better session change notification
* add mock randomness and fix test compilation
* shuffle validators into groups
* finish implementing session change logic for scheduler
* tweak core assignment type to track retries of parathread
* reframe queued parathread core as offset
* implement initialzation and finalization routines
* implement parathread claim queuing
* implement core_para
* implement the group_validators routine and fix errors
* add a reason for freeing cores
* implement `schedule` function
* add some docs to the scheduled function
* implement `occupied` helper
* implement availability predicate
* fix some warnings
* integrate scheduler into initializer
* integrate scheduler into mock module
* avoid conflict with Substrate's scheduler storage
* add parathreads index to paras module
* implement parathreads map in paras module
* add is_parathread to paras
* test adding parathread claim
* test that you cannot add claims when no parathread cores exist
* check session change parathread queue pruning
* test validator shuffling
* add allow_unused to scheduler items
* add test for scheduling
* add some more tests for scheduling logic
* test core rotation
* check parathread claim pruning after retries
* add bound notes
* Apply suggestions from code review
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* more suggestions from review
* test availability predicate, add box to please compiler
* add changes to guide
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
* Enable wasmtime on node-template
* Apply suggestions from code review
syntax
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* move old implementers' guide, add skeleton of new
* Split the old implementers' guide into the new one's sections
This is mostly a straightforward copying operation, moving the
appropriate sections from the old guide to the new. However, there
are certain differences between the old text and the new:
- removed horizontal rules between the sections
- promoted headers appropriately within each section
- deleted certain sections which were in the old guide's ToC but
which were not actually present in the old guide.
- added Peer Set Manager to the new ToC
* remove description headers
It is redundant and unnecessary. Descriptions fall directly under the
top-level header for any given section.
* add stub description of the backing module
* add stub description for the availability module
* add stub description for collators
* add stub description for validity
* add stub description for utility
* highlight TODO and REVIEW comments
* add guide readme describing how to use mdbook
* fix markdownlint lints
* re-title parachains overview
* internal linking for types
* module and subsystem internal links
* .gitignore should have a trailing newline
* node does not have modules, just subsystems
* transaction-pool: expose blocking api for tx submission
* service: separate ServiceBuilder::build for full and light
* service: add ServiceBuilder::build_common
* transaction-pool: extend docs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Initial commit
Forked at: f5caf030aa
Parent branch: origin/master
* Impl Debug and Display for Ss58AddressFormat when compiled with std
Fixes#6289
* Use write! instead of writeln!
When a peer in `Incoming` state disconnects, the "alive" entry
in the `incoming` list for that peer must be updated (set to `false`).
Currently the entry that is updated may be an earlier entry for the
same peer that is already no longer alive. This can happen if a
peer repeatedly connects (incoming) and disconnects between invocations to
`poll()` of the behaviour.
* define subsystems skeleton
* Create a blank section for each subsystem in the initial batch
* write out basics for most subsystems
* define network bridge subsystem
* integrate network bridge into network systems
* Apply suggestions from code review
some nits
Co-authored-by: Max Inden <mail@max-inden.de>
* clean up wording
Co-authored-by: Max Inden <mail@max-inden.de>
* Ensure authority discovery avoids self-lookups.
Thereby additionally guard the `NetworkService` against
adding the local peer to the PSM or registering a
"known address" for the local peer.
* Clarify comments.
* See if returning errors is ok.
* define subsystems skeleton
* Create a blank section for each subsystem in the initial batch
* write out basics for most subsystems
* Update roadmap/implementors-guide/guide.md
clean up language
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* ToC indentation
* clean up wording
* renaming block authorship (provisioning) to Provisioner
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
* Make NumberOrHex a common primitive.
* Update primitives/rpc/src/number.rs
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* expand subsystems descriptions independent of subsystems overview
The subsystems overview in https://github.com/paritytech/polkadot/pull/1161
is a very useful reference for what subsystems need to talk to each other,
when, and why; it helps us design the actual messages.
However, administratively, it belongs in a different PR. This commit
brings in all the changes made there so far as a base for an independent
PR.
* Reorder subsystem descriptions, add some messages
Update ordering of subsystem descriptions to rough order of use,
mirroring the order in the overview document.
Added some message types. Added OverseerSignal variants to several
types, such that each subsystem only needs to listen for a single
type.
* add some more message types, Statement Distribution overview
* add more detail on Statement Distribution, Misbehavior Arbitration
* intentionally punt MA details for a future PR
* reduce duplication from overseer signal handling
* reword for clarity
* clarify: other modules and subsystems also get to talk to the network
* finish current work on candidate selection
* update candidate backing subsystem description according to current thought
* update mechanism for candidate backing to report collator misbehavior to candidate selection
* sketch out the peer receipt state machine
* Fix typo in roadmap/implementors-guide/guide.md
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
* Don't specify 'peer validators', as messages from non-validator peers are ignored regardless
* clarify instancing of peer receipt state machine
* add section on peer knowledge tracking
* fix typo in roadmap/implementors-guide/guide.md
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Max Inden <mail@max-inden.de>
* fix (ci): hotfix Docker release
* change (ci): moving to the tested CI image with a proper name
* change (ci): rename substrate-ci-linux
* Reduce the lots_of_incoming_peers_works test load (#6314)
* change (ci): moving to the tested CI image with a proper name
* change (ci): rename substrate-ci-linux
* Reduce the lots_of_incoming_peers_works test load (#6314)
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>