-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kadcast functional implementation #141
Commits on Nov 6, 2019
-
Add message.go, peer.go and bucket.go files to kadcast implementation.
CPerezz committedNov 6, 2019 Configuration menu - View commit details
-
Copy full SHA for c3dace5 - Browse repository at this point
Copy the full SHA c3dace5View commit details
Commits on Nov 8, 2019
-
Add gotest.tools to go.mod and go.sum
CPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for a05dd7a - Browse repository at this point
Copy the full SHA a05dd7aView commit details -
Implement peer basic managing functions
Includes: - makePeer - addIp - addPort - addID - computePeerDistance
CPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for da3770f - Browse repository at this point
Copy the full SHA da3770fView commit details -
Refactor
Bucket
structure and defineTree
`Bucket` has now a dynamic array of peers instead of a fixed- length one. Implemented `Tree` struct which holds the routing info containing the L `Bucket` structures. Implemented for `Tree`: - makeTree - addPeer
CPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 79663a0 - Browse repository at this point
Copy the full SHA 79663a0View commit details -
Implement XOR distance computation utility functions
Implemented: `idXor` which computes the XOR between to `Peer` ID's. `collapseDistance` which allows to classify the XOR distance in one of the L `Bucket` that the `Peer` holds into the ROUTING `Tree`. Implemented tests for `idXor` function.
CPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 756fa3d - Browse repository at this point
Copy the full SHA 756fa3dView commit details -
Set result of
computePeerDistance
as uint16 to hold max range caseCPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 85dc560 - Browse repository at this point
Copy the full SHA 85dc560View commit details -
Refactor
idXor
andcollapseDistance
- `Peer` distance is expressed now as `uint16` to hold the max range value `128` unsoported on the `byte` type. - Instead of using math logarithms, we work with bitwise ops. - `collapseDistance` has been ranamed as `classifyDistance` and optimized since now only counts the ammount of `1` of a byte that comes from an XOR op. - `idXor` just performs the XOR between the two `Peer-ID` arrays and computes the number of different bits on the result, using this counter as the result for the distance classification value. NOTE that this value has the range (0 - 128] to match the `L-buckets`.
CPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for d7eeee1 - Browse repository at this point
Copy the full SHA d7eeee1View commit details -
Refactor tests according to the
uint16
impl.CPerezz committedNov 8, 2019 Configuration menu - View commit details
-
Copy full SHA for d938a79 - Browse repository at this point
Copy the full SHA d938a79View commit details
Commits on Nov 10, 2019
-
Implement ID generation from Wallet Pk
The ID matches the 16 first bytes of the output that comes from applying the sha3-256 to the Wallet's Pk as a 32-byte array input.
CPerezz committedNov 10, 2019 Configuration menu - View commit details
-
Copy full SHA for df7f831 - Browse repository at this point
Copy the full SHA df7f831View commit details
Commits on Nov 11, 2019
-
Finnish Peer ID generation functions
CPerezz committedNov 11, 2019 Configuration menu - View commit details
-
Copy full SHA for b7524c1 - Browse repository at this point
Copy the full SHA b7524c1View commit details -
Refactor
ip
field type of PeerIn order to implement LRU for Bucket managing, we need to use arrays whoose key is a Peer and since one of it's fields was a Slice (IP field) we will now represent it as a 4-byte array.
CPerezz committedNov 11, 2019 Configuration menu - View commit details
-
Copy full SHA for 80e5138 - Browse repository at this point
Copy the full SHA 80e5138View commit details -
Implement LRU policy on Node storage
Implemented almost all of the LRU-continuous policy with optimizations done to avoid array looping by using maps.
CPerezz committedNov 11, 2019 Configuration menu - View commit details
-
Copy full SHA for 7cb8dbb - Browse repository at this point
Copy the full SHA 7cb8dbbView commit details -
Finnish Least Recently Used policy impl
Finnished the implementation for `Bucket`. Everytime we need to add a Peer, now it is done under this policy which is specified on the Kadcast paper.
CPerezz committedNov 11, 2019 Configuration menu - View commit details
-
Copy full SHA for 8b4a3c9 - Browse repository at this point
Copy the full SHA 8b4a3c9View commit details -
Split storage into
Bucket
andTree
filesCPerezz committedNov 11, 2019 Configuration menu - View commit details
-
Copy full SHA for f1b9a55 - Browse repository at this point
Copy the full SHA f1b9a55View commit details -
Implement makeTree and addPeer for
Tree
- makeTree allocates space for a new routing tree and sets it's own Peer info on the lowest order bucket. - addPeer computes the distance between it's own peer info and the other peer to be included. Then it adds the peer to its corresponding bucket If the peer it's the same as our peer, the function simply doesn't do anything.
CPerezz committedNov 11, 2019 Configuration menu - View commit details
-
Copy full SHA for 6179dea - Browse repository at this point
Copy the full SHA 6179deaView commit details
Commits on Nov 12, 2019
-
Implement peer network info translation functions
This functions allow us to move from UDP packet style to Peer network info style/types.
CPerezz committedNov 12, 2019 Configuration menu - View commit details
-
Copy full SHA for 3d755a5 - Browse repository at this point
Copy the full SHA 3d755a5View commit details -
Implement UDP server and Client for kadcast
CPerezz committedNov 12, 2019 Configuration menu - View commit details
-
Copy full SHA for 9173784 - Browse repository at this point
Copy the full SHA 9173784View commit details -
Create packet.go file and add
processPacket
This function should be responsible of getting a received UDP packet, parse it and also call the needed processes according to the packet.
CPerezz committedNov 12, 2019 Configuration menu - View commit details
-
Copy full SHA for c79568a - Browse repository at this point
Copy the full SHA c79568aView commit details -
Implement a way for a peer to get its own UDPAddr
This function takes a tree and gets the UDPAddr data of the peer that is running the node.
CPerezz committedNov 12, 2019 Configuration menu - View commit details
-
Copy full SHA for c9241d6 - Browse repository at this point
Copy the full SHA c9241d6View commit details
Commits on Nov 13, 2019
-
Pass pointers and references intead of values
Refactored all of the functions to return and get inputs and outputs as references or pointers in order to save memory and to not copy thoose values everytime on the stack on each function call.
CPerezz committedNov 13, 2019 Configuration menu - View commit details
-
Copy full SHA for f680ade - Browse repository at this point
Copy the full SHA f680adeView commit details -
Implement Enc/Dec for uint32 <-> bytes
This is needed in order to compute the IdNonce of each Peer.
CPerezz committedNov 13, 2019 Configuration menu - View commit details
-
Copy full SHA for 5b4308e - Browse repository at this point
Copy the full SHA 5b4308eView commit details
Commits on Nov 14, 2019
-
Refactor
Tree
routing struct and makeTreeNow the tree holds the k-buckets and also: - Peer info in `Peer` fmt. - Peer UDP info as `UDPAddr` - Peer Id Nonce. Refactored the makeTree function to build the propper `Tree` with our personal Peer info.
CPerezz committedNov 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 304c6e8 - Browse repository at this point
Copy the full SHA 304c6e8View commit details -
CPerezz committed
Nov 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 6529e3d - Browse repository at this point
Copy the full SHA 6529e3dView commit details -
Implement
PING
&PONG
messagesThis two messages are used to test if a peer is actually connected or not to the network.
CPerezz committedNov 14, 2019 Configuration menu - View commit details
-
Copy full SHA for f1e99a1 - Browse repository at this point
Copy the full SHA f1e99a1View commit details -
The function that converts uint32 to bytes was using references, so it setted the nonce to 0 everytime. This has been solved and everything works now. With this setup, it takes aprox 1min to compute the ID on an Intel Core i5-7x series.
CPerezz committedNov 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 839d9f0 - Browse repository at this point
Copy the full SHA 839d9f0View commit details -
Now the Peer constructor gets the externalIP address of the peer and a port and computes the ID returning the whole Peer struct.
CPerezz committedNov 14, 2019 Configuration menu - View commit details
-
Copy full SHA for b790f81 - Browse repository at this point
Copy the full SHA b790f81View commit details
Commits on Nov 15, 2019
-
Get Local UDP Addr from func instead of param
Since we can get the local UDP Addr quickly, there's no need to pass it as a parameter. - Now sendUDPPacket gets the parameters per value instead of by-reference.
CPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for 46e62bc - Browse repository at this point
Copy the full SHA 46e62bcView commit details -
Implement Packet type and processPacket
processPacket now it's just a debugging tool to catch the packets recieved and print the content.
CPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for ad0d5e5 - Browse repository at this point
Copy the full SHA ad0d5e5View commit details -
Refactor peer module to work by-value
Refactored function arguments to be used by value and not by reference. Moved UDPAddr<->PeerInfo transformations.
CPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for e5c274f - Browse repository at this point
Copy the full SHA e5c274fView commit details -
`Router` holds the Routing tree data structure and also quick access to the owner `Peer` info. Added `sendPing` and `sendPong` methods passing and recieving arguments by-value
CPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for b746a00 - Browse repository at this point
Copy the full SHA b746a00View commit details -
CPerezz committed
Nov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for 8a2a001 - Browse repository at this point
Copy the full SHA 8a2a001View commit details -
Implement tests for PoW, byteConv and Ping-Pong
Most of the tests are actually used just with debugging and networking testing.
CPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for 68b7f0d - Browse repository at this point
Copy the full SHA 68b7f0dView commit details -
Add a router as a
StartUDPListener
proc variableCPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for 109a6e0 - Browse repository at this point
Copy the full SHA 109a6e0View commit details -
CPerezz committed
Nov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for 0d27a94 - Browse repository at this point
Copy the full SHA 0d27a94View commit details -
Implement small test to see Go's behaviour w/ UDP
CPerezz committedNov 15, 2019 Configuration menu - View commit details
-
Copy full SHA for 2f6a2e5 - Browse repository at this point
Copy the full SHA 2f6a2e5View commit details
Commits on Nov 17, 2019
-
Implement Nonce & ID verification
When a Peer recieves a packet, it can veriofy that the nonce attached to it really corresponds to the PoW process that a Peer has to accomplish before it can join the network.
CPerezz committedNov 17, 2019 Configuration menu - View commit details
-
Copy full SHA for d464bb7 - Browse repository at this point
Copy the full SHA d464bb7View commit details
Commits on Nov 18, 2019
-
Refactor verifyIdNonce function for Peer
The function now verifies that the Nonce has been computed correctly and then returns: - Peer if the Nonce is correct - Error if not.
CPerezz committedNov 18, 2019 Configuration menu - View commit details
-
Copy full SHA for f5fc0f7 - Browse repository at this point
Copy the full SHA f5fc0f7View commit details -
Implement basic Packet processing functions
Implements basic functions to work with packets as: - getHeadersInfo => Returns the headers sliced in the 3 different elements. - processPacket => gets a Packet and processes it according to it's type. - getPacketFromStream => Gets a stream of bytes and returns a Packet struct from it.
CPerezz committedNov 18, 2019 Configuration menu - View commit details
-
Copy full SHA for e3fdb65 - Browse repository at this point
Copy the full SHA e3fdb65View commit details -
CPerezz committed
Nov 18, 2019 Configuration menu - View commit details
-
Copy full SHA for b8c49fd - Browse repository at this point
Copy the full SHA b8c49fdView commit details -
Refactor Bytes-Uint32 pointer returns
CPerezz committedNov 18, 2019 Configuration menu - View commit details
-
Copy full SHA for 0074a15 - Browse repository at this point
Copy the full SHA 0074a15View commit details -
Add destPort to
Packet
headers in the protocolSince the node that receives a ping, only knows the port where the packet was sent, it does not know on which port the sender is listening for the UDP response. And since it is not possible to writte to a port that you are listening, we need to send the listeningPort in the headers. This also allows to update it.
CPerezz committedNov 18, 2019 Configuration menu - View commit details
-
Copy full SHA for 74d0c45 - Browse repository at this point
Copy the full SHA 74d0c45View commit details -
Add listenPort on packet headers creation
CPerezz committedNov 18, 2019 Configuration menu - View commit details
-
Copy full SHA for dc1fffa - Browse repository at this point
Copy the full SHA dc1fffaView commit details
Commits on Nov 19, 2019
-
Add methods for packet construction
CPerezz committedNov 19, 2019 Configuration menu - View commit details
-
Copy full SHA for 6393abd - Browse repository at this point
Copy the full SHA 6393abdView commit details -
Unexport testUDP for Ping/Pong tests
CPerezz committedNov 19, 2019 Configuration menu - View commit details
-
Copy full SHA for db65189 - Browse repository at this point
Copy the full SHA db65189View commit details -
PeerSort struct aims to be a helper data structure that allows the implementation to order the PeerList of a Node in terms of XOR-distance in respect to a certain Peer. The struct has the same fields as the `Peer` struct plus a `xorMyPeer` field which represents the XOR-distance of this specific `Peer` in respect to another.
CPerezz committedNov 19, 2019 Configuration menu - View commit details
-
Copy full SHA for 7822428 - Browse repository at this point
Copy the full SHA 7822428View commit details -
Refactor pointer params and impl
xorIsBigger
Refactored some Distance functions to use values instead of references. Also implemented `xoirIsBigger` in order to be able to order XOR-distances between two peers represented with [16]byte.
CPerezz committedNov 19, 2019 Configuration menu - View commit details
-
Copy full SHA for 9064686 - Browse repository at this point
Copy the full SHA 9064686View commit details -
Implement methods for FIND_NODES usage.
- Implemented sort.Interface for `ByXORDist` that allows to sort slices of Peers by it's XOR-distance. - getPeerSortDist allows to get a list of `PeerSort` items ready to be sorted by it's XOR-distance in respect to some `Peer`. - `getXClosestPeersTo` allows to get the selected number of peers that is closer to the specified Peer. Also implemented `FIND_NODES` message sender function. Which gets the `alpha` closest nodes to the Peer that runs the node and sends them a `FIND_NODES` packet.
CPerezz committedNov 19, 2019 Configuration menu - View commit details
-
Copy full SHA for 7d2199f - Browse repository at this point
Copy the full SHA 7d2199fView commit details
Commits on Nov 20, 2019
-
Solve array access errors in getXClosestPeersTo fn
The function was accessing an invalid position. Now it's solved and the `FIND_NODES` messages are tested and working propperly.
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for a0d585e - Browse repository at this point
Copy the full SHA a0d585eView commit details -
Implement function for
NODES
payload creation`setNodesPayload` allows to create the payload of a `NODES` message filled with the number of peers sent and the peers themselfs on a serialized format
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for 8bcfe5b - Browse repository at this point
Copy the full SHA 8bcfe5bView commit details -
Implement serialization for
Peer
Allows to serialize a Peer in bytes in order to be sent inside a packet.
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for 1b47847 - Browse repository at this point
Copy the full SHA 1b47847View commit details -
Implement methods for send
NODES
messagesThe method automatically gets `K` nodes from it's buckets that are closer to the selected target Peer, constructs a `NODES` packet and sends it over the network.
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for af519a9 - Browse repository at this point
Copy the full SHA af519a9View commit details -
Implement Se/Deserialization for
Peer
structWe can translate a Peer to bytes to send in wire format and viceversa.
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for 12ee7e1 - Browse repository at this point
Copy the full SHA 12ee7e1View commit details -
Implement
NODES
message support functions- `checkNodesPayloadConsistency` allows to verify if a `NODES` message is consistent in terms of `numPeersAnounced * bytesPerPeer <=> len of the payload`. - `getNodesPayloadInfo` returns a slice of Peers collected from a `NODES` message payload.
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for c98fc73 - Browse repository at this point
Copy the full SHA c98fc73View commit details -
Implement NODES and FIND_NODES cases.
CPerezz committedNov 20, 2019 Configuration menu - View commit details
-
Copy full SHA for 432d508 - Browse repository at this point
Copy the full SHA 432d508View commit details
Commits on Nov 21, 2019
-
Limit the num of Peers sent on
NODES
messageThe peers sent on the `getXClosestPeersTo` was higher than the number of peers specified in the function's arguments. It has been corrected.
CPerezz committedNov 21, 2019 Configuration menu - View commit details
-
Copy full SHA for 7ff2da0 - Browse repository at this point
Copy the full SHA 7ff2da0View commit details
Commits on Nov 22, 2019
-
Remove requester peer from Nodes payload
CPerezz committedNov 22, 2019 Configuration menu - View commit details
-
Copy full SHA for 8953210 - Browse repository at this point
Copy the full SHA 8953210View commit details
Commits on Nov 23, 2019
-
Refactor FINDNODES to not send requester ID
CPerezz committedNov 23, 2019 Configuration menu - View commit details
-
Copy full SHA for 12df9c3 - Browse repository at this point
Copy the full SHA 12df9c3View commit details -
Refactor getTotalPeers function
Now it iterates through the range and gets the peercount of each bucket.
CPerezz committedNov 23, 2019 Configuration menu - View commit details
-
Copy full SHA for 0d5f1b0 - Browse repository at this point
Copy the full SHA 0d5f1b0View commit details -
Implement bootstrapping process triggerer.
CPerezz committedNov 23, 2019 Configuration menu - View commit details
-
Copy full SHA for eef1bb8 - Browse repository at this point
Copy the full SHA eef1bb8View commit details
Commits on Nov 24, 2019
-
Implement Network Discovery process.
Attempts to get closest nodes on each round until it does not get a closest to the previous round. Then we consider the process has finnished.
CPerezz committedNov 24, 2019 Configuration menu - View commit details
-
Copy full SHA for a26a5ed - Browse repository at this point
Copy the full SHA a26a5edView commit details -
Add retries in Bootstrapping process.
Now the process does 3 attempts trying to bootstrap the network and add the network bootstrapping nodes to it's buckets if they respond with a `PONG`.
CPerezz committedNov 24, 2019 Configuration menu - View commit details
-
Copy full SHA for 8c4b7c8 - Browse repository at this point
Copy the full SHA 8c4b7c8View commit details -
Add tests for Bootstrap and Netw Discovery
CPerezz committedNov 24, 2019 Configuration menu - View commit details
-
Copy full SHA for 2613d5a - Browse repository at this point
Copy the full SHA 2613d5aView commit details -
Add Dest IP^on message sending logs
CPerezz committedNov 24, 2019 Configuration menu - View commit details
-
Copy full SHA for 5a59e68 - Browse repository at this point
Copy the full SHA 5a59e68View commit details
Commits on Nov 25, 2019
-
Fix LRU policy implementation adding peers to map
CPerezz committedNov 25, 2019 Configuration menu - View commit details
-
Copy full SHA for 37c4174 - Browse repository at this point
Copy the full SHA 37c4174View commit details -
Refactor the totalPeers computation
CPerezz committedNov 25, 2019 Configuration menu - View commit details
-
Copy full SHA for 5c7bc86 - Browse repository at this point
Copy the full SHA 5c7bc86View commit details -
CPerezz committed
Nov 25, 2019 Configuration menu - View commit details
-
Copy full SHA for 92c3918 - Browse repository at this point
Copy the full SHA 92c3918View commit details -
CPerezz committed
Nov 25, 2019 Configuration menu - View commit details
-
Copy full SHA for 5fbe5d6 - Browse repository at this point
Copy the full SHA 5fbe5d6View commit details -
Refactor validityCheck of NODES message
CPerezz committedNov 25, 2019 Configuration menu - View commit details
-
Copy full SHA for 6e4b695 - Browse repository at this point
Copy the full SHA 6e4b695View commit details
Commits on Nov 26, 2019
-
Solve some bugs on NODES messages
- `CheckNodesConsistency` now uses BigEndian for decoding. - `getNodesPayloadInfo` is now adjusted to get the Peers propperly from the payload.
CPerezz committedNov 26, 2019 Configuration menu - View commit details
-
Copy full SHA for 0e32783 - Browse repository at this point
Copy the full SHA 0e32783View commit details -
Add logs to protocol processes.
CPerezz committedNov 26, 2019 Configuration menu - View commit details
-
Copy full SHA for 9f739da - Browse repository at this point
Copy the full SHA 9f739daView commit details -
Refactor tests to send a reference of the
Router
CPerezz committedNov 26, 2019 Configuration menu - View commit details
-
Copy full SHA for 0376ec2 - Browse repository at this point
Copy the full SHA 0376ec2View commit details
Commits on Nov 27, 2019
-
Don't send NODES message if PeersAnnounced = 0
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for d6dcd4a - Browse repository at this point
Copy the full SHA d6dcd4aView commit details -
Set actualClosest node to null at Discovery start
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for 80e6f2b - Browse repository at this point
Copy the full SHA 80e6f2bView commit details -
Make getNodesPayloadInfo to return announcedPeers
Now the parser just gets the ammount of peers that it's announced instead of consuming the whole slice of bytes of the packet (1024B)
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for cfbb81b - Browse repository at this point
Copy the full SHA cfbb81bView commit details -
CPerezz committed
Nov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for d199773 - Browse repository at this point
Copy the full SHA d199773View commit details -
CPerezz committed
Nov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for 9a54a72 - Browse repository at this point
Copy the full SHA 9a54a72View commit details -
Hardcode Bootstrapp node IP on tests
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for 9bbfd64 - Browse repository at this point
Copy the full SHA 9bbfd64View commit details -
CPerezz committed
Nov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for d21d243 - Browse repository at this point
Copy the full SHA d21d243View commit details -
Dont export infinit-looping tests
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for d4fa817 - Browse repository at this point
Copy the full SHA d4fa817View commit details -
Hold Deadline Hangs recreating the connection.
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for 5866fac - Browse repository at this point
Copy the full SHA 5866facView commit details -
Remove i condition on getNodesPayloadInfo
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for a0e3ea0 - Browse repository at this point
Copy the full SHA a0e3ea0View commit details -
Close connection before goto using a new one.
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for 42a6cab - Browse repository at this point
Copy the full SHA 42a6cabView commit details -
Add mutex on bucket-changing functions
CPerezz committedNov 27, 2019 Configuration menu - View commit details
-
Copy full SHA for 1e6b6a3 - Browse repository at this point
Copy the full SHA 1e6b6a3View commit details
Commits on Nov 28, 2019
-
Return error on Bootstrap failure
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 03c0242 - Browse repository at this point
Copy the full SHA 03c0242View commit details -
CPerezz committed
Nov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 0fcbc9b - Browse repository at this point
Copy the full SHA 0fcbc9bView commit details -
Implement Serde for CircularQueue (ring) packets
This allows to se/derialize the red packets from the listener gorutine and the packetConsumer gorutine. Packet <-> ByteSlice
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for d2c791a - Browse repository at this point
Copy the full SHA d2c791aView commit details -
Refactor packetProcessing methodology.
Instead of spawning gorutines for each new connection, we just add the received packet to the circularqueue and the consumer will take care of them. The `Put` method sends a signal to the consumer to awake and start consumming and processing packets from the queue so we are not constantly waiting.
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 420ed5d - Browse repository at this point
Copy the full SHA 420ed5dView commit details -
Refactor PacketProcessing methodology
Now processPacket is a gorutine that consumes packets received for the UDPListener and then processes them as is needed. This saves us to spawn a gorutine for every single packet the node receives.
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 89c8b7b - Browse repository at this point
Copy the full SHA 89c8b7bView commit details -
Remove Router pointer from UDPList params
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 27a95c8 - Browse repository at this point
Copy the full SHA 27a95c8View commit details -
Addapt tests to the sync refactor.
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 1ce244a - Browse repository at this point
Copy the full SHA 1ce244aView commit details -
Now that the application works on a syncronous way, we don't need to protect the buckets with a mutex since onli `processPacket` will acces to them and will do it syncronously since the refactor has been finnished.
CPerezz committedNov 28, 2019 Configuration menu - View commit details
-
Copy full SHA for 219b7cc - Browse repository at this point
Copy the full SHA 219b7ccView commit details
Commits on Nov 29, 2019
-
Send PeerInfo instead of Router to UDPListener
Since there's no reason to pass the whole router to the UDPListener, we just send our peerInfo.
CPerezz committedNov 29, 2019 Configuration menu - View commit details
-
Copy full SHA for 3c44128 - Browse repository at this point
Copy the full SHA 3c44128View commit details -
Add bootstrapping node to Protocol test.
CPerezz committedNov 29, 2019 Configuration menu - View commit details
-
Copy full SHA for 7c40ab0 - Browse repository at this point
Copy the full SHA 7c40ab0View commit details -
Use LittleEndian for number deserialization
CPerezz committedNov 29, 2019 Configuration menu - View commit details
-
Copy full SHA for 2fe502d - Browse repository at this point
Copy the full SHA 2fe502dView commit details -
Now if deserialization from the queue fails, we will just break and go for the next iteration of the packetQueue.
CPerezz committedNov 29, 2019 Configuration menu - View commit details
-
Copy full SHA for f7949d2 - Browse repository at this point
Copy the full SHA f7949d2View commit details -
CPerezz committed
Nov 29, 2019 Configuration menu - View commit details
-
Copy full SHA for ef344c2 - Browse repository at this point
Copy the full SHA ef344c2View commit details -
Fix decoding issues. PacketProcessor finnished.
CPerezz committedNov 29, 2019 Configuration menu - View commit details
-
Copy full SHA for 68da553 - Browse repository at this point
Copy the full SHA 68da553View commit details
Commits on Dec 3, 2019
-
Implement TCP connection tools for broadcast
CPerezz committedDec 3, 2019 Configuration menu - View commit details
-
Copy full SHA for 298a773 - Browse repository at this point
Copy the full SHA 298a773View commit details -
Export functions to use them in main.go
CPerezz committedDec 3, 2019 Configuration menu - View commit details
-
Copy full SHA for 9d8eb06 - Browse repository at this point
Copy the full SHA 9d8eb06View commit details -
CPerezz committed
Dec 3, 2019 Configuration menu - View commit details
-
Copy full SHA for 295eb37 - Browse repository at this point
Copy the full SHA 295eb37View commit details -
Add main.go file and export peerInf
CPerezz committedDec 3, 2019 Configuration menu - View commit details
-
Copy full SHA for 7e3f180 - Browse repository at this point
Copy the full SHA 7e3f180View commit details -
Unexport tests and run main.go now
CPerezz committedDec 3, 2019 Configuration menu - View commit details
-
Copy full SHA for 22c3cc1 - Browse repository at this point
Copy the full SHA 22c3cc1View commit details -
Add doc comments and clear unused logs.
This cleans the entire implementation in order to be merged.
CPerezz committedDec 3, 2019 Configuration menu - View commit details
-
Copy full SHA for 208538c - Browse repository at this point
Copy the full SHA 208538cView commit details
Commits on Dec 5, 2019
-
Implement #141 minor issues changes
Modified the code according to the changes suggested by @autholykos in the review of #141.
CPerezz committedDec 5, 2019 Configuration menu - View commit details
-
Copy full SHA for f66abb3 - Browse repository at this point
Copy the full SHA f66abb3View commit details -
Update log to logrus log system
CPerezz committedDec 5, 2019 Configuration menu - View commit details
-
Copy full SHA for b84854c - Browse repository at this point
Copy the full SHA b84854cView commit details -
Reduce Nonce computation complexity
Instead of asking for 3 bytes of 0s we will just ask for 1 since will be faster for testing purposes. Also refactored logs to use `logrus`.
CPerezz committedDec 5, 2019 Configuration menu - View commit details
-
Copy full SHA for ae0308d - Browse repository at this point
Copy the full SHA ae0308dView commit details -
Refactor bootstrapping to catch the trials err
Refactored the code to allow the code to panic when we exceeded the maximum ammount of tries of bootstrapping. Also refactored logs to work with `logrus`.
CPerezz committedDec 5, 2019 Configuration menu - View commit details
-
Copy full SHA for 3c12db1 - Browse repository at this point
Copy the full SHA 3c12db1View commit details -
CPerezz committed
Dec 5, 2019 Configuration menu - View commit details
-
Copy full SHA for ecafdad - Browse repository at this point
Copy the full SHA ecafdadView commit details
Commits on Dec 6, 2019
-
Implement basic skeleton for WaitGroups
Since `Sleep` was not an option as discussed in #141, the waitGroup has been implemented in order to make the program itself trigger the protocol methods once a packet type in concrete is received. Also, added state-vars in order to force the `packetProcessor` gorutine to just activate the waitGroup if a bootstrapping or network discovery process is in progress. Now we need to add timeouts in order to prevent the app to get stucked at any protocol method execution.
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for be2218d - Browse repository at this point
Copy the full SHA be2218dView commit details -
Addapt main.go gorutines to wG
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 608cbf1 - Browse repository at this point
Copy the full SHA 608cbf1View commit details -
CPerezz committed
Dec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for e0753c4 - Browse repository at this point
Copy the full SHA e0753c4View commit details -
Replace
append
forcopy
insetHeadersINFO
On this way, we speed up the app by copying directly in the stack.
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 1a2c626 - Browse repository at this point
Copy the full SHA 1a2c626View commit details -
CPerezz committed
Dec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 368aff4 - Browse repository at this point
Copy the full SHA 368aff4View commit details -
Remove formatting from INFO logs
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for 6d52a44 - Browse repository at this point
Copy the full SHA 6d52a44View commit details -
Fix ID verification of refactoring.
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for f9f166b - Browse repository at this point
Copy the full SHA f9f166bView commit details -
Hold watigroup in Pong arrivals
CPerezz committedDec 6, 2019 Configuration menu - View commit details
-
Copy full SHA for f8dec50 - Browse repository at this point
Copy the full SHA f8dec50View commit details
Commits on Dec 8, 2019
-
Remove global state conditions on PONG handler
Now that we are using a different aproach with waitgroups, we can get rid of this state variables.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for a9032c7 - Browse repository at this point
Copy the full SHA a9032c7View commit details -
Implement poll functions for Router
Now the `Router` provides blocking methods to poll Bootstrapp node and closestPeers (FIND_NODES) to allow a better and more logical library construction also featuring waitGroups and removing the timeouts.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 69d1911 - Browse repository at this point
Copy the full SHA 69d1911View commit details -
Refactor protocol methods to work with poll methds
Now that the `Router` offers blocking methods to search for the closest `alpha` peers and for polling the bootstrapping nodes, the logic can be leaved there and the protocol functions just take car of the logic of the algorithms itself.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 00cbaca - Browse repository at this point
Copy the full SHA 00cbacaView commit details -
Remove WG from main and protocol params
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for b3df49a - Browse repository at this point
Copy the full SHA b3df49aView commit details -
Refactor contiune loop statements
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for e3661a2 - Browse repository at this point
Copy the full SHA e3661a2View commit details -
CPerezz committed
Dec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for bcbbedd - Browse repository at this point
Copy the full SHA bcbbeddView commit details -
Modify time.Afterfunc structure
We should not send the poll messages inside of the afterFunc, instead, we should send the messages on polling methods and wait on the afterFunc to execute the getters to our tree.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 8a8d57c - Browse repository at this point
Copy the full SHA 8a8d57cView commit details -
Reduce waitGroup times to speed up polling
With lower timings we should be able to get all of the info we are expecting on the polling methods.
CPerezz committedDec 8, 2019 Configuration menu - View commit details
-
Copy full SHA for 2f74a69 - Browse repository at this point
Copy the full SHA 2f74a69View commit details
Commits on Dec 10, 2019
-
Merge pull request #182 from dusk-network/protocol_sync
Protocol methods refactoring.
Configuration menu - View commit details
-
Copy full SHA for bdd07a7 - Browse repository at this point
Copy the full SHA bdd07a7View commit details -
CPerezz committed
Dec 10, 2019 Configuration menu - View commit details
-
Copy full SHA for 5593b62 - Browse repository at this point
Copy the full SHA 5593b62View commit details