AlexGR
Legendary
Offline
Activity: 1708
Merit: 1049
|
|
September 13, 2015, 01:53:15 AM |
|
The whole Dash ecosystem seems to be going through a major growth period right now with all these third party services springing up - not to mention actual retail adoption.
It doesn't matter that it's only a handful - precedent is being set.
I read in a Greek forum the other day about the first online shop for technology products that accepts BTC around here, and it is a simultaneous "first" with LTC and DASH (they accept BTC/LTC/DASH). Good stuff.
|
|
|
|
Solarminer
|
|
September 13, 2015, 02:42:42 AM |
|
And now, I announce the first ever automated block checking and restart script for your masternodes. #!/bin/bash blockold=$(/home/dash/dash-cli getinfo | grep "blocks" | grep -Eo '[0-9]{6,100}') while true do sleep 1000 blocknew=$(/home/dash/dash-cli getinfo | grep "blocks" | grep -Eo '[0-9]{6,100}') if [ $blocknew -gt $blockold ] then blockold=$blocknew else tail -n 30 /home/dash/.dash/debug.log >> crash.log /home/dash/dash-cli stop sleep 30 pkill -9 dashd sleep 10 /home/dash/dashd sleep 60 blockold=$(/home/dash/dash-cli getinfo | grep "blocks" | grep -Eo '[0-9]{6,100}') fi done
This program grabs the current block. Then waits 16 minutes(longest block I found was about 13 minutes) and checks that block. If the new block is bigger it stores the new block as the old and waits another 16 minutes. If the old block is not bigger we assume dashd is locked up. It first logs the last 30 lines of the debug.log and tries to shutdown nicely. And if that doesn't work it kills the process. Then restarts and finds blocks again. This should also restart the dashd if it doesn't get any output(like if it isn't running). So for those with more than one masternode on a server, you should change dashd to dashd1, dashd2, etc. Then use pkill -9 dashd1, dashd2, etc. If you just use dashd it will shut anything down with dashd in it. If there is any interest, I could make a script for multiple nodes. Start from crontab or with screen. Go back a dozen pages for more info on those options. As of last night, I found 122 recent blocks (since 300000) over 1000 seconds apart. (ranging from 17 to 40 minutes) (block number, seconds since last, pasted here): https://www.zerobin.net/?4ac778770e4c182a#sBpr6QYqHJSVW8tgPgTegOKgsgoVYpYqQ5/9Tvy9U9s=Your 1000 second sleep isn't long enough. You'll end up restarting unnecessarily. I'm sure there's better test criteria to use, but I don't have any suggestions at this time. Also, during shutoff 'dashd' renames its process to 'dash-shutoff' I'm not sure if pkill will pick that up. killall doesn't. I do 'dash-cli stop ; sleep 20 ; killall -9 dashd dash-shutoff' to allow the daemon time to shutdown and to be sure I've killed the (probably hung-on-closing) dashd (now named dash-shutoff) HTH BTW, I run several hundred instances of dashd, and haven't found a need to force-restart due to hangs. Version 12.0.53 has proven very stable for me. If you are having recurring hangs, check your hosting/build environment. I use the gitian-built distributed files from https://www.dashpay.io/downloads/I use DigitalOcean to host my masternodes Thanks Moocowmoo. I figured there would be tweaks on this. It makes sense to change the sleep to 2500 (about 41 minutes). Should be good enough for 99.9% of the blocks. It is still before the 70 minutes that you get kicked off the pay queue if you don't restart in time. Thanks for the info on the kill dash-shutoff. I haven't had any problems with .53 either. But .51, .49, ... didn't do so well. Usually, they just drop off. When we have new releases, it is a very good idea to have something like this running. Actually, using block number makes determining if the dashd is actually running much easier and more robust. Instead of looking at this program like a crutch for the current version, think of it like a safety net so you can really throw out innovative and ground breaking features. And just like the other restart scripts. You can start with screen so it runs when you logout. to start with screen type: screen -dm /blockcheck.sh This will run forever, so if you want it to stop type screen -ls and get the number replace that with the 11111 below. screen -X -S 11111 kill You could also email yourself if you did restart with this command by adding this near the last /home/dash/dashd line. ssmtp user@something.com < /home/dash/m.txt Assumes you setup this script first. https://dashtalk.org/threads/v12-release.5888/page-32#post-64582
|
|
|
|
Solarminer
|
|
September 13, 2015, 02:48:20 AM |
|
thx for the "better" details
I had changed it to 2000 sec. I'll alter my version further - your the BEST moocowmoo :-D
Thanks MangledBlue. I just let this run overnight (inefficient as hell, but I wasn't in a rush): for blocknum in `seq $(dash-cli getblockcount)` do echo -n "$blocknum : " ; dash-cli getblock `dash-cli getblockhash $blocknum` | grep time done > blocktimes.txt & then slapped together this perl script to zipper up the deltas: #!/usr/bin/perl
my $prev_time; while (<>) { ($block, undef, $time) = split /:/; print $block, ' ', $time - $prev_time . "\n"; $prev_time = $time; }
exit; Then: cat blocktimes.txt | ./parse_bloktime.pl > blocktimes_delta.txt to get the list. Opened that in vim, run some buffer sorts "%:!sort -n -k2", and extracted the relevant info. I don't really know what any of that does, per se but it looks really cool - lol doin bash stuff maybe perl later on... ha I wish I did know perl I'd like to someday be something like: BASF (we don't make things - we make things better) Not really better in the CODE but more "visually" pleasing I guess.... too the end-user Having a few pints actually and drifting off into dream world for a sec so....... cheers - good stuff as always...... I am impressed with this too. Kind of like looking at a piece of art. I do see the dash-cli getblock. We could used that instead of my complicated dash-cli with grep commands.
|
|
|
|
Solarminer
|
|
September 13, 2015, 02:56:36 AM |
|
Holy Shit! Thank You anonymous tipper! 22 dash! w00t!
Well deserved for your work on dashman, among other countless contributions! I highly recommend it for all current or potential masternode owners. I second this. Fantastic time saver when used with SuperPutty for multiple nodes. Another good ssh client is Bitvise SSH. It not only saves login info, but it also does file transfers over ssh.
|
|
|
|
cinnamon_carter
Legendary
Offline
Activity: 1148
Merit: 1018
It's about time -- All merrit accepted !!!
|
|
September 13, 2015, 03:02:55 AM |
|
said it before and want to say again,
for such a popular coin/project it could actually be greatly improved from it's most serious flaw --
verifiable research in cryptography with alt coins that use multiple algorithms are only at best (and even this is a stretch) secure as the weakest of the algorithms used.
this project has some aspects i have criticized in the past and still feel the same i will not bring up again as my intention is to give some constructive input here.
i think a smart move on the part of the dev. team would be to use a single algorithm, the best choices would probably be one of the sha 3 candidates --- much much more secure than current design....
|
Check out my coin Photon Merge Mine 5 other Blake 256 coins - 6x your hash power https://www.blakecoin.org/The obvious choice is not always the best choice. LOOK DEEPER - Look into the Blake 256 Family -- CC
|
|
|
Jestah
|
|
September 13, 2015, 03:03:24 AM |
|
Holy Shit! Thank You anonymous tipper! 22 dash! w00t!
Well deserved for your work on dashman, among other countless contributions! I highly recommend it for all current or potential masternode owners. I second this. Fantastic time saver when used with SuperPutty for multiple nodes. Another good ssh client is Bitvise SSH. It not only saves login info, but it also does file transfers over ssh. I've always used WinSCP and putty for all my Linux boxes.....but I saw someone mention super putty....awesome to have tabbed servers. Thank you whoever you are. Going to check out bitvise now.
|
|
|
|
moocowmoo
|
|
September 13, 2015, 03:08:18 AM |
|
I am impressed with this too. Kind of like looking at a piece of art. I do see the dash-cli getblock. We could used that instead of my complicated dash-cli with grep commands.
Thanks, is just what 20 years of hacking on linux does to a person. What you want isn't getblock, it's getblockcount. I don't really know what any of that does, per se but it looks really cool - lol
take it apart, run the pieces, learn how the pieces work together. for blocknum in `seq $(dash-cli getblockcount)` do echo -n "$blocknum : " ; dash-cli getblock `dash-cli getblockhash $blocknum` | grep time done > blocktimes.txt & the outer loop "for x in list ; do stuff ; done" reads: for each of the values supplied by the command in the backticks put the value in the variable named blocknum and run everything between do and done put all its printed lines in a file called blocktimes.txt
the outer backtick command "`seq $(dash-cli getblockcount)`" reads: spit out the numbers from one to the number returned by the command dash-cli getblockcount
the do,done line reads: print out the contents of blocknum, plus a space, with no newline then using the contents of blocknum, get the output from the command dash-cli getblockhash $blocknum and hand it to the command dash-cli getblock then filter out all lines not containing the word time
The trailing ampersand runs the whole job in the background.
I wish I did know perl
no. no you don't. really. python is a much better language to start out with. you can learn some /really/ bad habits starting out, due to perls flexibility.
|
|
|
|
moocowmoo
|
|
September 13, 2015, 03:16:52 AM Last edit: September 13, 2015, 03:35:15 AM by moocowmoo |
|
verifiable research in cryptography with alt coins that use multiple algorithms are only at best (and even this is a stretch) secure as the weakest of the algorithms used.
Please explain your position better. If collisions were discovered in one of the eleven sha3 candidate algorithms used in Dash, how would that be useful to an attacker? Have any weaknesses been discovered for any of the following algorithms used? blake bmw groestl jh keccak skein luffa cubehash shavite simd echo To clarify my position: only a weakness in the first hash blake, where the attacker has some possibility of controlling the input, might be an issue. I believe it is simply too difficult to accomplish a hash collision further down the chain due to the extreme unpredictability of the previous round output. And, doubt the usefulness of accomplishing such a collision in the first place. (collision space (available input byte variation) is generally way too tiny to do anything useful, except in certain unstructured cases (like the md5 pdf hack, where you have TONS of wiggle room to play with input variants, not to mention it's a static document. The blockchain is *constantly* moving, further frustrating any possible brute force collision search.)) But, I'm an armchair cryptographer, so take this with a grain of salt. Corrections welcome.
|
|
|
|
crowning
Full Member
Offline
Activity: 212
Merit: 100
Activity: -42
|
|
September 13, 2015, 04:12:22 AM |
|
If collisions were discovered in one of the eleven sha3 candidate algorithms used in Dash, how would that be useful to an attacker? I don't think that a collision is useful in real life, but his statement is true. Let's say you brute-force X11 for collisions, and that c1, c2, ..., c11 are the number of collisions each algorithm has (which might be zero, but nobody knows yet). The number of collisions you'll find is (c1 + c2 + ... + c11) minus the cases where the result of a collision of one algorithm would produce a collision on one or more of the following algorithms. Of course the difference is negligible because we all most probably won't live long enough to find even 1 collision in one algorithm, and even if we'd find one it would be of no practical use, but the difference is definitely there.
|
|
|
|
|
moocowmoo
|
|
September 13, 2015, 04:33:29 AM |
|
If collisions were discovered in one of the eleven sha3 candidate algorithms used in Dash, how would that be useful to an attacker? I don't think that a collision is useful in real life, but his statement is true. Let's say you brute-force X11 for collisions, and that c1, c2, ..., c11 are the number of collisions each algorithm has (which might be zero, but nobody knows yet). The number of collisions you'll find is (c1 + c2 + ... + c11) minus the cases where the result of a collision of one algorithm would produce a collision on one or more of the following algorithms. Of course the difference is negligible because we all most probably won't live long enough to find even 1 collision in one algorithm, and even if we'd find one it would be of no practical use, but the difference is definitely there. An impractical difference for sure. I still believe that finding a collision in any particular algo wouldn't benefit an attacker due to the complexity (ginormous, humongous namespace) surrounding the point being attacked. Needles in haystacks in neighboring galaxies. Only the beginning of the chain concerns me, and that's the exact same scenario for a single-algo configuration. So, for Dash, I'd want blake heavily vetted.
|
|
|
|
TanteStefana2
Legendary
Offline
Activity: 1260
Merit: 1001
|
|
September 13, 2015, 05:30:11 AM |
|
RE: WastedLTC,
$ dash-cli masternode winners 2000 | grep Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw "333774" : "Xcaj3MuJNCYWy5GQD3LxBq4fsc2X9h5obW:8, XdcKK8eFkabsHGrngymy3zfUKgQe2ZE7jv:1, Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw:1", "333828" : "XfThq3Rj9w1cnsUk7aAdPqnniV7Fexq1A2:9, Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw:1",
I guess someone else got more votes, thing I dont understand is, don't the people in the pool that didn't win, get put back in the pool for another chance? Gotta Read eduffield's post again....
When you see 1 vote, that's not enough to actually make the system skip. It skips on 2 or more. Exactly, so why isn't he paid in 12 days? I see nothing where he won 2 or more votes.
|
Another proud lifetime Dash Foundation member My TanteStefana account was hacked, Beware trading "You'll never reach your destination if you stop to throw stones at every dog that barks."Sir Winston Churchill BTC: 12pu5nMDPEyUGu3HTbnUB5zY5RG65EQE5d
|
|
|
|
hogwild
Newbie
Offline
Activity: 11
Merit: 0
|
|
September 13, 2015, 06:12:12 AM |
|
With the budget voting now in place do you need to change the "masternode share" column from 50% to 45%?
|
|
|
|
moocowmoo
|
|
September 13, 2015, 06:15:21 AM Last edit: September 13, 2015, 06:44:52 AM by moocowmoo |
|
With the budget voting now in place do you need to change the "masternode share" column from 50% to 45%? No. The block rewards are reduced to 90% on the second line (green row). Masternodes and miners receive 50% each of the remainder.
|
|
|
|
ITileclooTI
Member
Offline
Activity: 98
Merit: 10
|
|
September 13, 2015, 07:52:16 AM |
|
I sunk roughly few weeks paycheck into getting few thousand of dash so in the end I'm fine to just sit back and wait to see what happens. If nothing ever comes of that then oh well. But if things take off then I'll be able to forgive myself for not spending 1 week's paycheck on btc back around 2011.
|
|
|
|
kadrek
|
|
September 13, 2015, 08:19:46 AM |
|
Is there still no way to have a "pooled" masternode while keeping your coins under your control?
|
SWIPE │ │ │ Monetizing mobile engagement data, on the blockchain [ SWIPE . WHITEPAPER ] TELEGRAM TWITTER MEDIUM REDDIT
|
|
|
qwizzie
Legendary
Offline
Activity: 2548
Merit: 1245
|
|
September 13, 2015, 08:52:40 AM Last edit: September 13, 2015, 09:11:29 AM by qwizzie |
|
RE: WastedLTC,
$ dash-cli masternode winners 2000 | grep Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw "333774" : "Xcaj3MuJNCYWy5GQD3LxBq4fsc2X9h5obW:8, XdcKK8eFkabsHGrngymy3zfUKgQe2ZE7jv:1, Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw:1", "333828" : "XfThq3Rj9w1cnsUk7aAdPqnniV7Fexq1A2:9, Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw:1",
I guess someone else got more votes, thing I dont understand is, don't the people in the pool that didn't win, get put back in the pool for another chance? Gotta Read eduffield's post again....
When you see 1 vote, that's not enough to actually make the system skip. It skips on 2 or more. Exactly, so why isn't he paid in 12 days? I see nothing where he won 2 or more votes. His MN payments seem to have been regular untill 01-09-2015 at which he made a selfpayment of 28,5 Dash, making his balance 1000 again. At this point i would seriously think about stopping the server and at least remove the peers.dat & mncache before restarting it, maybe some clients got him blocked ? More draconic measures would be to delete everything (except dash.conf & wallet.dat & masternode.conf) and resync from scratch. Then keep an eye on the number of votes that masternode is getting afterwards with command : "$ dash-cli masternode winners 2000 | grep Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw" to see if it gets more votes. Edit :
* keep a copy of your debug.log in case dev-team needs it * avoid using any auto-restart scripts for now so you will have an indication if your masternode is having server problems or not, with v0.12.0.53 it really shouldn't need a restart script anyways.
|
Learn from the past, set detailed and vivid goals for the future and live in the only moment of time over which you have any control : now
|
|
|
TanteStefana2
Legendary
Offline
Activity: 1260
Merit: 1001
|
|
September 13, 2015, 08:57:56 AM |
|
RE: WastedLTC,
$ dash-cli masternode winners 2000 | grep Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw "333774" : "Xcaj3MuJNCYWy5GQD3LxBq4fsc2X9h5obW:8, XdcKK8eFkabsHGrngymy3zfUKgQe2ZE7jv:1, Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw:1", "333828" : "XfThq3Rj9w1cnsUk7aAdPqnniV7Fexq1A2:9, Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw:1",
I guess someone else got more votes, thing I dont understand is, don't the people in the pool that didn't win, get put back in the pool for another chance? Gotta Read eduffield's post again....
When you see 1 vote, that's not enough to actually make the system skip. It skips on 2 or more. Exactly, so why isn't he paid in 12 days? I see nothing where he won 2 or more votes. His MN payments seem to have been regular untill 01-09-2015 at which he made a selfpayment of 28,5 Dash, making his balance 1000 again. At this point i would seriously think about stopping the server and at least remove the peers.dat & mncache before restarting it, maybe some clients got him blocked ? More draconic measures would be to delete everything (except dash.conf & wallet.dat & masternode.conf) and resync from scratch. Then keep an eye on the number of votes that masternode is getting afterwards with command : "$ dash-cli masternode winners 2000 | grep Xb7qiTRzJJewfby9eXGeAcYMN7RNGgPnBw" to see if it gets more votes. sound suggestions, thanks!
|
Another proud lifetime Dash Foundation member My TanteStefana account was hacked, Beware trading "You'll never reach your destination if you stop to throw stones at every dog that barks."Sir Winston Churchill BTC: 12pu5nMDPEyUGu3HTbnUB5zY5RG65EQE5d
|
|
|
TaoOfSaatoshi
Legendary
Offline
Activity: 2156
Merit: 1014
Dash Nation Founder | CATV Host
|
|
September 13, 2015, 09:16:53 AM |
|
The dumper returns... Damn it, I thought he was done!
|
|
|
|
|