Kleissner
6c399a7be9
New function UserBlockchainListFiles to list all files in the users blockchain.
...
Refactor block record decoding code.
2021-08-19 16:49:37 +02:00
Kleissner
a2420b8468
Store user blockchain data in file. Close #30
...
Refactoring sanitize code into separate sub-package
Refactoring block and block record decoding code
2021-08-19 04:13:08 +02:00
Kleissner
7c7048c4c7
Use Pogreb as key/value store instead for now.
2021-08-11 22:49:00 +02:00
Kleissner
5d01fc6c72
Initial code to read/create the users blockchain database on the file system.
2021-08-11 22:36:47 +02:00
Kleissner
afef726aaf
Add tentatively cockroachdb/pebble as initial database! This can be changed/replaced easily. Unfortunately it adds 7 MB to the binary and tons of dependencies :(
2021-08-11 22:18:30 +02:00
Kleissner
3da1acde60
Key/value database rename functions.
2021-08-11 22:16:39 +02:00
Kleissner
d87e43cd32
Simplify Store interface. Remove unused replication placeholder and untangle expiration option.
...
MemoryStore is refactored into separate file.
2021-08-11 20:15:22 +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
dc54f94351
Fix in sendInfoRequest
2021-07-29 04:41:18 +02:00
Kleissner
3233bf5c1b
New Filters.IncomingRequest to intercept incoming information requests of all types
2021-07-29 04:10:53 +02:00
Kleissner
fc1f0407f3
-> Alpha 3.
...
DHT: Store and Get functions use search client.
Multiple improvements in search client. Alpha parameter is now provided by init caller.
StoreDataDHT add closestCount parameter.
2021-07-29 03:17: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
891e621e8a
DHT: Add Search Client which runs the search in concurrent levels. This means faster results.
...
Add function FilterSearchStatus to get notified on the status of searches for debugging.
FindNode uses the new search client.
2021-07-28 01:28:31 +02:00
Kleissner
66ebf7c91e
New DHT function IsNodeContact to check if node is in local routing table
2021-07-07 02:50:12 +02:00
Kleissner
c1ccc3c344
Export PublicKey2NodeID
2021-07-07 02:40:07 +02:00
Kleissner
560f019786
Remove unnecessary module for dht subdirectory. This streamlines dependencies on the core module.
2021-07-07 02:38:08 +02:00
Kleissner
27fdafd231
Only set error filter function if not already set, which is important for callers to intercept the init messages.
2021-07-06 13:37:27 +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
594c06e276
Implemented block encoding according to Whitepaper 0.8.2.
...
Blocks aren't yet shared.
2021-05-30 15:28:11 +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
8e2043728c
Properly count IPv4 and IPv6 networks listening (exclude link-local ones). Close #22
2021-05-18 23:22:11 +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
db1c2e358c
Store Features field in peer structure
2021-05-11 09:40:49 +02:00
Kleissner
9f21f56896
UPnP improve filter of ineligible IPs
2021-05-11 00:35:00 +02:00
Kleissner
db46b80e3f
Move ping code to separate file (no changes)
2021-05-09 15:37:32 +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
3a502a1ecc
Minor UPnP improvement: Run discovery of each network in parallel.
2021-05-07 01:05:02 +02:00
Kleissner
5f8f299799
Working UPnP code. Close #16
2021-05-06 14:57:40 +02:00
Kleissner
eb0afce3f9
Fix race condition in cmdResponse.
2021-05-06 14:54:28 +02:00
Kleissner
e929d6ba2f
Make result channel buffered. Function QueueResult to queue the incoming message non-blocking.
...
This fixes a bug (write on closed channel).
2021-05-06 14:48:34 +02:00
Kleissner
4df71d531f
Add basic forked UPnP library. More changes upcoming. #16
2021-05-05 21:35:32 +02:00
Kleissner
f1da49d68e
Add PortForward setting to override external listening port. Improve default config inline documentation.
...
Prepare EnableUPnP setting.
2021-05-04 12:43:31 +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
f3c9d5e17f
Add new fields Port Internal and Port External to the Announcement/Response message according to the latest Whitepaper 0.7.3.
...
These fields will be used for NAT detection and UPnP support.
2021-05-03 14:05:07 +02:00
Kleissner
948fa2be91
Add placeholder for future code
2021-05-03 11:00:17 +02:00
Kleissner
1e7bb0c40c
Fix #19 IPv4 address format in byte form
2021-04-25 22:12:59 +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
611dfa3b1c
RefreshBuckets: Use self ID on bucket 0.
2021-04-25 03:44:52 +02:00
Kleissner
1c03afd63b
Fix: Check if channel is closed.
2021-04-25 00:07:53 +02:00
Kleissner
63e736486a
Implement auto refresh of buckets. Close #11
2021-04-24 23:06:08 +02:00
Kleissner
6693d442a6
Add function dht.RefreshBuckets. Use RW mutex for accessing hash table.
2021-04-24 22:42:39 +02:00