Commit graph

4370 commits

Author SHA1 Message Date
Jason Volk 3f7ec4221d minor auth_chain optimizations/cleanup
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:33 -04:00
Jason Volk 4776fe66c4 handle serde_json for deserialized()
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:33 -04:00
Jason Volk 946ca364e0 Database Refactor
combine service/users data w/ mod unit

split sliding sync related out of service/users

instrument database entry points

remove increment crap from database interface

de-wrap all database get() calls

de-wrap all database insert() calls

de-wrap all database remove() calls

refactor database interface for async streaming

add query key serializer for database

implement Debug for result handle

add query deserializer for database

add deserialization trait for option handle

start a stream utils suite

de-wrap/asyncify/type-query count_one_time_keys()

de-wrap/asyncify users count

add admin query users command suite

de-wrap/asyncify users exists

de-wrap/partially asyncify user filter related

asyncify/de-wrap users device/keys related

asyncify/de-wrap user auth/misc related

asyncify/de-wrap users blurhash

asyncify/de-wrap account_data get; merge Data into Service

partial asyncify/de-wrap uiaa; merge Data into Service

partially asyncify/de-wrap transaction_ids get; merge Data into Service

partially asyncify/de-wrap key_backups; merge Data into Service

asyncify/de-wrap pusher service getters; merge Data into Service

asyncify/de-wrap rooms alias getters/some iterators

asyncify/de-wrap rooms directory getters/iterator

partially asyncify/de-wrap rooms lazy-loading

partially asyncify/de-wrap rooms metadata

asyncify/dewrap rooms outlier

asyncify/dewrap rooms pdu_metadata

dewrap/partially asyncify rooms read receipt

de-wrap rooms search service

de-wrap/partially asyncify rooms user service

partial de-wrap rooms state_compressor

de-wrap rooms state_cache

de-wrap room state et al

de-wrap rooms timeline service

additional users device/keys related

de-wrap/asyncify sender

asyncify services

refactor database to TryFuture/TryStream

refactor services for TryFuture/TryStream

asyncify api handlers

additional asyncification for admin module

abstract stream related; support reverse streams

additional stream conversions

asyncify state-res related

Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:30 -04:00
Jason Volk 6001014078 add UnwrapInfallible to Result
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk a5de27442a re-export crates used by error macros
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk f7ce4db0b0 add is_not_found functor to error; tweak status code matcher
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk a5822ebc27 add missing err! case
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 63053640f1 add util functors for is_zero/is_equal; move clamp to math utils
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk bd75ff65c9 move common_elements util into unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk aa265f7ca4 add err log trait to Result
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 3d4b0f10a5 add expected! macro to checked math expression suite
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 2709995f84 add MapExpect to Result
add DebugInspect to Result

move Result typedef into unit

Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 99ad404ea9 add str traits for split, between, unquote; consolidate tests
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 2db017af37 simplify service trait bounds and lifetimes
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
strawberry 16014e1594
remove ProcSubset=pid from systemd units for now
they appear to cause strange rust malloc issues on Debian systems

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 23:51:02 -04:00
strawberry 7e828440f9
allow conduit database version 16
Conduit bumped the database version to 16, but did not introduce any
breaking changes. Their database migrations are extremely fragile and risky,
and also do not really apply to us, so just to retain Conduit -> conduwuit
compatibility we'll check for both versions.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 23:44:15 -04:00
strawberry f6918833d7
remove -unknown- from nix flake
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 23:04:14 -04:00
strawberry 4d7bbe9fb4 tiny micro-optimisations in some config stuff
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:37:40 -04:00
strawberry 75be68fa61
add config option to control sending admin notices of alerts
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:37:34 -04:00
strawberry 0760150822
cache all 3 x86_64 nix devshells in CI
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:08:23 -04:00
strawberry 37a2ba59d0 improve UX of admin media deletion commands, ignore errors by default, support deleting local media too
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:02:58 -04:00
strawberry 724711218a add note that ko-fi takes a fee
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:02:58 -04:00
strawberry 359fb25262
add missing feat_sha256_media to fresh database creations
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:02:51 -04:00
strawberry 9761e2f10c
fix lockdown_public_room_directory bypass, add appservice exclusion
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 21:38:26 -04:00
strawberry 30e3e45f9f
misc CI improvements, build macOS binaries, flake improvements/fixes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 21:29:17 -04:00
strawberry e5efd55838 feature-gate direct TLS mode to make rustls/aws-lc-rs optional
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:54:21 -04:00
strawberry 87734a074f add m.call and m.call.member to list of permissions to set on public rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:53:31 -04:00
strawberry a7c4a7933d disable log colours in the complement config
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:52:14 -04:00
strawberry 83becf013c add config option to disable ANSI log colours
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:51:54 -04:00
strawberry acb9eae707 add back server name to error sending PDU to remote server
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:51:50 -04:00
strawberry 2eee454a18 docs: nixos and unix socket fail, jemalloc and hardened.nix
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:50:52 -04:00
strawberry e0b2595905 support reading TURN secret from a file (turn_secret_file)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:49:23 -04:00
strawberry 73afc1fd8f allow taking multiple --config arguments to "include"/merge more config files
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:49:17 -04:00
strawberry 6acdd0d947 improve some general documentation
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:49:13 -04:00
strawberry e38c37d9e7 allow users to respond to polls by default (org.matrix.msc3381.poll.response)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:49:08 -04:00
strawberry 45254638b1 drop target-cpu optimised builds
this seems too broken.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:48:59 -04:00
strawberry 2d54264fbe
bump rust to 1.82.0, rocksdb v9.7.3, ruwuma, and a few nix pkgs
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:47:51 -04:00
Toby Murray 6c1c7b35a5 Separate command lines
I don't think this works if the commands are invoked on the same line with no thing joining them, so separate them on to separate lines.
2024-10-24 15:09:28 -04:00
nisbet-hubbard 8428e7cdf7 Update generic.md 2024-10-19 12:35:20 -04:00
strawberry e589464954
bump cargo.lock and deps
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-05 22:33:58 -04:00
Jason Volk 0413037246 fix lints
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-05 17:07:37 -07:00
Jacob Taylor b9a8f8e6c7 automatically scale conduwuit caches by CPU-core-count 2024-10-05 17:07:37 -07:00
strawberry 032b199129 add db query command to get all pushers for a user
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-15 19:56:29 -04:00
strawberry e9e5fe2176 implement MSC4165, removing own power levels on deactivation
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-15 14:20:01 -04:00
strawberry 17fd34eb12 dedupe some account deactivation steps, remove all profile fields on deactivation
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-15 12:08:07 -04:00
strawberry 895b178720 add admin command to force demote a local user from a room
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-15 11:36:47 -04:00
strawberry a65dd6dfb3 dont allow guests to publish to room directories
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-14 12:37:29 -04:00
strawberry e146c75279 dont include appservices in room guest access enforcement check
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-14 12:27:22 -04:00
strawberry d75aebc373 implement generic K-V support for MSC4133, GET/PUT/DELETE
no PATCH still yet

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-09-14 11:16:49 -04:00
morguldir 80b72637e2
ci: enable cachix after restoring the cache
Signed-off-by: morguldir <morguldir@protonmail.com>
2024-09-13 05:09:10 +02:00