forked-synapse/synapse
Patrick Cloke 5e024a0645
Modify StoreKeyFetcher to read from server_keys_json. (#15417)
Before this change:

* `PerspectivesKeyFetcher` and `ServerKeyFetcher` write to `server_keys_json`.
* `PerspectivesKeyFetcher` also writes to `server_signature_keys`.
* `StoreKeyFetcher` reads from `server_signature_keys`.

After this change:

* `PerspectivesKeyFetcher` and `ServerKeyFetcher` write to `server_keys_json`.
* `PerspectivesKeyFetcher` also writes to `server_signature_keys`.
* `StoreKeyFetcher` reads from `server_keys_json`.

This results in `StoreKeyFetcher` now using the results from `ServerKeyFetcher`
in addition to those from `PerspectivesKeyFetcher`, i.e. keys which are directly
fetched from a server will now be pulled from the database instead of refetched.

An additional minor change is included to avoid creating a `PerspectivesKeyFetcher`
(and checking it) if no `trusted_key_servers` are configured.

The overall impact of this should be better usage of cached results:

* If a server has no trusted key servers configured then it should reduce how often keys
  are fetched.
* if a server's trusted key server does not have a requested server's keys cached then it
  should reduce how often keys are directly fetched.
2023-04-20 12:30:32 -04:00
..
_scripts Delete server-side backup keys when deactivating an account. (#15181) 2023-04-04 20:16:08 +00:00
api Implement MSC2174: move redacts to a content property. (#15395) 2023-04-13 13:47:07 +00:00
app Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
appservice Call appservices on modern paths, falling back to legacy paths. (#15317) 2023-04-03 13:20:32 -04:00
config Switch InstanceLocationConfig to a pydantic BaseModel (#15431) 2023-04-17 23:53:43 +00:00
crypto Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00
events Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
federation Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
handlers Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
http Refactor SimpleHttpClient to pull out reusable methods (#15427) 2023-04-14 20:46:04 +00:00
logging Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
media Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
metrics Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
module_api Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
push Fix missing app variable in mail subject for password resets (#15352) 2023-03-30 11:44:53 +01:00
replication Add some clarification to the doc/comments regarding TCP replication (#15354) 2023-03-30 12:51:35 +02:00
res Remove registration fallback code. (#15405) 2023-04-13 11:36:29 -04:00
rest Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00
server_notices Remove unused room_alias field from /createRoom response (#15093) 2023-02-22 11:07:28 +00:00
spam_checker_api Fix import in module_api module and docs on the new check_event_for_spam signature (#12918) 2022-05-31 12:04:53 +02:00
state Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
static Remove registration fallback code. (#15405) 2023-04-13 11:36:29 -04:00
storage Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00
streams Use mypy 1.0 (#15052) 2023-02-16 16:09:11 +00:00
types Experimental Unix socket support (#15353) 2023-04-03 10:27:51 +01:00
util Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
__init__.py Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
event_auth.py Implement MSC2174: move redacts to a content property. (#15395) 2023-04-13 13:47:07 +00:00
notifier.py Fix a bug in the send_local_online_presence_to module API (#14880) 2023-01-25 21:34:37 +00:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
server.py Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
visibility.py Refactor filter_events_for_server (#15240) 2023-03-10 15:31:25 +00:00