text:
Security within a deleting blockchain model
Assume a blockchain model that contained no transaction data - just pure data. After a set time this data would simply be deleted, and entire blocks would be removed. How would the security model of the blockchain suffer? Would it make it easier for a "long chain" attack, and if so how can this be prevented?
The idea is to store data into the blockchain. Anyone could store data in this chain, and all nodes have a copy of this chain. There is a block race, to secure the blockchain as normal, but there would be no rewards since this is not a money based system. How the deletion is done is yet to be explored, but basically all nodes would agree all blocks older than x months be deleted from their systems.
Would an attacker be able to compute a longer chain if they know of the point at which data is deleted, then show this to the network and then make the network believe this is the correct and valid chain? If so, how can we stop this? (Assume the attacker has less than 51% computing power.) I have looked into timestamps, and time capsule based encryption, but what I want is a mechanism where an attacker cannot successfully create a block without some information that would only be revealed on a specific day.

Are you talking about a rolling mini-blockchain without a financial incentive? Your question is a bit brief on the details of your scenario, could you elaborate?

Securing the blockchain against reorganization is easy as Nick has shown. Your problems are rather with a) adding new users to the system (how do they know which blockchain is the real one?), and b) with the incentives: As the miner decides what data gets included in a block, there is a strong incentive to be the miner, but if you aren't paying or mining it yourself, why would anyone include your data over their own in the block? Once difficulty goes beyond what you can mine yourself, the only way for you to get your data into the chain would be to fork it.

related: Mini-Blockchain proposal: How is the proof-chain secured against injections?, Is the "Finite Blockchain" idea secure?

Your system is pretty easy to implement. The major reason why Bitcoin nodes don't delete old blocks is that old transactions are needed to tell if new blocks are valid. But if the validity of new blocks doesn't depend on old blocks, than the contents of those blocks can be deleted without consequences.
You mention the problem of having a node on the network pretend that an old block is new. Bitcoin solves this problem in three ways:
Separate block header and block contents; keep block header forever
Bitcoin block headers are 80 bytes. They look like this:
<4 byte version> <32 byte hash of previous block header>
<32 byte hash of the block contents>  <4 byte timestamp>
<4 byte difficulty> <4 byte nonce>

That's small enough to avoid having to delete the block headers, ever, but enough to include a merkle root of what's in the block. You can delete the block, but keep the block header around. The difficulty field is necessary because Bitcoin difficulty can vary. The 4 byte nonce is added to make mining easier.
Record timestamp in block header
The timestamp is recorded in the block header, and the Bitcoin client rejects any block headers that are too far into the future or the past.
Record previous block in block header
Bitcoin includes the hash of the previous block header in the block header, which means that you can't take a previous set of block headers and pretend that they're new.
For example, if you've got these block headers:
A>B>C>D>E

You can't take C and append it to E, because other nodes will notice the mismatch between E and C's parent, B.

authors: Артем Дорофеев


text:
C Compilation Error Following README
I'm having an issue getting the local bitcoin client running on a Mac OS X machine.
When installing berkeley-db4, and running the following command (per the README):
brew install https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb -–without-java

I then enter the console, and run cd .. and then:
db-4.8.30/dist/configure --prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx

Once that happens, I get a long trace ending in this error. Has anyone run into this?
checking for a BSD-compatible install... /usr/bin/install -c
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/private/tmp/berkeley-db420160220-8656-19l1688':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

I don't have a Mac, so I can't reproduce this, but a google search suggests that the problem might be caused by not having glibc, gcc, or make.

Does not sound as if this is bitcoin related, maybe StackOverflow might be a better place to ask questions relating to dev-setup?

Thanks for the notes -- only reason I posted here was in case there was an error in the README that could be spotted. @nickodell will try out glibc (seems like I have the others installled)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

authors: Андрей Галушкин

sort: votes


text:
what about that the adress change all the time?
if the address has changed in my wallet
could I still receive funds on the old one??
because the address has changed a lot of times by its own without I have change it

Short answer: yes.
Addresses are just a representation of the public key from a public/private key pair.  Wallets generate new key pairs for every transaction.  Every time you click "Receive", you generate a new key pair.  Your wallet manages these keys for you, so you don't have to think about them.  For best practice in privacy, it's best to always use a new address (key pair) every time you receive payment.  That is why it has changed without you telling it to.  You can always re-use one, but there's really no reason for it.

If you choose to answer a question like that, please also fix the spelling in the question the next time. :) Also see Reminder: Please don't just answer bad questions

Yes.
A BIP32 wallet, in simple terms, is a wallet which generates up to billions of addresses from a single seed.
An address is, in short, the public part of a private and public key pair. As long as you hold the private key which corresponds to a public address, any funds received, past and future, are your funds.
The reason the wallet generates a new address each time you receive a payment is for privacy reasons only, because if you use the same address for many transactions, the peers you traded with will be able to identify which other transactions you were involved in, and your identity will be easier to tie to the address.
The mnemonic backup (those words the wallet asks you to safely write on a paper, usually 12 words) assembles back to the seed. So anywhere you restore your mnemonic, the exact same key pairs (and thus the same addresses) generated before would be generated again up to the 20 (i guess) last addresses which have no funds received yet.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
I run bitcoind in linux centos server. but it give me error "sendto: Operation not permitted". why?
root@srv [~/public_html/server/bin]# ./bitcoind -daemon

Bitcoin server starting
root@srv [~/public_html/server/bin]# sendto: Operation not permitted

What is the problem?
Also, bitcoind didn't download the blockchain in my linux centos server.
What is the reason?

Most likely SELinux.
~/public_html is not the correct place to store binaries or even the bitcoin data directory.
Put the binaries in ~/bin/
The data files should end up in ~/.bitcoin/ if you haven't changed the configuration. That should be okay.
If it still doesn't work you might need to run restorecon -R ~/bin to fix SELinux attributes.

root/public_html/server/bin/  here is my bitcoind . and data file is  'root/.bitcoin/ . what is the problem?? i run the command restorecon -R ~/bin. sitill same this.. pls give me some solution

public_html is for serving web pages, not for binaries. Put the bitcoin binaries in ~/bin/ . AFTER moving you may need to run restorecon.  Also don't run bitcoin (or anything) as root, create a new user and run bitcoin as that user. Once you have it working you probably want to set it up as a systemd service, which is very simple.

This is very likely to be a Firewall problem.
The "sendto: operation not permitted" is the typical message you get from an iptables reject
i never run a full bitcoind myself but looking at the documentation you need port tcp:8333 inbound and , i guess, at least HTTP and HTTPS outbound ...
check your firewall with
iptables -L -n

if the firewall is running, just to confirm you might try to stop the firewall and see if it fixes your problem.


text:
how to execute Ubuntu shell for bitcoind command in php?
i want to build a bitcoin third party server for my client.
but problem is that when i execute "bitcoin-cli" command using php then it didn't give any result.
i used JSONRPCClient. but i didn't find any solution and how to use it can't understand.
here i have to give "user:password@127.0.0.1:8338" . is this my pc user and password???
do i need bitcoin authentication for this? or give me some suggestion to make it live.
This script doesn't produce any output:
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://bitcoinrpc:HGySbCZrdHq5BDQH3iwzb3oGZCJX8AfWe2EBQrNg9EvJ@127.0.0.1:8332/');
echo "
";
print_r($bitcoin);
echo "
\n fgfgf";
print_r($bitcoin->getinfo());
echo "
";

Sounds like a PHP question. Otherwise, missing details from bitcoin.conf that would help debug this, like is the RPC even set up to service requests from the IP? Is it hosted on the same server?

Did you try reading this? https://en.bitcoin.it/wiki/PHP_developer_intro

it's my local server. it's php question.bitcoin.conf has only rpcuser and rpcpassword. how can i start??? @karimkorun------------------------------
i tried developer intro . but i won't understand how and where is the function details, $bitcoin->getinfo() ?there is no function details in JSONRPC. if i have to write this function then how i can start?? i need a example of function.. @NickODell

@ShahadatHossain The page I linked has several examples. Did you read it, or try any of them?

yes i have read those example before and after this post submit. but where is getinfo details. if it's submit by _call function then it does not give me any output. what should i do now??? @NickODell

require_once 'jsonRPCClient.php'; $bitcoin = new jsonRPCClient('http://bitcoinrpc:HGySbCZrdHq5BDQH3iwzb3oGZCJX8AfWe2EBQrNg9EvJ@127.0.0.1:8332/'); echo "
"; print_r($bitcoin); echo "
\n fgfgf"; print_r($bitcoin->getinfo()); echo "
";

It doesn't produce any output? Not even the echo "
";? Does it hang?

firstly Setup bitcoin Core API server on your pc.
then install Php-curl for your Apache server.
then Follow Link: en.bitcoin.it/wiki/PHP_developer_intro
put api command as function name and if have any Parameters then put in function parameter. i hope it will work.give you result as json format.
Must On your Display Error in php.ini


text:
What does the label field in Bitcoin-Qt mean?
I tried to get involved with Bitcoin on iPad, couldn't download a wallet and thought a paper wallet was an alternative; I generated said paper wallet and used the address to buy coins.
I realized I couldn't access the coins, so I bought a macbook to download a wallet. Assumed I could just add the address from the paper wallet, but its asking for a "label."

Welcome to the Bitcoin stack exchange! To import an address into Bitcoin-Qt could take a while, especially since you have to wait for the node to download and verify the whole blockchain. You might want to use Electrum or a mobile wallet instead.

The label is just a short, memorable name for your client to refer to that address.
It can be anything, or nothing.


text:
What's the point of having a stack-based scripting language, if only a few standard forms are allowed?
What is the purpose of a stackmachine if only some standard script forms are allowed? And why are some scripts allowed and perfectly fine in mined blocks but rejected by clients if found in transactions; what's the point of that? The more I read about script the less it makes sense.

I'm offering an opinion, however I opine that because of the possibilities of the Blockchain, it'd be silly of satoshi not to implement the framework so it can be integrated later much easier. Very similar to object orientated programming where the concepts are in place, but are essentially standing in

The question is not entirely true. The official client will only relay scripts in a handful of standard forms, but it will accept a broader range of scripts in a block mined by a more capable client.

OK, the original concept of scripts was not perfect. But with p2sh (BIP-16) any script can be realized

This seems like a really peculiar answer. I mean, BIP16 doesn't really do anything aside from deferring including the script until the scriptSig. Sure, you could deploy almost any soft-forking change to script the same way that BIP16 was, but that could also be done if script was substantially simpler than it actually is.

@nick as far as i understand the isStandard function is also not in effect anymore with p2sh. Meaning that the script is actually NOT restricted to a few standard scripts anymore as opposed to what's posited in the original question. Agree? I think that's what amaclin is referring to.

@amaclin is correct, no standardness constraints apply to P2SH. How could you enforce otherwise - only the hash is known to the network when the address gets funded.

Bitcoin was the first crypto coin. Satoshi when analyzing the problem of digital payment discovered that the machine needs to determine if some transaction sucessfully or unsuccessfully spent the output. In the most trivial case this means the signature is ok and pubkey matches.
Determining if anything (the spend) is one of two possible values (1=success, 0=failure) is the most studied problem in computer engineering, also known as set membership or recognition of word from language.
Standard off-the shelf solution to this problem is to use some machine that meets the criteria. For bitcoin the requirement that the machine should always halt, as fast as possible. the strongest machine with this guarantee is some kind of a stack machine.
TL;DR Satoshi just used the obvious solution to a known subject

Well the reason for allowing only some script forms is to ensure that the language is not Turing complete. The simplest reason why you cant have a Turing complete language is because you want a block to be pushed up into the blockchain every 10 mins. So you have to find a way to indirectly control execution time. Certain other scripts are prevented because of feared security vulnerabilities. A Turing complete language within bitcoin would call for a solution of the kind implemented by Ethereum.
Your second point about why certain scripts are allowed in blocks but not in transactions is an interesting one and is mostly because some of the vulnerabilities were discovered well  after bitcoin got rolling. So invalidating the blocks that had the problematic opcodes would have required a hard fork. Whereas just blocking the problematic opcodes to prevent future issues was much easier. Now it would be interesting if redeeming the coins in some block necessitated the use of any of the blocked opcodes, but I guess there aren't any transactions of that kind.

The bitcoin script mechanism is very simple and dumb, that's the reason why it is so secure. the more it will be complex the less it can be secured cause more scenarios can occur and points of failures. so you have a very simple mechanism with limited operations, very easy to test and maintain securely, still extendable such as pay to script hash.


text:
how to get total send balance of account in orbitcoin wallet?
I want to see my account balance in wallet using console but when i use getbalance test its only show me total receive balance?
There is many account that i want to see total balance but i try listreceivedbyaccount test is show me received balance?
And I also try getreceivedbyaccount.
And I'm trying create a web wallet in php a web wallet for orbitcoin.
Please, anybody help me!

Is 'test' part of the command that you're running? What do you mean by 'total send balance?'

I mean i want to get balance of account name is test but when i use its only show me received balance not include send balance for example the account is received 0.1 orb and after sending 0.1 the current balance is 0 but the command is still show me 0.1 not current balance ??


text:
Can I add Bitcoins by address?
I signed up for bitcoin ages ago, but never used it; I forget who I signed up with I have had to reinstall the OS (Win 10) on my computer and lost the program I used. I do still have a copy of the address though. How do I add the address to MultiBit?

Are there coins in the address?  The address does you no good by itself; what you need is the private key.

If all you have is the address, there's nothing you can do with it.

Edit: I apologize I was for some reason still thinking MultiBit classic, if you are using HD there is a possiblity you created seed words which you would be able to restore from.
Information is per: https://multibit.org/try-multibit-hd.html
Classic:
You're going to need the backup wallet or private keys that were automatically created for you by MultiBit. By default they would have been located in a sub-directory of the folder your original MultiBit wallet was created in.
This information is per: https://multibit.org/en/help/v0.5/help_walletBackups.html
If you do not have any of these files/private keys you are out of luck with regards to recovering the funds. The wallet address alone will only allow you to view the funds, there is no way to recover funds with a bitcoin address alone.


text:
How does PoW solved in miner.cpp gets transferred to main.cpp in source code?
As per my understanding of bitcoin codebase, the following events happen after we solve a proof of work.

In miner.cpp, once the miner thread solves a new Proof-of-work (PoW), ProcessBlockFound basically notifies others via a signal BlockFound.
BlockFound signal calls ResetRequestCount which basically resets the mpRequestCount in wallet.h via the validationInterface.h.
(Missing Logic)
A new NetMsgType::INV is issued from main.cpp in SendMessages/ProcessMessages to all peers.
These messages are eventually dispatched to all peers via network socket logic net.cpp

I am missing the main piece of code logic between step2 and step4. Can any expert help me understand what background story is happening after step2?

If you read a few lines after the BlockFound signal, you'll see:
CValidationState state;
if (!ProcessNewBlock(state, chainparams, NULL, pblock, true, NULL))
    return error("BitcoinMiner: ProcessNewBlock, block not accepted");

https://github.com/bitcoin/bitcoin/blob/v0.12.0rc2/src/miner.cpp#L373-L375
This is where the processing actually starts. ProcessNewBlock is defined in main.cpp.

I think you got my question wrong. ProcessNewBlock basically sanity checks the block, stores to disk and activates the best chain again. My question is where is the logic which actually sends the Hash out to other nodes? The mining logic is in miner.cpp sending logic is in main.cpp. Somewhere I miss where it picks the information of new block mined and sends out 'Hey! I have a new one' or INV message


text:
Ramifications of illegal content in transaction messages?
Would it be possible to make using Bitcoin illegal by posting child porn or similar highly illegal content in the message of a transaction? There are methods for having 'thin clients' that don't download the entire transaction history - would these be immune to an attack like this? How difficult would it be to track the sender of such material?

I don't think there is space for images in the blockchain (I could be mistaken) but you could add an "illegal number" like 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 .. .. .. easily enough.

Can you make it illegal to operate a package delivery service by shipping child porn or other illegal content?

@DavidSchwartz Your comparison is lacking. A better comparison would be "Can you make it illegal to receive a delivery of 1000s photos, containing a small number of child porn or other illegal content I wasn't aware of and didn't notice?" Then yes, it's possible.

So, 4 years later... This happened: Child abuse imagery found within bitcoin's blockchain

Would it be possible to make using Bitcoin illegal by posting child porn or similar highly illegal content in the message of a transaction?

Bitcoin, as a decentralised provision network of sorts, may have the same protections as given to ISPs and content providers. So unless the government is gunning for Bitcoin anyway - I'd say no, Bitcoin can not be rendered illegal this way.

There are methods for having 'thin clients' that don't download the entire transaction history - would these be immune to an attack like this?

Obviously if you don't download the illegal content nor upload any intent to download specifically that type of content - you should be safe with a thin-client. But it limits the security of Bitcoin network considerably if only thin-clients were possible.

How difficult would it be to track the sender of such material?

Not very difficult. Bitcoin is not an inherently anonymous protocol. If the communication between nodes is not encrypted with ephemeral TLS sessions, a mix service wouldn't provide any meaningful anonymity either.

"if you don't download the illegal content" Easier said than done when parts of the block chain could be downloaded automatically by the software. And fyi, tracking senders over the internet can easily made very difficult, see proxies and dark net.

Can someone answer with a citation how you would be able to track someone using bitcoin? The link provided is a bit hard to understand. Does time effect how easy it is to track? For example if it happened a few years ago?

@LateralTerminal I think this would be a good question for this site :)

This might be a bit tricky because people generally tend to map binary data sequences to representations of real-life objects automatically, often conveniently slipping to lax and negligent assumptions. What is often left out is the importance of encoding, which is the essence that gives data a meaning. Without encoding, it's just a meaningless bitstream.
Now, the thing with the encoding is that, given a "right" encoding, you can basically turn any binary data into arbitrary "image" (or text; or give it any other meaning). Even this answer might be considered to convey an illegal material, if a carefully-crafted encoding scheme is used to interpret it.
When questioning the legality of binary data, a highly motivated prosecutor could surely come up with an encoding scheme which, when used to interpret the data in the Blockchain, would reveal an illegal material. However, a reasonable judge would probably dismiss it because it isn't the natural encoding intended to be used in the protocol. I'm not a lawyer, but I believe the intent would be a key factor here, so people using Bitcoin (and sharing the Blockchain) should not be prosecuted if they're only using it for the intended purpose, interpreting the data as specified in the Bitcoin protocol. Otherwise, anybody using the Internet could be prosecuted for anything.
On the other hand, a person who inserted such a data on purpose (re-encoding them to a compatible format and sending as a transaction output), could probably face a criminal prosecution, if reliably found.
Disclaimer:
I'd like to add that law is not an exact science (actually is not exact nor science) and thus might be hard to grasp for technical people who strive to always find definite answers. Also, all decisions might be politically or otherwise motivated.

The "turn any binary data into arbitrary image" idea is simply wrong. An encoding cannot provide additional bits of information, only extend the representation of these bits.

Not true. Even though the example was far-fetched and there are no "common" encodings doing this; you could surely come up with one. Example: take an image, xor it with some selected blockchain data and then make the result part of the definition of encoding function. Now, if you take the same data from blockchain and throw it into the just defined encoding function...yes, you get the image you always wanted to get :-) You can obviusly come up with any variation of this.
It's silly, but so it is silly to interpret blockchain data using any other non-intended encoding.

A character encoding is different from a program that gives a certain output on a certain input. A character encoding needs to return the same values for the same chunks of bytes. xor wouldn't work that way. You make it sound like an easy feast for a dedicated criminal programmer, but it really is not.

I said "encoding", not "character encoding". There's infinite number of encodings and what I proposed would be a technically valid encoding. It was showed to make a point about natural and non-natural data interpretation in particular context.


text:
Is it possible to run out of nonce values?
Miners can vary at least these things when searching for hashes:

A 32-bit nonce
Which transactions are included in the block.

Is it ever possible for a currency using the Bitcoin protocol to get 'stuck'? That is, can all combinations of parameters that miners are allowed to tweak not result in a hash that conforms to the difficulty?
One scenario using those parameters I listed could be an ASIC miner working on a brand new network. The difficulty should rise extremely quickly, but there would be very few transactions for him to work with.


text:
Using confidential transactions with plain-text ouputs
I was reading about Confidential Transactions (CT) and understand the basic idea behind it. But what if CT must be bootstrapped on an existing Blockchain such as in Bitcoin, where the amounts are for now visible in the outputs?
Is it possible to create a CT transaction, where the inputs reference UTXOs that are not confidential (just as in Bitcoin now), but creating new outputs that are hiding the value using CT's scheme?
What would the network have to do to check that the sum of commitments in the outputs are the same as the sum of clear-text amounts from the inputs?
//Edit: I found some help from the mailing list describing how CT can be implemented as a Soft Fork to Bitcoin: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-January/012194.html
But I am still not sure how the network can make sure that the confidential transaction outputs from "blinding transactions" sum up to the amount that is being stored into the GCTXO.
Similarly when "unblinding", how can the network be sure that the sum of commitments from the confidential inputs is the same as the amount that is being spent from the GCTXO?
//edit2:
The only way I can think of is that the blinding tx also contains a proof using the sum of commitments in the outputs. That sum of commitments corresponds to a value equal to the amounts from the inputs (minus the tx-fee).
More precisely, a CT commitment looks like xG+aH, with G and H being generating points, x a secret key and a being the amount locked with the output. For a proof we sum all commitments from the outputs: C=xG+aH + yG+bH + ... + zG+cH = (x+y+...+z)G + (a+b+...+c)H. A proof can then be provided by subtracting (a+b+...+c)H from C and signing it with the corresponding secret key: C-(a+b+...+c)H=(x+y+...+z)G, where (a+b+...+c) is exactly the amount from the inputs (minus tx fee), and a signature is provided from the public key (x+y+...+z)G, where (x+y+...+z) is the private key.
But from reading the specification I cannot see where such a proof/signature would be provided with the blinding transaction?

Is it possible to create a CT transaction, where the inputs reference UTXOs that are not confidential (just as in Bitcoin now), but creating new outputs that are hiding the value using CT's scheme?

Yes, you include a dummy blinding factor.

What would the network have to do to check that the sum of commitments in the outputs are the same as the sum of clear-text amounts from the inputs?

With the dummy blinding factor, it would do exactly the same a normal CT tx.
The answer was a lot simpler than you thought.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
What's the rationale of using ECDSA instead of RSA?
One major drawback of (EC)DSA is that it requires a good RNG, otherwise the private key may be accidentally exposed. This is also one of the major reasons (I found so far) why no(?) smartcard supports any kind of DSA. In contrast to that, RSA, while usually being used for encryption, can also be used for digital signatures and behaves deterministic, i.e. signing the same message again will yield the same signature everytime. Lacking the requirement of a RNG (other than in key generation) this is why RSA is available on many smartcards, which would make bitcoin much safer without requiring a rather complicated offline-wallet setup.
So, does ECDSA provide anything bitcoin absolutely needs that RSA cannot achieve? Or is it merely bad luck in Satoshi's choice?

This problem has been solved: generate k for signatures deterministically instead of by RNG. See RFC 6979.

I'm not sure why you think RSA is much safer than ECDSA. As you can read here: https://crypto.stackexchange.com/questions/3216/signatures-rsa-compared-to-ecdsa
ECDSA offers same levels of security as RSA, but with a much smaller footprint.
In fact, the more you increase the security, the larger the RSA keys become compared to ECDSA.  This makes RSA less fit for a system such as bitcoin which requires small packets to be sent around the network all the time (being peer-to-peer).

I didn't claim RSA was safer, merely that it apparently can be implemented more easily on smartcards. The smaller footprint is a severe reason though, due to the blockchain containing all signatures ever made

As far as I can tell you claim that RSA is safer, compared to ECSDA, because it doesn't require a good RNG. Not sure this claim is proven in the link you posted.

Oh, that was badly phrased, sorry - I merely wanted to use that as a transition on why there appear to exist no ECDSA smartcards

Now with vulnerability found in RSA it looks like a good choice… then in the past
https://crocs.fi.muni.cz/public/papers/rsa_ccs17 .
With Amazon AWS  (Intel E5-2650 v3@3GHz) you can crack 512bit RSA key proximately in 2 hours.

This is not a vulnerability in RSA itself but rather in the way that a certain cryptographic library generates RSA keys. Keys not generated with this library are not vulnerable. Shorter keys (keys with length less than 2048 bits) are generally considered insecure anyways.

Actually, RSA is broken. The Fasterfactor algorithm, is a high speed factorization for very large numbers:

If RSA was broken, I think I'd have heard about it somewhere, probably on the front page of the New York Times or something.

Citation needed!  If this is your own proposed novel attack, then this is not the place to share it.  People will probably not take it seriously until you have released code, cracked well-known challenge messages, or published your attack in a peer-reviewed journal.  Your image doesn't seem to contain anything beyond simple algebra and I would bet a lot that the idea has already been considered and shown not to be significant.


text:
Is it possible to run Bitcoin on Google App Engine? / alternatives?
This question is cross-posted on bitcoin.stackexchange, stackoverflow and bitcointalks.

I'm planning to build an application on Google App Engine that will heavily make use of Bitcoin trading. I've been Googling along a little but I couldn't find whether it is possible to run Bitcoin itself on App Engine (with Java). I have some experience with App Engine, but limited to a pure web-app centered usage.
I've read about a few people that have made applications using Bitcoin with App Engine as well that are hosting Bitcoin separately on an Amazon EC2 instance.
So, does anyone here either has experience with running Bitcoin in App Engine for Java or would anyone have an idea how this could possibly be done?
I know there are a lot of Bitcoin applications out there, I'd like to know how these manage their Bitcoin traffic.
I'm trying to avoid needing a separate Amazon service running all the time next to App Engine.
In fact, receiving Bitcoin can easily be done by using passive APIs like blockexplorer or blockchain, so I'm considering to find a reliable API to handle my outgoing payments. But this approach causes extreme dependency on this API service, which I actually want to avoid as much as possible.

Was it really necessary to cross post in a half dozen places?

It's 3 actually. And, in fact, the question belongs here. But I think there are far more App Engine specialists in Stackoverflow (this place is a little deserted). And I know that the true Bitcoin insiders are on Bitcointalk.
I'm sorry for that, but I ought this question quite relevant, considering the popularity of App Engine among web developers...

You should have a look at this (my master thesis topic connected to running Bitcoin on GAE).
While it is possible to run a Bitcoin-related application on Google App Engine, the service will inherently depend on another application to run. GAE only allows one to use the most basic ports for HTTP and HTTPS communication, whereas running an independent Bitcoin node requires the use of TCP/IP. It is possible to write a simple program to convert HTTP calls into TCP/IP ones, but that would need to be hosted elsewhere. If you want to use Bitcoind as the way to communicate with the Bitcoin network, things get significantly easier.
I've tried writing my own implementation of a Bitcoin client on Google App Engine in Go, but was ultimately defeated by OP_Checksig and its lack of documentation. But honestly, I found using Bitcoind for everything Bitcoin-related to be a lot simpler.
What you also need to consider are the costs of running apps on Google App Engine. I personally found the write and read operations to be a bit limiting if you want to stay on a free tier, but depending on what you will actually want to do, there can be other factors to consider.

So to conclude? The only feasible way is to host a Bitcoind client elsewhere?
I have considered to host the entire application on an Amazon or Heroku service. But I'm familiar with App Engine and my team is just not experienced enough to run from a self-managed host like those. Maybe we will eventually consider doing this, but for now we're looking to do it on App Engine.

@stevenroose Running a Bitcoind client elsewhere is the easiest, but you probably could do what StronCoin did and rely on other services to operate - for example a javascript wallet handling services and an API to accept custom Transactions.

What exactly did StrongCoin do? Why "did"? Are they gone? I know what Blockchain My Wallet does. But I'm not wanting to write a real Wallet service. Just a service where users can send and receive coins from. More the way MtGox does it, f.e.

@stevenroose StrongCoin is still around and doing well as far as I know. I'm not sure which service they use exactly for some things, but they get information required for creating transactions from Block Explorer, let the users decode their private keys on their machines through javascript, then sign the transaction and send it back to them to relay to the Bitcoin network. The same could be done on Google App Engine.

Ah, yes, that's exactly the way Blockchain My Wallet works as well. Sadly, this is not possible in our case.

BTW, I'm in examination period now, but will definitely read your thesis about this.

Where can I get your latest GAE java code? I used to have it but lost in a old death HDD.

@quantme I don't use Java, I code in Go.


text:
Are there ready-to-use indexed bitcoind data files available somewhere?
I tried bootstrapping bitcoind, but it's slowly downloading and downloading. I tried putting these files first, but it is still downloading something a bit, stays 100% CPU, iowaits, fills up the thawing free gigabytes and is not going to finish soon.
Is there somewhere ready-to-use $HOME/.bitcoin directory available for download to skip any lengthy initial phase?

Is it possible you are using an encrypted filesystem?
Bitcoin is i/o heavy and bitcoin running on an encrypted filesystem is really slow.

With bitcoin v0.7 you can have it create blk000n.dat and regenerate the blkindex.dat from another blk data file: http://bitcoin.stackexchange.com/q/4145/153

But I'm unaware of any download that already includes all (currently three) blk*.dat files.

If you're going to trust someone to give you a pre-indexed version of the blockchain, you are trusting them about the entire history of transactions. They can claim whatever they want (within certain bounds), and your client will accept it. If there is a mistake in the data (either deliberately or accidentally), it will result in the client rejecting the future valid chain at some point, potentially landing you in a side chain (which may be under control of the attacker). If many people would use the same source for their pre-indexed files, they would all end up on the same side chain, living in their own happy world. Both chains (the real one, and the side one) would allow every existing output to be spent once; if this happens on a large scale, it is a disaster for Bitcoin.
Of course, the long waiting times are a real problem (the upcoming 0.8 version should be significantly faster, though) but if you can't spend the resources and time to maintain a fully validating node (like the reference client implements), consider using a lightweight client like Multibit. It does not offer the same security, but it is better than trusting a centralized instance to tell you history.

An Intel(R) Core(TM)2 Duo CPU T5850  @ 2.16GHz takes 2 days to process.
Providing a reliable indexed bootstrap is simple: just checksum the whole package.

Then you're still trusting the person who computed the checksum.


text:
how to monitor +20,000 addresses for new received transactions?
I have around 20000 generated addresses which I want to monitor for new transactions. More addresses should probably come. Customers should use every address only once but I would like to monitor already used addresses if some of them decide to transfer coins to "used" addresses.
These addresses are not in the online wallet, I have only addresses in the databases. Private keys are held offline.
That means that I do not want to monitor addresses from the local wallet but the addresses from databases.
A command should executed after a transaction is received (with enough confirmations). There are some monitor services which can send an email or call url after receiving a transaction for an address on the watchlist.
I would like to implement the same feature for my application without depending on external service.
I saw some questions and answers like:
How to know there is a new transaction? or
  Monitor all transactions on bitcoin network - API
But what would be the most efficient way to do this? Is there a perl/php compatible way to do that?
One of topics from above links to https://bitcointalk.org/index.php?topic=89725.0 where Gavin is talking about some new features but I did  not get how could I or whether I can use anything of this to monitor a high number of addresses. Sending every minute a batch RPC call with a few thousands addresses to bitcoind is probably not a solution :-(.
I hope that there is a elegant way to monitor the whole information stream (all incoming transactions and other incoming information) and react if it matches what I need.

I would start with an external service, and then build and run a bitcoin node when you need to. We've used https://www.blockchainwebhooks.com/ and https://www.blockcypher.com/, both have been very reliable and offer free plans

I am basically doing the same thing for bitcoinmonitor.net. I have a database of addresses to monitor and get notifications from bitcoind for any incoming transaction.
I maintain a patchset for bitcoind which allows setting an url which will be called with any incoming unconfirmed transaction, including transaction details in a json object. Also for any new accepted block a (different) url can be set up to be called with details on the new block.
So you will get a notification for any incoming unconfirmed transaction, then you can match this with the monitored addresses in your database.
If you want to trigger actions after a certain number of confirmations you need to hook up to the new block event.
Check https://github.com/TripleSpeeder/bitcoin for my bitcoind fork. I try to keep it more or less in sync with the current stable official client. This is running stable with bitcoinmonitor.net for around 10 months now.

really nice job. thanks. I just did diff with bitcoin repository and patch looks really promising.

Thanks :-) Note that my custom "getanytransaction" rpc method is deprecated. Upcoming official 0.7 client will include a new method "getrawtransaction" which will do basically the same (see https://bitcointalk.org/index.php?topic=89725.0).

“I try to keep it more or less in sync with the current stable official client.” – Sorry to say so, but the problem with aging answers like this one are things like [This branch is 3502 commits behind bitcoin:master]

If number of addresses in your local wallet is not too high, you can search all transactions (in and out) and filter them to seperate addresses which is not in the database. If you have a large number of addresses in the local wallet, this may not be helpful for your case due to very high number of "string comparisons". (In this case, just use another wallet for the ones in the DB).

If this is the first time for monitoring, start searching from
Block-0 (genesis) "getblockhash n" RPC command will give you hash of
n'th block. Use 1 to get hash of the block which is just after the
Genesis-Block. Then use "getblockheader"
getblockhash 1
Use the result with "getblockheader" RPC command. This will give
you header of a block which includes "previousblockhash" variable.
getblockheader 'blockhash'
Use 'previousblockhash' variable from the result you got at
previous step. "listsinceblock" RPC command will return all
transactions since given block. (Attention: transactions in the
given block are not included!)
listsinceblock 'previousblockhash'
After you finish your job on transactions which are returned from
"listsinceblock 'blockhash'", save the last block hash you achieved
(and you don't want to search again) into the db or a file.
Next time, get the block hash you saved and go to step 3.

This way, you will only monitor new transactions. If you want to update old transactions (number of confirmations etc.), you need to search from the first block every time. In that case, you would just want to use walletnotify or blocknotify.

Hey, this is exactly what I am trying to do, store deposit transactions for each unique user address from the output received from listsinceblock. I would like to ask, when computing the sum of deposits for each unique user address, does one consider transactions only of category receive and generate and ignore all other transactions categories like orphan, immature and send?

You could import all of those keys into a wallet using a very long password that you will never use again. Then, you could make bitcoind handle keeping track of all of those addresses and their balances, while not being able to spend any of them. The rest can be handled through the JSON RPC API. It might not be the neatest way of doing things, but it should work.

that is more or less the same thing I said. I could bomb bitcoind with RPC calls but I was looking for a neater way.

If you want to just monitor large number public address, you can try blockonomics wallet watcher. It is optimized to watch large number of address. In addition to this:

You can get email notification of transactions
Tag Addresses to group them
See history of transactions

I have written a program in Python3 that allows you to search for any address on bitcoin core whether it belongs to your wallet or not.
Here is the github link:
https://github.com/ORP967/Bitcoin_Core_RPC_par_address
Let me know what you think or if you have any improvements you might have.


text:
Gridseed USB ASIC Won't Mine Bitcoins
Okay so I have done my research, I have practically tried everything. It just frustrates me because mining LTC was a piece of cake but I can't seem to figure out how to mine bitcoins which this device says it can do bitcoins plus dual mining.
I have tried BFGminer but it seems not to detect my gridseed unless I am mining LTC. Then I tried CPUMiner and it works except it gets invalid all the time its like its using the wrong algorithm but I tried the -a sha256d and still produces the same issue. Can somebody help me I have the drivers installed and my usb Gridseed miner is on COM6. I have also tried CGMiner and it says cannot detect any USB devices.
I have tried every possible thing that comes up on the first few Google Results. I am not exactly new to mining as I have done Scrypt mining fine with this device.
Here is the product.

Is there any sort of an error message printed when you try to mine, or are your shares rejected?

For cpuminer it just rejects shares, I am not talking a few but all of them. For BFGMiner it doesn't detect it but I think BFGMiner doesn't support Gridseeds for mining BTC.

I found this link apparently cgminer doesn't like usb3 according to the forum post don't know why I thought usb3 is backwards compatiable. But I tried thinking this is bull but it worked.


text:
Accept payments on someone else's behalf without being able to spend them
TL;DR I wish to store some sort of key in my application for each vendor account that allows for my application to generate a receiving address for clients to make payments to.
I am writing some invoice software in Java that I would like to allow to use bitcoin. Basically what I want to have happen is a vendor can save some sort of key to their account details (sorta like the PayPal id and secret key) and any clients paying to that vendor via bitcoin will be given the url to pay to. I don't want this to be a middle man software in the sense that I will never have any bitcoins on my server, I won't accept payments, it only serves to give a payment address of the vendor to a client.
I am under the understanding that this would be possible using the receiving address, however it is not good to use one address for every payment so that is out of the question. I don't want a vendor to have to add a new address after every payment because that isn't at all user friendly.
So I'm wondering if there's some way I can generate addresses for the vendor on my server without holding their wallet. I have been looking at bitcoinj and it seems like there may be some way to do it, but I am quite new to bitcoin. Is that even a possibility? Is this a reasonable expectation for my application to have? If not, do I have any other options?

This is entirely possible with an optional additon to Bitcoin called BIP32. Unfortunately, BIP32 is not implemented by the standard client, but there are other clients that do implement it.

Ask your customer to download the latest version of Electrum, then have them give you their extended public key.
(As I said above, there are multiple clients that can do this, I'm just most familiar with Electrum.)
Include this code in your BitcoinJ application:
String serialized_xpub = "xpub.....";
unsigned int address_num = 4;
NetworkParameters params = MainNetParams.get();
DeterministicKey root_xpub = DeterministicKey.deserializeB58(null, serialized_xpub, params);

// Derive m/0/<n>, Electrum's BIP32 path
DeterministicKey receiving = HDKeyDerivation.deriveChildKey(root_xpub, new ChildNumber(0, false));
DeterministicKey new_address_key = HDKeyDerivation.deriveChildKey(receiving, new ChildNumber(address_num, false));
String new_address = new_address_key.toAddress().toString();

You will generate the same address as long as you use the same xpub and address_num. Make sure that you don't skip five or more addresses, though. If you do end up doing this, then your customer can generate addresses until they see the new payments.
Also, note that you don't have the private key for this address. If your customer loses their wallet, those coins are gone.
Put that address on the invoice.
The money will show up in their wallet.

Best of luck with your application!

Aha! I think this is just what I need. I had seen the discussion of BIP32 around, but I have installed Bitcoin-QT which didn't seem to contain any of that. That explains a lot to me. I'll check this out tomorrow as it's just hitting quitting hour for me today, and report back, but I don't suspect difficulties. Thank you.

Sweet, I think I have it working, at least simplisticly. I needed to make a couple changes to your code, not sure if it was due to a change in the library or something. Anyways, I didn't add the network parameters to root_xpub when it was created, instead I had to change the address generator to be new_address_key.toAddress(params)

Take a look at bitcoin payments for woocommerce plugin. It can generate unlimited addresses from a single electrum master public key. You can't spend using just the public key so it is safe too.

authors: Алеся Стивенс

authors: Артур Салахиев


text:
Trying To Get More MH/s Litecoin Mining
I am relatively new to this but do have technical abilities like overclocking, etc. Here's what I'm working with:

AMD A6 3620 APU w/Rade
  Radeon HD 6530D
  Driver: AMD Catalyst 15.7.1
  Win 7 64 bit Home Premium

Also installed the recommended SDK for the AMD.
Tried both the cgminer from Kalrof and the version included in the GUIMiner -script download, and the best is around 42-43 KH/s. Tried the full GUIMiner and it was too unstable to connect on my system...it seems.
Been looking around and finding people with (what seems to be) lesser graphics getting above 100, and some in the area of 200 KH/s. If I can get into the 80-100 MH/s I would be happy. So I have tried all their settings, and keep getting lower numbers than I had to start with, or the driver crashes...which brings me to the second issue.
If I set the intensity above 16 the driver will crash. It reloads, but CGMiner stops working and has to be reloaded, too. This also happens when using xintensity above 225...and at 225 cgminer crashed after three days.
I've played with everything I can think of, in the .conf file and through flags. Any help would be sincerely appreciated! I want to do this, but if it's gonna take 3 months to get a single litecoin then I may as well go back to writing... tongue.gif
Also: Would it be possible to use both the GPU and the APU simultaneously? I haven't found much on this subject anywhere...
Here's a link to the complete specs on the Radeon: http://www.pc-specs....on_HD_6530D/489
Here's a look at my .bat, file:
setx GPU_MAX_ALLOC_PERCENT 100
setx GPU_USE_SYNC_OBJECTS 1
cgminer.exe --scrypt -o stratum+tcp://global.wemineltc.com:3333 -u user.worker -p pwd

AND the CONF:
{
"pools" : [
{
"url" : "stratum+tcp://global.wemineltc.com:3333",
"user" : "user/worker",
"pass" : "pwd"
},
{
"url" : "stratum+tcp://global.wemineltc.com:3333",
"user" : "user/worker",
"pass" : "pwd"
}
],
"xintensity" : "330", (had to change this to 225 due to crashes after about 30 mins.)
"vectors" : "1",
"worksize" : "256",
"lookup-gap" : "0",
"gpu-threads" : "1",
"thread-concurrency" : "0",
"gpu-engine" : "0-0",
"gpu-fan" : "0-85",
"gpu-memclock" : "0",
"gpu-memdiff" : "0",
"gpu-powertune" : "0",
"gpu-vddc" : "0.000",
"temp-cutoff" : "95",
"temp-overheat" : "85",
"temp-target" : "75",
"api-mcast-port" : "4028",
"api-port" : "4028",
"expiry" : "120",
"failover-switch-delay" : "60",
"gpu-dyninterval" : "10",
"gpu-platform" : "0",
"log" : "5",
"log-dateformat" : "0",
"no-pool-disable" : true,
"no-client-reconnect" : true,
"queue" : "1",
"scan-time" : "30",
"scrypt" : true,
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}

Again, THANKS for any help you can provide!

Please fix the formatting: E.g. four spaces will give you "preformatted text", allowing you to present your config in a readable fashion. However, today, using a GPU instead of an ASIC for mining, is like using a spoon to compete with a dredger.

"Been looking around and finding people with (what seems to be) lesser graphics getting above 100, and some in the area of 200 KH/s. If I can get into the 80-100 MH/s I would be happy."
I think you are comparing speeds of mining SHA-256 with your mining Scrypt. Mining SHA-256 will have vastly higher hashrates. However, afaik even Litecoin has surpassed its GPU mining phase.

Mining hardware comparision on Litecoin.info lists an "AMD 6530D" with a hashrate of 47 kH/s. This is in the same range as what you achieve. The higher numbers you found were probably associated with a different mining algorithm instead of Scrypt which you are performing when mining Litecoin.
However, the age for GPU mining is over for Scrypt mining just as it is with Bitcoin mining. Although, I was talking about Bitcoin, this longer explanation applies to Litecoin just as well:
In the ASIC-age, is it worth starting mining Bitcoin at home?


text:
How to login into my wallet?
I get my bitcoin address from freebitco.in. So how can I login into my wallet to know about my bitcoins? How to convert bitcoins into dollars and send it in to my prepaid debit mastercard?

I would be very surprised if you had enough bitcoins to buy anything meaningful after using a free bitcoin website. PS. No referral links.

Your question shows that you're quite new to Bitcoin in general. I would advise you to do a little light reading about it to understand what bitcoin exactly is. Regardless..

I get my bitcoin address from freebitco.in . So how can I login into my wallet to know about my bitcoins?

If you acquired your wallet from Freebitco.in, you were redirected to Blockchain.info, you can log in there to check your balance. You will only have balance there if you withdrew coins from Freebitco.in in the first place. Otherwise, log into Freebitco.in and withdraw your coins.
Blockchain.info is a web wallet, you'll find all the information you need about it on their website.

How to convert bitcoins into dollars and send it in to my prepaid debit mastercard?

You will first need to sell your coins for fiat currency. There are literally hundreds of online exchanges, or people you could find locally to sell to on Localbitcoins. Here's a nice guide to get you started.
After you've read the guide, signed up for an exchange, and sold your coins, you can have them transfered to your bank account and use the money with your prepaid card.
Congratulations on starting with Bitcoin, I would recommend you not to cash out, and instead of converting your coins to fiat, try finding places where you can spend your bitcoin instead.


text:
my wallet will not send BTC
I get this error when I try to send BTC
A FATAL ERROR OCCURRED. Bitcoin can no longer continue safely and will quit.
Exception: St13runtime_error
CDB(): can’t open database file wallet.dat, error -30974
C:\program files (x86)\Bitcoin\bitcoin-qt.exe in Runaway exception
Win 7
Bit core 0.9.0
Any help would be greatly appreciated
Thanks

Sounds like your wallet is corrupted. Try extracting your keys, and reïmporting them.

I am a newbie so if there instructions on how to perform a key extraction and re-importation that would be great thx

This was a learning experience for me too! I wasn't sure how to extract keys on Windows, and had to work my way through it. This is what I did on Windows 7.
Before you do anything: backup your wallet!
Bitcoin-Qt does not have these as commands in it's GUI, so you need to use bitcoind.

Close Bitcoin-Qt
Open Command Prompt
Enter the command:
"C:\Program Files (x86)\Bitcoin\daemon\bitcoind" -server
or if that doesn't work, try
"C:\Program Files\Bitcoin\daemon\bitcoind" -server
(The -server switch tells bitcoind to accept commands.)
That CMD session should freeze and become unresponsive--just minimise it; that's Window's way of telling you it's working.
Open another Command Prompt and type:
"C:\Program Files (x86)\Bitcoin\daemon\bitcoind" dumpprivkey [ADDRESS]
Where address is the full public address.
So, I might enter "C:\Program Files (x86)\Bitcoin\daemon\bitcoind" dumpprivkey 18gcVuGVgJSPswQML7LbxQBFEmBgrEwtuW
Do this for every address you have bitcoin(s) in or want to keep.
Write down all of your private keys.
Close both CMD's, delete your wallet (not the backup), and redo steps 2 and 3. (This will create a new wallet for you to use.)
Enter "C:\Program Files (x86)\Bitcoin\daemon\bitcoind" importprivkey [PRIVATE KEY] [LABEL] into the 2nd CMD instance.
So for example "C:\Program Files (x86)\Bitcoin\daemon\bitcoind" importprivkey 5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ OldWallet

I have looked at the instructions and I get this error when trying to get my keys "CDB() : can't open database file wallet.dat, error -30974 (code -1)

@steelmythos By "when trying to get your keys" do you mean when running the dumpprivkey command? Or something else?

what i mean is i am using the console under the help menu option. I had to restart bitcoin client to get to the private keys.

@steelmythos no problem! If you found my answer fulfilled your question, please consider marking your question as answered so other people with the same problem may find help in the future. And may I be the first to say: Welcome to SE!

It started working. i followed your instructions but got stuck. But i noticed that the Maxcoin was installed in the same dir. I renamed the maxcoin install restarted bitcoin and i was able to send 2 coins I will test further in a couple hours. but right now it looks good. thanks agin i could not have done it without you

@steelmythos That's what the site is for! :) Enjoy your stay.


text:
What is the variable valertpubkey in net.cpp for?
vAlertPubKey = ParseHex("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284");

The vAlertPubKey variable can be seen in the initialisations for main and test network, but not for regtest. Can someone explain what it exactly means and how will it affect me if I want to simulate a network of 1000 or more nodes on a private network in regtest mode ?

One of the people who holds the private key corresponding to that public key (Satoshi, theymos, Gavin, and unspecified others) has the ability to send a message out to everyone on the network. This has been used in the past to tell people about security vulnerabilities in the client.

Can someone explain what it exactly means and how will it affect me if I want to simulate a network of 1000 or more nodes on a private network in regtest mode ?

Assuming you're not testing the alert system, it won't affect you.


text:
Sites for searching the blockchain?
This is a general question, but what's the best way to search the blockchain? Blockchain.info lets you search by address, but it seems to be a side feature instead of its central purpose.
Are there other sites for searching Bitcoin transactions? I want to see all the transactions associated with a single address or to do other arbitrary types of searches?

Blockchain.info does let you view all transactions associated with an address. Example. Could you clarify why this doesn't meet your needs?

Thanks @NickODell. There's no specific purpose. Just looking for something interesting to build and contribute back to the Bitcoin community, but if tons of alternatives already exist, we prefer to find something else. Googling for ways to search Bitcoin hasn't yielded  many options, so we wanted to ask the community.

The term for such a site is block explorer and there are many of them.  Among the top Google hits for "block explorer" are:

http://blockexplorer.com
http://blockchain.info
http://biteasy.com
http://blocktrail.com
http://btc.blockr.io
http://bkchain.org


text:
Syncronization time jumps up to 8 days, then down again
I'm relatively new to using the litecoin software.  I watched the local copy of the blockchain build all the way down to two days.  Suddenly, it jumped back up to 8 days, and then built all the way down to zero days and finished.  The time it took to go from 8 days down to zero was a lot faster than the normal build had been down to two days (about ten or fifteen minutes). Knowing that this latter part of the build would be past all the checkpoints (do I know that?), is there an issue here?
Answers to comment section:
Nick: No, the time was not altered, and the computer was never rebooted during the blockchain build.
Unfortunately, I deleted the blockchain, due to suspicion.  Now I wish I'd kept it for forensic analysis.

Did you change your computer's clock during this time?

@Jannes That is entirely irrelevant to the question, and a subjective opinion.


text:
Blockchain.info returns "None Standard Script Output" when submitting a transaction?
I dont know what is wrong
var insight = new Insight('https://insight.bitpay.com','livenet');
insight.getUnspentUtxos('1MkZVyKqNB5jpJDpfhp4TkDikFwdQM44he', function(err, utxos) {

if (err) {
        console.log('Error in getUnspentUtxos: ' + err);
    } else {
        console.log('utxos' + ' :' + JSON.stringify(utxos, undefined, 2));

        var transaction = new bitcore.Transaction()
        .from(utxos)
        .addData('pime')// Add OP_RETURN data.
        .to('1J4u97VGMz4GV7YFfRjtKLDchZ5zjiKLu4',15000)
        .fee(1000)
        .change('1AG1c1t3FAAEFdxmzm3wTg7XAnRGSwX5QA')
        .sign(privateKey);

        console.log(transaction.serialize());

        //console.log(transaction);

    }
});

This is the result: http://pastebin.com/raw.php?i=YNaHBcmU

blockchain.info does not accept OP_RETURN outputs via API, You should use any other service for broadcasting. for example http://webbtc.com/relay_tx

There is nothing wrong with this transaction, the website you tried to submit it through (blockchain.info) is defective. I have broadcast it for you, and it is visible as a confirmed transaction on most block explorers.
bitcoin-cli decoderawtransaction is a useful tool which will let you decode and view the transaction have created prior to submitting it to the network, and bitcoin-cli sendrawtransaction will allow you to broadcast the transaction without relying on possibly faulty third parties.
{
  "txid": "63913178feb485db6f25c9f7940e3d17175ae7a51bf1ae58acf8f11ee95a2966",
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "f713e91b7df1dc4e4e85c7e2d9a050ca95408d1f578925f54aa93dc7bc98daa7",
      "vout": 0,
      "scriptSig": {
        "asm": "3044022012051ad672731cf555964c23d31defb67b06a85ea7de4843777d7058d3a084490220567864bf79669a8cb48e8de29f31fb29caef56f741ab9145424b3430af7b317001 038042cf5da3747c559e1d77e574eb81842958ef0cbc0461c1b783eda091afa782",
        "hex": "473044022012051ad672731cf555964c23d31defb67b06a85ea7de4843777d7058d3a084490220567864bf79669a8cb48e8de29f31fb29caef56f741ab9145424b3430af7b31700121038042cf5da3747c559e1d77e574eb81842958ef0cbc0461c1b783eda091afa782"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_RETURN 1701669232",
        "hex": "6a0470696d65",
        "type": "nulldata"
      }
    },
...
}

so..I need to put sendrawtransaction..for example get the rawtransaction and then sendrawtransaction. can i use rpc json to use node and bitcoind??

Basically use any raw transaction submission method that is not Blockchain.info. The RPC interface of bitcoind will work fine, and there is surely tools existing to communicate with it.


text:
What does it mean to "password protect" your wallet on Multibit?
Isn't my wallet (i.e. my private key) already private? What does it mean to set a password for it? I assumed it encrypted the wallet file, but this answer seems to point otherwise. How can they verify the password? I don't feel very comfortable sending it to a server, and it doesn't seem any safer to store a password with the wallet file than just have a wallet file without a password. However if it does encrypt the wallet, what software is used?
I'm very unsure of multibit, it seems very non-transparent. The wallet file seems to be a binary file instead of a plain text one with my key (granted plain-text "isn't safe", but so isn't a binary file that can be used by an attacker on his multibit client). I don't even know what multibit is doing with that file...
Thanks... Noob here.

Your wallet.dat file contains your private key. By default this is saved in clear text. Meaning that anybody who gets a hold of this file, could see the private key and therefore spend your money.
When password protecting this file, to see the private key, you need a password. MultiBit uses a well known Java library to "password protect" it. It's all open source and well peer reviewed.
If you don't trust MultiBit you can still encrypt your wallet.dat file using other software. You must also understand that if you decide to unprotect your wallet file, it's not necessarily the case that people will be able to steal your money; they would still have to get a hold of the wallet.dat file.
So, it's best practice to password protect it, so in case you lose your file, or a hacker enters your computer, they won't be able to spend your money because they would need the password.


text:
test cases for hash algorithm anywhere?
RFC4231 gives test cases for SHA256 with several different sets of gozintas and gozoutas. I'm looking for something similar for the SHA256 hash as implemented in the Bitcoin mining algorithm.

Based on the answers given, here is a very simple test in Python. Note that the generated digest must be reversed before the check, as the 256-bit digest is apparently returned with the least significant bits first.
#!/usr/bin/python
import hashlib
GENESIS_BLOCK = \
    '0100000000000000000000000000000000000000000000000000000000000000' + \
    '000000003BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA' + \
    '4B1E5E4A29AB5F49FFFF001D1DAC2B7C01010000000100000000000000000000' + \
    '00000000000000000000000000000000000000000000FFFFFFFF4D04FFFF001D' + \
    '0104455468652054696D65732030332F4A616E2F32303039204368616E63656C' + \
    '6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F75742066' + \
    '6F722062616E6B73FFFFFFFF0100F2052A01000000434104678AFDB0FE554827' + \
    '1967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4' + \
    'F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC00000000'
GENESIS_HASH = \
    '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
def check_hash(block = GENESIS_BLOCK, blockhash = GENESIS_HASH):
    '''
    check that the calculated hash matches what Bitcoin expects

    >>> check_hash()
    True
    '''
    blockheader = block.decode('hex')[:80]
    header_hash = hashlib.sha256(blockheader).digest()
    check_hash = hashlib.sha256(header_hash).digest()
    return check_hash[::-1].encode('hex') == blockhash

if __name__ == '__main__':
    print check_hash()

First off, bitcoin uses SHA256d.
Second, the best testcase I can think of is the genesis block:
GetHash()      = 0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
hashMerkleRoot = 0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
txNew.vin[0].scriptSig     = 486604799 4 0x736B6E616220726F662074756F6C69616220646E6F63657320666F206B6E697262206E6F20726F6C6C65636E61684320393030322F6E614A2F33302073656D695420656854
txNew.vout[0].nValue       = 5000000000
txNew.vout[0].scriptPubKey = 0x5F1DF16B2B704C8A578D0BBAF74D385CDE12C11EE50455F3C438EF4C3FBCF649B6DE611FEAE06279A60939E028A8D65C10B73071A6F16719274855FEB0FD8A6704 OP_CHECKSIG
block.nVersion = 1
block.nTime    = 1231006505
block.nBits    = 0x1d00ffff
block.nNonce   = 2083236893

CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
  CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
    CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
  vMerkleTree: 4a5e1e

You can take any raw block and its hash as an example. For example, use the Genesis Block:

0100000000000000000000000000000000000000000000000000000000000000000000003BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A29AB5F49FFFF001D1DAC2B7C0101000000010000000000000000000000000000000000000000000000000000000000000000FFFFFFFF4D04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73FFFFFFFF0100F2052A01000000434104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC00000000

You need to take its header:

0100000000000000000000000000000000000000000000000000000000000000000000003BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A29AB5F49FFFF001D1DAC2B7C00

(note the last byte changes from the original 01 to 00, since block headers don't have transactions in them)
Which hashes to

000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Actually, for the block header hash, you only hash up to the nonce, which is 2B7C in this case.


text:
How to configure the official bitcoin client to conveniently use offline wallets?
This is a follow up question to "How can I keep my wallet secure?"
Is there a portable (at least Win32&64/Linux) to configure the official bitcoin client to use only offline wallets to be inserted in the usb slot for each transaction?

You can use symbolic links to your bitcoin data folder or wallet.dat to the usb device location.  You will still have to run bitcoin -rescan when you start the bitcoin client, and you will have to remove the link if you want to run bitcoin without the usb devices.
Note, however that you do not need to have an offline wallet online at anytime ever unless you are spending the money out of it.  If you are only sending money to it then it can remain offline.

Symbolic links should work for linux, but what about windows?

True symbolic links work on linux and OS X. Short cuts on windows are not the same thing. However, you can alias your bitcoin command to provide the "-datadir" flag to point to the USB path.

Symbolic links work on NTFS as well, since Vista: http://en.wikipedia.org/wiki/NTFS_symbolic_link

Can you not just put your wallet.dat on the secure usb and when try to load the wallet if usb no unlocked the wallet would fail with error.


text:
How do I get the address that received a payment?
I am using BitcoinJ and wondering who user that I should credit, all users have their own receiving addresses. Please post an example also, if you have time. :)
Current code:
    wallet.addEventListener(new AbstractWalletEventListener(){
        @Override
        public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
            String txid = tx.getHashAsString();
            long received = newBalance.value-prevBalance.value;
            String address; // The receive address that the payment was sent to.
            int UserID = MySQL.getUserIDbyAddress(address);
            // Here will I credit the user.
        }
    });

I'm afraid I don't understand the question. It sounds like you have some piece of information and you want to get some other piece, but it's not clear to me exactly what those pieces are.

@NateEldredge I think he wants the address that recieved the payment, given the arguments to onCoinsReceived. Is that correct, HydroTekZ?

It is very correct, @NickOdell. NateEldredge, I want to get the address that recived the payment.

Please don't offer people money. It's against SE's policies.

Sorry, never mind about the money then... Anyways, do somebody know how I can get the address that recive a payment?

I found out in the end how to do it, here you can see:
    wallet.addEventListener(new AbstractWalletEventListener(){
        @Override
        public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
            String hash = tx.getHashAsString();
            long received = newBalance.value-prevBalance.value;
            String address = null;
            for (TransactionOutput txop : tx.getOutputs()){
                if (txop.isMine(wallet)){
                    address = txop.getScriptPubKey().getToAddress(params).toString();
                }
            }
            int UserID = MySQL.getUserIDbyAddress(address);
            // Code...
        }
    });


text:
All Bitcoin Public Keys with non-zero balance
I want to get a database or otherwise retrieve a set off all bitcoin public keys (not addresses) that have non zero balances.
What would be the easiest way to do that? Is there an API that could do such thing? Do I have to download and prune the whole blockchain? If so how would I do that?

What do you mean PK (but not addresses)?  Do you want to exclude RIPEMD(SHA(PK))?  Is that it?

I want to get only the (non-zero-balance) addresses that have a "visible" public key, i.e. from which money has been spend from.

You can't get a database of all such public keys, but you can get some of them.
An address, as you know, is a hash of a public key.  When somebody sends coins to an address, you can think of the associated public key as having a positive balance, but nobody else necessarily knows what the public key actually is.  (You can't compute the public key directly from the address, because hash functions are effectively one way.)
However, in order to spend the coins from that address, the spending transaction has to reveal the public key (so that the spending transaction's signature can be verified).  So what you need to look for are addresses with a positive balance that have also had some coins spent.  I am not aware of any simple way to do this short of making an index of all transactions.  It is possible you could rig up a way to produce such a list by querying a fully-synced bitcoind using -txindex (so that all transactions are indexed), but it seems likely to be inefficient.
But as a randomly chosen example, consider the address 1Q6NNpHM1pyh6kEqzinBhEgsRc3nmpTGLm.  It is associated with some public key which has a balance of BTC 259.7299, but since (as of this writing) no coins have been spent from that address, nobody except the owner of the address knows what the public key is.  So your database will necessarily be incomplete; probably very incomplete.
In particular, most people use a new address for each of their transactions (including change addresses), in which case the transaction that reveals the public key for an address also spends all its coins (so that the balance is now zero), and that public key will likely never be used again.  This strategy is used partly because certain theoretical cryptographic attacks are easier if the public key is known, and this strategy mitigates the risk from such attacks; it also increases privacy by making it harder to look at patterns of transactions to try to deduce who the address belongs to.
Another case in which you can learn the public key is so-called P2PK transactions, where the output script includes the actual destination public key, instead of merely its associated address.  These were common in the past, but these days all standard clients use the P2PKH transaction type, in which only the address is used.

Yes, I know that only for a subset of the bitcoin addresses, there is a public key available. My goal is actually to figure out how many there are. My question is more of a implementation question of how I would go about doing this.

Bitcoinlib (https://github.com/petertodd/python-bitcoinlib) will give you the python functionality to scan the blocks and create a database with public keys being reused.   The rest, it seems, is up to you.

You can use btcposbal2csv.py script to export the list to CSV.

To get current addresses with positive balance, let the full node client sync with the network. Stop the bitcoin-core client before running this utility. If you not stop the client, the database might get corrupted.

Then run this program with path to chainstate directory (usually $HOME/.bitcoin/chainstate).

For example, the following will read from ~/.bitcoin/chainstate, and write result to ~/addresses_with_balance.csv:
./btcposbal2csv.py /home/USER/.bitcoin/chainstate /home/USER/addresses_with_balance.csv

Notes:

That the output may not be complete as there are some transactions which are not understood by the decoding lib, or that which do not have "address" at all. Such transactions are not processed. Number of them and the total ammount is displayed after the analysis.

The output csv file only reflects the chainstate leveldb at your disk. So it will always be few blocks behind the network as you need to stop the bitcoin-core client.

You can also download the full list from some websites, e.g.

https://bitkeys.work/faq.php (All Bitcoin Address with Balance in a CSV File).
https://blockchair.com/dumps (Database and Full Node Dumps)

For Ethereum, see: How to list ALL Ethereum addresses with a positive balance.

Although he explicitly wrote "public keys (not addresses)" in the first sentence.

Here is a script based on abe to print all public keys in the blockchain https://github.com/shivaenigma/bitcoin-abe. You can easily exclude the ones that have zero balance


text:
Sandbox bitcoins status is pending
I have registered on https://sandbox.coinbase.com before, two days ago. They are showing me that I have received 100,000 bits.
It's been 3 days that status is still in pending state. What am I supposed to do?

It would probably be easiest and fastest to simply request addition testnet coin from a faucet. I'd suggest TP's TestNet Faucet which at the time of this writing is giving out 0.94 tbtc per request.
If this also doesn't work, it's possible that Coinbase's testnet node is down, in which case you'd have to contact their support team.
Please remember to return your tbtc to TP's Faucet once your done with it!

How long does it take to get bitcoins from TP's ?


text:
how to send money using json-rpc in bitcoin-cli for php?
$bitcoin->sendfrom($this->session->userdata('account'), $_POST['address'], number_format($_POST['amount'], 8));
but this isn't working. i got everything via json-rpc. but can't send or move money using  json-rpc. what is the problem?

The suggested library for Bitcoin JSON-RPC via PHP is the EasyBitcoin-PHP library. Source
Here's a simple example:
<?php
require("easybitcoin.php");

//authenticate
$bitcoin = new Bitcoin("RPCusername", "RPCpassword");

//execute ternary command
$send = $bitcoin->sendtoaddress("1SomeBitcoinAddy", 1);
echo $send ? $send : "Oops an error: ".$bitcoin->error;
?>

The first argument for sendtoaddress() is the address you want to send funds to, the second is the amount in whole bitcoins.

if(number_format($_POST['amount'], 8)>.00009){

$amount=number_format($_POST['amount'], 8);

$bitcoin->sendfrom($this->session->userdata('account'), $_POST['address'], (float)$amount);

}
else{

echo "Tumbling is not possible vai php";

}


text:
What does event_base_dispatch do?
Source code (src/httpserver.cpp):
static void ThreadHTTP(struct event_base* base, struct evhttp* http)
{
    RenameThread("bitcoin-http");
    LogPrint("http", "Entering http event loop\n");
    event_base_dispatch(base);
    // Event loop will be interrupted by InterruptHTTPServer()
    LogPrint("http", "Exited http event loop\n");
}

Can anyone help me understand this portion of logic? In particular

What is the HTTP magic happening here event_base_dispatch(base)?
Why are we renaming threads?

event_base_dispatch is part of libevent, a library that takes events from network sockets, and uses them to call callbacks in your program. To find out what it's calling, you should look at the struct event_base* base variable.
bool InitHTTPServer()
{
    // [...]
    base = event_base_new(); // XXX RAII
    // [...]
    http = evhttp_new(base); // XXX RAII
    // [...]
    evhttp_set_gencb(http, http_request_cb, NULL);

There are three important calls here. event_base_new creates the struct that tells event_base_dispatch how to handle incoming connections. evhttp_new tells libevent to interpret incoming data as the HTTP protocol, instead of passing along raw bytes. evhttp_set_gencb tells libevent which function to call when new requests come in. This is where that ends:
/** HTTP request callback */
static void http_request_cb(struct evhttp_request* req, void* arg)

Why are we renaming threads?

Debuggging and performance logging.

Thanks for the clear explanation! As I understand, here we are registering handlers while we are listening to socket connections. But where is the logic which actually causes the invocation of these callback functions? Lets say, I have established connection between 2 nodes A and B and I want to send a INV message from B to A.

@Paarth But where is the logic which actually causes the invocation Somewhere in libevent, I think. I don't think I understand your question. Lets say, I have established connection That's not handled by this code at all. This is JSON-RPC code, and you're looking for the peer to peer code. That's in ProcessMessage in main.cpp on the receiving side, and SendMessages in main.cpp on the sending side. Look for NetMsgType::INV

Thank you once again. So JSON-RPC is used ONLY for communicating between bitcoin-d servers and its client? But the mining nodes individually talk via some other logic to exchange messages (like inv, ack or blk ) etc

Yes. 2) Yes, but ack and blk aren't messages. The closest thing in the p2p protocol to ack and blk is pong and block.

Really sorry to bother you again. My background in networks is pretty bad. But where exactly is the socket connection happening for p2p protocol? All the logic I can see in codebase is associated with JSON-RPC in httpserver.cpp. The main.cpp you had pointed out implicitly boils down to overloaded function PushMessage, which uses BeginMessage in net.cpp. The logic am looking for is how the data in PushMessage (or BeginMessage) is actually being sent to other nodes. It needs to send the data via some opened socket right? If I am not wrong.

@Paarth The connection is opened here: https://github.com/bitcoin/bitcoin/blob/7a5040155ed59f8c9c51734bb2ee29f1593eaa6a/src/net.cpp#L1615  The data is sent here: https://github.com/bitcoin/bitcoin/blob/7a5040155ed59f8c9c51734bb2ee29f1593eaa6a/src/net.cpp#L764


text:
Problems loading blockchain from existing folder
I once saved the "blocks" folder + the "index" folder of the Bitcoin wallet.
Now on another PC I thought I could load the chain that way by copy pasting these folders in Appdata. Wasn't very smart not to copy directly the whole file folder.
So in my situation what else do I need exactly to properly launch the wallet with a full blockchain ? Please help I don't want to download the chain again...
I get this error:
2017-02-01 02:56:15 ERROR: ReadBlockFromDisk(CBlock&, CBlockIndex*): GetHash() doesn't match index for CBlockIndex(pprev=0xd4ba3c0, nHeight=299478, merkle=4f27a1a8c5f19894e7012ce4ea4f83eba0ea846af888749980d855e5d7179e46, hashBlock=00000000000000001e66b8d27a6bcff234f06d502a01aa23fd4be311d8b2dbf2) at CBlockDiskPos(nFile=138, nPos=8)

What exactly is the problem? If blocks/ and blocks/index/ are present, recent versions of Bitcoin Core will process the blocks in it, and rebuild chainstate/ at startup.

Are you getting any sort of error doing this?

Sorry haven't checked the error log. It says :
2017-02-01 02:56:15 ERROR: ReadBlockFromDisk(CBlock&, CBlockIndex*): GetHash() doesn't match index for CBlockIndex(pprev=0xd4ba3c0, nHeight=299478, merkle=4f27a1a8c5f19894e7012ce4ea4f83eba0ea846af888749980d855e5d7179e46, hashBlock=00000000000000001e66b8d27a6bcff234f06d502a01aa23fd4be311d8b2dbf2) at CBlockDiskPos(nFile=138, nPos=8)
2017-02-01 02:56:15 *** Failed to read block
Which block file is in cause ? I don't know what to do.

This means your blocks/ and blocks/index do not correspond. See the answer below.

As far as I am aware, you will also need the chainstate folder in order to properly run from a backup. Other files/folders are not strictly needed to restart your daemon. More information concerning specific folders can be found here: https://en.bitcoin.it/wiki/Data_directory
If all else fails start the process with -reindex and let it run - it "only" takes 24-48 hours depending on your bandwidth. Even though I know you don't want that!

His problem is that the blocks/ and blocks/index are out of sync, but this answer (using -reindex) will fix that too. It's also inevitable, as he needs to build the chainstate anyway.

Okay. How much space is the full chainstate folder ? If not too heavy could someone please upload it via wetransfer ? My mail lau.w@live.fr


text:
Upgrading from classic to hd
Trying to upgrade. I can open my wallet in Multibit classic without entering a password. I have never needed a password to open it and don't remember ever setting one up. I certainly have none recorded. But I can't export a key without entering a password. I tried sending the contents of the wallet to a new wallet in Multibit-HD but I don't know how much to send to allow for the transaction fee. There does not seem to be an "empty wallet" option.

MultiBit developer here. You should be able to simply spend from your Classic wallet into your new HD wallet. Don't try moving private keys around - that's really easy to get wrong and is one of the reasons we wrote HD in the first place.
There are full instructions on upgrading on the MultiBit website: https://multibit.org/en/help/hd0.1/how-to-upgrade-from-classic.html

Well I'm not totally sure about the password situation but you can easily send a 1 cent transaction fee and send the rest of your bitcoin to another wallet if that is an option. You don't even technically need a transaction fee it will just take much longer for the transaction to be confirmed if you do not send a fee.
1 cent currently is ~ 0.00004 BTC


text:
How many Secp256k1 signatures exist for a piece of data?
ECDSA signatures are not deterministic. That is, random information is used in calculating the signature for a piece of data. Approximately how many unique signatures exist for a piece of data?
Another way this question might be phrased is: if I continually sign the same piece of data using random multiples of the generator point then how many signatures (on average) will I have to generate before finding a duplicate signature?
And finally, if instead I start with a random multiple of the generator kG and then sign using (k+1)G, then (k+2)G, ... then will I ever produce the same signature?

Approximately how many unique signatures exist for a piece of data?

something like 2^256 (slightly less)

will I have to generate before finding a duplicate signature?

It depends of the quality of you random generator. You must use "true" random generators, not pseudo-random.

then will I ever produce the same signature?

Are you going to live eternally? The sun will go out by the time of when you repeat the signature. By the way: you can take value of 'k' as a function of your 'privateKey' and 'data-2-sign'
See https://bitcointalk.org/index.php?topic=727918.0 for more info
By the way. The signature itself is 512 bits. R and S (256 bits each). Your private key can be recovered when you sign different data with the same 'k'. In this case 'R' value will be the same for both signatures. And 'S' value will differ.


text:
Is there any concrete evidence that Wright & Kleiman were involved or not involved in the creation of Bitcoin?
Is there any cryptographically verifiable evidence that one or both Wright & Kleiman were or were not involved with the Satoshi Nakamoto character?
Looking for information related to Bitcoin keys, addresses, PGP keys, or any other type of cryptographic evidence. Information that disproves their involvement also welcome (faked PGP keys inserted into documents, etc), also welcome.

http://motherboard.vice.com/read/satoshis-pgp-keys-are-probably-backdated-and-point-to-a-hoax

That was a good read, thank you. I had seen Maxwell's post on Reddit, this blog post expanded on it and examined other attributes of the keys as well.

Wright:
While his supposed credentials pointed at a polymath with a range of interests along the lines of what Satoshi must have studied, neither his contributions at a recent discussion panel, nor his published work indicate that he has worked sufficiently on the main ideas of Bitcoin. Additionally, large parts of the corroborating evidence have not been substantiated or outright disproven.
Kleiman:
After a career as a soldier, technician, deputy sheriff, and detective, Kleiman only switched to working with computers in 1995 (at 30) after a crash turned him paraplegic.
He then made career in computer forensics which, derived from the list of his publications, seemingly focused on password security, data recovery, and Windows exploits. On January 1, 2007 he was named a Microsoft MVP for Windows - Security.
It seems unlikely that Wright and Kleiman, whether solely or as a team could be the creators of Bitcoin.
Edit: I just found out that the first version of Bitcoin was Windows only. So, maybe it is a shade more likely then.


text:
Does the bitcoin testnet3 network support Segwit and OP_CSV?
As far as I know, Segregated Witness and OP_CHECKSEQUENCEVERIFY are the last features needed to be able to fully implement a trustless bi-directional payment channel, from start to finish. (Technically you don't need OP_CHECKSEQUENCEVERIFY, it just makes channels a lot better)
Does testnet3 support those features?
If not, is there another public development chain which has those features?

Yes, testnet3 supports SegWit as of block 834624.
Yes, testnet3 supports both OP_CSV and OP_CLTV.

You might also be interested to know that there is a segnet test network on another port number. See https://bitcointalk.org/index.php?topic=1453392.0 for more details.

Segwit activated on testnet3 in block 834624 (may 13th), and segnet was deprecated after that...

@Pieter -- If we run Core wallet v.0.13.0-rc1 on Testnet now, does it mean the transactions we make are segwit transactions? And how can I find out they're segwit transactions? Thank you.

You need to use addwitnessaddress <normaladdress> to make the wallet produce a witness P2SH address. If you're paid through that address, and then spend those coins, then yes, it will be a segwit transaction.


text:
Using the bitcoind, can I query if funds have been sent to a multisig address?
I would like to query whether funds have been sent to a multi-sig address.
Using the daemon: the address is valid, but listunspent and getreceivedbyaddress don't show the multisig address. I can see a txn, which reports the target address is my multisig address.
I suppose I am asking how do the apis from blockr.io work (e.g. btc.blockr.io/api/v1/address/info/...... ) ?
TIA

Is the multisig address one of your 'watch' addresses? (bitcoind importaddress <addr>) Can you try adding it to the watch address list, then run bitcoind -rescan?

Thank-you. I tried that - now I see it in listunspent. Is there a way to rescan without starting the daemon? I want to create many addresses. I will try importing the address before funds are sent - maybe that will work.

So, if you import the address before you use the address on the network, then you don't need rescan.

Brilliant - it's good when things are thought out properly. Thank-you so much.


text:
Is Bitcoin's value the same, country to country? If not, which valuation is correct?
Does a bitcoin have the same value in every country? Is it not like real money that we use in real life? Does it have a different value in every country?

Define "correct valuation"

Things only have value if you can get stuff with it.  The value of a bitcoin is dependent on supply and demand and how much the BTC-currency exchanges are exchanging for, so it does not necessarily have the same value in a all countries.

Your basic assumption that "real money" always has the same value is not really valid. A million dollars is worth a lot more to me than it is to Bill Gates. And it might be worth nothing on a lifeboat in the middle of the ocean.
A Bitcoin behaves like any other commodity. Its value may be different from person to person or area to area based on things like supply and demand.
So long as transaction costs are low, values will be approximately the same under all reasonable conditions because of exchange and arbitrage. Someone who can get a bitcoin for less than other people will sell it to someone willing to pay more, this will take the people willing to sell for less or buy for more out of the market.
Generally, when you find a significant different in the value of a bitcoin in different places, it's explained by some difference in the asset on the other side. For example, at one time, there was a glut of dollars at an exchange called Mt. Gox. This made a dollar at Mt. Gox worth less than a dollar, and bitcoins sold for more of them at Mt. Gox.

The primary explanation for discrepancies in bitcoin price across different exchanges is the fact that, as a decentralized digital currency, there is no standard or global bitcoin price at any given period of time. It isn't pegged to the USD or to any other fiat currency, nor is it linked to a particular country or to an exchange. As with commodities of all types, supply and demand vary depending upon the time and the market, and the price of bitcoin fluctuates as a result

This has nothing to do with decentralization. Arbitrage exists in all markets. It's just more apparent in Bitcoin by being a relatively small market.

Pretty much the same everywhere.  You might get a small lag between exchanges around the world but minutes at most.


text:
An explanation of transaction scripts
https://en.bitcoin.it/wiki/Script
I'm trying to wrap my mind around them. Could anyone provide a bit more intuitive understanding?

Could you clarify what part of scripts you're unclear on? Why is your question not a duplicate of this?

Scripts are used to determine the person who can spend the transaction (at Bitcoin you spend using transactions, not using BTC on an address).
To understand scripts, you probably first need to understand the Bitcoin transaction model. Unlike your old style bank, where you have accounts with a certain amount of money on it, Bitcoin doesn't actually have accounts. The address you send money to is nothing like an account, even though clients show them as such for simplicity.
What Bitcoin really does is send transactions with scripts that can only be solved by one specific private key, by using the public key to create a script. If you send money, you basically destroy one or more previous transactions to create a new one. If you're sending less than the sum of the transactions you're using, just send a bit back to your own account. A transaction can only be used once.
Because of that transaction model, scripting can work. A transaction can be made with a script that doesn't indicate one specific destination address, but instead lets everyone spend it. Such a transaction does not fit in the old style bank model, but works fine for Bitcoin. There can even be scripts that require multiple private keys, or scripts that require you to answer a question.
One quick step back to the transaction model, so I can give you the full picture. Money is created with mining, via special transactions that don't have to destroy a previous transaction: coinbase transactions. All transactions have inputs and outputs. The inputs are the previous transactions it's getting the money from (exception: coinbase) and the outputs are the scripts it's sending the money to. After money is created via mining, it can be used once as an input, after which the money will be destroyed and re-created in a new transaction that can then be used. The role that scripts play in this whole process is to verify that you actually have permission to spend certain transactions.
Hope it helped. Scripts are not the easiest part of bitcoin to understand.

Thank you Tom. Very helpful and informative. I'll have more questions a little later. I've been going through the source code slowly


text:
Import OLD wallet.dat to new Bitcoin core
i made a wallet.dat backup in an old version of bitcoin qt. The mac where i had wallet is dead. In other mac with the last version of bitcoin core when i try to replace the wallet.dat the app crushes. What i am doing wrong?

Crashes with what message? How are you trying to load the wallet?