salsacz
|
|
March 16, 2014, 10:38:54 PM |
|
how can I link Ricky?
|
|
|
|
ebereon
|
|
March 16, 2014, 10:41:15 PM Last edit: March 16, 2014, 11:08:09 PM by ebereon |
|
I have hacked together a php script, to get a list of ip addresses that use lower NRS version as your own like 0.5.x etc. With this list I use iptables/ipset to block these ip addresses. If there is a other way, pls let me know. I use "getPeers" and then foreach with "getPeer&peer=x.x.x.x". Is there a faster way? Here is the php code if someone like it: <?php
// Your own Node address to check (pls modify to you needs!) $NodeAddress = "192.168.1.22";
// Maximun different Versions from own Version $DiffVersions = 3;
// ------------------------------------------------------------------------
$NodeInfo = array(); $NodeInfo = json_decode( send( "https://$NodeAddress:7876/nxt?requestType=getState" ) , true );
$NodeInfo['version'] = explode('.', $NodeInfo['version'], 3); $NodeInfo['version'][2] = str_pad($NodeInfo['version'][2], 2 ,'0', STR_PAD_LEFT); $NodeInfo['version'] = implode("", $NodeInfo['version']); $NodeInfo['version'] = intval($NodeInfo['version']);
$MyVersion = $NodeInfo['version']; $DiffVersion = $MyVersion - $DiffVersions;
echo "My version is $MyVersion\n"; echo "Minimum Version is set to $DiffVersion\n";
$Peers = array(); $Peers = json_decode( send( "https://$NodeAddress:7876/nxt?requestType=getPeers" ) , true );
$i = 0;
foreach ($Peers['peers'] as $value){ $IP = $value; $Peer = array(); $Peer = json_decode( send( "https://$NodeAddress:7876/nxt?requestType=getPeer&peer={$value}" ) , true ); if ( $Peer['version'] == "" ) { //print "{$Peer['version']} #:{$i} - No Version\n"; } else { $Peer['version'] = explode('.', $Peer['version'], 3); $Peer['version'][2] = str_pad($Peer['version'][2], 2 ,'0', STR_PAD_LEFT); $Peer['version'] = implode("", $Peer['version']); $Peer['version'] = intval($Peer['version']); if( $Peer['version'] < $DiffVersion && $Peer['application'] = 'NRS') { print "{$Peer['version']} #:{$i} - Version is smaller $DiffVersion\n"; $datei = fopen("bad_ips.txt","a+"); fwrite($datei, "$IP\n"); fclose($datei); } } $i++; } function send( $url = NULL ) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); $result = curl_exec($ch); curl_close($ch); return $result; }
exit(); ?>
And here is the iptables script for my RasPI: #!/bin/bash
if [ `id -u` != "0" ] ; then echo "You must be root to execute this script!" exit 1 fi
DEV=wlan0 IPT=/sbin/iptables
cd /home/pi/nxt/ # restore old ipset rules ipset restore </home/pi/nxt/ipset-rules.txt
# add every ip in bad_ips.txt to the ipset rule for i in `cat /home/pi/nxt/bad_ips.txt`; do sudo ipset add banned_hosts $i ; done
# activate and drop everything from the ipset $IPT -A INPUT -m set -j DROP --match-set banned_hosts src
# save the current ipset rules ipset save >/home/pi/nxt/ipset-rules.txt And here is my traffic shaping script for my RasPI to save bandwidth(homeconnection): #!/bin/bash
if [ `id -u` != "0" ] ; then echo "You must be root to execute this script!" exit 1 fi
DEV=wlan0 IPT=/sbin/iptables TC=/sbin/tc $IPT -t mangle -F $TC qdisc del dev $DEV ingress > /dev/null 2>&1 $TC qdisc del dev $DEV root > /dev/null 2>&1 $TC qdisc del dev lo root > /dev/null 2>&1 $TC qdisc add dev $DEV root handle 1:0 htb default 12 r2q 6 $TC class add dev $DEV parent 1:0 classid 1:1 htb rate 6000kbit ceil 100Mbit $TC class add dev $DEV parent 1:1 classid 1:10 htb rate 5000kbit ceil 98Mbit prio 0 $TC class add dev $DEV parent 1:1 classid 1:11 htb rate 5000kbit ceil 98Mbit prio 1 $TC class add dev $DEV parent 1:1 classid 1:12 htb rate 5000kbit ceil 98Mbit prio 2 $TC class add dev $DEV parent 1:1 classid 1:13 htb rate 1000kbit ceil 2000kbit prio 3 $IPT -A POSTROUTING -t mangle -o $DEV -p tcp -m length --length :64 -j MARK --set-mark 10 $IPT -A POSTROUTING -t mangle -o $DEV -p udp --dport 53 -j MARK --set-mark 10 $IPT -A POSTROUTING -t mangle -o $DEV -p tcp --dport 22 -j MARK --set-mark 11 $IPT -A POSTROUTING -t mangle -o $DEV -p tcp --sport 22 -j MARK --set-mark 11 $IPT -A POSTROUTING -t mangle -o $DEV -p tcp --dport 7874 -j MARK --set-mark 13 $TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10 $TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 11 fw flowid 1:11 $TC filter add dev $DEV parent 1:0 prio 0 protocol ip handle 13 fw flowid 1:13 $TC qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 $TC qdisc add dev $DEV parent 1:11 handle 11: sfq perturb 10 $TC qdisc add dev $DEV parent 1:12 handle 12: sfq perturb 10 $TC qdisc add dev $DEV parent 1:13 handle 13: sfq perturb 10
My new RasPI NRS start script for verson 0.8.x (pls update the one in wiki!): #!/bin/bash ### BEGIN INIT INFO # Provides: NXTserver # Required-Start: $local_fs $remote_fs $network $syslog $named $sshd # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop NXT server ### END INIT INFO
if [ `id -u` != "0" ] && [ "$1" = "start" -o "$1" = "stop" ] ; then echo "You must be root to start/stop nxt." exit 1 fi
# Settings nxtdir=/home/pi/nxt nxt=nxt.jar java=/usr/bin/java nxtpid=/var/run/nxt.pid nxtlog=/home/pi/nxt/nxt.log nxtuser=pi nxtgroup=pi nxtnice=19 timeout=700 maxmem=120 # end Settings
# check for exist files and dirs test -d $nxtdir || exit 0 test -f $nxtdir/$nxt || exit 0 test -f $java || exit 0
# make sure $nxtdir is ours! chown -R $nxtuser:$nxtgroup $nxtdir
. /lib/lsb/init-functions
function status {
start-stop-daemon -T --pidfile "$nxtpid" && echo "NXT server is started." \ || { echo "NXT server is stopped." ; return 1; }
return 0; }
case "$1" in start) log_daemon_msg "Starting NXT server..." "" || true
# check if server is running if [ -e $nxtpid ]; then pid=`cat $nxtpid` var=`ps -p$pid | wc -l`
if [ $var -lt "2" ]; then # clear logfile echo -n > $nxtlog else echo -n " NXT server is already running!" log_end_msg 0 || true exit 0 fi fi # Enable Debug for more info when starting NXT if cat $nxtdir/conf/nxt.properties | grep -q "nxt.debug="; then if cat $nxtdir/conf/nxt.properties | grep -q "nxt.debug=true"; then # Debug is enabled, nothing todo... echo -n "" elif cat $nxtdir/conf/nxt.properties | grep -q "nxt.debug=false"; then echo nxt.debug=true >> $nxtdir/conf/nxt.properties fi else echo nxt.debug=true >> $nxtdir/conf/nxt.properties fi # n minute timeout. sleep $timeout & timerPid=$!
# check log file and generate status-msg; will be killed when server is started or timeout hit tail -q -n0 -F --pid=$timerPid $nxtlog 2> /dev/null | while read line; do
if echo $line | grep -q "Scanning blockchain"; then echo -n " Scanning blockchain" elif echo $line | grep -q "processed block"; then echo -n "." fi
if echo $line | grep -q "started successfully."; then echo -n "NXT server started successfully." log_end_msg 0 || true # stop the timer.. kill $timerPid > /dev/null 2>&1 $nxtdir/traffic_shaper.sh > /dev/null 2>&1 fi done & # start server if start-stop-daemon --start --name nxt --nicelevel $nxtnice --chuid $nxtuser:$nxtgroup --pidfile $nxtpid -m --chdir $nxtdir --exec $java >> $nxtlog 2>&1 -- -Xmx"$maxmem"m -cp $nxt:lib/*:conf nxt.Nxt >> $nxtlog 2>&1 & then # wait for the timer to expire (or be killed) wait %sleep > /dev/null 2>&1 else log_end_msg 1 || true fi ;; stop) log_daemon_msg "Stopping NXT server..." || true
# check if server is running if start-stop-daemon --stop --pidfile $nxtpid > /dev/null 2>&1; then while status > /dev/null; do sleep 1; done echo -n " NXT server stopped." log_end_msg 0 || true rm $nxtpid > /dev/null 2>&1 else echo -n " NXT server is not running!" log_end_msg 0 || true exit 0 fi ;; restart) $0 stop sleep 1 $0 start ;; status) status ;; *) echo "usage:`basename $0` start | stop | restart | status" exit 1 ;; esac
If anyone find something badly wrong, pls tell me! I'm not a php, linux or iptables expert, but I try to do my best Greets, eb
|
|
|
|
rickyjames
|
|
March 16, 2014, 10:44:50 PM |
|
how can I link Ricky?
No prob, I just tweeted him volunteering - I will let you know if I hear anything, thanks for posting the heads up he was looking for contacts.
|
|
|
|
|
brooklynbtc
Sr. Member
Offline
Activity: 336
Merit: 250
AKA jefdiesel
|
|
March 16, 2014, 11:11:52 PM |
|
not working now.. connect() failed: Connection refused connection variant.0 failure error submitting results to (162.217.204.142) retval -1 vs 48 -> switch to (162.217.204.144) NEW block.(2427680280895981793) vs lastblock.(13833505500464351431) 0: GOOD PEER.0 (2901759 458677) 109.87.169.253 state.1 blacklist.false share.true announce.109.87.169.253 downloaded.290156651 uploaded.18444708 1: GOOD PEER.1 (253198 327999) 162.217.203.106 state.1 blacklist.false share.true announce.162.217.203.106 downloaded.1088124 uploaded.1316131 2: GOOD PEER.2 (36715 191156) 162.217.204.38 state.1 blacklist.false share.true announce.162.217.204.38 downloaded.3250738 uploaded.6157631 3: GOOD PEER.3 (2944190 191366) 138.91.4.52 state.1 blacklist.false share.true announce.testnxt-jp.cloudapp.net downloaded.128051412 uploaded.6176910 4: GOOD PEER.4 (167913 195465) 107.170.226.230 state.1 blacklist.false share.true announce.node10.mynxtcoin.org downloaded.9732909 uploaded.137761789 5: GOOD PEER.5 (148816 202070) 162.243.126.110 state.1 blacklist.false share.true announce.node9.mynxtcoin.org downloaded.26166168 uploaded.10190513 6: GOOD PEER.6 (65062 190529) 209.126.73.166 state.1 blacklist.false share.true announce.209.126.73.166 downloaded.2054511 uploaded.6124137 7: GOOD PEER.8 (36801 191596) 209.126.75.130 state.1 blacklist.false share.true announce.209.126.75.130 downloaded.2027089 uploaded.4608605 8: GOOD PEER.9 (120248 212415) 178.162.198.111 state.1 blacklist.false share.true announce.bug.airdns.org downloaded.578768 uploaded.749405 9: GOOD PEER.10 (90031 114932) 192.241.223.132 state.1 blacklist.false share.true announce.192.241.223.132 downloaded.688219 uploaded.644000 10: GOOD PEER.11 (251528 114690) 209.126.74.120 state.1 blacklist.false share.true announce.209.126.74.120 downloaded.9279095 uploaded.6967156 11: GOOD PEER.12 (292540 85560) 162.217.204.28 state.1 blacklist.false share.true announce.162.217.204.28 downloaded.6786889 uploaded.3289142 12: GOOD PEER.13 (77272 8498) 162.217.202.168 state.1 blacklist.false share.true announce.162.217.202.168 downloaded.2184392 uploaded.181774 13: GOOD PEER.14 (108457 8586) 83.212.110.150 state.1 blacklist.false share.true announce.83.212.110.150 downloaded.4222167 uploaded.146522 14: GOOD PEER.15 (224112 165183) 162.217.204.12 state.1 blacklist.false share.true announce.162.217.204.12 downloaded.6442259 uploaded.3296037 15: GOOD PEER.16 (51539 8712) 209.126.73.128 state.1 blacklist.false share.true announce.209.126.73.128 downloaded.2709012 uploaded.164439 16: GOOD PEER.17 (59406 8637) 162.217.203.174 state.1 blacklist.false share.true announce.162.217.203.174 downloaded.2654224 uploaded.180542 17: GOOD PEER.18 (65715 7992) 209.126.73.160 state.1 blacklist.false share.true announce.209.126.73.160 downloaded.1916314 uploaded.183345 18: GOOD PEER.19 (1560964 2277487) 23.97.135.119 state.1 blacklist.false share.true announce.testnxt-we.cloudapp.net downloaded.101856605 uploaded.41129862 19: GOOD PEER.20 (95447 9150) 209.126.74.122 state.1 blacklist.false share.true announce.209.126.74.122 downloaded.4013920 uploaded.251659 20: GOOD PEER.21 (252716 78371) 162.217.203.16 state.1 blacklist.false share.true announce.162.217.203.16 downloaded.5259173 uploaded.2855958 20: GOOD PEER.22 (2024640 2553411) 137.135.208.131 state.1 blacklist.false share.true announce.testnxt-ne.cloudapp.net downloaded.102871165 uploaded.47500423 numactivepeers.20 connect() failed: Connection refused
|
|
|
|
|
brooklynbtc
Sr. Member
Offline
Activity: 336
Merit: 250
AKA jefdiesel
|
|
March 16, 2014, 11:42:37 PM |
|
does say right on the front page Log in with your TestNet account - not your real one!
|
|
|
|
salsacz
|
|
March 16, 2014, 11:47:20 PM |
|
1) the front page doesn't count coz it disappears
2) I still don't know if it makes real accounts or not. I just got this number there: 6365394688875287683 - what happens if I send there my Nxt from Cryptsy?
|
|
|
|
rdanneskjoldr
|
|
March 16, 2014, 11:52:23 PM |
|
I think an extra advertisement as salsacz says would help.It says it before you log in,and in the dashboard,,but it should be more clear imo.
|
|
|
|
dhit
Newbie
Offline
Activity: 20
Merit: 0
|
|
March 17, 2014, 12:05:21 AM |
|
I'd love to mine for NXT, but I don't have a miner, nor any idea how to get one, or set one up.. Other than that, I'd be right there with you guys.
To the guy with the 15 year old who wants to learn code & work on CCs, I'd do whatever you can to encourage him or her to do so. They'll figure it out for themselves if they need to take on other work to make money, but pursuing something you're really interested in.. That possibility is invaluable. I concluded myself that I should focus on non-computer related work to make money. I can't say I regret it, but 15 years old was a looooong time ago for me, and I can't tell you how many times I almost learned something to get distracted by girls, work, etc., and never got back around to it.
I'm very excited about all this decentralized tech stuff, and I decided to put virtually all of my non-BTC holdings in NXT. I don't really get peoples' concern for the distribution. That's probably the least important quality to me, but then I'm not looking to get rich, really. I'm much more excited about the potential of the technology. NXT seems to be the most exciting, and I can't wait to see the Zerocoin implementation.
I have a couple of questions.. How do I use the messaging on the NXT network? Will it be easier, or less expensive, to acquire NXT when the exchange is open for business? When will I be able to insert some of this paper money into my computer, and get some NXT, like in that gif I saw a little while ago?
|
|
|
|
Sebastien256
|
|
March 17, 2014, 12:52:59 AM |
|
Anyone know who (NXT account) is dumping NXT like that and how many NXT still left to dump? That large amount of NXT selling would be better done off exchange. I think it may scare out a lot of people.
|
|
|
|
jl777
Legendary
Offline
Activity: 1176
Merit: 1134
|
|
March 17, 2014, 12:56:11 AM |
|
not working now.. connect() failed: Connection refused connection variant.0 failure error submitting results to (162.217.204.142) retval -1 vs 48 -> switch to (162.217.204.144) NEW block.(2427680280895981793) vs lastblock.(13833505500464351431) 0: GOOD PEER.0 (2901759 458677) 109.87.169.253 state.1 blacklist.false share.true announce.109.87.169.253 downloaded.290156651 uploaded.18444708 1: GOOD PEER.1 (253198 327999) 162.217.203.106 state.1 blacklist.false share.true announce.162.217.203.106 downloaded.1088124 uploaded.1316131 2: GOOD PEER.2 (36715 191156) 162.217.204.38 state.1 blacklist.false share.true announce.162.217.204.38 downloaded.3250738 uploaded.6157631 3: GOOD PEER.3 (2944190 191366) 138.91.4.52 state.1 blacklist.false share.true announce.testnxt-jp.cloudapp.net downloaded.128051412 uploaded.6176910 4: GOOD PEER.4 (167913 195465) 107.170.226.230 state.1 blacklist.false share.true announce.node10.mynxtcoin.org downloaded.9732909 uploaded.137761789 5: GOOD PEER.5 (148816 202070) 162.243.126.110 state.1 blacklist.false share.true announce.node9.mynxtcoin.org downloaded.26166168 uploaded.10190513 6: GOOD PEER.6 (65062 190529) 209.126.73.166 state.1 blacklist.false share.true announce.209.126.73.166 downloaded.2054511 uploaded.6124137 7: GOOD PEER.8 (36801 191596) 209.126.75.130 state.1 blacklist.false share.true announce.209.126.75.130 downloaded.2027089 uploaded.4608605 8: GOOD PEER.9 (120248 212415) 178.162.198.111 state.1 blacklist.false share.true announce.bug.airdns.org downloaded.578768 uploaded.749405 9: GOOD PEER.10 (90031 114932) 192.241.223.132 state.1 blacklist.false share.true announce.192.241.223.132 downloaded.688219 uploaded.644000 10: GOOD PEER.11 (251528 114690) 209.126.74.120 state.1 blacklist.false share.true announce.209.126.74.120 downloaded.9279095 uploaded.6967156 11: GOOD PEER.12 (292540 85560) 162.217.204.28 state.1 blacklist.false share.true announce.162.217.204.28 downloaded.6786889 uploaded.3289142 12: GOOD PEER.13 (77272 8498) 162.217.202.168 state.1 blacklist.false share.true announce.162.217.202.168 downloaded.2184392 uploaded.181774 13: GOOD PEER.14 (108457 8586) 83.212.110.150 state.1 blacklist.false share.true announce.83.212.110.150 downloaded.4222167 uploaded.146522 14: GOOD PEER.15 (224112 165183) 162.217.204.12 state.1 blacklist.false share.true announce.162.217.204.12 downloaded.6442259 uploaded.3296037 15: GOOD PEER.16 (51539 8712) 209.126.73.128 state.1 blacklist.false share.true announce.209.126.73.128 downloaded.2709012 uploaded.164439 16: GOOD PEER.17 (59406 8637) 162.217.203.174 state.1 blacklist.false share.true announce.162.217.203.174 downloaded.2654224 uploaded.180542 17: GOOD PEER.18 (65715 7992) 209.126.73.160 state.1 blacklist.false share.true announce.209.126.73.160 downloaded.1916314 uploaded.183345 18: GOOD PEER.19 (1560964 2277487) 23.97.135.119 state.1 blacklist.false share.true announce.testnxt-we.cloudapp.net downloaded.101856605 uploaded.41129862 19: GOOD PEER.20 (95447 9150) 209.126.74.122 state.1 blacklist.false share.true announce.209.126.74.122 downloaded.4013920 uploaded.251659 20: GOOD PEER.21 (252716 78371) 162.217.203.16 state.1 blacklist.false share.true announce.162.217.203.16 downloaded.5259173 uploaded.2855958 20: GOOD PEER.22 (2024640 2553411) 137.135.208.131 state.1 blacklist.false share.true announce.testnxt-ne.cloudapp.net downloaded.102871165 uploaded.47500423 numactivepeers.20 connect() failed: Connection refused
Just updating networking stuff. Let me know if it is still broken. Are you getting coins?
|
|
|
|
Gaman
|
|
March 17, 2014, 12:57:20 AM |
|
Anyone know who (NXT account) is dumping NXT like that and how many NXT still left to dump? That large amount of NXT selling would be better done off exchange. I think it may scare out a lot of people.
Wow big dump in NXT ... it is now 0.00004+. I have been buying since 0.00009+. I will keep on buying loads of NXT now. Whoever is dumping is either giving his NXT cheaply to the community or shortsighted. BUY BUY BUY!
|
|
|
|
dhit
Newbie
Offline
Activity: 20
Merit: 0
|
|
March 17, 2014, 01:15:35 AM |
|
Anyone know who (NXT account) is dumping NXT like that and how many NXT still left to dump? That large amount of NXT selling would be better done off exchange. I think it may scare out a lot of people.
Is there such a thing as a localbitcoins for NXT?
|
|
|
|
hardalisas
|
|
March 17, 2014, 01:33:21 AM |
|
Anyone know who (NXT account) is dumping NXT like that and how many NXT still left to dump? That large amount of NXT selling would be better done off exchange. I think it may scare out a lot of people.
Wow big dump in NXT ... it is now 0.00004+. I have been buying since 0.00009+. I will keep on buying loads of NXT now. Whoever is dumping is either giving his NXT cheaply to the community or shortsighted. BUY BUY BUY! I am not dumping, just riding the wave.
|
|
|
|
Mistafreeze
|
|
March 17, 2014, 01:35:37 AM |
|
1) the front page doesn't count coz it disappears
2) I still don't know if it makes real accounts or not. I just got this number there: 6365394688875287683 - what happens if I send there my Nxt from Cryptsy?
It'll end up in an account on Mainnet with the same account number.
|
|
|
|
cc5alive
|
|
March 17, 2014, 01:47:47 AM |
|
Would love to contribute my 1.5 Mh/s to this pool! Invite please!
|
|
|
|
bitcoinrocks
Legendary
Offline
Activity: 1372
Merit: 1000
|
|
March 17, 2014, 01:52:50 AM |
|
Which exchange has the most Nxt volume? Is it DGEX?
|
|
|
|
hardalisas
|
|
March 17, 2014, 01:55:58 AM |
|
Which exchange has the most Nxt volume? Is it DGEX?
bter, DGEX is history.
|
|
|
|
xyzzyx
Sr. Member
Offline
Activity: 490
Merit: 250
I don't really come from outer space.
|
|
March 17, 2014, 02:04:56 AM |
|
Which exchange has the most Nxt volume? Is it DGEX?
http://coinmarketcap.com/volume.html#nxt
|
"An awful lot of code is being written ... in languages that aren't very good by people who don't know what they're doing." -- Barbara Liskov
|
|
|
|