Commit Graph

180 Commits

Author SHA1 Message Date
Tony Garnock-Jones 7d7b3135ba Release independent packages
syndicate@0.28.0
syndicate-macros@0.23.0
syndicate-server@0.31.0
syndicate-tools@0.6.0

Generated by cargo-workspaces
2023-02-10 16:44:38 +01:00
Tony Garnock-Jones 06d52c43da Merge latest changes from the syndicate-protocols repository 2023-02-09 23:07:58 +01:00
Tony Garnock-Jones 4dca1b1615 More updates to gatekeeper protocol 2023-02-09 00:17:12 +01:00
Tony Garnock-Jones 45406c75ac Merge latest changes from the syndicate-protocols repository 2023-02-08 23:44:22 +01:00
Tony Garnock-Jones f134d0227d Merge latest changes from the syndicate-protocols repository 2023-02-08 23:39:53 +01:00
Tony Garnock-Jones 8de00045e6 Merge latest changes from the syndicate-protocols repository 2023-02-08 23:36:37 +01:00
Tony Garnock-Jones f8d1acfa3e Merge latest changes from the syndicate-protocols repository 2023-02-08 23:11:49 +01:00
Tony Garnock-Jones 00c99d96df Simplify 2023-02-08 22:35:34 +01:00
Tony Garnock-Jones 6ec6bbaf41 Incorporate Step, Description 2023-02-08 22:27:41 +01:00
Tony Garnock-Jones ddc94bfa60 Merge latest changes from the syndicate-protocols repository 2023-02-08 22:12:01 +01:00
Tony Garnock-Jones 7e8dcef0e2 Refactor gatekeeper implementation for new protocols. 2023-02-08 18:01:51 +01:00
Tony Garnock-Jones 9a5d452754 Merge latest changes from the syndicate-protocols repository 2023-02-08 17:47:01 +01:00
Tony Garnock-Jones c0d4b535a3 Merge latest changes from the syndicate-protocols repository 2023-02-08 14:35:19 +01:00
Tony Garnock-Jones a2013287db Release independent packages
syndicate@0.27.0
syndicate-macros@0.22.0
syndicate-server@0.30.0
syndicate-tools@0.5.0

Generated by cargo-workspaces
2023-02-06 18:15:03 +01:00
Tony Garnock-Jones 7de2752068 Switch to HMAC-BLAKE2s 2023-02-06 17:09:17 +01:00
Tony Garnock-Jones d2c783927c Merge latest changes from the syndicate-protocols repository 2023-02-06 16:31:50 +01:00
Tony Garnock-Jones 833be7b293 Update attenuations 2023-02-06 14:48:18 +01:00
Tony Garnock-Jones 12eaeb8f62 Merge latest changes from the syndicate-protocols repository 2023-02-06 13:35:51 +01:00
Tony Garnock-Jones 1879c52963 Merge latest changes from the syndicate-protocols repository 2023-02-04 17:09:55 +01:00
Tony Garnock-Jones 9f88765cf7 Release independent packages
syndicate@0.26.2
syndicate-server@0.29.2

Generated by cargo-workspaces
2023-01-31 15:12:12 +01:00
Tony Garnock-Jones 2a11bc6bbb Use bundled bundle, rather than external file, which isn't found in published crate build 2023-01-31 15:11:50 +01:00
Tony Garnock-Jones 1dac3e5a19 Release independent packages
syndicate@0.26.1
syndicate-server@0.29.1

Generated by cargo-workspaces
2023-01-31 14:21:29 +01:00
Tony Garnock-Jones 2382157039 Oops. Wrong dep on preserves-schema 2023-01-31 14:21:18 +01:00
Tony Garnock-Jones 69c526436f Release independent packages
syndicate@0.26.0
syndicate-macros@0.21.0
syndicate-server@0.29.0
syndicate-tools@0.4.0

Generated by cargo-workspaces
2023-01-31 14:13:06 +01:00
Tony Garnock-Jones 94040ae566 More ergonomic guard api 2023-01-30 17:29:25 +01:00
Tony Garnock-Jones c3571a2faf Expose a more flexible interface to relays 2023-01-30 17:28:20 +01:00
Tony Garnock-Jones dbbbc8c1c6 Breaking change: much improved error API 2023-01-30 14:25:58 +01:00
Tony Garnock-Jones f3424c160d Groundwork for handling noise connects 2023-01-28 22:45:48 +01:00
Tony Garnock-Jones 049ef9aea7 Merge latest changes from the syndicate-protocols repository 2023-01-27 12:52:58 +01:00
Tony Garnock-Jones 48c61098c4 Merge latest changes from the syndicate-protocols repository 2023-01-27 12:49:17 +01:00
Tony Garnock-Jones fce32a589c Release independent packages
syndicate@0.25.0
syndicate-macros@0.20.0
syndicate-server@0.28.0
syndicate-tools@0.3.0

Generated by cargo-workspaces
2023-01-16 15:05:48 +01:00
Tony Garnock-Jones bae21fb69b Update deps; in particular, get preserves 3.0, which has the fixed numerics/symbols syntax 2023-01-16 15:03:35 +01:00
Tony Garnock-Jones 25ef92f78e Include syndicate package version in syndicate-server version display 2023-01-09 09:30:46 +01:00
Tony Garnock-Jones 2f6f1dde26 Release independent packages
syndicate@0.24.3

Generated by cargo-workspaces
2023-01-09 09:21:13 +01:00
Tony Garnock-Jones b5564979f0 Repair error in sync handling 2023-01-09 09:20:58 +01:00
Tony Garnock-Jones 5ca6bdb3bb Release independent packages
syndicate@0.24.2

Generated by cargo-workspaces
2023-01-08 13:19:21 +01:00
Tony Garnock-Jones 1cb89f0b6b Pick up preserves bugfix around schematized embedded-ref deserialization 2023-01-08 13:17:46 +01:00
Tony Garnock-Jones eb2bd3cf8e Release independent packages
syndicate@0.24.1
syndicate-macros@0.19.1
syndicate-server@0.27.1
syndicate-tools@0.2.1

Generated by cargo-workspaces
2022-10-26 13:46:28 +02:00
Tony Garnock-Jones 451a298f94 Oops, want independent versioning 2022-10-26 13:45:48 +02:00
Tony Garnock-Jones 2f3b186262 Switch to cargo-workspaces 2022-10-26 13:41:46 +02:00
Tony Garnock-Jones 54103f87eb (cargo-release) version 0.24.0 2022-10-24 15:14:06 +02:00
Tony Garnock-Jones 4a6bb3e143 Bump preserves-schema 2022-10-24 15:10:37 +02:00
Tony Garnock-Jones 406f22703b (cargo-release) version 0.23.0 2022-02-04 17:00:18 +01:00
Tony Garnock-Jones b556414fec Merge latest changes from the syndicate-protocols repository 2022-02-04 14:27:02 +01:00
Tony Garnock-Jones 98c76df2f7 Repair accidentally-committed reference to local path (!) 2022-02-04 14:15:28 +01:00
Tony Garnock-Jones 84ebf530d3 (cargo-release) version 0.22.0 2022-02-04 14:02:10 +01:00
Tony Garnock-Jones f88592282d MAJOR REFACTORING OF CORE ASSERTION-TRACKING STRUCTURES. Little impact on API. Read on for details.
2022-02-01 15:22:30 Two problems.

 - If a stop action panics (in `_terminate_facet`), the Facet is dropped before its outbound
   handles are removed. With the code as it stands, this leaks assertions (!!).

 - The logic for removing an outbound handle seems to be running in the wrong facet context???
   (See `f.outbound_handles.remove(&handle)` in the cleanup actions
    - I think I need to remove the for_myself mechanism
    - and add some callbacks to run only on successful commit

2022-02-02 12:12:33 This is hard.

Here's the current implementation:

 - assert
    - inserts into outbound_handles of active facet
    - adds cleanup action describing how to do the retraction
    - enqueues the assert action, which
       - calls e.assert()

 - retract
    - looks up & removes the cleanup action, which
       - enqueues the retract action, which
          - removes from outbound_handles of the WRONG facet in the WRONG actor
          - calls e.retract()

 - _terminate_facet
    - uses outbound_handles to retract the facet's assertions
    - doesn't directly touch cleanup actions, relying on retract to do that
    - if one of a facet's stop actions panics, will drop the facet, leaking its assertions
    - actually, even if a stop action yields `Err`, it will drop the facet and leak assertions
    - yikes

 - facet drop
    - panics if outbound_handles is nonempty

 - actor cleanup
    - relies on facet tree to find assertions to retract

Revised plan:

 - ✓ revise Activation/PendingEvents structures
    - rename `cleanup_actions` to `outbound_assertions`
    - remove `for_myself` queues and `final_actions`
    - add `pre_commit_actions`, `rollback_actions` and `commit_actions`

 - ✓ assert
    - as before
    - but on rollback, removes from `outbound_handles` (if the facet still exists) and
      `outbound_assertions` (always)
    - marks the new assertion as "established" on commit

 - ✓ retract
    - lookup in `outbound_assertions` by handle, using presence as indication it hasn't been
      scheduled in this turn
    - on rollback, put it back in `outbound_assertions` ONLY IF IT IS MARKED ESTABLISHED -
      otherwise it is a retraction of an `assert` that has *also* been rolled back in this turn
    - on commit, remove it from `outbound_handles`
    - enqueue the retract action, which just calls e.retract()

 - ✓ _terminate_facet
    - revised quite a bit now we rely on `RunningActor::cleanup` to use `outbound_assertions`
      rather than the facet tree.
    - still drops Facets on panic, but this is now mostly harmless (reorders retractions a bit)
    - handles `Err` from a stop action more gracefully
    - slightly cleverer tracking of what needs doing based on a `TerminationDirection`
    - now ONLY applies to ORDERLY cleanup of the facet tree. Disorderly cleanup ignores the
      facet tree and just retracts the assertions willy-nilly.

 - ✓ facet drop
    - warn if outbound_handles is nonempty, but don't do anything about it

 - ✓ actor cleanup
    - doesn't use the facet tree at all.
    - cleanly shutting down is done elsewhere
    - uses the remaining entries in `outbound_assertions` (previously `cleanup_actions`) to
      deal with retractions for dropped facets as well as any other facets that haven't been
      cleanly shut down

 - ✓ activate
    - now has a panic_guard::PanicGuard RAII for conveying a crash to an actor in case the
      activation is happening from a linked task or another thread (this wasn't the case in the
      examples that provoked this work, though)
    - simplified
    - explicit commit/rollback decision

 - ✓ Actor::run
    - no longer uses the same path for crash-termination and success-termination
    - instead, for success-termination, takes a turn that calls Activation::stop_root
       - this cleans up the facet tree using _terminate_facet
       - when the turn ends, it notices that the root facet is gone and shuts down the actor
       - so in principle there will be nothing for actor cleanup to do

2022-02-04 13:52:34 This took days. :-(
2022-02-04 13:59:37 +01:00
Tony Garnock-Jones 98731ba968 Merge latest changes from the syndicate-protocols repository 2022-02-03 22:57:58 +01:00
Tony Garnock-Jones 99a027dc26 Remove unwanted commented-out code 2022-02-03 15:59:19 +01:00
Tony Garnock-Jones 9add501124 Remove the (no-op) rollback entirely 2022-02-02 12:21:43 +01:00