Commit Graph

40 Commits

Author SHA1 Message Date
Kleissner
a82f575816 Embed IsLast indicator in bit 15 of count of peer records field 2021-04-18 03:18:59 +02:00
Kleissner
ce2d3309af Update seed list. New function LoadConfigOut to parse main config into custom structure.
Remove reuseport module file (not needed).
2021-04-15 12:59:06 +02:00
Kleissner
6a9d167177 Module update 2021-04-10 16:06:55 +02:00
Kleissner
ff9804bf6d Start with the store code. Properly handle announcement requests.
Add core data functions: Data2Hash, GetData, GetDataLocal, GetDataDHT, StoreDataLocal, StoreDataDHT
2021-04-10 16:00:43 +02:00
Kleissner
96213d4ed9 Minor fixes. dht.Store and Get work now! 2021-04-10 15:43:56 +02:00
Kleissner
27ec231e14 Moving store code to nested module 2021-04-09 22:41:08 +02:00
Kleissner
e69589c5c8 Kademlia: Use information requests from updated DHT library. More testing & fixes upcoming. 2021-04-09 16:36:35 +02:00
Kleissner
c44e57a0a0 Add information request list to DHT structure. It keeps track of requests and matches responses.
Break up SendRequest into individual functions SendRequestStore and SendRequestFindNode, which improves readability.
Alpha parameter must be now passed. MarkNodeAsSeen is exported.
Breaking up dht.iterate and embedding into 3 functions Get, FindNode, and FindValue.
2021-04-09 16:07:20 +02:00
Kleissner
7927e18572 Add Connectivity documentation 2021-04-05 18:43:59 +02:00
Kleissner
b2cbe2d066 Support for feature bits: IPv4_LISTEN and IPv6_LISTEN
Share IPv4/IPv6 peer connections only if supported by the remote peer.
2021-04-05 14:58:47 +02:00
Kleissner
d83123bf46 dht.GetClosestContacts introduce custom filter function 2021-04-05 14:45:33 +02:00
Kleissner
f4473c6139 Add MIT license. Close #12
Note: This applies and affects only the core library.
2021-04-05 11:01:58 +02:00
Kleissner
b8e408048c Add byte to Announcement/Response to inform about sender's feature support. According to Whitepaper 0.7. 2021-03-17 11:40:20 +01:00
Kleissner
ddd3f65187 Fix in msgEncodeResponse when multiple peers are returned in a Response message 2021-03-17 02:56:17 +01:00
Kleissner
75c0d12850 Adding initial 2 root peers. The Peernet network is live! 16.03.2021 2021-03-16 23:04:28 +01:00
Kleissner
8d2a94d078 Add go module for core package 2021-03-16 22:31:22 +01:00
Kleissner
8b329f7258 Enable go module for sub packages 2021-03-16 22:19:15 +01:00
Kleissner
caf3a4f11c initSeedList skip if self 2021-03-16 19:59:54 +01:00
Kleissner
81fd372b0a contactArbitraryPeer only if not already in peer list.
Remove nodes from Kademlia structure when appropriate.
2021-03-16 15:55:13 +01:00
Kleissner
e8b53051f2 Convert tabs to white spaces 2021-03-16 14:36:17 +01:00
Kleissner
842d5c7c7b Add use paragraph to readme 2021-03-16 14:35:16 +01:00
Kleissner
cfb0129152 Forking dependency reuseport. Close #8 2021-03-16 14:24:37 +01:00
Kleissner
3080119fc1 Initial working Kademlia network - peer list exchange is working!
Using the announcement and response messages to exchange peer lists. Fixes in encoding.
Add arbitrary Info structure to DHT Lite/Node.
2021-03-15 22:25:05 +01:00
Kleissner
323f379ee7 Message encoding of announcement and response messages.
More changes coming.
Rename of organization to Peernet s.r.o.
InformationRequest proper termination signal.
2021-03-14 04:30:57 +01:00
Kleissner
f120971944 Initial code of DHT Lite. Requires more testing and iterations (pun intended). 2021-03-08 03:15:52 +01:00
Kleissner
b5395d9186 DHT: Add in-memory store. 2021-03-06 12:45:20 +01:00
Kleissner
5ff6b5ccc1 DHT: Starting with the fork, initially only the hash table.
The distributed part follows.
2021-03-06 11:55:37 +01:00
Kleissner
73e1643548 Network detection proper action on IP new and remove. Close #2 2021-03-02 13:40:29 +01:00
Kleissner
76e4114be9 Network start listening on new interfaces #2
Removal from listening IP map
2021-03-02 04:48:08 +01:00
Kleissner
56a24b8b64 Termination of networks upon removal of their network adapter. 2021-03-02 04:14:22 +01:00
Kleissner
213c724016 Detect network changes, initial code. Actions to be developed. #2 2021-03-02 00:28:03 +01:00
Kleissner
c34adc472c Prevent link-local to non-link-local connections for multicast and broadcast. 2021-03-01 04:13:18 +01:00
Kleissner
fec5644b9f Connections: Introduce Redundant type to lower ping overhead. 2021-03-01 03:41:26 +01:00
Kleissner
ce831b31b6 Connection status field 2021-03-01 01:37:39 +01:00
Kleissner
dcc7464f46 New function IsNetworkErrorFatal to invalidate connections on fatal network errors. Use connection.Expires field to trigger removal of inactive connections after a while. 2021-03-01 01:05:37 +01:00
Kleissner
9086e201c3 Minor change: New networkWire.unicast field which might be handy in the future. 2021-03-01 01:01:44 +01:00
Kleissner
b53ab7c7b3 Reworked connection code. Pings are now regularly sent out to every connection to check if it remains valid.
Invalid connections are moved to a second list, and eventually dropped if they don't become active.
2021-02-28 20:59:39 +01:00
Kleissner
aca6d65044 Introduce default configuration file which is embedded into the binary.
Proper LoadConfig function with error status. Close #1
Separate InitLog function with error return.
2021-02-28 14:46:16 +01:00
Kleissner
ea05439262 No code changes; export some functions/struct. 2021-02-26 14:45:16 +01:00
Kleissner
fec65603f5 Initial commit. 2021-02-26 05:57:42 +01:00