MatrixSynapse/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
api
app Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
appservice
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
logging
media Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
metrics
module_api Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
push
replication
res
rest Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00
server_notices
spam_checker_api
state
static
storage Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00
streams
types
util
__init__.py
event_auth.py
notifier.py
py.typed
server.py Move Spam Checker callbacks to a dedicated file (#15453) 2023-04-18 00:57:40 +00:00
visibility.py