Commit Graph

100 Commits

Author SHA1 Message Date
Derrick Hammer ee6f140b7e
fix: add logging of peer ip and the node id signing the message if handshake is not done 2024-03-10 09:17:13 -04:00
Derrick Hammer 48ef3e3a2a
fix: require a handshake for announcement messages 2024-03-10 06:46:18 -04:00
Derrick Hammer 701386c05d
fix: set the username to the peer id for all connection uris 2024-03-05 14:13:22 -05:00
Derrick Hammer e2d79c0357
fix: pass nil for pk on SignRegistryEntry 2024-03-03 13:02:42 -05:00
Derrick Hammer 4023d99838
fix: MarshalRegistryEntry should optionally take pk so it can work both for marshall and signing 2024-03-03 12:52:59 -05:00
Derrick Hammer ad7880edbe
fix: MarshalRegistryEntry needs to pack the public key after the record type byte 2024-03-03 12:42:45 -05:00
Derrick Hammer cab059e82a
fix: use original data not the version with the message type stripped, so we don't need to shift the offset math in UnmarshalSignedRegistryEntry 2024-03-03 12:25:27 -05:00
Derrick Hammer e6c6ea473c
refactor: we do not need to bother storing our own ProviderStore data as that would just duplicate any possible data coming from the ProviderStore. 2024-03-03 09:30:40 -05:00
Derrick Hammer dfeb8b29a8
fix: silently abort early if we have no connections to make 2024-01-31 20:20:59 -05:00
Derrick Hammer 5079db4f03
fix: need to use NewDecoder and manually call DecodeMessage and HandleMessage 2024-01-30 17:26:06 -05:00
Derrick Hammer a51e3430e1
refactor: more refactoring to break import cycles, introduce a mediator between protocol and service 2024-01-30 00:31:31 -05:00
Derrick Hammer b48b8f2f51
fix: filename typo 2024-01-29 22:40:36 -05:00
Derrick Hammer ff134ece14
refactor: merged signed back into protocol 2024-01-29 22:35:40 -05:00
Derrick Hammer 715980fd1b
fix: bad imports 2024-01-29 22:28:39 -05:00
Derrick Hammer af58aac985
refactor: base pkg is not needed 2024-01-29 22:25:46 -05:00
Derrick Hammer 2e8c335b7e
refactoring: more refactoring to break import cycles 2024-01-29 18:53:32 -05:00
Derrick Hammer b60979e79d
refactor: further refactoring for DI, splitting node responsibilities to a new Storage service, Services, and P2P 2024-01-29 01:55:36 -05:00
Derrick Hammer 59a73e4266
refactor: use a dependency injection/IoC pattern based off uber fx 2024-01-29 01:10:04 -05:00
Derrick Hammer 384557de0c
testing: remove bad imports 2024-01-29 00:25:25 -05:00
Derrick Hammer 238f78b556
testing: remove mocks for now 2024-01-29 00:23:42 -05:00
Derrick Hammer 4b718e1dd3
fix: update import for node 2024-01-29 00:02:15 -05:00
Derrick Hammer a0dcc52d63
refactor: remove dedicated interfaces and minimize interfaces 2024-01-28 23:59:43 -05:00
Derrick Hammer 31ccfb8c0b
refactor: major rewrite of message structure and wiring, reducing complexity 2024-01-28 23:39:40 -05:00
Derrick Hammer 91b171d468
fix: prevent panic if length range is out of bounds for message 2024-01-24 11:10:16 -05:00
Derrick Hammer ba00e15518
fix: AddStorageLocation no longer needs config 2024-01-24 03:37:14 -05:00
Derrick Hammer 96be8235f9
feat: add provide support to HashQuery 2024-01-24 03:01:59 -05:00
Derrick Hammer 7fa2e6adac
fix: filename typo 2024-01-24 01:49:50 -05:00
Derrick Hammer 883f50b198
feat: add incoming and outgoing peer blocking to handle abuse 2024-01-15 10:54:31 -05:00
Derrick Hammer 3d41119f74
fix: add a new property on messages and peers to prevent messages from being processed before the handshake is done 2024-01-13 11:22:01 -05:00
Derrick Hammer 19fb3b9967
fix: move everything using endian to uint64 2024-01-10 11:00:01 -05:00
Derrick Hammer ac11da28c0
fix: pass SelfConnectionUris to NewHandshakeDoneRequest 2024-01-10 09:37:27 -05:00
Derrick Hammer b542de3cb0
fix: need to decode the original message as its not msgpack 2024-01-10 07:20:33 -05:00
Derrick Hammer 6bf557346d
feat: initial registry service support 2024-01-10 06:29:03 -05:00
Derrick Hammer 528e1a6c27
chore: remove debug lines 2024-01-09 17:17:45 -05:00
Derrick Hammer 1e7baabcb3
fix: switch to using the originally stored message since we need everything to do message verification 2024-01-09 14:54:59 -05:00
Derrick Hammer 8806e69a66
fix: register RecordTypeStorageLocation 2024-01-09 13:58:11 -05:00
Derrick Hammer ed97c03d16
refactor: switch to using a normal map 2024-01-09 13:57:35 -05:00
Derrick Hammer 316e3cddb0
refactor: add Original to interface 2024-01-09 12:50:52 -05:00
Derrick Hammer 799be312e1
refactor: add kind to interface 2024-01-09 12:49:16 -05:00
Derrick Hammer 1458cbe1d9
fix: ensure we use int everywhere for kind to try and avoid any weird bitwise or implied conversions 2024-01-09 12:47:58 -05:00
Derrick Hammer 13be047bf8
fix: revert back to only passing the network id if its set, due to dart bug being fixed 2024-01-09 10:39:58 -05:00
Derrick Hammer ed2a47fca3
refactor: rename CID decode to CIDFromString 2024-01-09 08:23:35 -05:00
Derrick Hammer 4de11b414f
feat: implement HashQuery EncodeMsgpack 2024-01-09 07:07:00 -05:00
Derrick Hammer 6e34f052f3
feat: add NewHashRequest 2024-01-09 06:57:06 -05:00
Derrick Hammer 47847ea124
refactor: use types.StorageLocationType 2024-01-09 06:56:44 -05:00
Derrick Hammer 83be618dc0
feat: register hash query in protocol 2024-01-08 12:42:02 -05:00
Derrick Hammer d51f5e4590
refactor: update HandleMessage and add hash to routing table 2024-01-08 12:41:38 -05:00
Derrick Hammer 350d9c8244
fix: switch to using hash cid and fix handling of list 2024-01-08 12:40:40 -05:00
Derrick Hammer a593cac1ce
fix: always send networkId due to bug in dart implementation 2024-01-08 12:13:28 -05:00
Derrick Hammer b70d350447
fix: need to store connectionUris 2024-01-08 12:11:54 -05:00