Commit graph

2963 commits

Author SHA1 Message Date
Brian Meek 3fc97630ed
Merge pull request #72 from HereNotThere/main-merge
Main merge back from Harmony
2023-02-08 17:06:20 -08:00
Brian Meek 88eb6af729
Merge changes made in Harmony to get Dendrite to pass tests
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-08 17:04:54 -08:00
Brian Meek b90114cda3 Merge upstream Dendrite 0.11 changes, Dendrite and lib tests passing (#1440)
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-08 16:58:48 -08:00
Giuseppe Rodriguez 9a85e1b3c1 Audit Fixes 6 - Code quality checks (#1439) 2023-02-08 14:38:06 -08:00
Giuseppe Rodriguez 6bdd949235 Audit Fixes 5 - Updates to channel based functionality (#1435)
Fixes HNT-716
Fixes HNT-710
Fixes HNT-708
2023-02-08 14:09:03 -08:00
Giuseppe Rodriguez 72d43d8baa getter for channels (#1441) 2023-02-08 11:41:38 -08:00
Brian Meek 823b675bce
Merge pull request #71 from HereNotThere/main-merge
Main merge
2023-02-08 08:25:21 -08:00
Brian Meek c243677795
Merge local harmony changes, Dendrite tests passing
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-08 08:23:06 -08:00
Giuseppe Rodriguez 3757e0f596 Audit Fixes 4 - Upgradeability of Entitlement Modules is controlled by OpenZeppelin owner() and not SpaceOwner NFT holder (#1431)
Fixes HNT-704
Fixes HNT-715
Fixes HNT-714
Fixes HNT-711
Fixes HNT-706
Fixes HNT-707
2023-02-07 19:43:32 -08:00
Giuseppe Rodriguez cade6d1de3 Audit Fixes 3 - [M-1] More than one Role can contain the Permissions.Owner permission (#1429)
Impact: High

Likelihood: Low

According to the discussion with the team, it is expected that in Space
contracts, only one Role can have the Permissions.Owner permission.
Currently, multiple Roles can be created containing this permission.
This is caused by Space.sol’s createRole() function allowing the
OpenZeppelin owner to create new owner-permissioned roles without limit.

Remediations to consider:

Do not allow multiple roles to be created with the ownership permission.
This could be done with something like: if Space.sol’s ownerRoleId is
set, do not allow new roles to be created with the Permissions.Owner
permission.

 Fixes HNT-703 as well
2023-02-07 19:23:07 -08:00
Brian Meek 9cc55befe7
Merge upstream
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:31:43 -08:00
Brian Meek ceff2ae574
Merge upstream
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:31:02 -08:00
Brian Meek c74798b5ab
Merge branch 'matrix-org-main' 2023-02-07 17:30:09 -08:00
Brian Meek 34504e3cfe
Merge upstream
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:30:01 -08:00
Brian Meek d89f1aee85
Merge pull request #69 from HereNotThere/brian/merge_upstream
Brian/merge upstream
2023-02-07 17:18:57 -08:00
Brian Meek 706e81f512 Revert "Merge upstream latest"
This reverts commit 06c319d580.
2023-02-07 17:14:27 -08:00
Brian Meek ff194d6610 Revert "Fix lint warning about ioutil deprecation"
This reverts commit 6225873d04.
2023-02-07 17:14:27 -08:00
Brian Meek be1fd40275 Revert "Fix lint warning about ioutil deprecation"
This reverts commit 8610b4225e.
2023-02-07 17:14:27 -08:00
Brian Meek 92e468f352 Revert "Debug test failure"
This reverts commit 548029d6da.
2023-02-07 17:14:27 -08:00
Brian Meek c47b088eda Revert "Fix lint warning about ignored err assignment"
This reverts commit a4c410b81f.
2023-02-07 17:14:27 -08:00
Brian Meek 04d272d32a Revert "Logging the config in the error to debug CI"
This reverts commit 9d8dfcabcf.
2023-02-07 17:14:27 -08:00
Brian Meek 7df85cde1d Revert "Logging the config in the error to debug CI"
This reverts commit 39377bd048.
2023-02-07 17:14:27 -08:00
Brian Meek 13c221469b Revert "Logging the config in the error to debug CI"
This reverts commit c8f8e90446.
2023-02-07 17:14:27 -08:00
Brian Meek a610e6d043 Revert "HArdcoding the server_name while debugging while it isn't loading from the config"
This reverts commit d179b9f6f7.
2023-02-07 17:14:27 -08:00
Brian Meek a21b421156 Revert "Set the test config server_name to localhost"
This reverts commit 7fa8ee0d1a.
2023-02-07 17:14:27 -08:00
Brian Meek 7fa8ee0d1a Set the test config server_name to localhost
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek d179b9f6f7 HArdcoding the server_name while debugging while it isn't loading from the config
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek c8f8e90446 Logging the config in the error to debug CI
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 39377bd048 Logging the config in the error to debug CI
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 9d8dfcabcf Logging the config in the error to debug CI
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek a4c410b81f Fix lint warning about ignored err assignment
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 548029d6da Debug test failure
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 8610b4225e Fix lint warning about ioutil deprecation
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 6225873d04 Fix lint warning about ioutil deprecation
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 06c319d580 Merge upstream latest
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 17:13:06 -08:00
Brian Meek 34c62de3d6
Set the test config server_name to localhost
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 16:42:36 -08:00
Brian Meek 69d7eef327
HArdcoding the server_name while debugging while it isn't loading from the config
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 16:28:29 -08:00
Giuseppe Rodriguez 7d6ffad2de Audit Fixes 1 - Removes OZ Ownable from Space contract and makes checks for space token ownership to see if caller is space owner (#1424)
Removing the OpenZeppelin ownership logic, and, checking directly for
the ownership of the Space’s SpaceOwner NFT. The SpaceFactory could be
the owner during the bootstrapping phase, and afterwards, could transfer
the NFT to the proper owner. Doing a direct check like
_spaceOwner().ownerOf(tokenId) == _msgSender() would be safe because
that’s what the owner entitlement is going to check eventually.

---------

Co-authored-by: Kerem Kazan <kerem.kazan@gmail.com>
2023-02-07 15:57:39 -08:00
Brian Meek f23e0f5e06
Logging the config in the error to debug CI
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 15:53:58 -08:00
Brian Meek cc5dab6828
Logging the config in the error to debug CI
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 14:51:02 -08:00
Brian Meek e515dd4ccd
Logging the config in the error to debug CI
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 14:33:53 -08:00
Brian Meek c0d986fdb1
Fix lint warning about ignored err assignment
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 09:17:09 -08:00
Brian Meek b19342ecee
Debug test failure
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 09:13:26 -08:00
Brian Meek 5e556292c9
Fix lint warning about ioutil deprecation
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 08:24:08 -08:00
Brian Meek b41d9915d7
Fix lint warning about ioutil deprecation
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-07 08:11:33 -08:00
Till eb29a31550
Optimize /sync and history visibility (#2961)
Should fix the following issues or make a lot less worse when using
Postgres:

The main issue behind #2911: The client gives up after a certain time,
causing a cascade of context errors, because the response couldn't be
built up fast enough. This mostly happens on accounts with many rooms,
due to the inefficient way we're getting recent events and current state

For #2777: The queries for getting the membership events for history
visibility were being executed for each room (I think 185?), resulting
in a whooping 2k queries for membership events. (Getting the
statesnapshot -> block nids -> actual wanted membership event)

Both should now be better by:
- Using a LATERAL join to get all recent events for all joined rooms in
one go (TODO: maybe do the same for room summary and current state etc)
- If we're lazy loading on initial syncs, we're now not getting the
whole current state, just to drop the majority of it because we're lazy
loading members - we add a filter to exclude membership events on the
first call to `CurrentState`.
- Using an optimized query to get the membership events needed to
calculate history visibility

---------

Co-authored-by: kegsay <kegan@matrix.org>
2023-02-07 14:31:23 +01:00
Brian Meek 4f1c8983ad
Merge upstream latest
Signed-off-by: Brian Meek <brian@hntlabs.com>
2023-02-06 20:50:50 -08:00
Devon Hudson cf254ba044
Add max frame size to pinecone bindings 2023-02-04 06:05:39 -07:00
Devon Hudson 4ed61740ab
Disable fulltext search in pinecone builds 2023-02-04 05:56:33 -07:00
Devon Hudson 26f86a76b6
Update dendrite-pinecone gobindings build script 2023-02-03 09:06:03 -07:00