Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

mod subsystem-util #1376

Merged
merged 32 commits into from
Jul 14, 2020
Merged

mod subsystem-util #1376

merged 32 commits into from
Jul 14, 2020

Commits on Jul 10, 2020

  1. Add subsystem-util crate.

    Start by moving the JobCanceler here.
    coriolinus committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    aee251a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1719606 View commit details
    Browse the repository at this point in the history
  3. convert subsystem-util from crate to module in subsystem

    The point of making a sub-crate is to ensure that only the necessary
    parts of a program get compiled; if a dependent package needed only
    subsystem-util, and not subsystem, then subsystem wouldn't need to
    be compiled.
    
    However, that will never happen: subsystem-util depends on
    subsystem::messages, so subsystem will always be compiled.
    
    Therefore, it makes more sense to add it as a module in the existing
    crate than as a new and distinct crate.
    coriolinus committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    bc5efd0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    145dd58 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e76239d View commit details
    Browse the repository at this point in the history
  6. add struct Validator representing the local validator

    This struct can be constructed when the local node is a validator;
    the constructor fails otherwise. It stores a bit of local data, and
    provides some utility methods.
    coriolinus committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    be2be35 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    32e5c18 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5d8a8af View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    447ab4a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1d59e66 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    fa46a8a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    36b3367 View commit details
    Browse the repository at this point in the history
  13. implement generic job-manager subsystem impl

    This means that the work of implementing a subsystem boils down
    to implementing the job, and then writing an appropriate
    type definition, i.e.
    
    pub type CandidateBackingSubsystem<Spawner, Context> =
    	util::JobManager<Spawner, Context, CandidateBackingJob>;
    coriolinus committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    91e301b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3a47236 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    38110d5 View commit details
    Browse the repository at this point in the history
  16. doc improvement

    coriolinus committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    b5d28ce View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    93fe700 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    cca7d4b View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    841579d View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    38ee247 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    8bb08b8 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2020

  1. Configuration menu
    Copy the full SHA
    fa595c2 View commit details
    Browse the repository at this point in the history
  2. impl Stream for Jobs<Spawner, Job>

    This turns out to be relatively complicated and requires some
    unsafe code, so we'll want either detailed review, or to choose
    to revert this commit.
    coriolinus committed Jul 13, 2020
    2 Configuration menu
    Copy the full SHA
    940c111 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11772f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dc9e12c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    802981a View commit details
    Browse the repository at this point in the history
  6. reenvision the subsystem requests as an extension trait

    This works within `util.rs`, but fails in `core/backing/src/lib.rs`,
    because we don't actually create the struct soon enough. Continuing
    down this path would imply substantial rewriting.
    coriolinus committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    a5639e3 View commit details
    Browse the repository at this point in the history
  7. Revert "reenvision the subsystem requests as an extension trait"

    This reverts commit a5639e3.
    
    The fact is, the new API is more complicated to no real benefit.
    coriolinus committed Jul 13, 2020
    Configuration menu
    Copy the full SHA
    e7f5276 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2020

  1. Configuration menu
    Copy the full SHA
    0eaca1b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    863d733 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e14746 View commit details
    Browse the repository at this point in the history
  4. make most node-core-backing types private

    Now the only public types exposed in that module are
    CandidateBackingSubsystem and ToJob. While ideally we could reduce
    the public interface to only the former type, that doesn't work
    because ToJob appears in the public interface of CandidateBackingSubsystem.
    
    This also involves changing the definition of CandidateBackingSubsystem;
    it is no longer a typedef, but a struct wrapping the job manager.
    coriolinus committed Jul 14, 2020
    Configuration menu
    Copy the full SHA
    e3f76a4 View commit details
    Browse the repository at this point in the history