Bitcoin Forum
June 20, 2024, 06:04:32 PM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 ... 163 »
301  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 04, 2015, 12:36:08 PM
I have added android development to the long list of things I do badly.   Cheesy



Needs a bit of polish but works on my GS2.  

There's an apk here if anyone wants to test it: http://s000.tinyupload.com/?file_id=94269125168536291897

Remember, you get what you pay for.  Grin
302  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 03, 2015, 11:59:09 AM
To got it working I had to install Qpython or Qpython3 and change '/storage/sdcard0/mybanknodes.txt' to '/storage/emulated/0/mybanknodes.txt'

I'm on Sammy Note4 Android 5.0.1 and what i read sdcard/emulated/0/ must be used in any android 4.2 => versions.

I'm still using my old Galaxy S2. Smiley

New version checks for stuff in current working directory, it should tell you where to put your mybanknodes.txt if it doesn't find it:

Code:
#!/usr/bin/python

import sys, os, urllib, time, datetime, urllib2, re

def felch():

#set up paths
cwd = os.getcwd()
logpath = os.path.join(cwd, "mybanknodes.log")
mybanknodespath = os.path.join(cwd, "mybanknodes.txt")

#check if mybanknodes.txt exists, if not abort
if not os.path.isfile("mybanknodes.txt"):
print 'No mybanknodes.txt file found!'
print 'Please create one here: ' + mybanknodespath
print 'Place one BCR address on each line.'
sys.exit()

#check if mybanknodes.log exists, if not create it and stick a timestamp in it
if not os.path.isfile("mybanknodes.log"):
nowtime = datetime.datetime.now()
with open(logpath, "w") as myfile:
    myfile.write(str(nowtime) + "\n")

#build list of previous balances
prevbalancelist = []
floatlistold = []
with open(logpath, mode="r") as f:
#skip 1st line, instead store it as timestamp so we can compute the temporal delta - sounds fancy, eh?
timestampold = f.readline().rstrip('\n')
try:
thentime = datetime.datetime.strptime(timestampold, "%Y-%m-%d %H:%M:%S.%f")
#print 'Timestamp in mybanknodes.log: ' + str(thentime)
except:
print "Couldn't parse timestamp in mybanknodes.log!"
#carry on
a = [line.strip() for line in f]
for line in a:
#strip off 1st 17 chars, should leave us with just the numbers
prevbalancelist.append(line[17:])

#convert prevbalancelist to floats
floatlistold = [float(i) for i in prevbalancelist]

#get time for mybanknodes.log timestamp
nowtime = datetime.datetime.now()
print nowtime

#write timestamp to mybanknodes.log in writemode, incidentally erases previous file contents, making life simpler and preventing logfileaphantitis
with open(logpath, "w") as myfile:
    myfile.write(str(nowtime) + "\n")
   
#open mybanknknodes file
print 'Felching Banknode balances...'
print 'Querying ' + mybanknodespath

#loop through lines in file and query chainz for each address
with open(mybanknodespath, mode="r") as f:
a = [line.strip() for line in f]
itemindex = 0
delta = "0"
floatdelta = 0
deltatotal = 0
total = 0
print 'Address:\tBalance:\tChange:'
for line in a:
address = line[0:34]
######################################################### need to fool cloudflare!
      site = ("http://chainz.cryptoid.info/bcr/api.dws?q=getbalance&a=" + address)
      hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
       'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
       'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
       'Accept-Encoding': 'none',
       'Accept-Language': 'en-US,en;q=0.8',
       'Connection': 'keep-alive'}
      ######################################################### cloudflare hoodwinked!
req = urllib2.Request(site, headers=hdr)
      try:
page = urllib2.urlopen(req)
      except urllib2.HTTPError, e:
print e.fp.read()
data = page.read()

#compare data (balance we just felched) with previous balance stored in floatlistold
floatdata = float(data)
try:
    old = floatlistold[itemindex]
    floatdelta = floatdata - old
    delta = str(floatdelta)
    #print ("prevbal: " + str(old) + " - currentbal: " + str(floatdata) + " - delta: " + delta)
except IndexError:
print "Note: empty logfile as 1st run, can't compare past results."

#truncate address string to save space and print result of our little exercise
print(address[:3] + ' ... ' + address[-3:] + '\t' + data + "\t(+ " + delta + ")")

#append result for each line to mybanknodes.log
with open(logpath, "a") as myfile:
    myfile.write(address[:3] + ' ... ' + address[-3:] + '\t Bal: ' + data + "\n")

#update running total
b = float(re.sub("[^0-9.]", " ", (data)))
total = total + b

#sync list item with file line
itemindex = itemindex + 1
deltatotal = deltatotal + floatdelta

#compute temporal delta!
try:
thentime = datetime.datetime.strptime(timestampold, "%Y-%m-%d %H:%M:%S.%f")
except:
print "Couldn't parse timestamp in mybanknodes.log!"

try:
delta = nowtime - thentime
#print 'Your Banknodes have earned ' + str(deltatotal) + ' BCR in ' + str(delta)
print 'Your have earned ' + str(deltatotal) + ' BCR since'
print 'last check @ ' + timestampold
print '(' + str(delta) + ' ago.)'
except:
print "Couldn't compute temporal delta!"

#print total
print "Total: " + str(total) + " BCR"

#exit
sys.exit()

#shindig!
felch()
303  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 03, 2015, 10:46:20 AM
Upgraded BCR address checker script a little:



Now stores the results of your last check and gives you any delta. Will post script later when I'm finished sunbathing. Smiley

Still uses the chainz API though, which lags the blockchain by hours, I could grab realtime balances with a bit of html parsing but doing that's a lot slower. Will continue noodling when I can. Not sure the microsecond precision is needed...

304  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 03, 2015, 10:30:15 AM
I got it to work with the QT just one node

The deamon didn't seem to do anything

I'll fire up the others shortly so AU is back online

Edit: Multiple user accounts doesn't work - only 2 can run else windows detects and doesn't allow the 3rd or more

Really, the simplest solution to to rent a *buntu 14.04 / 14.10 VPS for a few dollars a month. You can easily fit 5 BNs on a 1GB server, 10 on a 2GB RAM server... etc. Cutting and pasting a few commands into a terminal window is surely easier than buggering about with Windows...
305  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 02, 2015, 01:48:30 PM

Any ideas for simple BNs monitoring ?

nagios.. shell script.. a bit of python... and I would say, that's it. =)

Code:
#!/usr/bin/python

import sys, os, urllib, time, urllib2, re

def felch():
print 'Felching Banknode balances...'

now = time.strftime("%c")
print now

total = 0

m = 'mybanknodes.txt'
with open(m, mode="r") as f:
a = [line.strip() for line in f]
for line in a:
address = line[0:34]
######################################################### need to fool cloudflare!
      site = ("http://chainz.cryptoid.info/bcr/api.dws?q=getbalance&a=" + address)
      hdr = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
      'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
      'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
      'Accept-Encoding': 'none',
      'Accept-Language': 'en-US,en;q=0.8',
      'Connection': 'keep-alive'}
      ######################################################### cloudflare hoodwinked!
req = urllib2.Request(site, headers=hdr)
      try:
page = urllib2.urlopen(req)
      except urllib2.HTTPError, e:
print e.fp.read()
data = page.read()

print(address + '\t Balance: ' + data)

b = float(re.sub("[^0-9.]", " ", (data)))
total = total + b

print "Total: " + str(total) + " BCR"

sys.exit()

felch()

Save as mybanknodes.py in same directory as your mybanknodes.txt and run with 'python mybanknodes.py'

Anyone with rudimentary java experience should be able to knock up an android version in minutes.

edit: actually this works fine on android if you have python installed, but you have to specify the full path to mybanknodes.txt, eg. change m = 'mybanknodes.txt' to m = '/storage/sdcard0/mybanknodes.txt' if you've stuck it in the root dir of your onboard memory.




Dog almighty I'd forgotten how easy everything is in python.  Cheesy

I might jazz it up a bit to give you the delta since you last checked.
306  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 02, 2015, 11:48:02 AM
@bitcreditscc - should we just get rid of the 2nd tab in the banknodes page? It's useless for anything other than a single BN and just confuses people. Or I could at least make it clearer in there that this is for one BN only and trying to set up multiple BNs this way isn't going to work.

Eventually I'd like to either replace it with something better or improve it but I haven't had the time yet and me doing anything low-level might be dangerous.  Cheesy
307  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 02, 2015, 11:38:29 AM
Still wondering how to get multiple BN's working in Windows

Once you create more than 1 inside the QT then close and re-open it only the last one created displays not however many you create


Run the daemons (bitcreditd) separately under different users, or with different datadirs and confdirs set for each instance, and appropriate bitcredit.conf files for each user/instance, ie. your port/rpcport and banknodeprivkeys need to be different in each bitcredit.conf file.

Until I or someone else gets around to writing a BCR-specific guide, use one of the many DASH Masternode guides, same thing, just replace dashd with bitcreditd, and you need bitcredit-cli to issue commands to the daemon, eg. 'bitcredit-cli banknode start,' not 'bitcreditd banknode start.' BCR is a version of Bitcoin Core ahead of them currently.

308  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 02, 2015, 11:34:28 AM
@thelonecrouton

1. I have tried to apply your stylesheets without success (qss in the same location as wallet.dat), every time I try to select a theme, browsing files force closes all wallet. All the same with clean new wallet.

2. So far mybanknodes.txt didn't worked for me too (same location as wallet.dat)

addresses are in a few rows like this :

xGCvyHbhjbJNkjnKNMkmKMKmkMKmk
hbhBUHJjikjiuhYGytgYGujikMIKmiMIiJM



Anyone know some good and tested android app that can track few BCR wallet addresses, monitoring banknodes is now another pain in the ass, tracking this in desktop browser tabs is also not easy, it has to be an easier way.


mybanknodes.txt didn't work here to.


Are you using Windows? If you're using the last Windows build then I'm not sure the mybanknodes thing was included yet.

If you're on linux and compiling from the master branch then it should work, has done for me on all the boxes I've tried it on.

When it's in the Windows build, make sure Windows isn't adding some additional file extension to it.
309  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: July 01, 2015, 07:58:43 PM
Another quick'n'dirty mock up from Crouton's Lunchbreak Factory, of how our assets might be displayed once distribution by tender is implemented:



The big white space might one day soon display an advert. Before you all mutiny and throw up over the idea of in-wallet advertising, consider that any ad revenue is going to be contributing directly to the numbers up above, ie. how much your BCR is worth.  Advertisers want to monetise our userbase, we'll monetise them right back.

And we can have an option to turn the ads off if your BCR balance is > xxx BCR or something.
310  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 30, 2015, 08:11:23 PM
Slightly wordier version of crouton's "PoW is imbecilic" rant: http://motherboard.vice.com/read/bitcoin-is-unsustainable

BCR needs to get mining shifted to BNs as a non-competitive process and implement distribution by tender ASAP.
311  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 30, 2015, 05:06:09 PM
Added a few new simple themes, with repainted logo image and About icons. You need to restart the wallet for them to take effect. They persist until changed.

eg. purple (bitcreditscc likes purple)



eg. green (hack_ said he likes green)



If you've put your BN addresses in mybanknodes.txt then you also get a colour co-ordinated banknode list:



Built in choices are orange, dark/orange, blue, green, pink, purple, turquoise. You can still load your own custom .qss file if you want by sticking your own 'theme=/path/to/theme' line in your bitcredit.conf. I have set the default to orange, for no particular reason.

If none of these fruity options please you, you can find the qss files in the git repo  -  get creative, and it you come up with something nice please share it so I can include it with the client for everyone to marvel at.

@dragos - they should all work out of the box now, no need to bundle the qss files separately with the linux binary.

Hope all this stuff works on Windows too.

Still hoping someone will come up with some content for the Help-pages, haven't had time to put anything together myself yet. Borrowing DASH guides and modifying them for BCR is perfectly acceptable...  Grin  
312  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 27, 2015, 09:43:24 PM
@thelonecrouton
Good job on the wallet, looking great! Smiley

Thanks, but don't hesitate to dish out criticism, I'm not going to break down in tears if I'm told something sucks.

I'd like to make things as simple as possible for users.

I might try having the wallet default to nothing but basic send / receive and show balance / transactions (granny mode, and all most people are ever going to use) unless the user asks for the full monty. Basic / Advanced modes should be enough, I'm not granularising fifteen different user competence levels.

bitcreditscc has begun an electrum port, if we can integrate electrum servers on the BNs then the electrum thin client might make a better grannyplatform. It's also in python, which is better for one's blood pressure and means stuff can get tried and tested far faster. And electrum runs on Andoid too.  Smiley
313  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 27, 2015, 03:46:53 PM
so thanks you all for the good guides on bn nodes,
got my first bn payment but have still got to know if i have to change

 rpcallowip=to my own ip ? or leave it

cause instead of
 localhost

i did not try it yet but at
 banknodeaddr=it is only working with

 localhost:9999

i gues my router or my system is setup like that.

Yes, set rpcallowip=127.0.0.1 (or localhost) -  if it's getting paid it's working.  Smiley
314  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 27, 2015, 08:46:36 AM
Made the help window non modal so the user can have help up while still operating the wallet. Some voodoo about heaps and stacks. Gripping stuff, eh?  Grin
315  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 26, 2015, 07:58:41 PM
Quick prototype newfangled About / Help page, as usual everything is subject to change without notice, eg. I'll probably style the buttons to match the ones in the main wallet:



I can have the wallet pull updated content if available from the website (when one exists) - do not expect me to display a fully working javascript-infested website in the wallet though.

Also, get writing! I need content.  Smiley
316  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN] SpreadCoin | Decentralize Everything (official thread) on: June 26, 2015, 04:40:59 PM
I can fit 10 daemons comfortably on a 2GB server with a low end CPU. I'm talking about *coind, not *coin-qt. Maybe you'd need 3 64GB servers... point is it aint much.

And bitcoin bodes can be run on IPv6 addresses, either directly or via a tunnel. IPv6 addresses are practically free.

Yes coind, that's why I repeatedly said "daemons".  Smiley

You can maybe put 10 "idle" daemons on a 4 GB server, but the moment they actually need to do some work (verifying, etc) they will totally crash the system.

Hey, everybody is invited to back up his claims, I will post a few screenshots later of the CPU and RAM load. (starting up, synching process and idle)

During validation / verification process when a new block has to be checked I have repeatedly seen CPU spike to 100%, because this is a process that gets high priority by the system, because it needs to be done fast so as to be ready for the next block.

And bitcoin nodes can be run on IPv6 addresses, either directly or via a tunnel. IPv6 addresses are practically free.

We can insist the server use a IPv4 address.

I agree that this is a problem that has to be solved: how to discourage the running of multiple nodes on 1 server.




Next time try starting and syncing them one at a time, or use a bootstrap blockchain file.  My BCR and DASH daemons never go over 150MB, usually they hover around 110-120MB while running. Bitcoind does a whole lot less so probably uses even less RAM.

You can put whatever restrictions on SPR nodes you like, it doesn't change the fact that running a crapload of BTC nodes is neither difficult nor expensive, and SPR's service needs to be competitive. Forcing SPR node ops to buy IPv4 addresses just adds to their costs.
317  Alternate cryptocurrencies / Announcements (Altcoins) / Re: BITCREDIT | NEW BANKNODES | UPDATE 6/15/15 on: June 26, 2015, 04:12:45 PM
First small step to better user friendliness:



About Bitcredit window isn't very helpful yet but it will be...  Smiley

@hack_ : any content for me?

edit: I was thinking of having the help pages as html, to allow easy syncing/updating between wallet and future website...?
318  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN] SpreadCoin | Decentralize Everything (official thread) on: June 26, 2015, 02:50:00 PM
Two servers with 64GB RAM each and a few TB of storage can easily run a thousand full BTC nodes. This isn't a big expense, ...

If SPR node ops can run a thousand BTC nodes for a few $ a month each, so could BTC zealots,...

I tried installing as many daemons as possible on a 24 GB RAM server a few months ago.
I was only able to start about 15-20 of them before running out of RAM.
(And most of those daemons were for small altcoins that didn't have the high verification needs of BTC (lots of CPU))

1000 daemons on 2 servers is not possible, you need to spread this over a few dozen servers, plus it will probably cost you a few thousand dollars a month.

Also, with SPR we will have the requirement that every node needs to run on a unique IP.

So having enough servers to be able to run 1000 daemons is one thing, but having unique IPs for every single daemon will cost you a fortune. Every month.


I can fit 10 daemons comfortably on a 2GB server with a low end CPU. I'm talking about *coind, not *coin-qt. Maybe you'd need 3 64GB servers... point is it aint much.

And bitcoin nodes can be run on IPv6 addresses, either directly or via a tunnel. IPv6 addresses are practically free.
319  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN] SpreadCoin | Decentralize Everything (official thread) on: June 26, 2015, 01:43:30 PM
....
Two servers with 64GB RAM each and a few TB of storage can easily run a thousand full BTC nodes. This isn't a big expense, you can buy this stuff for peanuts on ebay...

We need to test that this is a valid option. If it is, then Bitcoin has no problems.

But, Bitcoin does have problems. So it can't be that easy, or cost efficient. Bandwidth costs alone would make it expensive to set-up and maintain.

Bitcoin has plenty of problems.  Grin

If SPR node ops can run a thousand BTC nodes for a few $ a month each, so could BTC zealots, they're just too tightfisted, and the Bitcoin Foundation would rather spend their money flying themselves around the world to fancy conferences where they can all dip their beards in free soup.  Tongue
320  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN] SpreadCoin | Decentralize Everything (official thread) on: June 26, 2015, 01:22:26 PM
Exactly.

Can a company run Full Bitcoin nodes in the range of 1,000 to 5,000 nodes, around the world? Doubt it.  Google, Apple, Microsoft, sure. But can they beat SPR's decentralized model in terms of no trust required? A community of thousands can match any big company or government. Dash has proven this already.

If you are looking for data, which would you prefer, a company making a profit with a small number of nodes, or a public service project that has many thousands of nodes?


Scripts / APIs are relatively easy. I've allowed for a bounty in the revenue streams to pay for requested scripts, all open source so they can be vetted.


Two servers with 64GB RAM each and a few TB of storage can easily run a thousand full BTC nodes. This isn't a big expense, you can buy this stuff for peanuts on ebay.  Physical location is irrelevant unless a few milliseconds of latency is critical to you, and if it is then you just set up your servers 'next door' in network terms to your target(s).

Or, alternatively, if a bunch of SPR enthusiasts can rent a bunch of VPS instances, anyone can.

I'm not being obnoxious for the sake of it here, I'm just trying to pin down the value proposition of data mining via SPR nodes vs. Inquisitive Inc. doing it themselves or using another provider.

I don't see any intrinsic difference in trust between using any one outsorced data mining provider vs. any other.

SPR nodes could compete on cost I suppose if their operation is subsidised anyway by other reward structures.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 ... 163 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!