-
Notifications
You must be signed in to change notification settings - Fork 63
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
[WIP] Feature: TCPFactory/TCPTransport instead of dmsg #503
Closed
ayuryshev
wants to merge
27
commits into
skycoin:mainnet
from
ayuryshev:feature/tcp-transport-instead-of-dmsg
Closed
Changes from 10 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
1857842
Compiling. Passes tests
ayuryshev b81e03f
configurable pubkeys file, TCPFactory initialized with Listener
ayuryshev 0a2297d
Deduplicated code
ayuryshev 6d96017
Commented out tcp-transport for setup-node
ayuryshev 56c74c5
Changes: TCPFactory working correctly with predefined in/out ports
ayuryshev 15226f0
Now works with dynamic ports from diallers
ayuryshev afbdd85
Integration environment ready.
ayuryshev cb5bf31
Proceeded to thorn-letter problem
ayuryshev 4f56b61
Transport is accepted by nodeA. Still not working
ayuryshev 45f805c
Remerged with mainnet. Setup node changes rolled back
ayuryshev fca2d56
Start of multihead test
ayuryshev 4d4b980
Managed to run 128 nodes in Example_runMultihead
ayuryshev 8dec53d
Logrus output accumulated in memory. Routing Tables are in memory too
ayuryshev 5ae74d5
multihead environment enveloped in type MultiHead. Send message as Mu…
ayuryshev 43d2611
Fixed logging everywhere. Multhead simplified
ayuryshev a8142bc
Restructured tests for router
ayuryshev 70b1779
Changes in PacketRouter implementations: callbacks streamlined into r…
ayuryshev 4a951c6
a lot of debugging logs
ayuryshev 3da5dbe
still working
ayuryshev 1d31171
yet another step forward
ayuryshev 598e17a
Yet another step
ayuryshev 7572b29
tcp-transport finally working
ayuryshev 7635a5a
some cleanups
ayuryshev d9e6356
encore un efforti
ayuryshev fef6c40
restored logging
ayuryshev 3ac70d0
routing.Loop renamed to routing.AddressPair
ayuryshev 1e53cfe
LoopDescriptor, LoopData -> AddressPairDescriptor, AddressPairData
ayuryshev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
MSGD=messaging.discovery.skywire.skycoin.net | ||
MSGD_GET="https://"$MSGD"/messaging-discovery/available_servers" | ||
|
||
echo -e "\nTCP delays. Measuring by ping:" | ||
ping $MSGD -c 10 -q | ||
|
||
if type mtr > /dev/null; then | ||
echo -e "\nTCP delays. Measuring by mtr:" | ||
mtr -y 2 --report --report-cycles=5 $MSGD > /tmp/msgd-out.txt | ||
|
||
cat /tmp/msgd-out.txt | ||
else | ||
echo -e "\nTCP delays. mtr not found. Install for detailed stats" | ||
fi | ||
|
||
if type vegeta > /dev/null; then | ||
echo -e "\nHTTP delays. Measuring by vegeta:" | ||
echo "GET "$MSGD_GET \ | ||
| vegeta attack -duration=10s |tee results.bin |vegeta report | ||
else | ||
echo -e "\nHTTP delays.vegeta not found\n. Install with \ngo get -u github.com/tsenart/vegeta\n for detailed stats" | ||
fi | ||
|
||
echo -e "\nHTTP delays. Measuring by curl:" | ||
curl $MSGD_GET >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# intended to be sourced `source ./integration/tcp-tr/env-vars.sh` | ||
|
||
export RPC_A=192.168.1.2:3435 | ||
export RPC_C=192.168.1.3:3435 | ||
|
||
alias CLI_A='./skywire-cli --rpc $RPC_A' | ||
alias CLI_C='./skywire-cli --rpc $RPC_C' | ||
|
||
export PK_A=$(./skywire-cli --rpc $RPC_A node pk) | ||
export PK_C=$(./skywire-cli --rpc $RPC_C node pk) | ||
|
||
export CHAT_A=http://192.168.1.2:8001/message | ||
export CHAT_C=http://192.168.1.3:8001/message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
02fffa3ffd07630bf5565493a990f182ea7de56a9c14abbe041959a8e4667d3447 192.168.1.2:9119 | ||
0315852b6dba67d16c5376b40e082a1036bd17b66c67573b242625f485f605756e 192.168.1.3:9119 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"version": "1.0", | ||
"node": { | ||
"static_public_key": "02fffa3ffd07630bf5565493a990f182ea7de56a9c14abbe041959a8e4667d3447", | ||
"static_secret_key": "4be3f22d89d0bade8c5bf0084919f891e5e2dd0d4db0bc139318dfa576ca0237" | ||
}, | ||
"messaging": { | ||
"discovery": "https://messaging.discovery.skywire.skycoin.net", | ||
"server_count": 1 | ||
}, | ||
"transport": { | ||
"discovery": "https://transport.discovery.skywire.skycoin.net", | ||
"log_store": { | ||
"type": "file", | ||
"location": "./local/tcp-tr/nodeA/transport-logs" | ||
} | ||
}, | ||
"routing": { | ||
"setup_nodes": [ | ||
"0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" | ||
], | ||
"route_finder": "https://routefinder.skywire.skycoin.net/", | ||
"route_finder_timeout": "10s", | ||
"table": { | ||
"type": "boltdb", | ||
"location": "./local/tcp-tr/nodeA/routing.db" | ||
} | ||
}, | ||
"apps": [ | ||
{ | ||
"app": "skychat", | ||
"version": "1.0", | ||
"auto_start": true, | ||
"port": 1, | ||
"args": [ | ||
"-addr", | ||
"192.168.1.2:8001" | ||
] | ||
} | ||
], | ||
"trusted_nodes": [], | ||
"hypervisors": [], | ||
"apps_path": "./apps", | ||
"local_path": "./local", | ||
"transport_type": "tcp-transport", | ||
"pubkeys_file": "./integration/tcp-tr/hosts.pubkeys", | ||
"tcptransport_addr": "192.168.1.2:9119", | ||
"shutdown_timeout": "10s", | ||
"interfaces": { | ||
"rpc": "192.168.1.2:3435" | ||
}, | ||
"log_level": "info" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"version": "1.0", | ||
"node": { | ||
"static_public_key": "0315852b6dba67d16c5376b40e082a1036bd17b66c67573b242625f485f605756e", | ||
"static_secret_key": "55553e1fb464b557e47392caad59f94ca14dff872f43c4ee786a84df761e69e0" | ||
}, | ||
"messaging": { | ||
"discovery": "https://messaging.discovery.skywire.skycoin.net", | ||
"server_count": 1 | ||
}, | ||
"transport": { | ||
"discovery": "https://transport.discovery.skywire.skycoin.net", | ||
"log_store": { | ||
"type": "file", | ||
"location": "./local/tcp-tr/nodeB/transport-logs" | ||
} | ||
}, | ||
"routing": { | ||
"setup_nodes": [ | ||
"0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557" | ||
], | ||
"route_finder": "https://routefinder.skywire.skycoin.net/", | ||
"route_finder_timeout": "10s", | ||
"table": { | ||
"type": "boltdb", | ||
"location": "./local/tcp-tr/nodeB/routing.db" | ||
} | ||
}, | ||
"apps": [ | ||
{ | ||
"app": "skychat", | ||
"version": "1.0", | ||
"auto_start": true, | ||
"port": 1, | ||
"args": [ | ||
"-addr", | ||
"192.168.1.3:8001" | ||
] | ||
} | ||
], | ||
"trusted_nodes": [], | ||
"hypervisors": [], | ||
"apps_path": "./apps", | ||
"local_path": "./local", | ||
"transport_type": "tcp-transport", | ||
"pubkeys_file": "./integration/tcp-tr/hosts.pubkeys", | ||
"tcptransport_addr": "192.168.1.3:9119", | ||
"shutdown_timeout": "10s", | ||
"interfaces": { | ||
"rpc": "192.168.1.3:3435" | ||
}, | ||
"log_level": "info" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
curl --data {'"recipient":"'$PK_A'", "message":"Hello Joe!"}' -X POST $CHAT_C | ||
curl --data {'"recipient":"'$PK_C'", "message":"Hello Mike!"}' -X POST $CHAT_A | ||
# curl --data {'"recipient":"'$PK_C'", "message":"Hello Mike!"}' -X POST $CHAT_A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dmsg
is to be used withSetupNode
always.