Bitcoin Forum
June 24, 2024, 03:54:33 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 [570] 571 572 573 »
11381  Bitcoin / Bitcoin Discussion / Re: Need help! Ubuntu 11.04 wireless problems on: July 11, 2011, 09:02:04 PM
Thank you so much for the updated code.  I'll have to try it out when I get home.

Just curious, would this work in the code?

Code:
ping_pause=5*60

I'm not sure which prog language the bash script uses.

Also, would it be possible to have the bounce prog create a log of the time and date for each time there is a failed ping attempt?

Yean, $((5*60)) to do maths, not just 5*60

And in .xprofile:

Code:
/path/to/script >> ~/bounce-log.txt &

will make it append to the end of bounce-log.txt while it's running.

You'll see all the successful pings in there too, so comment that line out if you don't want them.
11382  Bitcoin / Development & Technical Discussion / Re: [PULL] private key and wallet export/import on: July 11, 2011, 05:57:02 PM
I am not sure this a suitable to be on by default. This will cause a great amount of lost bitcoins because unsophisticated users are careless.

+1

This is fine living in a separate branch.

Being able to recompile a branch is a nice
barrier of entry for the tech. clueless.
This SHOULD be included in the default client.  Reason being, it is incredibly useful for people who know how to use it, and not all of us know how to use linux or feel like spending hours on Windows attempting to compile the source with all of the dependencies.

Discluding a feature like this from anyone who doesn't know how to compile c code would be a terrible thing.

I think "I am not sure this a suitable to be on by default" was referring to the "Can i also remove a key from the wallet with this patch?" request.  Removing keys from wallets isn't "incredibly useful" if you already have the ability to dump wallets and import those dumped keys into other wallets.
11383  Bitcoin / Bitcoin Discussion / Re: Need help! Ubuntu 11.04 wireless problems on: July 11, 2011, 05:39:20 PM
For some reason it won't work right when it's set as a startup program.  I think it has to do with the fact that the bounce program starts before the network manager connects to the router.  It also does not work right if you start the bounce program while its not connected to the network.  So I commented out the .xprofile file and manually started bounce after the network connected and my miner has been working ever since!  I also adjusted the ping rate to every 5 min.

Right.  I'll update it so that it waits for you to get connected before it starts pinging.

Here's an updated copy.  You should be able to run this from your .xprofile - it doesn't give up if the network is down when you first run it.

Code:
#!/bin/bash

########################################################################
#
#   we need to be able to restart the network-manager to reconnect
#   automatically.  this usually requires us to type our password, but
#   since we want to be able to run this unattended, we need to tell
#   sudo that we can restart network-manager without typing our password
#   to set that up, run these two commands in a terminal while logged in
#   as your regular user:
#
#     echo "$(whoami) ALL=(ALL) NOPASSWD: /etc/init.d/network-manager" | sudo tee /etc/sudoers.d/network-manager
#     sudo chmod 0440 /etc/sudoers.d/network-manager
#   
########################################################################

ping_pause=10                   # how long, in seconds, to wait between ping attempts
restart_pause=60                # how long, in seconds, to wait after restarting networking

########################################################################

log() {
    echo "$(date) $@"
}

restart-network() {
    log "restarting networking"
    sudo /etc/init.d/network-manager restart > /dev/null
    # give it a minute to reconnect before we start checking again
    log "waiting $restart_pause seconds"
    sleep $restart_pause
}
   
# find the address of our router
log "finding router address"
while true
do
    router=$(route | grep ^default | awk '{print $2}')

    if [[ -z $router ]]
    then
        log "can't determine router"
        restart-network
    else
        break
    fi
done
log "router address '$router'"

# ping it repeatedly
while true
do
    log "pinging router '$router'"
    if ! ping -c 1 $router > /dev/null
    then
        log "ping failed"
        restart-network
    fi
    sleep $ping_pause
done
11384  Bitcoin / Bitcoin Discussion / Re: Need help! Ubuntu 11.04 wireless problems on: July 11, 2011, 05:26:44 PM
For some reason it won't work right when it's set as a startup program.  I think it has to do with the fact that the bounce program starts before the network manager connects to the router.  It also does not work right if you start the bounce program while its not connected to the network.  So I commented out the .xprofile file and manually started bounce after the network connected and my miner has been working ever since!  I also adjusted the ping rate to every 5 min.

Right.  I'll update it so that it waits for you to get connected before it starts pinging.
11385  Bitcoin / Bitcoin Discussion / Re: Need help! Ubuntu 11.04 wireless problems on: July 11, 2011, 05:25:15 PM
Excuse my ignorance, but does "sudo" work from within a script like that?

Read the comment at the top of the script.  There are two command lines embedded within the comment which you need to run once.  Once you've run then, the 'sudo' line will work from within an unattended script.
11386  Bitcoin / Bitcoin Discussion / Re: Trojan Wallet stealer be careful on: July 11, 2011, 09:44:34 AM
I'd like to be able to rename my wallet.dat to some other file, and the client asks for the file on startup.

Something like this will do it for you on Linux:

Code:
#!/bin/bash

cd
wallet=~/.bitcoin/wallet.dat

if [[ -e "$wallet" ]]
then
    echo "real wallet file $wallet already exists; giving up"
    exit 1
fi

echo -n "which file is your wallet hidden as? "
read hidden

if [[ ! -e "$hidden" ]]
then
    echo "hidden wallet file $hidden doesn't exist"
    exit 1
fi

echo "moving hidden wallet to $wallet"
mv -i "$hidden" "$wallet"

sleep 1

echo "starting bitcoin"
bitcoin "$@"

sleep 1

echo "moving $wallet back to secret location"
mv -i "$wallet" "$hidden"

Save to a file, add a line to the end of .bashrc saying:
Code:
alias bitcoin="/path/to/script-file"

Start a new terminal, type 'bitcoin', and it should use the script instead of the regular client.
11387  Bitcoin / Bitcoin Discussion / Re: Need help! Ubuntu 11.04 wireless problems on: July 11, 2011, 07:10:25 AM
That's a great script. Thanks for sharing.

You're welcome.
11388  Bitcoin / Bitcoin Discussion / Re: Need help! Ubuntu 11.04 wireless problems on: July 10, 2011, 06:15:56 AM
I sent him this script and it seems to be doing the job:

Code:
#!/bin/bash

########################################################################
#
#   we need to be able to restart the network-manager to reconnect
#   automatically.  this usually requires us to type our password, but
#   since we want to be able to run this unattended, we need to tell
#   sudo that we can restart network-manager without typing our password
#   to set that up, run these two commands in a terminal while logged in
#   as your regular user:
#
#     echo "$(whoami) ALL=(ALL) NOPASSWD: /etc/init.d/network-manager" | sudo tee /etc/sudoers.d/network-manager
#     sudo chmod 0440 /etc/sudoers.d/network-manager
#   
########################################################################

# how long, in seconds, to wait between ping attempts
pause=10

########################################################################

# find the address of our router
router=$(route | grep ^default | awk '{print $2}')

if [[ -z $router ]]
then
    echo "can't determine router - is network down already?"
    exit 1
fi

while true
do
    echo "$(date) pinging router '$router'"
    if ! ping -c 1 $router > /dev/null
    then
echo "$(date) ping failed; restarting network-manager"
sudo /etc/init.d/network-manager restart

        # give it a minute to reconnect before we start checking again
sleep 60
    fi
    sleep $pause
done

The two commands mentioned in comments at the top of the script need to be run if you want to run the script as a regular user and have it be able to restart the network-manager without prompting for a password.

The script needs to be saved to a file, then set as executable ("chmod +x scriptname").

It can be run automatically on login by putting

Code:
/path/to/script/scriptname &

in .xprofile in your home directory, which probably doesn't exist.  Just make it.

In my case, that's "/home/chris/bounce &", but call it what you like and put it where you like.
11389  Bitcoin / Development & Technical Discussion / Re: Launch of BitPay, worlds first smartphone-ewallet for bitcoins on: July 10, 2011, 06:09:30 AM
Code:
Forbidden

You don't have permission to access /bitcoin/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Hello dooglus, read what I wrote at the end of this thread
http://forum.bitcoin.org/index.php?topic=6967.msg317910#msg317910

OK.  Maybe don't link to it in your signature for now then, if you know it's not working.
11390  Bitcoin / Bitcoin Discussion / Re: Let's add up the KNOWN lost bitcoins on: July 09, 2011, 08:00:54 AM
18,907.12000001
+      1.12
18,908.24000001

don't ask.

http://blockexplorer.com/address/1BitcoinEaterAddressDontSendf59kuE

18,908.24000001
+      0.0211
18,908.26110001
11391  Bitcoin / Development & Technical Discussion / Re: Launch of BitPay, worlds first smartphone-ewallet for bitcoins on: July 07, 2011, 05:59:07 AM
Acumulated ask/bid graph over mtgox depth of market
http://warpi.net/bitcoin/

Code:
Forbidden

You don't have permission to access /bitcoin/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
[code]
[/code]
11392  Bitcoin / Project Development / Re: UK exchange: Britcoin on: July 06, 2011, 01:55:21 PM
How long untill you see that its actually being adressed (I dont mean cleared).

Not stressing just trying to get an idea of whats normal Smiley

I think last time I transferred from my Nat West to the Britcoin Lloyds TSB it took 23 hours for the funds to show up in Britcoin.  They were cleared and spendable after 23 hours - I didn't see any 'pending' status.  (But I wasn't obsessively refreshing).
11393  Bitcoin / Project Development / Re: UK exchange: Britcoin on: July 04, 2011, 08:47:33 PM
I entered my newly created openid login created at myopenid as suggested but when I click the Submit button I get:

Couldn't resolve host '<my login id - removed for this post>'

Any ideas?

Seems the site was down for a while.  Seems OK again now.
11394  Bitcoin / Bitcoin Discussion / Re: Britcoin V2 Community Input on: July 04, 2011, 07:51:48 AM
There isn't anything to absorb.  The rounding occurs in the exchange rate. So we simply run the exchange at that rate.

I think what Genjix might be saying is that it would be possible to round the result in the favour of both sides of the trade so they both gain a fraction of a 'satoshi', and the exchange loses a satoshi on each trade.

Currently one side gains a fraction and the other side loses a fraction, but it would be possible (and very cheap) for both sides to gain.  Then you could claim to be the only exchange with negative commission!  Wink
11395  Bitcoin / Bitcoin Discussion / Re: Britcoin V2 Community Input on: July 03, 2011, 05:33:34 PM
We round up for the person and absorb that cost ourselves. So the parties involved get more money than they asked for.

Your calculations end up with an amount of BTC and an amount of GBP.

The BTC amount is taken from one person and given to the other, and the GBP amount is taken from the 2nd and given to the 1st.  It's a zero sum game as far as you are concerned.  So where's the 'absorb that cost' bit?

When the division isn't exact, one person loses less than 0.01 uBTC and the other gains it.  I don't see how the exchange is absorbing anything.
11396  Bitcoin / Bitcoin Discussion / Re: A *realy* secure environment for Bitcoint client and private keys (wallet.dat) on: July 03, 2011, 11:07:55 AM
You zip file seems broken.

I tried downloading it twice, and got the same both times - a tiny text file with an error from woofiles in it:

Code:
$ cat Bitcoin_Safe_Usage_v02.zip 
<br />
<b>Warning</b>:  fclose(): supplied argument is not a valid stream resource in <b>/srv/www/lighttpd/woofiles/includes/HTTPDownload.class.php</b> on line <b>191</b><br />
11397  Bitcoin / Bitcoin Discussion / Re: Britcoin V2 Community Input on: July 03, 2011, 09:33:18 AM
I propose storing what you have, and the rate you want, along with the currency you have and want.
11398  Bitcoin / Project Development / Re: UK exchange: Britcoin on: July 02, 2011, 08:51:50 PM
we ran our unit testing scripts and didn't find any problems with the rates, could you tell use what order this is so we could check it out.

I have no way of knowing - it wasn't my order, but it's clearly wrong.  The timestamps in the list of trades I posted are in Pacific time.  Add 8 hours to get BST; that should let you find it.  Or query on the price since there shouldn't be more than that one order with that price:
Code:
select * from transactions where abs(a_amount/b_amount-0.4463) < 0.0001 or abs(b_amount/a_amount-0.4463) < 0.0001;

The problem is that the want_amount field of the orderbook table is used for doing matches when I don't think it should be.  Suppose you have an order on the books and someone comes along and fills most of it by offering a much better rate than you asked for.  Your (have) amount field will be reduced some, and your want_amount field will be reduced a lot, leaving you the ratio of 'want' to 'have' being much lower than the ratio of initial_want_amount to initial_amount.  Since want_amount is used in the matching code, you can end up with the leftover portion of your order being matched at a very unfavourable rate for you.

My patch at https://gitorious.org/~dooglus/intersango/dooglus-intersango/commit/126d05d8f23a2745da8db65fb57414eca607d0d8 fixes the problem by never using the want_amount column other than for display.
11399  Bitcoin / Bitcoin Discussion / Re: How is date/time determined? on: July 02, 2011, 01:53:24 AM
So the timestamp of a new block has to be less than 2 hours in the future, and newer than the median of the timestamps on the previous 11 blocks, which will be about 1 hour in the past.
11400  Bitcoin / Bitcoin Discussion / Re: How is date/time determined? on: July 02, 2011, 01:38:53 AM
Then there's this, which rejects blocks with too early a timestamp:

Code:
    // Check timestamp against prev
    if (GetBlockTime() <= pindexPrev->GetMedianTimePast())
        return error("AcceptBlock() : block's timestamp is too early");
Pages: « 1 ... 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 [570] 571 572 573 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!