Commit graph

2550 commits

Author SHA1 Message Date
John Terzis 6059650464 message sync gating 2022-11-01 18:07:15 -07:00
Tak Wai Wong 4d655a5e24
refresh latest zion contract types and addresses (#54) 2022-11-01 09:50:45 -07:00
Tak Wai Wong 1574b5e347
Fix #2842 - room state incorrectly filtered away for newly joined member (#52)
* fix room state regression when a new member joins the room

* disables sytests to workaround bug in dendrite

Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-10-31 16:56:15 -07:00
Tak Wai Wong f369ee11ca
Merge pull request #53 from HereNotThere/sync-upstream
Sync upstream changes
2022-10-31 11:23:23 -07:00
Tak Wai Wong 13f5aa6026
sync upstream changes 2022-10-31 10:49:06 -07:00
Neil Alexander 8c7b274e4e
Version 0.10.5 (#2845)
Changelog and version bump.
2022-10-31 16:44:41 +00:00
Neil Alexander 4c38bd76ce
Fix go.mod 2022-10-31 15:15:18 +00:00
Neil Alexander 7307701a24
Tweak "state" and "timeline" filtering (#2844)
This should stop state events disappearing down a gap where we'd try to
separate out the sections *before* applying history visibility instead
of after.

This may be a better approach than #2843 but I hope @tak-hntlabs will
shout if it isn't.
2022-10-31 15:14:08 +00:00
Neil Alexander 66a82e0fa4
Update to matrix-org/gomatrixserverlib@0885c35 2022-10-31 15:12:05 +00:00
Neil Alexander f10c6f26e5
Add /_dendrite/admin/downloadState/{serverName}/{roomID} admin endpoint 2022-10-31 09:13:28 +00:00
Tak Wai Wong bcf4ac9c9d
fix stream_invite regression (#50) 2022-10-28 16:13:17 -07:00
Tak Wai Wong ed8b5d09eb refresh fork with upstream 2022-10-28 15:49:31 -07:00
Till 69aff372f3
Limit recent events when going backwards (#2840)
If we're going backwards, we were selecting potentially thousands of
events, which in turn were fed to history visibility checks, resulting
in bad sync performance.
2022-10-28 13:40:51 +02:00
X. Ding 0782011f54
Add hcaptcha support besides Google ReCaptcha (#2834)
### Pull Request Checklist
This PR add support for hcaptcha.com as an alternative to Google
ReCaptcha. It also makes possible for user to customize ReCaptcha URL
when needed. (Such as use recaptcha.net instead of www.google.com)

This feature needs manual test cuz it involves 3rd party _captcha_.

Signed-off-by: `Simon Ding <dxl@plotbridge.com>`

Co-authored-by: dxl <dxl@plotbridge.com>
2022-10-28 11:25:01 +01:00
Till Faelligen f6035822e7
Simplify error checking and check the correct error 2022-10-28 08:17:40 +02:00
Neil Alexander a2706e6498
Refactor claimRemoteKeys 2022-10-27 15:34:26 +01:00
Till Faelligen a785532463
Fix upgrade appservices 2022-10-27 16:01:51 +02:00
Till 444b4bbdb8
Add AS specific public room list endpoints (#2836)
Adds `PUT
/_matrix/client/v3/directory/list/appservice/{networkId}/{roomId}` and
`DELTE
/_matrix/client/v3/directory/list/appservice/{networkId}/{roomId}`
support, as well as the ability to filter `/publicRooms` on networkID
and including all networks.
2022-10-27 14:40:35 +02:00
Till a169a9121a
Fix /members (#2837)
Fixes a bug introduced in #2827, where the SyncAPI might not have all
requested eventIDs, resulting in too few members returned.
2022-10-27 14:18:22 +02:00
Till fa96811e64
Add scheduled tasks to run tests with race detection (#2814)
Needs https://github.com/matrix-org/sytest/pull/1308 to be actually
useful.
Not sure if we need to run Sytest in all combinations with enabled race
detection.

Closes https://github.com/matrix-org/dendrite/issues/491
2022-10-27 12:12:50 +02:00
Neil Alexander 238b6ef2cd
Update Yggdrasil demo 2022-10-26 18:37:01 +01:00
devonh 97491a174b
Associate events in db before queueing them to send (#2833)
Fixes a race condition between sending federation events and having them
fully associated in the database.
2022-10-26 17:35:01 +01:00
devonh a74aea0714
Add network interface callback to pinecone build (#2825)
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-26 17:25:57 +01:00
Neil Alexander 5298dd1133
Update federation API consumers 2022-10-26 14:52:33 +01:00
Neil Alexander f6dea712d2
Initial support for multiple server names (#2829)
This PR is the first step towards virtual hosting by laying the
groundwork for multiple server names being configured.
2022-10-26 12:59:19 +01:00
Neboer 2a4c7f45b3
Add support for config "auto_join_rooms" (#2823)
Add support for config "auto_join_rooms". Now new accounts can join the
rooms in config file automatically.

### Pull Request Checklist

<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->

* [x] I have justified why this PR doesn't need tests.
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)

Signed-off-by: `Rubin Poster <rubinposter@gmail.com>`
2022-10-26 11:04:53 +02:00
Tak Wai Wong c4afa77636
Fix dendrite config to use env for chain_id and enable_authz (#49)
* Fix config to support env variables
2022-10-25 20:56:36 -07:00
Tak Wai Wong 8d2033418e
Merge branch 'matrix-org:main' into main 2022-10-25 17:26:39 -07:00
Tak Wai Wong f87fd94b1b
fix spelling in README 2022-10-25 09:29:31 -07:00
Till c62ac3d6ad
Fix Current state appears in timeline in private history with many messages after (#2830)
The problem was that we weren't getting enough recent events, as most of
them were removed by the history visibility filter. Now we're getting
all events between the given input range and re-slice the returned
values after applying history visibility.
2022-10-25 15:15:24 +02:00
Till Faelligen 8b7bf5e7d7
Return forbidden if not a member anymore (fix #2802) 2022-10-25 15:00:52 +02:00
Neil Alexander db6a214b04
Prettify unit test output 2022-10-25 12:28:34 +01:00
Till 313cb3fd19
Filter /members, return members at given point (#2827)
Makes the tests
```
Can get rooms/{roomId}/members at a given point
Can filter rooms/{roomId}/members
```
pass, by moving `/members` and `/joined_members` to the SyncAPI.
2022-10-25 12:39:10 +02:00
Tak Wai Wong 15091daa37
revert Caddyfile 2022-10-24 21:53:45 -07:00
Tak Wai Wong dead9ec2c4
Remove CaddyFile 2022-10-24 21:52:57 -07:00
Tak Wai Wong 330ed77d47
revert unwanted changes 2022-10-24 21:52:07 -07:00
Kerem dd1bf9541a
removed comment 2022-10-24 21:35:37 -07:00
Kerem 3cd70dbf45
added canonical dendrite.yaml 2022-10-24 21:35:37 -07:00
Tak Wai Wong db9758464d
Dendrite should only support 1 chain id (#47)
* Support 1 blockchain only

* auth check based on single chain

* use config to set the blockchain provider URL

* fix config to read from env variable

* handle 31337 in addition to 1337
2022-10-24 21:35:36 -07:00
John Terzis 36039c2efc
HNT-105 invite authz 2022-10-24 21:35:36 -07:00
Tak Wai Wong 94061b7b8d
Return an "Unauthorized" error message + refresh zion contract types (#44)
* Add unauthorized message

* update regenerated types for zion contracts
2022-10-24 21:35:36 -07:00
Tak Wai Wong 18db428c23
Figure out space vs channel from roomid (#43)
* pass in roomserver API so that we have access to the db

* interface to get db info for spaceid and channelid

* determine space or channel by querying the room db

* Add authorization check to the JOIN endpoint

* fix lint errors
2022-10-24 21:35:36 -07:00
Tak Wai Wong c5a753d6e2
Updated generated GO types for Zion Space Manager contracts (#41)
* Refresh generated types

* Added Permission enum
2022-10-24 21:35:36 -07:00
John Terzis c2d57b8679
merge latest changes from dendrite main (#42)
* merge latest changes from dendrite main

* fix go formatting

Co-authored-by: John Terzis <john@hntlabs.com>
Co-authored-by: Tak Wai Wong <64229756+tak-hntlabs@users.noreply.github.com>
2022-10-24 21:35:32 -07:00
Tak Wai Wong c2e15cfed9
Support environment variables for selected config fields (#40)
* deployment time config using env variables

* check if ethereum is enabled before replacing the config value with env variable
2022-10-24 21:24:36 -07:00
Tak Wai Wong 04a78694d1
Authorization framework for gating dendrite endpoints (#39)
* import new versions of the zion contracts

* bootstrap zion authz

* define interface for space manager contract

* instantiate spacemanager interface

* load goerli and localhost

* embed json

* remove zion interface. Use contracts directly

* split user identifiter into address and chain id

* isAllowed in routing.go

* remove permission.go

Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-10-24 21:24:35 -07:00
Tak Wai Wong c9ec018121
Authorization - config, interface, and default implementation (#33)
* add config yaml for enable_auth

* zion_space_manager_localhost.go

* Placeholders for authorization

* rename func and type

* re-run go mod tidy

Co-authored-by: Tak Wai Wong <tak@hntlabs.com>
2022-10-24 21:24:35 -07:00
Brian Meek b8342738ac
Setup foundry to build abi.json files (#509)
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-10-24 21:23:17 -07:00
Brian Meek 1a2a0db1a3
Update to the latest go-ethereum
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-10-24 21:22:24 -07:00
Brian Meek 68d9300ec0
After discovering the full path using the go nm tool, properly set the ReleaseVersion in the clientapi router
Signed-off-by: Brian Meek <brian@hntlabs.com>
2022-10-24 21:20:49 -07:00