45 Commits

Author SHA1 Message Date
Akilan Selvacoumar
ae5f1d2fd7 New features (#110)
* added upload status

* added changes for progress bar with more logs and bug fixes, Documentation yet to be added

* huge changes that need more doucmenting

* added possibility to get profile using NodeID

* added fix profile listing user profile information

* removed profile image from the explore reult struct

* saving current changes

* added filter to search based on NodeID

* Monday bug fixing

* updates to the profile

* changes for tracing the blockchain profile image not shown

* added condition to ensure TAG is not sent and removed debug prints

* updated webapi docs
2023-06-28 00:38:17 +01:00
Akilan Selvacoumar
2b2f20ca18 changed route to view files added by a certain node (#105)
* changed route to view files added by a certain node

* gofmt my changes
2023-02-27 17:24:27 +00:00
Akilan Selvacoumar
9775525d35 gofmt peernet (#103) 2023-02-12 09:59:31 +00:00
Akilan Selvacoumar
3537d04c4d Exposed certain variables in the struct public for the Test framework. (#101)
* Exposed peer seed as a public struct

* Made certain variables public in the struct WebAPIInstance
2023-02-11 21:57:41 +00:00
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
281622aa49 NodelistLookup function 2021-12-14 02:05:08 +01:00
Kleissner
5d0989bfeb Introduce nodeList for quicker lookup based on node ID. It is mirrored from peerList.
This improves the speed of lookup in FindNode if the node is already connected.
2021-12-13 13:33:09 +01:00
Kleissner
0cd4519688 Send Announcement instead of ping in case blockchain info was not refreshed within a certain threshold. This helps to keep the global blockchain cache active, with no additional overhead. Close #78 2021-12-12 01:06:55 +01:00
Kleissner
c12b68c35c Update blockchain height to 64-bits according to the Whitepaper 0.9.2. Close #74 2021-12-11 20:43:38 +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
d06c2e0b1a Define common application exit codes for backend executables in Exit.go.
Improve logging of webapi start.
2021-11-15 03:00:24 +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
5d9d1bf838 File transfer: New API /file/read 2021-10-27 14:16:13 +02:00
Kleissner
89f9e3a563 New function PublicKeyFromPeerID 2021-10-22 06:17:28 +02:00
Kleissner
e45d6fe888 New function to delete account. Create deletion functions for blockchain and warehouse. Add function /account/delete to webapi. Close #42 2021-10-20 08:46:53 +02: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
b51579fb3f Untangle function IsBadQuality 2021-10-17 18:29:21 +02:00
Kleissner
7be31a9e34 Refactoring code. Use protocol.HashData and HashSize. Move PublicKey2NodeID into protocol. 2021-10-17 17:15: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
c1ccc3c344 Export PublicKey2NodeID 2021-07-07 02:40:07 +02:00
Kleissner
96ee35ebf9 Finalize filter for log messages. Close #26 2021-06-29 00:48:22 +02:00
Kleissner
084f3bc1ee Prepare log functions for filters. Init all filter functions by assigning empty stubs. #26 2021-06-28 02:37:31 +02:00
Kleissner
f5ce15d33a Initial filters for new peers and new connections. More filters to be added. #4 2021-06-09 22:45:43 +02:00
Kleissner
94c8e16724 Record BlockchainHeight and BlockchainVersion for each peer. New function IsPortForward. 2021-06-09 22:35:55 +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
db1c2e358c Store Features field in peer structure 2021-05-11 09:40:49 +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
530cd541c1 Add new fields Port Internal and Port External to the exchanged peer record according to the latest Whitepaper 0.7.3.
This allows peers to detect each other's NAT and port forwarding status.
2021-05-08 13:03:45 +02:00
Kleissner
0fe2ce60ec Add reported internal and external port to Connection. New function peer.IsBehindNAT.
PeerlistAdd is now called on every incoming message. User Agent fixes.
2021-05-04 01:13:11 +02:00
Kleissner
250f60a4b6 New flag: IsRootPeer. Rearranged initialization priority (initNetwork should always be last). 2021-04-25 05:34:00 +02:00
Kleissner
35f50230cd Add 2 root peers. New seed list auto update. 2021-04-25 04:40:45 +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
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
00db57aed8 Provide the new sequence number in responses. New message Local Discovery to be sent instead of Announcement via IPv4 Broadcast and IPv6 Multicast.
Detecting IPv6 link-local addresses as local ones. Fixes.
2021-04-18 21:50:30 +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
e69589c5c8 Kademlia: Use information requests from updated DHT library. More testing & fixes upcoming. 2021-04-09 16:36:35 +02: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
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
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