Commit Graph

21 Commits

Author SHA1 Message Date
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
ea31af1f6e Fix bug in packetGarbage 2021-12-11 22:25:54 +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
d2bde58d4b Get Block message: BlockTransferReadBlock validate limit. Fix in startBlockTransfer. New high-level function BlockDownload to download requested blocks. 2021-12-11 12:59:50 +01:00
Kleissner
66e890ff08 Protocol: Add encoding of Get Block message. 2021-12-04 03:03:11 +01:00
Kleissner
50ec1c804e Proper abstraction of virtualPacketConn. It now supports other transport protocol encodings. 2021-12-04 02:56:14 +01:00
Kleissner
68d8c11872 Refactor file transfer header encoding into protocol sub-module. 2021-11-30 03:53:19 +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
ce37461705 Improve MTU settings and documentation. #41 2021-11-09 21:04:06 +01:00
Kleissner
14f034cc8d Turns out internet MTU must be honored, otherwise packets are dropped/not reassembled. Setting to 1500 bytes for transfer messages. 2021-11-05 03:39:46 +01:00
Kleissner
b5266b1c52 File Transfer: Add header to file transfer to indicate file size and transfer size. This is important to know when to stop reading. It will also help when reading only ranges (which is important for video streaming).
New function FileTransferReadHeaderUDT to read the header.
Warehouse: ReadFile return count bytes read
2021-10-25 03:34:28 +02:00
Kleissner
f6bbd02a01 Transfer: Change virtual connection from net.PacketConn to channels which is faster and less complex.
Improve termination behavior and documentation of it.
2021-10-24 06:27:23 +02:00
Kleissner
6c2d526251 Protocol sequences: Add support for bidirectional responses. 2021-10-24 02:28:33 +02:00
Kleissner
0c4562e1d3 Protocol: Fixes in Transfer code. Add IsLast convenience functions. 2021-10-22 06:23:56 +02:00
Kleissner
d2899a4378 Initial Transfer message encoding. Embedded UDT implementation to follow.
Documentation of file transfer to follow in upcoming Whitepaper update.
2021-10-20 10:20:56 +02:00
Kleissner
f954c4777b Refactor message encoding code into separate files. No code changes. 2021-10-18 04:57:54 +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
f1e8e0cab8 Finally moving Sequence code into protocol package 2021-10-18 02:41:55 +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