Kleissner
6a5312d834
New config field LogTarget. Simplified function backend.LogError.
2022-01-12 22:18:34 +01:00
Kleissner
f2c344dc96
Major refactoring of the code base into Backend structure. Increase version number to Alpha 6 to prepare for the upcoming release.
2021-12-29 05:29:34 +01:00
Kleissner
f7e8f1821b
New flag Firewall in the Features field to inform uncontacted peers that a Traverse message might be required to establish a connection. Close #61
...
This flag can be activated via the config setting LocalFirewall.
The Features field exists in Announcement/Response messages and was now added to peer records.
2021-11-20 04:28:03 +01:00
Kleissner
9626fa8088
Fork btcec to remove external dependency. This significantly reduces the count of indirect modules (cuts it by half). Close #7
...
Update the other Go modules.
2021-11-14 22:37:07 +01:00
Kleissner
c9d9be2972
Refactor message encoding into protocol package. User Agent must be now provided in the Init function.
2021-10-18 04:37:02 +02:00
Kleissner
5d93a74981
Collecting network vars and functions in networks structure
2021-10-18 02:12:36 +02:00
Kleissner
77579a8866
Simplify EncodeAnnouncement. Return generic packetsRaw.
...
Fixes also a theoretical bug in announcement encoding for multicast/broadcast.
2021-10-17 19:30:24 +02:00
Kleissner
b51579fb3f
Untangle function IsBadQuality
2021-10-17 18:29:21 +02:00
Kleissner
1b93eac17a
Moving FeatureSupport() and UserBlockchain.Header() calls out of Message Encoding.
...
This paves the way for refactoring the message code into the protocol package.
2021-10-17 17:40:22 +02:00
Kleissner
0c7b1e0e03
Start refactoring protocol code into sub package. Move Packet Encoding and list of Commands. Change SetSelfReportedPorts parameters.
...
More related commits to follow!
2021-10-17 16:28:19 +02:00
Kleissner
958ec52f83
Close #18 cmdResponseBootstrapFindSelf uses now a recently-contacted list to prevent potential initial flood when multiple peers return the same peer for FIND_SELF.
2021-10-01 00:33:43 +02:00
Kleissner
2937154c8d
Add filters for low-level packet and high-level message interception for debugging purposes. Close #4
2021-07-31 17:29:14 +02:00
Kleissner
e5d09e7086
New filter DHTSearchStatus for debug purposes.
...
Various minor improvements and fixes.
New high-level FindNode and AsyncSearch functions.
2021-07-28 01:33:33 +02:00
Kleissner
96ee35ebf9
Finalize filter for log messages. Close #26
2021-06-29 00:48:22 +02:00
Kleissner
1a44b9c5e7
Include both IPv4/IPv6 addresses in peer records in Response message. This makes peer list sharing more efficient and speeds up discovery. Close #24
2021-05-21 02:33:32 +02:00
Kleissner
82033e124a
Finalize Traverse message implementation. Close #23
...
Remove createVirtualAnnouncement function, no longer needed.
2021-05-19 14:56:39 +02:00
Kleissner
d148fddd1e
Simplify and streamline send code. Close #21
2021-05-19 03:40:26 +02:00
Kleissner
9eb1127b40
Alpha 2 release. Includes Traverse message according to latest Whitepaper 0.8.
...
Send and traverse code needs some cleanup.
2021-05-11 10:33:06 +02:00
Kleissner
f084edc316
New function record.IsBadQuality to make sure bad peers returned in the Response message are not considered.
...
Improved remote peer NAT detection. Placeholder for sending the Traverse message.
Fix in handling incoming FIND_PEER request. Do not return self as closest node.
Do not share peers for which the internal port is not known.
2021-05-09 00:49:34 +02:00
Kleissner
f70875a345
Use PortReportedExternal when available.
2021-05-08 17:25:20 +02:00
Kleissner
948fa2be91
Add placeholder for future code
2021-05-03 11:00:17 +02:00
Kleissner
250f60a4b6
New flag: IsRootPeer. Rearranged initialization priority (initNetwork should always be last).
2021-04-25 05:34:00 +02:00
Kleissner
f13695709f
Kademlia: Initial bucket refresh implementation. This might be improved down the road.
2021-04-25 04:22:10 +02:00
Kleissner
ec809029d8
Sequences add pointer to high-level data. Proper mapping of sequences to information requests.
2021-04-21 03:27:03 +02:00
Kleissner
8269219cf0
Fix sendAllNetworks: New sequence number per packet
2021-04-20 07:18:46 +02:00
Kleissner
62c4b370fc
New announcementPacket structure to report back values up the chain
2021-04-20 05:25:56 +02:00
Kleissner
b2db81143e
Proper message sequence implementation for Response and Pong messages. Record round-trip time at connection level! Reply timeout. Close #13 #5
...
Fixes.
2021-04-19 05:18:07 +02:00
Kleissner
703e40c947
Add Sequence field #13 to packet header according to latest Whitepaper 0.7.1
...
The field is yet to be used.
2021-04-18 05:22:19 +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
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
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
213c724016
Detect network changes, initial code. Actions to be developed. #2
2021-03-02 00:28:03 +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