Commit Graph

223 Commits

Author SHA1 Message Date
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
Derrick Hammer 8a47faecac
feat: implement HandshakeDone HandleMessage 2024-01-08 12:11:34 -05:00
Derrick Hammer deee8b0e0f
feat: implement AnnouncePeers EncodeMsgpack 2024-01-08 12:10:56 -05:00
Derrick Hammer 5f3f3e98dc
refactor: add getters, peersToSend property, NewAnnounceRequest constructor, remove connected property 2024-01-08 12:10:41 -05:00
Derrick Hammer 75b0d36b84
refactor: add AddPeer and SendPublicPeersToPeer to interfaces 2024-01-08 12:09:21 -05:00
Derrick Hammer 1fe2940fc4
refactor: send every message in a coroutine and manage errors in a dedicated channel 2024-01-08 12:08:15 -05:00
Derrick Hammer e011d452d5
refactor: ToMessage isnt needed 2024-01-08 12:07:19 -05:00
Derrick Hammer 2a0a817006
fix: OnNewPeer needs to use a wait group with OnNewPeerListen 2024-01-08 12:06:53 -05:00
Derrick Hammer a7f7963f1c
fix: DecodeMsgpackURLArray needs to parse urls and create *url.URL 2024-01-08 12:04:21 -05:00
Derrick Hammer 17d7eda377
fix: handle delay being nil 2024-01-08 10:51:38 -05:00
Derrick Hammer b41c763be8
refactor: add getter/setter for isConnected connectionURIs 2024-01-08 09:52:57 -05:00
Derrick Hammer a785031255
refactor: add getter/setter for isConnected 2024-01-08 08:44:47 -05:00
Derrick Hammer 3c1a9cc526
refactor: add getter for nodeId 2024-01-08 08:40:18 -05:00
Derrick Hammer 61faaf5694
test: add tests for DecodeMessage 2024-01-08 08:28:10 -05:00
Derrick Hammer b3a6d6ddcc
fix: DecodeMessage needs to be by ref 2024-01-08 08:21:18 -05:00
Derrick Hammer a5ac5af154
test: add tests for EncodeMsgpack 2024-01-08 07:55:23 -05:00
Derrick Hammer 1020293b35
test: add tests for HandleMessage 2024-01-08 07:15:30 -05:00
Derrick Hammer a488cb806f
test: use TestMain approach on protocol 2024-01-08 07:14:52 -05:00
Derrick Hammer 29cff7f368
refactor: add setter for handshake 2024-01-08 07:14:25 -05:00
Derrick Hammer 33e2ef0d61
test: need to generate mock for peer 2024-01-08 05:32:06 -05:00
Derrick Hammer 6a474c92dc
test: fix mock generation 2024-01-08 01:16:20 -05:00
Derrick Hammer adef9b1eb4
test: add test for DecodeMessage 2024-01-08 01:02:04 -05:00
Derrick Hammer 2cce0cd46d
dep: add testify assert 2024-01-08 01:01:49 -05:00
Derrick Hammer a23f72ce12
test: add test for EncodeMsgpack 2024-01-08 00:44:26 -05:00
Derrick Hammer 86da64fa41
feat: add gomock testing 2024-01-08 00:18:30 -05:00
Derrick Hammer e39ea9e48f
refactor: update DecodeMessage and HandleMessage 2024-01-07 23:40:13 -05:00
Derrick Hammer 24e2b3a79f
fix: need to set self on message handler 2024-01-07 23:01:09 -05:00
Derrick Hammer ed48f60b12
fix: use ReadAll on msgpack.Buffered 2024-01-07 22:57:03 -05:00
Derrick Hammer 2f5a853ff8
refactor: store incoming message as a child property vs overriding itself via pointer magic 2024-01-07 22:55:57 -05:00
Derrick Hammer 0d083e8567
fix: need to use DecodeMsgpackArray 2024-01-07 22:54:43 -05:00
Derrick Hammer d6c7bd37dd
fix: we need to strip off the key prefix 2024-01-07 22:38:19 -05:00
Derrick Hammer 291a87aefc
fix: we need to use EncodeMsgpackArray 2024-01-07 22:35:41 -05:00
Derrick Hammer 819219cdcf
fix: we need to define custom array encoding and decoding api due to non-standard message packing in the dart implementation 2024-01-07 22:33:04 -05:00
Derrick Hammer fec2adb72f
fix: we need to use the msgpack reader and get the rest of the bytes, not use DecodeRaw 2024-01-07 22:21:59 -05:00
Derrick Hammer 12d8d1371a
fix: we dont need to send the network id 2024-01-07 21:41:17 -05:00
Derrick Hammer 102f147ec4
fix: encode the challenge, mot the original message 2024-01-07 21:38:26 -05:00
Derrick Hammer 3f469a3a15
fix: dont strip off anything 2024-01-07 11:24:47 -05:00
Derrick Hammer 1b8ba683c0
fix: need to handle no network id 2024-01-07 10:54:26 -05:00
Derrick Hammer a9fb6aedb9
fix: need to store a reference to the handler to itself so we can access it by the proper type in a parent method 2024-01-07 10:37:42 -05:00
Derrick Hammer a6389eb738
feat: add EncodeMsgpack, HandleMessage, and NewHandshakeDoneRequest toHandshakeDone 2024-01-07 09:13:03 -05:00
Derrick Hammer cc2885f2b4
feat: add DecodeMessage and HandleMessage to HandshakeOpen 2024-01-07 09:13:02 -05:00
Derrick Hammer 00c8a081f6
feat: add secure message signing and encoding 2024-01-07 09:13:02 -05:00
Derrick Hammer 3ce371986b
refactor: add NetworkId() to node 2024-01-07 09:13:02 -05:00
Derrick Hammer ebd95f59d4
fix: need to set known 2024-01-07 09:13:02 -05:00
Derrick Hammer a59b7d44d6
fix: bad type conversion, and add a panic 2024-01-07 09:13:02 -05:00
Derrick Hammer be082fda60
refactor: add interface check 2024-01-07 09:13:02 -05:00