Bitcoin Forum
June 22, 2024, 08:24:36 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Other / Beginners & Help / accounts should be able to work like mini wallets. on: October 04, 2012, 02:44:55 PM
accounts should be able to work like mini wallets to reflect an the accurate state of the network with respect to your accounts.

Meaning:
Wallets are like sets of pair of keys (addresses and their respective private keys).
Accounts are like sets of pair of keys (addresses and their respective private keys).

Yet, when you do a

sendtoaddress, the software uses only your keys in your wallet (that is obvious since the software can only use the private keys in your wallet), but when you do a

sendfrom, the software may use any key in your wallet to sign. the software should be configurable to only use the private keys associated with the addresses in that given account, just like a mini wallet.

And when you do a,

getbalance *, the software calculates the wallet balance given the amounts that have been signed to any of the addresses of your wallet and the amounts that the private keys in your wallet have been used to sign to other addresses not in your wallet. But when you do a,

getbalance 'account', the software does NOT calculate the account balance given the amounts that have been signed to any of the addresses of that account and the amounts that the private keys in that account (the ones associated with the addresses in your account) have been used to sign to other addresses not in that account. Not like a mini wallet.

In this scenario in which accounts are like mini wallets (configurable one so that accounts can also be used to local accounting like they do now) the 'move' from one account to an other should not be permitted.



2  Other / Beginners & Help / Re: What would you do with a million dollars worth of customer data? on: October 04, 2012, 01:52:37 PM
Now we know why they fired you.
3  Other / Beginners & Help / Where is the getbtcaddressbalance json-rpc function? on: October 02, 2012, 06:37:37 PM
If the client verifier of transactions is sound it must calculate that balance some where to see if the transaction is even possible.

Where is that very useful functionality reflected in the json-rpc calls?

We as users (web programmers) should be able to do a pre-verification before even trying sending with the real balance and not an 'account' balance.

Thanks.


4  Other / Beginners & Help / Default miner should distribute work over the network for a block candidate. on: October 02, 2012, 06:29:09 PM
Since default miner is now useless. Why not try distributing work for a given block candidate over the network just like the big boys do it in their private networks?

Options:
1. Send the given block candidate to all peers with a starting value for the nonce and a final value for the nonce.
2. Just randomize starting value for the nonce. (It could be seeded with the local ip address).
3. Give another.

5  Other / Beginners & Help / Re: HOWTO: create a 100% secure wallet on: October 02, 2012, 05:52:14 PM
There is another way in which you can get robbed.

Since any valid Bitcoin transaction must get in the public block chain. Your public keys must be in the block chain. And some body might use the block chain to calculate what is the balance of a 'big' and 'static' Bitcoin address and use a cryptographic attack that address to find out the corresponding private key. It might take months, but you are not moving those Bitcoins so the attacker can take the time. Once he has the private key he makes a transaction to one of is addresses.
Try all the time of the universe, billions of billions of years, then maybe, just maybe you may have a better chance than one atom out of all the atoms on planet earth. I wasn't going to bother posting but that "It might take months" was just too juicy to pass up.


Good luck with your assumption that:
1. The discrete logarithm in the subgroup spanned by g (resp. G) is hard.
2. SHA-1 is a one-way hash function.
3. SHA-1 is a collision-resistant hash function.
4. The generator for k is unpredictable.
will hold for billions and billions of years for any given pair of keys.

6  Other / Beginners & Help / Re: Questions about accounts vs btc addresses behaviour. on: October 02, 2012, 03:11:16 AM
 Thank you for your response.

Then suppose I have a btc address addr1 tagged with name acc1 (account). Only one address for that account.

If I understand well, it is possible to have the following situation.

I have received since block 1 a total of 500 BTC in addr1, and they have more than 6 confirmations.
getbalance acc1 returns only 100 BTC because I have only received 100 after the time I did a setaccount addr1 acc1.

If that is the case is there a json-rpc call that explores the block chain an tells me the real balance of a
btc address ? That is:

sum(input txs to addr1 since block 1) - sum(output txs from addr1 since block 1) ?

Does getreceivedbyaddress "Returns  the  total amount received by 'bitcoinaddress' in transactions with at least ['minconf'] confirmations" SINCE BLOCK 1? Or just since it was added to the current wallet?

If that is the case, then what about an rpc call for what has been transfered from addr1 since block 1?

Thanks again.



7  Other / Beginners & Help / Questions about accounts vs btc addresses behaviour. on: October 02, 2012, 12:17:37 AM
It says on

https://en.bitcoin.it/wiki/Accounts_explained

that

"Moves are not broadcast to the network, and never incur transaction fees; they just adjust account balances in the wallet."

1. Since btc addresses are assigned to accounts, do they get automatically reassigned to a receiving account during a 'move' when enough bitcoins of a given address are moved to that account?

2. Suppose I have one account per btc address, and move some coins from acc1 to acc2 but not all the balance, does that transaccion gets ever reflected in the public bitcoin network block chain? When? At the moment I do a sendfrom to an external btc address?

Thanks.
8  Other / Beginners & Help / Who owns your Bitcoins? on: October 02, 2012, 12:02:38 AM
Here is a video for newbies.

It is called: "Who owns your Bitcoins?"

http://www.youtube.com/watch?v=_tPScleiGSk

9  Other / Beginners & Help / Re: HOWTO: create a 100% secure wallet on: October 01, 2012, 11:51:46 PM
There is another way in which you can get robbed.

Since any valid Bitcoin transaction must get in the public block chain. Your public keys must be in the block chain. And some body might use the block chain to calculate what is the balance of a 'big' and 'static' Bitcoin address and use a cryptographic attack that address to find out the corresponding private key. It might take months, but you are not moving those Bitcoins so the attacker can take the time. Once he has the private key he makes a transaction to one of is addresses.

10  Other / Beginners & Help / RPC_JSON java example connecting to bitcoind on: September 11, 2012, 07:57:35 PM
I was going to post this to
https://bitcointalk.org/index.php?topic=417.0

but I am a newbie and cannot.

Here it is:

// START OF FILE ----------------------------------------------------------------------------------------------

import java.io.*;
import java.net.*;
import java.nio.*;
import java.lang.management.*;
import java.util.*;
import org.json.simple.*;
import org.json.simple.parser.*;

public class
json_test {

public static void
main(String[] args){
   JSONObject obj = new JSONObject();
   obj.put("method", "getinfo");
   obj.put("id", new Integer(11));

   String btc_comm = obj.toString();

   try{
      Authenticator.setDefault(new BitCoinAuthenticator());

      URL url_bcd = new URL("http://localhost:8332/");
      URLConnection yc = url_bcd.openConnection();
      yc.setDoOutput(true);
      OutputStreamWriter wr = new OutputStreamWriter(yc.getOutputStream());
      wr.write(btc_comm);
      wr.flush();

      BufferedReader in = new BufferedReader(
                  new InputStreamReader(
                  yc.getInputStream()));
      String inputLine;

      while((inputLine = in.readLine()) != null){
         System.out.println(inputLine);
      }
      in.close();
   } catch (MalformedURLException ex) {
      System.out.println(ex);
   } catch (IOException ex) {
      System.out.println(ex);
   }
}

}

class BitCoinAuthenticator extends Authenticator {
    // This method is called when a password-protected URL is accessed
    protected PasswordAuthentication getPasswordAuthentication() {
        String promptString = getRequestingPrompt();
        String hostname = getRequestingHost();
        InetAddress ipaddr = getRequestingSite();
        int port = getRequestingPort();

        String username = "";  // i have no user name in /home/your_user/.bitcoin/bitcoin.conf
        String password = "none"; // rpcpassword=none in /home/your_user/.bitcoin/bitcoin.conf
        return new PasswordAuthentication(username, password.toCharArray());
    }
}


// END OF FILE ----------------------------------------------------------------------------------------------

I compile with this script:

# START OF FILE
rm ./json_test.class
PS_CLASS_PATH=./lib/JSON/*
javac -classpath $PS_CLASS_PATH json_test.java
echo "Type enter \n Thanks." | more -1
# END OF FILE

And run it with this script:

# START OF FILE
PS_CLASS_PATH=./lib/JSON/*
java -cp $PS_CLASS_PATH json_test
echo "Type enter \n Thanks." | more -1
# END OF FILE

Preconditions:

1)

json-simple-1.1.1.jar

file must be in ./lib/JSON
(you can google it).

2)

bitcoind must be running and you must be able to type the command

bitcoind getinfo

and get something like:

{
    "version" : 60300,
    "protocolversion" : 60001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 198343,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 2694047.95295501,
    "testnet" : false,
    "keypoololdest" : 1346473056,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

Hope it helps.

JLQ.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!