Commit Graph

  • cab881ebdb webapi: Add option for some URLs to accept the API key in the parameter, instead of the "x-api-key" HTTP header. By default add /file/read and /file/view. This allows embedding the URLs into existing code that may not be able to set the special HTTP header. Kleissner 2021-12-13 16:49:56 +01:00
  • 7adadf9ad5 UDT: Fix critical bugs that appear during high packet loss. Recv: Implement resending ACKs (until ACK2'ed). Send: Implement unsolicited data resending of unacked data packets. Double sending time each try to prevent ddos. Kleissner 2021-12-13 16:21:53 +01:00
  • 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. Kleissner 2021-12-13 13:33:09 +01:00
  • ca58296e65 UDT: Fix race condition 'send on closed channel' by introducing a separate termination signal. Kleissner 2021-12-13 13:30:23 +01:00
  • 388343dc3e Version Alpha 5. Kleissner 2021-12-13 04:16:02 +01:00
  • ecef7b5fb8 Webapi: Live implementation of search and explore. Removed dummy code. Kleissner 2021-12-13 04:07:38 +01:00
  • 8c8a901a31 Search: Deduplication of file IDs if found via multiple search terms. Kleissner 2021-12-13 04:02:17 +01:00
  • 359387af0d Search index: Change unindexing algorithm on entire blockchain level instead of version+block number. Fixing bug in unindexing. Kleissner 2021-12-13 02:15:55 +01:00
  • f9c661b003 Search index: Add blockchain version to the records. Kleissner 2021-12-13 00:05:54 +01:00
  • d494d46410 🔍 search algorithm! 🎉🎊🥳 Kleissner 2021-12-12 19:12:01 +01:00
  • 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 Kleissner 2021-12-12 01:06:55 +01:00
  • ea31af1f6e Fix bug in packetGarbage Kleissner 2021-12-11 22:25:54 +01:00
  • 9f2783349e Fix race condition in UDT, check if socket is nil before closing it Kleissner 2021-12-11 21:43:06 +01:00
  • c12b68c35c Update blockchain height to 64-bits according to the Whitepaper 0.9.2. Close #74 Kleissner 2021-12-11 20:43:38 +01:00
  • 5db25f2704 Minor fix for mobile: Explicitly cast length to uint64 so it works on stupid systems (32-bit) as well Kleissner 2021-12-11 18:46:43 +01:00
  • c8e0d1cfbe Blockchain: New TargetBlockSize which is honored for files and profile fields. Close #80, close #75 Kleissner 2021-12-11 18:07:48 +01:00
  • 15e46133c7 Global Blockchain Cache implementation. Automatically download other blockchains based on the limits in the config. Started with a unified backend struct. Long term all lose vars should be put there, which in term will support multiple concurrent Peernet instances (users) within the same process. Kleissner 2021-12-11 14:55:02 +01:00
  • 1ece19709e Store: New Count() function to return count of all records stored. Kleissner 2021-12-11 13:00:49 +01:00
  • d2bde58d4b Get Block message: BlockTransferReadBlock validate limit. Fix in startBlockTransfer. New high-level function BlockDownload to download requested blocks. Kleissner 2021-12-11 12:59:50 +01:00
  • b65f53611a Rename file to clarify Kleissner 2021-12-11 04:03:35 +01:00
  • 2900f06281 Add blockchain multi store implementation. Close #73 Kleissner 2021-12-11 03:58:23 +01:00
  • b83a48bf44 added .idea/ to gitignore Akilan Selvacoumar 2021-12-09 14:10:58 +04:00
  • c2af2fe5e7 Housekeeping, renaming few things for clarification. Kleissner 2021-12-08 20:55:17 +01:00
  • 4aa15d6a78 Minor fix in test code Kleissner 2021-12-08 04:19:04 +01:00
  • a26900755b UDT: Resend NAKs every SynTime until missing packets are received. Fix #70 Fix additional divide by 0 bug Kleissner 2021-12-08 04:09:48 +01:00
  • 85dcb9d256 UDT: Multiplexer pass down external termination signal. This makes sure any socket reader will return with EOF and does not hang. Change transferSequenceTimeout to 1 minute which is more appropriate. Kleissner 2021-12-08 01:36:50 +01:00
  • 34e48c09df UDT bug: Fix #68 fillDataToMTU, appended slice was not returned. Kleissner 2021-12-04 03:52:34 +01:00
  • c63f5543f6 Implement protocol.CommandGetBlock. Close #33 Kleissner 2021-12-04 03:17:28 +01:00
  • 65f1d4eab7 Blockchain: Add functions GetBlockRaw and DecodeBlockRaw Kleissner 2021-12-04 03:09:27 +01:00
  • 66e890ff08 Protocol: Add encoding of Get Block message. Kleissner 2021-12-04 03:03:11 +01:00
  • 50ec1c804e Proper abstraction of virtualPacketConn. It now supports other transport protocol encodings. Kleissner 2021-12-04 02:56:14 +01:00
  • 68d8c11872 Refactor file transfer header encoding into protocol sub-module. Kleissner 2021-11-30 03:53:19 +01:00
  • e648f80e31 webapi: /file/read and /file/view serve file from warehouse if available. Kleissner 2021-11-29 17:51:22 +01:00
  • 1be95b46fd webapi: Add documentation about file type and format. Kleissner 2021-11-29 03:13:15 +01:00
  • e10ece7358 Blockchain: blockchain.IterateDeleteRecord decode all records at once, fixing multiple issues with file tags that could result in corrupted or orphaned records. Fix #66, fix #37, fix #38 Kleissner 2021-11-29 02:06:51 +01:00
  • d7f66474ef Blockchain: Fix bug in encodeBlockRecordFiles. Virtual tags were mistakenly counted, resulting in corruption. Kleissner 2021-11-29 01:52:25 +01:00
  • ffc558b7f2 Change file permission of config file to 666 😈 when creating it. This is consistent with the log file. Kleissner 2021-11-28 22:05:27 +01:00
  • 793e586234 webapi: Set merkle fields of file records when adding files to the blockchain. Kleissner 2021-11-28 22:03:08 +01:00
  • e5c2d8d91d Protocol change: Implement merkle tree for files and store root hash and fragment size in the blockchain. Kleissner 2021-11-28 21:59:52 +01:00
  • 05a31cf3af Warehouse: Automatically create .merkle companion files to store the entire merkle tree. Close #48 Pregenerating this means that fragments can be serve immediately with 0 hash calculation needed. Kleissner 2021-11-28 21:52:30 +01:00
  • 5ad8586cd4 Merkle: Define MinimumFragmentSize. Split code into ReadMerkleTreeHeader function. #48 Kleissner 2021-11-28 20:47:01 +01:00
  • d5b95542e6 Rename fragment to merkle #48 Kleissner 2021-11-27 14:57:19 +01:00
  • 954afb2c12 Merkle tree: export/import functions. #48 Kleissner 2021-11-27 05:30:20 +01:00
  • c7665d7385 Merkle Tree create verification hashes and implementation of validation function. #48 Kleissner 2021-11-27 02:30:31 +01:00
  • 19971c629d Merkle tree creation. #48 Kleissner 2021-11-27 00:53:39 +01:00
  • d64f8b19fb webapi: New function /warehouse/read/path to read a file from warehouse to disk Kleissner 2021-11-26 08:53:42 +01:00
  • 3b839d547b File fragment size calculation and documentation of research. #48 Kleissner 2021-11-22 04:47:42 +01:00
  • 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. Kleissner 2021-11-20 04:28:03 +01:00
  • 446c62bcd9 Explicitly define locations for important files and folders in the config file. This removes the hardcoded paths for the blockchain and warehouse. Kleissner 2021-11-17 17:37:04 +01:00
  • 83e6e5fb62 Additional error logging for multicast/broadcast Kleissner 2021-11-16 22:04:18 +01:00
  • f9d8ecb6b0 webapi: Implement optional API key to secure the API against unauthenticated attackers. Kleissner 2021-11-16 19:27:53 +01:00
  • d06c2e0b1a Define common application exit codes for backend executables in Exit.go. Improve logging of webapi start. Kleissner 2021-11-15 03:00:24 +01:00
  • 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. Kleissner 2021-11-14 22:37:07 +01:00
  • a727f4d8b1 Define and document the flow window size for transfer. Document webapi timeout parameters. Kleissner 2021-11-13 14:41:14 +01:00
  • eb0ad540fe UDT: Finally fixing this piece of crap by rewriting the send logic. Close #58 Kleissner 2021-11-11 18:47:10 +01:00
  • ce37461705 Improve MTU settings and documentation. #41 Kleissner 2021-11-09 21:04:06 +01:00
  • 014d4a34ee UDT: Fix in receiveLossHeap.Range Kleissner 2021-11-08 19:26:53 +01:00
  • 80bf639aea UDT: Provide io.EOF signal in udtSocket.fetchReadPacket. Otherwise readers may linger forever. Kleissner 2021-11-08 05:12:40 +01:00
  • c44b05b9c1 UDT: Remove buggy EXP code. It caused wrong termination. It is not needed; the Peernet protocol handles connectivity. Kleissner 2021-11-08 04:57:21 +01:00
  • f3d5f23cf9 Transfer: Record close reason of underlying library (UDT). This helps for debugging issues. Close #54 Kleissner 2021-11-08 04:40:53 +01:00
  • 2924f0074d UDT: Redeveloped receiving code to fix the packet reassembly bugs. Kleissner 2021-11-08 00:14:56 +01:00
  • bb2a4bac48 Update User Agent, new release! Kleissner 2021-11-05 03:44:20 +01:00
  • 14f034cc8d Turns out internet MTU must be honored, otherwise packets are dropped/not reassembled. Setting to 1500 bytes for transfer messages. Kleissner 2021-11-05 03:39:46 +01:00
  • 0d62c215ee UDT: Fixing #43 #49 #51. File transfer works in test environment. More tests needed for production testing. Internet MTU needs to be tested. Kleissner 2021-11-05 03:19:29 +01:00
  • f76426aa48 UDT: Remove the datapacket_heap with the new heap code Kleissner 2021-11-05 01:06:02 +01:00
  • 8502cb15cf UDT: Fix the first piece of !@#$ heap code. Rewrite from scratch. Kleissner 2021-11-05 00:41:06 +01:00
  • bfe2985149 UDT: Remove broken sentAck2. Always send ACK2 in response to an ACK. No need for artificial delay. Kleissner 2021-11-04 23:43:18 +01:00
  • 1573ded639 UDT: Fix invalid initial packet sequence number when random number was a signed negative int Kleissner 2021-11-04 22:35:57 +01:00
  • d0b5db9437 UDT: Removing light ACK. This reduces complexity. Kleissner 2021-11-04 21:20:47 +01:00
  • b728b939ec UDT: Remove ackInterval which was never set anyway. Instead, send ACK every few packets depending on congestion window and count of sent packets. Removing LightACK. The implementation of it was confusing (it competed with ACK in a race condition) and rather pointless. LightACKs will be ditched completely to get to a working version. Kleissner 2021-11-04 20:47:34 +01:00
  • d9bbdf573e Disable pogreb log output Kleissner 2021-11-04 18:34:31 +01:00
  • cce68e9abe UDT: Fix packets being resent are not stored on the to-acknowledge list. Add return statement in udtSocketSend.processDataMsg which was incorrectly removed with de9b67e751 Kleissner 2021-11-04 18:22:31 +01:00
  • e6846c232c UDT: Fix another bug, this time in udtSocket.Read. This UDT library is a fucking piece of !@#$ code that deserves a special place in hell. It probably takes longer fixing this piece of !@#$ than writing a new library from scratch. booh! Kleissner 2021-11-04 17:05:53 +01:00
  • e141510b9c UDT: Fix divide by zero Kleissner 2021-11-04 14:17:03 +01:00
  • cc3384e03e Merge branch 'master' of github.com:PeernetOfficial/core Kleissner 2021-11-04 14:09:55 +01:00
  • 29061318da UDT: Fix bug in packet.Add Kleissner 2021-11-04 14:09:48 +01:00
  • 78e46b8daa Merge pull request #53 from PeernetOfficial/Akilan1999-patch-1 Akilan Selvacoumar 2021-11-04 00:35:30 +04:00
  • ed6d6becc8 Delete main.yml Akilan Selvacoumar 2021-11-04 00:35:05 +04:00
  • 006a8a0479 Create draft.yml Akilan Selvacoumar 2021-11-04 00:34:08 +04:00
  • c15f9d4adf Create release-drafter.yml Akilan Selvacoumar 2021-11-04 00:32:56 +04:00
  • ca10ee8277 Rename release.yml to main.yml Akilan Selvacoumar 2021-11-04 00:29:16 +04:00
  • 627d608232 Update release.yml Akilan Selvacoumar 2021-11-04 00:28:45 +04:00
  • 5489a7c502 Update release.yml Akilan Selvacoumar 2021-11-04 00:26:34 +04:00
  • 96fac9c56e Update and rename main.yml to release.yml Akilan Selvacoumar 2021-11-04 00:12:58 +04:00
  • de9b67e751 UDT: Minor refactor of udtSocketSend.processDataMsg Kleissner 2021-11-03 21:07:43 +01:00
  • 451aac9c47 Fix bug in transfer code. A wrong transfer size was returned when an offset was used. Kleissner 2021-11-03 21:02:00 +01:00
  • 4bb8ac7adf UDT: Fix critical bug in udtSocket.Write use after return. CC #43 Kleissner 2021-11-03 20:57:04 +01:00
  • b04e089fbe Merge branch 'master' of github.com:PeernetOfficial/core Kleissner 2021-11-03 20:53:08 +01:00
  • 62c262e2b6 UDT: Fixing critical bugs in heap code. Fixing endless loops! #51 #49 Kleissner 2021-11-03 20:52:32 +01:00
  • 997ece717d Create main.yml Akilan Selvacoumar 2021-11-03 23:46:24 +04:00
  • 4704b5194f webapi: Add cancellation channel to FileStartReader. Add convenience function FileReadAll. Kleissner 2021-11-01 22:36:10 +01:00
  • 0f546caed0 UDT: Fix a bug in udtSocketRecv.ingestData. The wrong sequence identifier was pushed to the lossList. #43 Kleissner 2021-11-01 09:09:30 +01:00
  • 8b593975b6 UDT: Fix closing channel twice in race condition when calling udtSocket.Close() multiple times Kleissner 2021-11-01 09:02:35 +01:00
  • 81b409d5a4 UDT: Fix divide by zero. Kleissner 2021-11-01 08:50:33 +01:00
  • 0368752324 UDT: Fix bug in NativeCongestionControl.OnNAK that causes a crash when the provided losslist is empty Kleissner 2021-10-28 17:16:14 +02:00
  • 9ddca35277 Transfer: Set max packet size. udt: Improve error messages. Fix bug in udtSocketSend.processDataMsg, the header was not considered in the max size. webapi: New /file/view API which is useful for immediate testing of file transfer. Kleissner 2021-10-28 04:06:10 +02:00
  • 5d9d1bf838 File transfer: New API /file/read Kleissner 2021-10-27 14:16:13 +02:00
  • b0f98fdd4f UDT: Simplify closing behavior - removing multiplexer level for reporting close of listener/socket back to upstream provided closer. Kleissner 2021-10-25 09:56:28 +02:00
  • 13ef42ac39 UDT: Reduce complexity of multiplexer, removes a race condition, increases stability. pktOut was not needed. Kleissner 2021-10-25 09:46:36 +02:00
  • e476c7e40b UDT: Remove unnecessary shutdownEvent waiting in udtSocket.Close. permitLinger only allowed for server, unless closed by client. Kleissner 2021-10-25 09:36:59 +02:00