Jason Volk
2bdb1dc9bb
add toolchain and build/check shortcut to smoketest
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 09:51:24 +00:00
Jason Volk
2b375dfaaf
enable http2 feature for reqwest.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
9ce9f7041f
fix duplicate output; increase wait in smoketest.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
9103e2325e
replace num_cpus dependency with available_parallelism()
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
9fc49fda0e
add possibly referenced rocksdb symbol to export list.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
d0d56dd007
fix rustflags for release-max-perf
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
9c4a5e1865
fix regressed jemalloc stats feature
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
f6ddf2f098
remove unused jemalloc dep in main module.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
d44f8b0f27
dissolve key_value/*
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
4c52264af1
split ruma_wrapper from_request() related.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
b3b45d338f
simplify RumaHandler for Router building.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
df308540fc
tweak error strings.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
239322fba6
tweak log levels
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
98a73d2c8d
check invite target is our server.
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
e94276ca54
dedup acl checks
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
Jason Volk
4ef45edb3f
hoist receipt ACL check
...
Signed-off-by: Jason Volk <jason@zemos.net>
2024-05-27 08:58:34 +00:00
strawberry
055acf54ed
check invited user's server against ACLs on /invite
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
0047772377
use ok_or_else instead of ok_or for function calls in server_server.rs
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
5bad6881c1
check for membership join state at /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
1e7aea408d
ignore inbound EDUs for users that dont belong to origin server
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
6d946c945d
compare X-Matrix origin + body origin and check PDU/EDU length at /send txn
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
0734cf5c68
check state_key matches sender user at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
196737733d
check user ID server against ACLs at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
cbe4e583b4
check for member event type at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
3d38393aca
check for membership leave state at /send_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
ab2681aa55
check if we know about room at /make_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
8dd0fec139
check state_key matches sender user at /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
f7246dd862
only allow membership event types at /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
2a512505f2
check user ID server against ACLs for /send_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
987a4459b3
check user ID server against ACLs for /make_join
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
ca5f76c3a3
check user ID server against ACLs for /make_leave
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
daf44c8604
ignore read receipts from ACL'd servers and users not joined
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
3482f63f30
debug log receiving typing EDUs for users not in room
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
5ccc3003cf
ignore typing EDUs from ACL'd user's servers
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
e47fa8ba24
listen on IPv6 localhost by default
...
this is dual-stack by default on linux, resolves
issues with nginx using `localhost` and randomly
choosing between 127.0.0.1 and [::1], causing
intermittent upstream issues
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
217367ae1e
check room ACLs on sender user's server for incoming PDUs
...
`handle_incoming_pdu`
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
strawberry
9810b56175
rename misleading sender_servername
to origin
...
this is the X-Matrix origin/server, NOT the `"sender"``
user's server name.
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-27 08:58:34 +00:00
Benjamin Lee
6ccf578437
bump rocksdb input
...
Nedded to pull in [1], which is rared for dynamic rocksdb builds with
liburing.
[1]: c8a1450231
2024-05-27 04:54:57 -04:00
Benjamin Lee
8a1848a814
Revert "nix: default output to scopeHostStatic instead of scopeHost"
...
This reverts commit a37b2b9e64
.
Dynamic builds are working again, so we'd prefer having that be the
default output for consistency with nixpkgs.
2024-05-27 04:54:57 -04:00
Benjamin Lee
b4cd8e9140
fix dynamic builds with liburing
...
The original implementation of this was really weird, so I restructed it
a lot while debugging, and am just gonna leave the restructured version.
Root cause of the segfault seems to be that upstream nixpkgs liburing
derivation is generating both static and dynamic libraries, causing
rocksdb to statically link liburing in a dynamic build, pulling in some
allocator stuff at the same time. I created a PR[1] to fix this upstream,
but it probably won't be available on nixos-unstable for quite a while,
so we can also patch it locally.
[1]: https://github.com/NixOS/nixpkgs/pull/314945
2024-05-27 04:54:57 -04:00
Benjamin Lee
a08f90b161
add a smoke-test to CI for the nix 'default' output
...
I talked to somebody yesterday in #conduwuit:puppygock.gay that was using
this output in their system config. The dynamically-linked jemalloc build
is quite fragile, and is not tested by anything else in CI. We want to
make sure we don't break it again in the future.
2024-05-27 04:54:57 -04:00
Benjamin Lee
207979579c
fix dynamically linked devshell
...
This failed to inherit the fix from bec507d739
because the crane package's buildInputs become propagatedBuildInputs in
a static stdenv, but become normal buildInputs in a dynamic stdenv. Since
we were only pulling propagatedBuildInputs into the devshell, dynamically
linked devshells did not include the rust-jemalloc-sys package. This
causes tikv-jemalloc-sys to build it's own static jemalloc package, and
we end up loading libc before jemalloc at runtime.
2024-05-27 04:54:57 -04:00
Benjamin Lee
68b96026ec
unmark dynamically-linked jemalloc builds as broken
...
It turns out that this was actually fixed by
bec507d739
and
857ac42aac
, but we didn't identify it at the
time. Notably, the `dynamic` devshell is still broken.
2024-05-27 04:54:57 -04:00
strawberry
30beb20230
conditionally static link rust-rocksdb-uwu by hot reload cfg
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
19e7779693
update complement test results
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
6269822613
actually fix all let_underscore_must_use lints
...
CI caught some more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
0877ee6191
allow let underscore use lint for rocksdb create cf for now
...
the workaround needs to be extended to rocksdb caches, but
i dont know that part of code
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
a37b2b9e64
nix: default output to scopeHostStatic instead of scopeHost
...
defaults to static builds instead of dynamically linked builds
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
29fe960efa
bump hyper-util and libz-sys
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00
strawberry
6bf2e73830
ci: run cache dependencies in ci.yml as well
...
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-25 22:28:43 -04:00