47 Commits

Author SHA1 Message Date
Devin Ragotzy
a0177669e6 Fix all failing tests because of state_key unwraps 2021-03-26 16:05:12 -04:00
Timo Kösters
1621a491a9
improvement: refactor code and fix a few auth rules 2021-03-25 23:19:20 +01:00
Devin Ragotzy
791c66d73c Replace tracing crate with log (conduit uses log) 2021-01-29 11:18:01 -05:00
Devin Ragotzy
47b19fdc15 Remove StateStore trait, caller must collect all events needed 2021-01-24 20:44:41 -05:00
Devin Ragotzy
f4772e0fcb Make auth_events arg for auth_check be a ref, cleanup 2021-01-05 15:43:55 -05:00
Devin Ragotzy
b0ee71e401 Make event_map &mut and take fields in membership_change 2021-01-05 15:43:55 -05:00
Devin Ragotzy
da14be3000 Fix tests to work with PDU event trait 2021-01-05 15:43:55 -05:00
Devin Ragotzy
05a4dd1bf0 Convert state-res to use possible ruma::ServerPdu 2021-01-05 15:43:55 -05:00
Devin Ragotzy
282270ed4f Start work on db less state-res 2021-01-05 15:43:55 -05:00
Devin Ragotzy
611d1a3d9c Add tests for resolve_incoming 2021-01-05 15:43:55 -05:00
Devin Ragotzy
dd2a115b94 Clean up tests, move setup into its own file 2021-01-05 15:43:55 -05:00
Devin Ragotzy
dca71f76ee Update readme example Option<String> -> String 2020-12-13 09:12:14 -05:00
Devin Ragotzy
c6a108631d Add apply_event function testing if a given event will pass auth 2020-12-11 18:04:41 -08:00
Devin Ragotzy
b04c74ce88 Add more comments and cleanup out of date comments 2020-12-11 18:04:41 -08:00
Devin Ragotzy
ac4ab7ac06 Update tests to new StateEvent using Pdu::RoomV3Pdu 2020-12-11 18:04:41 -08:00
Devin Ragotzy
11e8856a91 Fix tests after state_key = String from Option<String> 2020-12-11 18:04:41 -08:00
Timo Kösters
f587b88a60 Fixes 2020-12-11 18:04:41 -08:00
Devin Ragotzy
3cc4ae2bf7 Remove the last few synapse-ism using only spec event auth 2020-08-31 14:53:20 -04:00
Devin Ragotzy
8dbd9aae0b Add error type, more docs, and conduit sorting test
Not resolve sorting just topo/mainline
2020-08-29 16:33:40 -04:00
Devin Ragotzy
394d26744a Use own Error type for all errors 2020-08-27 20:03:19 -04:00
Devin Ragotzy
b846aec94a Replace membership auth with timo's logic 2020-08-27 15:46:36 -04:00
Devin Ragotzy
aadccdee64 Fix DM room creator rejoining
Check only the previous event is a RoomCreate event not that one exists
2020-08-27 09:08:52 -04:00
Devin Ragotzy
17958665f6 Update docs in event_auth and add first few event_auth tests 2020-08-26 20:51:39 -04:00
Devin Ragotzy
e8acae05ff Add test testing conduits event sorting logic
This could possibly be turned into another public function for exporting.
A list of ruma::Pdu (events) and another list of ruma::Pdu (auth_events)
and returns the sorted list of events.
2020-08-26 07:10:47 -04:00
Devin Ragotzy
43e0f20d3b Remove self param from all StateResolution methods 2020-08-20 17:43:04 -04:00
Devin Ragotzy
d22d83522b Make auth_types_for_event take the ruma types instead of StateEvent 2020-08-14 07:39:30 -04:00
Devin Ragotzy
6e0edce35a Continue to update to keep compatibility with conduit 2020-08-13 01:15:57 -04:00
Devin Ragotzy
5f77bc11a2 Update ruma with conduit, make event_id return EventId not Option<> 2020-08-12 18:24:58 -04:00
Devin Ragotzy
5a45970266 Update how PDU works this needs to be fixed TODO
I have just added a hack to make the Pdu deserialize correctly in the
tests this has to be fixed!!
2020-08-11 23:53:33 -04:00
Devin Ragotzy
1509ef45c1 Update ruma depricated and use Option<String> for state_key 2020-08-11 23:40:22 -04:00
Devin Ragotzy
185047918a StateResolution's methods take &self now + more clean up 2020-08-05 23:34:49 -04:00
Devin Ragotzy
8a9f15e01f House keeping, remove &mut self in all methods
Improved perf -7.8220%
2020-07-28 07:09:07 -04:00
Devin Ragotzy
77cbcc7ee2 Clean up logging calls 2020-07-27 17:10:06 -04:00
Devin Ragotzy
d8fb5ca112 Add benchmark for longer auth chain and Error type
This required that the code being run in the benchmark be tested to
verify it works correctly. Now work can begin cleaning up and optimizing
state-res.
2020-07-27 00:09:21 -04:00
Devin Ragotzy
ea0b6ad530 Update readme to more accuratly reflect API 2020-07-25 08:26:26 -04:00
Devin Ragotzy
0ae8c8fe09 Add benchmarks for lexi_topo and state resolve method 2020-07-25 00:03:33 -04:00
Devin Ragotzy
29d86ebf3c Fix separate ignoring missing ids and auth_check details 2020-07-24 23:14:30 -04:00
Devin R
106cab46bc lexi_topo_sort needs to return a neg power_level to sort properly
All tests pass!!! Changed println! to logger calls.
2020-07-23 09:38:47 -04:00
Devin R
a0db51b3bd Room topic reset test fails 2020-07-23 01:12:25 -04:00
Devin R
5842ddf36e Working ban_vs_power_level test, add travis.yml, logging 2020-07-22 23:26:55 -04:00
Devin R
2f443cf41a BUG: follows synapse until get_mainline_depth then it loops forever 2020-07-21 08:55:51 -04:00
Devin R
d69e712dba Working at get_auth_chain_diff 2020-07-21 00:11:03 -04:00
Devin R
0c21f38cb1 Fixing failing first failing state res test
lexicographical_topological_sort test passes. Chasing bug somewhere in
resolve.
2020-07-20 22:02:29 -04:00
Devin R
954fe5e51e Done transcribing all logic is filled in no more unimplemented! 2020-07-19 08:42:45 -04:00
Devin R
d3c3c95985 Use ruma's PDU events not the sent events 2020-07-18 16:14:57 -04:00
Devin R
c043b10d64 Sketch is mostly finalized now fill in with code 2020-07-18 14:01:22 -04:00
Devin R
61f485ea3f Initial commit sketching out ideas 2020-07-17 10:07:03 -04:00