Why hasn't the Bitcoin client advanced to version 1.0? Who would invest money in a currency, which is held together by some software, which is currently in version 0.3.24? It is like putting ones money in a bank, which is currently undergoing in a test phase.

What is the rationale behind the decision not to go to 1.0? Obviously the incentives to break the security and steal all the money are there and have been there long enough for it to be deemed secure. I cannot even judge from the homepage, whether the client is in alpha or beta stage.

The software is definitely in beta at the moment. There are many things that need working out before version 1.0 can be declared, like the blockchain for instance - many works in progress. And they're about to completely change the GUI to QT so it certainly wouldn't make sense to declare v1 just before releasing something a lot closer to the actual v1. Patience :)


op_return regex search Is there a webservice around that allows one to search the OP_RETURN data on the blockchain? More precisely: I'm looking for a service that would return the transaction ids of transactions that contain an OP_RETURN with data that matches the given expression.

Chain.com offers OP_RETURN data for addresses, transactions and blocks.


Will be possible to have the same key on more than one wallet? On pull request https://github.com/bitcoin/bitcoin/pull/220 say will be possible to import/export keys.
I would like to know if will be possible to have the same key on different wallets and only be able to spend the bitcoins from this key with permission of the other users that has this same key on the wallet. Example:

I have a key on my client with 10 BTC.
I export this key and send to a friend
The key will be on my wallet and on my friend wallet
When I or my friend try to spend the bitcoins from this specific key, will be requested a password asking if we accept the transaction.

Will this be possible on next Bitcoin versions?

The pull request that you refer to is just for simple import/export of private keys and wallets and does not include the feature that you want.

There have been some discussions on multi-signature transactions which sounds similar to what you are looking for. That would allow for cases where two different private keys are required to make a transaction. See this forum thread and the draft proposal here.


How can a Bitcoin consumer and a Bitcoin seller mediate disputes? Since Bitcoin payments are non-reversible, what technical and business solutions are there to mediate issues such as

Product wasn't as expected
Payment was double spent or in an invalid chain
etc...

Right now it seems that these issues are fixed by "having a service on top of Bitcoin" and these mediators use their own opinion to mediate the transaction.

The problem I have is that these mediators may be biased for the seller, or the buyer and may not be publicly accountable (or audited) for their decisions.

Question

What solutions exist (no matter how imperfect they are) to address product disputes when doing transactions with Bitcoin or other Virtual currency?

I'm a mediator and this is an interesting subject. In the conventional world it's seller beware, as the customer can either not pay at all, or charge back a credit card. In the case of Bitcoin, the situation is reversed, and payment once made is gone. I don't think that the issue is with the bias of the mediator, most are neutral, but I do think that a mediator can help to assess the intentions of the parties and a clear path to resolution. It all depends on the intentions of the parties and their willingness to correct whatever is not right about the transaction.  A good mediator can point the way forward in that discussion.


ScriptSig (coinbase) structure of the Genesis Block From original bitcoin c++ source code:

// Genesis Block:
        // 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

...

txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));

We could see that scriptSig is: 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

Let's see closer:

04 - ?

ffff001d - 486604799 aka 0x1d00ffff

010445 - ?

5468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73 - The Times 03/Jan/2009 Chancellor on brink of second bailout for banks

I don't understand what are 04 and 010445. How can I get them?
At wiki page of Genesis Block (https://en.bitcoin.it/wiki/Genesis_block) in ScriptSig line there is nothting about 010445.

Here is a breakdown of the entire genesis block:

01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
3BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A - merkle root
29AB5F49 - timestamp
FFFF001D - bits
1DAC2B7C - nonce
01 - number of transactions
01000000 - version
01 - input
0000000000000000000000000000000000000000000000000000000000000000FFFFFFFF - prev output
4D - script length
04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73 - scriptsig
FFFFFFFF - sequence
01 - outputs
00F2052A01000000 - 50 BTC
43 - pk_script length
4104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC - pk_script
00000000 - lock time

Decoding the ScriptSig:

04 - push the next 4 bytes to stack
FFFF001D - 4 bytes pushed, they appear to be the same as bits
01 - push the next 1 byte to stack
04 - 1 byte pushed
45 - push the next 69 bytes to stack
5468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73 - pushed bytes, "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"

So 010445 are in fact part of 2 operations - 01 pushes 04 to the stack, 45 pushes the message to the stack. As to why push 04, beats me, maybe it was just testing to make sure something works? Some internal counter used by Satoshi during Genesis block creation? Since the script of a coin generation transaction is really meaningless, we might never know.


Is it possible to schedule function calls to an Ethereum smart contract? I am wondering - is it possible to schedule or somehow trigger function calls to an Ethereum smart contract based on the current block height or timestamp? This would involve some pre-payment of gas for execution understandably, but it might be beneficial to have something like:

If current block height is 1'000'000, send 1000 ether to the block miner
If it's 2016-01-01 00:00:00, release funds from escrow

Of course those functions could be triggered by transactions at an appropriate time, but some sort of "execution scheduling" might be a useful automation of the process.

This feature can be easily realised outside the Ethereum virtual machine (and thus keeping the VM simple): Create a (reusable) contract where contracts can register to be called at a certain time (and provide a reward as compensation for the gas costs). A script can poll this contract from outside and call it at the appropriate times. The contract could be similar to the following.

contract CallbackRegistry
{
  struct Entry { uint time; address addr; bytes data; uint reward; }
  mapping(bytes32 => Entry) entries;
  function register(uint _time, address _addr, bytes _data) external returns (bytes32 _hash)
  {
    _hash = sha3(_time, _addr, _data);
    entries[_hash].time = _time;
    entries[_hash].addr = _addr;
    entries[_hash].data = _data;
    entries[_hash].reward = msg.value;
  }
  function invoke(bytes32 _hash) external
  {
    if (entries[_hash].time > 0 && now >= entries[_hash].time)
    {
      msg.sender.send(entries[_hash].reward);
      entries[_hash].addr.call(entries[_hash].data);
      delete entries[_hash];
    }
  }
}


Does any current SegWit or blocksize increase proposal also seek an increase in the OP_RETURN byte limit? Does any current SegWit or blocksize increase proposal also seek an increase in the OP_RETURN byte limit?

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

Are there any current pull requests that seek an increase in the current 80 byte limit?

If the current OP_RETURN byte limit is 80, why does the StackExchange "op-return" tag still reference a 40 byte limit?

"An opcode that allows you to create an unspendable transaction output that stores up to 40 bytes of data."

Currently, there are no BIPS (Bitcoin Improvement Proposals) that seek to increase the 80 byte limit as you can see here.

Doing a cursory search on that repository, you can see that only a few mention OP_RETURN at all.


How would somebody compromise my identity if I generate new receive address in Bitcoin Core? I open Bitcoin Core and generate a new receive address.
I publish this without mentioning my name, and make every effort to conceal my identity in every other way.
Some time passes (possibly months or years).
Some entity has figured out that I'm the owner of that "receive address".

How did that happen?
Can the Bitcoin network see which IP address is "receiving" money to a given receive address? Is there anything that leaks my IP address or any other identifiable information when creating, publishing or receiving money to a receive address?

Identity leaks usually happen in two places.
Off Chain Leaks
Here, the address is somehow linked to you off chain - this could be because you shared it from an account or network that can be traced to you (it's largely impossible to avoid being tagged online if a well funded and skilled group, such as nation states, is targeting you).
Alternatively, if you have sent funds to an address from an exchange or other wallet that has some link to your identity, off chain requests by law enforcement or other such authorities for your transaction data could link you to it quite trivially.
On Chain Leaks
Although modern wallets, especially Bitcoin Core, take steps to avoid this, there are scenarios where when spending funds from one address, you also include inputs sent to other addresses. If all your addresses do not have an equal level of privacy in how you shared them and received funds to them, transactions which spend from multiple addresses can create links that on chain monitoring tools use to identify clusters of addresses controlled by a single entity.
Thereafter, if any one address in the cluster is deanonymized, the entire cluster can be tagged to you retroactively.


Partial transactions I am new to cryptocurrencies.

I want to transfer coins to multiple exchanges, how can I do it?
Can I split coins from one wallet into the exchanges?
Do I need a specific kind of wallet?
And when I withdraw coins from an exchange, can I withdraw only a part of my funds(and leave the rest in my exchange account)?

I want to transfer coins to multiple exchanges, how can I do it?

Just open accounts on all those exchanges and then get deposit addresses. Transfer funds howefver you like.

  Can I split coins from one wallet into the exchanges?

Yes.

  Do I need a specific kind of wallet?

You can just withdraw from wherever your coins are now to your deposit addresses at various exchanges.

  And when I withdraw coins from an exchange, can I withdraw only a part of my funds(and leave the rest in my exchange account)?

As far as I know, every legitimate exchange supports withdrawals of whatever amounts you want. Typically there are minimum withdrawal amounts and some withdrawal fee to cover the transaction cost, but that's about it.


Why do leading ASICs manufacturers sell their chips? I understand that some people have access to cheaper electricity than others. However why not just open mining facilities in the parts of the world offering the lowest cost structure? If that is not possible, then a joint miner with those miners would seem more profitable than selling the most profitable newly invented ASICs chips to the general public.

In some situations I know people will buy older ASICs miners that are no longer profitable for various reasons including a desire to help the network or speculating on future bitcoin price increases retroactively making the mining profitable. That is not my area of focus. I am more interested in why the newest most profitable ASICs chips are being sold.

I think the simple answer is that a company doesn't have to be a "Bitcoin believer" in order to manufacture Bitcoin mining hardware.  The companies that produce ASIC chips also produce other products for other industries.  They are perfectly profitable just selling their chips to mining equipment manufactures, and probably don't feel the need to enter the world of speculation on a young, digital currency.

At their core, these companies are silicon chip factories, and there is lots of demand for custom silicon chips in the market.  There's no need for them to change up their business model and become Bitcoin mining facilities.

Don't forget that during the California Gold Rush, the wealthiest man in town was the guy selling shovels :)


bitcoin core problem payment I downloading bitcoin core on my computer. But my computer is full, and downloading is not complete. I made transfer my bitcoin to URI on bitcoin core, which downloading. But nothing came and I didn't seen. Becouse you wrote information "bitcoin can be see only when downloading when will be done" And my question is, where is my bitcoin money, when downloading is failed . regards

where is my bitcoin money, when downloading is failed.

Your money is in the Blockchain (loosely speaking). It is not affected by the state of your wallet. When your wallet finishes collecting its own copy of the public Blockchain (synchronisation), it will be able to show you the amount of money you control.

Some explanation:

A wallet does two things. Firstly it creates a local copy of the Blockchain and keeps it up to date. Secondly it stores a secret number that gives control over some money in the Blockchain.

Everyone with a traditional  "full-node" wallet has their own copy of the Blockchain. This is just a list of all the transactions. A transaction records changes in control over amounts of money.

Bitcoins are not really sent to wallets and are not stored in wallets. As long as you have a safe copy of the secret number (private key) or a wallet recovery phrase, it doesn't matter what happens to the wallet. If needed you can create a new wallet and regain control over your money.


Why are AntMiners' firmware closed-source / non-GPL? Why are AntMiners' firmware closed-source / non-GPL? What does Bitmain have to lose by making the source open?

The ASIC "arms-race" is all about having cutting edge technology. In a recent Motherboard article about a mining farm, the hardware was not even allowed to be specified.

Consider also that both SHA256/Scrypt ASIC manufacturers were clamoring to bring smaller nanometer sized chips - and the associated R&D costs - and it's probably more a question of why a company would make their hardware open source.


Why do HD seeds use a word list? I'm curious what the purpose behind having a word list for BIP39 HD wallets?

Are you required to use these words to create a wallet seed?

What would happen if you chose random words not on the list, or instead a long continuous string?

The bip39 algorithm is badly designed and that is why it is dependent on a specific wordlists. Each time you want to add a new language you have to update the BIP!

Electrum has it's own seed mnemonic format that does not depend on specific wordlists so it's definitely possible to create a format like that.


Is blockchain the only technology for p2p decentralised global network? Are there any p2p decentralised cross border network structure out there?

One may also note that Blockchain is not a P2P technology per se, but rather just a  data-structure designed to reach global consensus provided with transactions acquired from a P2P network. Validation rules which govern the updates to this data-structure are consensus rules.

The actual Bitcoin P2P layer is similar to other P2P protocols(Gnutella, IPFS etc.), and is a messaging protocol designed to acquire and propagate public data with peers. Theoretically, a validating Bitcoin full-node may acquire its transaction/block updates from another channel/P2P protocol and still be in consensus.


Listtransactions in v. 0.4.0 - different behavior? I upgraded to Bitcoin v. 0.4.0, and I think the way "listtransactions" works is different now.

Let's assume I have 10 transactions on my account.

Old behavior:

When I call

listtransactions account='', 1, 10

I get an empty list, and then when I call

listtransactions account='', 1, 11

it would wrap around and give me the first transaction

listtransactions account='', 1, 12

would give me the 2nd one, etc.

New behavior:

When I request a non-existent transaction (i.e. the "from" parameter is more than 10), I always get the first transaction.

Does anybody know if this is by design?

Yes, it was by design.  The old behaviour was accidental and was causing a crash in some situations.

Here are the full details:

In version 0.3.24, the 'from' parameter was simply passed into std::advance() to skip the required number of transactions.  If the value given was bigger than the number of available transactions, it would wrap around, due to how std::advance() works.  I'm not clear on whether advance() is defined to work like that, or if it's dependent on the particular implementation in the library your version was linked against.

Anyway, in version 0.4, the advance() function call was made conditional:

if (txByTime.size() > nFrom) std::advance(it, nFrom);

meaning to only skip some transactions if the number of transactions available is greater than the number you're trying to skip.

The change was made by Gavin Andresen on August 12, 2011 in response to a bug report


Bitcoin Blockchain in the Quantum computing era The design and the evolution of quantum computers has been one of the "hot" topics during the last 20 years.

My question is about the possible consequences of the rise of quantum computers (through concrete realizations of quantum computers) on the level of the Bitcoin  blockchain architecture.

Given the fact, that the Bitcoin blockchain is strongly based on digital signatures generated through public-key cryptography schemes based on the hardness of prime factorization and that furthermore, the anonymity (and thus "identity") of the users is based on private keys, it is reasonable to think that quantum computers -which are expected to solve in polynomial time  problems related to the prime factorization and thus to "break" those public cryptoschemes (like RSA) which base their security on the (classically) exponential hardness of prime factorization- will dramatically affect the technologies underlying Bitcoin (and other cryptocurrencies) as well.

A first thought I had, was that the rise of the computational power (relative to the problems described above) could easily be compensated -inside the present blockchain structure- by simply using "longer" private keys (with their "length" suitably chosen so that whatever the total hashing power available, going back from the public to the private will remain practically infeasible -as it is today). At the same time, the difficulty of the mathematical problem to be solved for the mining to occur, will also be rescaled so that the 10-min interval for producing a new block will remain unaltered.  Is it that simple (in principle) or am I oversimplyfying? Are there some other important details one should take into account?

P.S. 1: See also: https://manage.kmail-lists.com/subscriptions/web-view?c=yMWFtj&r=5F9DLpu&m=wYXDhP&k=1dc8ecb6243f9dced47626ac0221f800 for a relevant discussion.

P.S. 2: this question is partially related to What effects would a scalable Quantum Computer have on Bitcoin?

If quantum computers become viable and the approach of factorization of numbers which has been theoretically presented works, this means that Bitcoin will have to use a different way of signing transactions as through the use of quantum computers, it becomes easy (only polynomial time required) to calculate a private key from a public key.

Simply increasing the key length doesn't work. If you double the key length, a classical computer has to work twice as hard to encrypt or decrypt the message but it becomes much, much harder than twice as hard as before to crack the encryption. Signing, in this case, really is just encrypting a hash of a message. However, for a quantum computer, the problem of cracking the encryption, only becomes twice as hard. So you can't keep up with using longer and longer keys because then the increase in effort an attacker has to put in only increases as fast as the increase of effort you have to put into using the keys.

However, there are ways to approach the problem of the signatures currently in use being rendered useless by the advent of quantum computers. Namely, quantum digital signatures.

Because quantum computers aren't faster than classical computers but reduce some exponential problems to polynomial problems, and cryptographic hashes can't be broken using quantum computers, their advent won't impact the difficulty to find a new block.


Why do we need a mining speed above 4.3Ghash/s? I believe there will be a simple flaw in my understanding somewhere.

From what I can tell for any given block you increment a nonce up to 2^32 (4294967296) per second (and the timestamp every second) in order to find a suitable hash.

Thus if you have a mining rig that can do 4.3Ghash/s, you can cover all possible block hashes in any given second.

What am I missing here, and if this is the case, why do mining rigs with this specification or higher not find all the new blocks?

You assume that there exists (exactly?) one block for each work unit. This is not true, there are many variables (timestamp, nonce, transactions in a block, extranonce inside the block's coinbase transaction, ...), and all of them influence the block's hash. Each hash has a chance (as of October 2013) of less than 1 in a billion billion (1.15*10^18 to be precise) to be below the difficulty target.

Each miner searches a different part of the search space (which is, for all intents and purposes, infinitely large), hoping to find a valid block before anyone else does, but there is no "progress" to be made: every attempt has exactly the same chance as any other attempt. The nonce in the block header is just a way of making a particular group of attemps faster to search through.


(litecoin) High hashrate but low amount of submitted shares in solo I'm playing around with litecoin mining and have been mining at a pool but decided to mine solo using cgminer.

When I mine at pools the amount of shares submitted to the pool sinks dramatically when I crank up the intensity (180 khash/s at intensity 11 compared to 20 khash/s at intensity 15). This is the same no matter which pool I'm on.

According to cgminer the khash/s go up as would be expected when intensity is upped.

For solo I really want to know if just the submitted amount of shares goes down for some reason or if a higher intensity really somehow ups the khash/s but lowers the submitted shares. cgminer's output is not easily checked for this.

The system of shares on a pool is set by the pool owner. It is not exactly the same as mining litecoin solo, and in fact some pools will have much smaller shares (pool-x.eu) set up to encourage you to continue mining, even though you are not actually mining more litecoin. Other pools have larger shares which take longer to mine (ltc.kattare.com), but are actually less work for the server so (theoretically) you should get a bit more from the longer ones.  While solo mining you are A) getting all the shares yourself with no "pool power" and B)getting the normal share size for litecoin. Hope this helps, 5mil


library for validating bitcoin private and public keys I am building a python script that gets a string and determines if it is a valid bitcoin private key or public key, and if so it returns its type/format (base58, BIP32, HexaDecimal etc.) and its derivations (public key from private key and address from public key).
Is there any free library that I can use its code inside mine, to get those details?
I have tried to do so myself but there are a lot of formats of keys and mathematical computations for validation and derivation the keys.
Thank you.

No sane application should EVER attempt to validate a private key by attempting to pass it to an external API. That's a ridiculously easy way to lose all your funds if the API operator is malicious, compromised, or someone is eavesdropping on your communication with said API.
You should do this yourself, preferably using a well tested, community supported, open source library for your choice of language - most major languages have such libraries.
If this is too much work, you should reconsider building something like this. Do not compromise on safety, especially if you intend for other people to trust this code with their funds.


lightning network bitcoin howto install Hello fellow bitcoiners,

I would like to install lightning over Bitcoin core - I already have a full node. But every guide I follow ends up with a broken build or some issue preventing to finish the install of lightning. Did you have success with a good howto by any chance? I would preciate if someone could post a proven working install howto.

Thank you very much, /cr!?ptal

You can do

sudo apt-get install -y software-properties-common
sudo add-apt-repository -u ppa:bitcoin/bitcoin
sudo add-apt-repository -u ppa:lightningnetwork/ppa
sudo apt-get install bitcoind lightningd

If you don't want to add external repositories you can flollow the clightning docs from https://github.com/ElementsProject/lightning/blob/master/doc/INSTALL.md they worked perfectly last time I checked and are copied here for your convenience.

Library Requirements

You will need several development libraries:

libsqlite3: for database support.
libgmp: for secp256k1
zlib: for compression routines.

For actually doing development and running the tests, you will also need:

pip3: to install python-bitcoinlib
valgrind: for extra debugging checks

You will also need a version of bitcoind with segregated witness and estimatesmartfee economical node, such as the 0.16 or above.

To Build on Ubuntu

OS version: Ubuntu 15.10 or above

Get dependencies:

sudo apt-get update
sudo apt-get install -y \
  autoconf automake build-essential git libtool libgmp-dev \
  libsqlite3-dev python python3 python3-mako net-tools zlib1g-dev libsodium-dev \
  git gettext

Clone lightning:

git clone https://github.com/ElementsProject/lightning.git
cd lightning

For development or running tests, get additional dependencies:

sudo apt-get install -y valgrind python3-pip libpq-dev
sudo pip3 install -r tests/requirements.txt -r doc/requirements.txt

Build lightning:

./configure
make
sudo make install

Running lightning:

bitcoind --datadir=<path_to_blockchain> && ./lightningd/lightningd && ./cli/lightning-cli help

Note: You may need to include testnet=1 in bitcoin.conf


Scraping multiple cryptocurrencies I would like to scrap data from Bitcoin and mix of alternative cryptocurrencies which are fundamentally like Bitcoin. The data I am looking for are blocks and transactions.

I found a pretty awesome (very old and not maintained) project called MultiCoin: https://bitcointalk.org/index.php?topic=24209.0

I have noticed cool projects such as DNS Seeding which do things like connect to peer nodes simply to request more peer nodes (without transmitting data), but do not seem to transmit transactions or blocks or any other data.

Are there any more modern implementations of this? As the alternate cryptocurrency space grows I would like to get data from a lot of coins without having to consume more resources than strictly necessary.

The BlockCypher web services supports 3 different cryptocurrencies right now, more may be added in the future. All coins have the exact same services exposed so it's easy to develop for all of them at once.


What happens to the transactions included in the forks? Let:

a) the vector triplet <x,y,z> refer <height, index, parent_index>

b) blocks, block100, block110 (of height 1) are mined together and they both refer previous block block00[null] (of height 0).

Block, block110 (of height 1) gets a child block and its branch grows but

block block100 doesn't get any child block till then and became leaf/fork.

Please advise what happens to the ith transaction t100i of block, block100 that is not included in the branching block, block110.

On nodes that had accepted block100: when they disconnect it to reorg they will remember the transactions in it and attempt to reinsert into the mempool any that fell out once they finish the reorg. If they're still valid, they'll be added and queued for mining in a future block.

On nodes that initially accepted block110: the transactions that were still valid after accepting the block will remain in the mempool queued for mining in a future block.

Transactions which were invalidated by other transactions included in block110 are forgotten by nodes.


Pseudo-Node and putative attack vectors on the network Pseudo-Node is discussed here on Reddit's /r/Bitcoin
Essentially it functions to relay calls from connected nodes in a random fashion.

This was an experiment into how easily can full nodes be "faked".  In conclusion: very easily.
A proof-of-concept implementation (& documentation) is available here:
https://github.com/basil00/PseudoNode
To the network, PseudoNode appears to be a normal full node.  It relays invs, txs, blocks, etc. just like a full node.  In reality, PseudoNode is a type of p2p proxy server.  It merely forwards any request it cannot handle (getdata, getheaders, etc.) to neighboring nodes.  For more information see the above links.
PseudoNode uses no disk (no blockchain download required), uses little CPU/RAM, and uses less network resources (bandwidth) than a normal full node.  A PseudoNode can "sync" with the network within seconds.
PseudoNode demonstrates some of the problems with incentivized full nodes (including the "Bitnodes Incentive Program").  It is difficult to prove that a full node is really a full node.
The implementation mostly has novelty/proof-of-concept value.  It is not intended to be "production" software.

And the FAQ:

Does PseudoNode harm the network?
Short answer: No.
Long answer: Not unless the number of PseudoNodes significantly overwhelms the number of normal full nodes. Otherwise, if PseudoNode can connect to at least some good nodes (default 2), then will PseudoNode will acts just like a normal node and contributes network bandwidth.
Can PseudoNode cause the network to fork?
No, PseudoNode just follows what other nodes are doing.
Can PseudoNode steal coins?
No.
Can PseudoNodes be banned from the network?
Not easily. Requests that PseudoNode cannot handle directly can always be forwarded to other (cooperative) full nodes.

This seems incredibly reckless in terms of attack vectors to me. Obviously a balance between the pros and cons needs assessing, and since its value is "novelty" (self-described by the developer), several cons seem immediately evident:

Latency will effectively increase blockchain download times such that new latency = original latency * performance decrease %
Nefarious pseudonode could throttle latency to just above the threshold of the nodes enforcing blacklisting (ie throttled latency ~> cutoff latency)
An increased percentage of nefarious nodes could possibly execute a Sybil Attack (?)

2 related questions:

What other attack vectors (in high-level terms) and their
repercussions could be expected from Pseudo-Nodes?
Is there any feasible contingencies in the protocol to delineate between a PN and a node? For example, would different Bitcoincore versions identify PNs (or a simple modification to the protocol)?

A large number of interconnected psuedo-nodes makes launching a bandwidth-exhaustion attack much easier.  Bitcoin Core validates most information before relaying it, but psuedo-nodes don't validate---so if you can get some psuedo-nodes connected together, it's probably easy to get them to waste tons of bandwidth by relaying junk data to each other and then to their peers.

For example, if there are 101 psuedo-nodes (PNs) connected together, you can send PN1 a valid-looking inv packet announcing a single fake transaction (about 61 bytes plus TCP packet overhead).  Each PN relays that inv for a minimum of 6100 wasted upload bytes.

But those PNs are also connected to real nodes.  Lets say 500 real nodes, so now the wasted PN upload bandwidth is 36,600 bytes (plus TCP overhead)---all because an attacker created a single 61-byte inv.  Worse, the real nodes are going to request the transaction using a 61-byte getdata packet, wasting 30,500 bytes of real node upload bandwidth.

If the attacker sends 1MB of fake data per second for an entire day, he'll use 86 gigabytes of his own bandwidth,  but waste 52 terabytes of aggregate PN upload bandwidth and potentially 43 terabytes of real node upload bandwidth.

(Depending on how the PNs are written, they may waste even more bandwidth relaying the getdata packet around.)

Compare this to the cost of running the attack against a single real node.  For each 61-byte inv packet the attacker uploads, the real node replies by uploading a single 61-byte getdata.  So a bandwidth exhaustion attack against a real node requires roughly a 1:1 about of wasted bandwidth.  The real node doesn't further relay the inv until it receives and validates the transaction it refers to, so no other node has any wasted bandwidth.

  Is there any feasible contingencies in the protocol to delineate
  between a PN and a node? For example, would different Bitcoincore
  versions identify PNs (or a simple modification to the protocol)?

The protocol already has the notion of a DoS ban score, in which each
Bitcoin Core node assigns a private score to each of its peers for any
bad behavior they perform. Once the DoS ban score for a particular peer
reaches a threshold (100 by default), the node disconnects from the peer
and refuses further connections from its IP address for a time (one day
by default). Bad behaviour includes sending invalid transactions
and blocks.

Because PNs don't validate data, they'll happily relay invalid data. If
they become common, someone who wants to grief PNs could simply connect
to any advertised node and send it a bunch of invalid data. If it was a
real full node, it will disconnect (DoS ban). If it was a PN, it would
relay that data to real full nodes, causing the real full nodes to DoS
ban it. This would make the PN useless and would allow the griefer to
detect which nodes are PNs---the griefer could then publish (an
unauthenticatable) database of PN IP addresses.

This method works best against long-term PNs. To make it harder to
execute short-term Sybil attacks from lots of lightweight PNs, something
like Greg Maxwell's proof of storage to make distributed resource
consumption
costly
could be used.


Why I can transfer btc from unconfirmed balance? I am facing a problem of long waiting unconfirmed transaction since yesterday. (Same problem with many people here). All of my wallet and transaction are Blockchain.info

But while I am waiting for confirming transaction, my destination wallet already got balance and I can do transfer from this wallet to another wallet.

I have 4 wallets (A, B, C, D)

https://blockchain.info/tx/1dac8a76f5fc6115e1c1df2c65f034d89555bf73e09849c615d5e91887d2909a
A->B

https://blockchain.info/tx/dfcf3799b41d0a555d461dc6dda2b28f6f412c3a7ff7ad76a105140752003046
C->B

https://blockchain.info/tx/686a32191cba7b3b4299b60398a23de10e96f1737e26e15cbd6111d6a26d48ce
B->D

The question are
 1. why my B wallet got available balance and can transfer out?
 2. what will happen to my B->D transaction?

Thank you

Transactions spend outputs from other transactions. Just because the transaction hasn't been included in a block yet, doesn't mean it isn't valid. It's valid as long as it isn't a double spend, so spending unconfirmed transactions is all about trust and risk. If you trust that the transaction is not going to be double spent (e.g. it's your own transaction) or its relatively low risk (e.g. small amount being sent), you can safely spend from it. If it's higher risk, though,
 (e.g. larger payment), it is safer to wait for it to be included in a block to reduce the chance of it being double spent and invalidated. If the unconfirmed transaction becomes invalid, so does it's child.


How does Dash achieve anonymity without centralisation? Dash is supposedly completely anonymous. How does this work without any centralisation? Is there one person with all the transactions and only they mine?

TL;DR yes, it's still decentralized, no it isn't perfectly anonymous.

From the Darkcoin (now Dash) Wikipedia: "It adds privacy to transactions by combining identical inputs from multiple users into a single transaction with several outputs. Due to the identical inputs, transactions usually cannot be directly traced, obfuscating the flow of funds." The nodes who perform this "mixing" are called Masternodes, and operate on a decentralized ledger.These nodes are trustless and do not have complete knowledge of input/output

In order to prevent Sybil attack, the masternode tier requires colateral of 1000 Dash to run. This makes the cost of attack very big. In this whitepaper is a lot more information for interested ones.


when I send money from my wallet, which address shows up as "sender"? I have not yet sent money to anyone. I was wondering if there is any way to control which address shows up in the block chain as the sending address.

Say I receive money on addresses A, B, C.
I want to send money to someone from a totally unrelated address D. How to do this using the bitcoin client.

EDIT: I want to unlink addresses (A, B, C) from D

So when I send money, the sender should be D, and there should be no transactions from any of (A, B, C) to D, directly or in a chain. I guess this is not possible without 3rd party help.

I fear that the ability to follow transactions in a chain will eventually reveal enough information about identity of users. So there should be a way to send/receive from two complietely unlinked addresses. (linked = connected via a transaction chain).

Bitcoin doesn't really have sender addresses.

Every transaction consumes some of your coins, and creates one or more new coins, potentially assigned to a different address. What the receiver can see is the transaction, and he can trace which coins it spent, and which addresses those coins were previously assigned to. Some programs/sites use the first such address as sender, but this is not recommended. It doesn't say who sent the money - only who previously controlled it (which may for example be a shared webwallet).

The reference client always considers its entire pool of (confirmed) coins as source for creating transactions. The recently (0.7.0) introduced raw transaction API allows fine-grained control over which coins are used as input, but does not have a GUI (yet).


Run specific RPC commands in PHP? I'm trying to get the balance of a specific address in my PHP session, I currently have this:

<?php
  require 'header.php';
  include 'Includes/Bitcoin/easybitcoin.php';
  $bitcoin = new Bitcoin('user', 'password', 'localhost', '8332');
  $wallet = $_SESSION['UserWallet'];
  $balance = $bitcoin->getbalance($wallet);
?>
<!DOCTYPE html>

<meta charset="utf-8">

  Wallet address: <?php print_r($wallet); ?>

  Account balance: ฿<?php print_r($balance); ?>

Where the $_SESSION['UserWallet'] contains the bitcoin address, when I run this it returns an error, how does it work?

To get the balance of something you need an account, which is best created dynamically with PHP. You would use the getnewaddress("echo uniqid()"); in PHP as an example of generating a new account for every user.


Spending unconfirmed output from a change address Consider a custom program which will occasionally need to send out bitcoin to users to whom I owe money.

Let's say I have 100 unspent BTC at address ADDR_A.

UserX demands payment of 1 BTC to ADDR_X. I honor the request, spending my 100 BTC from ADDR_A, directing 1 BTC to ADDR_X and 99 to ADDR_CHANGE_A. (Let's ignore the impact of transaction fees in this contrived example.) The raw transaction is submitted via a public Bitcoin API like Insight.

Five seconds later UserY demands payment of 1 BTC to ADDR_Y. I want to use ADDR_CHANGE_A as an input to facilitate the transaction.

Question: Can I use my newly created ADDR_CHANGE_A address as an input given that the original change output that targeted ADDR_CHANGE_A has not yet confirmed? Other material on this site indicates that the transaction should work but I'd like to understand WHY it works. Assuming that the public Bitcoin API receives my transaction that uses ADDR_CHANGE_A as an input, but has no knowledge that ADDR_CHANGE_A was used as an output in a prior transaction which took place only seconds earlier, wouldn't it balk at my attempt to spend from ADDR_CHANGE_A?

You are technically able to do this but it is strongly not recommended. A transaction can spend the output of another transaction so long as the parent transaction is known by the node in question, however this is quite fragile.

Bitcoin transactions back reference by TXID, a cryptographic hash of the previous one being spent. Due to a property known as transaction malleability it is currently possible for this TXID to change spontaneously when it it broadcast through the network, due to some nodes running custom code which mutates transactions in specific ways. If you build a long chain of unconfirmed transactions and one early on is mutated, all subsequent transactions can suddenly appear to spend outputs which don't exist anymore and are effectively invalidated. It's difficult to produce safe software which can handle this situation with this as there's a lot of edge cases that need dealing with.

If you need to make a number of payments to many parties in a short period, many large providers will split their outputs up ahead of time to avoid ever needing to spend unconfirmed change. When they receive a 100 BTC output they might break it into four 25 BTC chunks paying themselves, which will allow them to pay four people when required without needing to ever attempt to spend unconfirmed change. Some delicate balancing is required here, if you have too many outputs in your wallet the fees increase dramatically and the software will become slow.


What is "Verifying last 288 blocks at level 3"? Upon every start of bitcoind, I see the following in de debug log:

Verifying last 288 blocks at level 3

come up. At this point, no new blocks have been downloaded and the block chain was 100% up to date when I last closed bitcoin. Bitcoind does not do anything before it has 'verified' these 288 blocks (the server does not answer until this phase has passed).

Why do the last blocks need to be verified if nothing new has been added since shutdown?
Does this verification make any changes to any files? Does it save anything to the blocks / chainstate / database directories?

It is to verify the block database has not been damaged or tampered with. It does not modify the databases in any way.


Litecoin transaction never reached my adress Hi I did a Litecoin transaction from Mercado Bitcoin to Bitstamp and it never reached the destination.

The platform mercado bitcoin says my transaction was completed and it doesn't and when I click on the transaction code it the website blockcypher and Blockchai.info, both say the transaction wasn't found. In the meantime I have no more litecoins in mercado bitcoin and no litecoins appear on Bitstamp.

Here is the transaction code: 68b9ba2f30afc3eca80ba36df298f5e1d91f9aa5b282306233d6d767ca1acddf

Did I loose my litecoins?

Thank you for your help.

If they can't give you a transaction ID that you can find in a block explorer, then there is no evidence to support their claim that they completed the transaction.


How does the Bitcoin network maintain the chains created when two nodes generate different versions of the same block? I came across these lines from the Bitcoin whitepaper:

  If two nodes broadcast different versions of the next block
  simultaneously, some nodes may receive one or the other first. In that
  case, they work on the first one they received, but save the other
  branch in case it becomes longer.

Does that mean two chains are maintained in parallel in each node? If yes, how do the nodes actually maintain it in implementation level of the Bitcoin network?

Both blocks are indexed and stored. The extending block which was received first is represented as an array element with links/pointers to the headers of the strong chain: Chains are represented as arrays with links pointing to headers in the store.

The second block is now considered part of a “candidate chain”, of which there can be many with different heights. The tip of each branch emanating from the strong chain is the tip of a candidate chain. A candidate chain can be potentially extended to form the strong chain if it accumulates the most POW. At this point, the strong chain array elements are popped to the forking height, and the new candidate chain headers/blocks are pushed on the strong chain array/stack. The popped elements of the strong chain are pushed to a candidate chain array in respective order.

Since the number of candidate chains is unbounded, it may not make sense to organize them individually to store, but keep a them as a separate data structure (tree). Furthermore, given the cost of auch branches at current chain heights, they tend to be short. The risk of reorg is most likely with the “2nd” highest chain, so keeping this in persistent store can optimize for faster reorgs if the node is restarted (other indexed candidate chains in memory are lost and need to be rebuilt, but less likely to overtake strong chain). Of course, an implementation can persistently index an arbitrary bounded number of candidate chains depending on design objective.


Does there exist any cryptocurrency that doesn't tend to centralization? All PoW schemes tend to concentrate miners in pools to have a more steady income for the miners, while the major PoS coins, such as NXT, also end up concentrating the stake because of leasing. But, does there exist any cryptocurrency that doesn't tend to centralization?

With P2Pool there's no central pool authority so it's as decentralized as it gets. The problem is that miners don't like to use it because it requires a copy of the entire blockchain. I hope this gets fixed with new bitcoind version that allows to prune and delete some history, and would therefore allow to run full nodes with less effort.


How can a DAO seek enforcement of a contract? If a DAO hires someone to perform a task that is not completed according to contract terms, what is the legal remedy of the DAO.

Assuming the DAO is not incorporated in any jurisdiction, can DAO members vote to appoint an agent to use the courts to seek enforcement on their behalf? Will the courts recognize the legal standing of this agent?

Please use any jurisdiction you can to cite a means of a DAO enforcing a contract.

The DAO's service provider would hire the person, not the DAO. The contract would be with the service provider, and the service provider could then sue the agent if the task wasn't completed as the specified.

The DAO does have to carefully arrange things so its service providers can't betray it. One way to do that is to have the DAO pay the service provider only when work is completed, as certified by a vote of the DAO.

There's some risk to the service provider that the DAO won't be able to vote them their money for some reason even if they complete the job satisfactorily. The DAO could choose to pay the service provider at a high enough rate to justify them taking this risk. Or the DAO could pay the service provider up front and assume the risk that the service provider defaults. Various escrow solutions could also be used between the DAO and the service provider.

The basic idea is that the DAO only does business directly with agents who are willing to do whatever is need to do business with the DAO, whether that's accepting delayed payment, using escrow, or whatever. Then others can enter into normal contracts with the DAO's service providers without having to deal with any legal oddities of dealing with the DAO directly.

One can imagine companies whose sole purpose is to act as service providers for DAOs. They would lose all the trust they had built if they ever betrayed a DAO that trusted them. Also, contracts could exist between these service providers and the members of a DAO, possibly even giving them standing to sue if the service provider failed to do what it promised.


Need help with stuck bitcoins I have an issue that's probably happened lots of people already, so I'm really sorry for asking the same question. My transaction is stuck since 28.12.2017 already. I've accidentally paid not enough fee to ever get it confirmed. I wanted to pay 0.0001BTC but I've paid a total fee of 0.00001BTC. So not even a transaction accelerator can help me out with this problem anymore. My question is now, what can I do to get my bitcoins back or even get it ever confiormed?

Best regards,

Sazer

try use abandontransaction "Your transaction ID here" and then restart it with -rescan flag

and then add your transaction fees higher (NOTE: ONLY WORKS IF TRANSACTION IS NOT IN THE BLOCKCHAIN)


Is scaling Bitcoin heading it to a dead end? The immutability of any given blockchain is reinforced by the total hashing power behind it. Proof of work (ergo a financial commitment) is a necessity to ensure the party verifying transactions is incentivized to do so honestly.

Currently (April 2018) mining profitability is relatively low and may soon become limited to those with really cheap electricity. This is before any scaling solutions have really come into full force with Bitcoin.

With the next block halving in 2020 (one of many more to come) and scaling solutions becoming mainstream will there still be enough incentive for miners to support the blockchain?

You're confusing different things here.

Parties incentivized to verify transactions are those that receive payments. Miners are only incentivized to do Proof of Work. (Although they have to be careful to not include invalid transactions while doing so.)

Mining is actually very profitable now. You can tell by looking at how fast the hashrate keeps growing. In the long term though, profitability is supposed to be near 0 because of competition: if there's free money to be collected, it would be weird if nobody came around to take it. Those who have cheap electricity inherently have an advantage.

Scaling solutions don't have much to do with any of this, other than possibly hurting the entire system by having blocks become too big. Scaling implies more transactions per block so which means, all things equal, more total fees for miners. Of course not all things are equal in practice, but assuming enough demand to fill blocks, a new equilibrium will be achieved.


Which block explorers recognize bech32 addresses? At this time, blockchain.info doesn't. Neither does blockchair or blockcypher.

Blockchair announced support for Bech32 addresses last month.

This page about Bech32 adoption on bitcoin.it wiki page is tracking blockexplorers that support Bech32 addresses.


Bitcoin mining with a Raspberry Pi I'm a newbie with this argument. If I want to mine Bitcoin with Raspberry, how should I proceed? In specific:

Distro
Mining's software

And, How many Bitcoins I can to mine in a month?

You'll attain about 0.1MH/s with an overclocked and overvolted Raspberry Pi. 963437 years on average to generate a block, or averaged to 0.00000007 BTC a day when using a pool. Not enough to cover the 5W power draw.


Why was ECDSA chosen over Schnorr Signatures in the inital design? Schnorr Signatures and Signature aggregation is in the bitcoin technology roadmap. Schnorr Signatures was around the same time ECDSA is around.

Why wasnt Schnorr Signature Scheme implemented at the get-go instead? Why was ECDSA chosen over Schnorr Signatures in the inital design?

Why was ECDSA chosen over Schnorr Signatures in the inital design?

You'll need to ask Satoshi to know for sure, but my guess is simply because ECDSA was well standardized at the time, while no Elliptic Curve Schnorr based schemes were.

One of the reasons why an ECDSA standard existed but no EC-Schnorr ones may be patents. DSA was designed as a variant of Schnorr specifically to avoid Schnorr's patent on his signature scheme. By the time Bitcoin was created that patent had expired, but it was already too late - it was already much more appealing to use a well-known standardized scheme over designing your own cryptography (which would have been necessary to design a Schnorr based scheme).


Bitcoind does not like ECDSA (r, s) pair produced by OpenSSL I am writing transactions manually and have stumbled across a rather bizarre situation.

Only one in a few of the transactions I broadcast to bitcoind is accepted, otherwise I get a REJECT_NONSTANDARD (Non-canonical DER signature).

So I got my hands dirty and tracked the rejection to be originating from this line: https://github.com/bitcoin/bitcoin/blob/9c5f0d542d1db507b3b9c87bd9de6d0d758d51c1/src/script/interpreter.cpp#L163

I read about DER encoding and checked how IsValidSignatureEncoding is enforcing it, but I do not know why OpenSSL generates not-DER-compliant (r, s) values?

How should I overcome this? I am thinking of something along the lines of (pseudocode):

Pair (r, s);
do
{
   (r, s) = sign(hash, pvtkey);
} while (r[0] >= 128 || s[0] >= 128); // where r[0], s[0] should be the very first byte of each value

But isn't that kind of redundant? Can I give OpenSSL any flag to produce a valid DER (R, S) pair in the first place?

A possible reason is that Bitcoin Core expects a low S value. Try changing s with N-s if s > N/2 (N is the curve order).

Source here


Why are there not miners on homebrew Is there some reason why the mining software like sgminer, cgminer, or bgminer are not on homebrew?  I guess I'm wondering if there is a "political" reason? or if it's just not been tried yet? or is there some other reason?

Profitable mining is done by fairly few individuals today (unfortunately), and so there is not really much demand for an easily installable mining client. Most professional mining operations likely compile their own mining clients from source, possibly with their own customizations.

The only demand I could see, which I suspect is your usecase, is to just try mining out for fun. That reason alone hasn't been sufficient enough for someone to spend the time to get a mining client on brew/macports/etc.


Is Bitcoin trading anonymous and untraceable? I know little about bitcoin except they are digital currency.

I heard that bitcoin ownership or exchanges/trading is anonymous and untraceable by government. Is that true?
If I buy a bitcoin and pay by credit card, the money goes through banking system right? That would make it traceable wouldn't it?

Thanks in advance.

Appended: Thank you for the all answers that are informative. The reason I asked is because I heard that the underworld and money launderers etc. use bitcoin to evade governments' scrutiny which is part of the reason for its price soar. Guess there is no truth in that since transactions are traceable.

Bitcoin transactions are anonymous but traceable. Many wallets and exchanges are now linked to your bank account and ask you to furnish personal details beforehand. Hence, If needed they can trace you easily.

You can avoid it by buying BTC in cash.


When bitcoin forks, how do they decide which fork gets the original name? Bitcoin has had a number of forks over the years. The biggest one was Bitcoin and Bitcoin Cash.
Bitcoin seems to have won out in this fork, and is much more popular than Bitcoin Cash.
However, how was this naming scheme agreed? Why did Bitcoin end up still allowed to be called Bitcoin, whereas Bitcoin Cash needed a new name?
Arguably the fork that had the original name had a much bigger advantage in "winning out" over the one with the new name.
For example, Ethereum also had a fork and it was the original Ethereum that needed a new name (Ethereum Classic) and in that case, the new Ethereum (the fork we know now) was the one that won out.

One might think that the network maintaining the same consensus rules would be considered the original, and the project introducing a consensus rule change and thus creating a new network would be considered the derivative, but you've already pointed out an exception to that rule with the ETH DAO fork. Various arguments can be made why one or the other network should have been named ETH in that case. Similarly, with Bitcoin and Bitcoin Cash, proponents of Bitcoin Cash had attempted to claim the name Bitcoin for their own network.
Looking at a few fork events, the rule seems to rather be that the dominant fork gets to keep the name. However, it might not be obvious prior to a split which project will end up being recognized by the majority. In the advent of the Bitcoin Cash fork and the Segwit2x fork attempt, futures markets gave some indication how the public valued each proposal. Yet, in the end, it's an emergent social phenomenon. Whatever "everyone" ends up calling Bitcoin is Bitcoin. Often this conflict is resolved when one of the two networks rebrands.


What prevented NXT from being distributed the same way bitcoins are? As Nxt's generating accounts receive now the transaction fees of the transactions included in the block they forged, it would be possible to add some new NXT to the balance of the generating account, incentivizing forging even more and distributing the currency in a better way.

Is there a technical reason why all NXT were distributed in the beginning instead of distributed over time?

If every block subsidizes the forger with extra coins (in addition to the fees) then bigger accounts become even bigger by following the compound interest curve. In a currency with selfish forgers most of the coins would be absorbed by very few accounts that would lead to centralization of the currency.

This was predicted (https://nxtforum.org/alternate-cryptocurrencies/dgex-assists-in-launch-of-a-new-crypto-fimk/msg58485/#msg58485) by me and proved in practice (http://forum.fimk.fi/index.php?topic=539.0) by FIMKRYPTO, which is a clone of Nxt with over-time distribution.

Regarding a PoW distribution, back in 2013, when Nxt was launched, PoW couldn't be used as a good distribution method because a CPU-friendly algorithm would give enormous advantage to botnet masters and a GPU-friendly one - to owners of GPU-based mining farms left after Bitcoin rise in 2012.


Bitcoin Node Data Leakage Besides an IP address and broadcasting transactions, what other pieces of information can be derived from a Bitcoin node in the network?

As a peer:

You can derive the approximate location (GeoIP for IPv4, latencies and allocations for IPv6) unless the node is operating as a hidden service.
You can query the node for it's version number.
You can query the node for current date and time.
You can query some of the nodes recent connections with the addr host discovery mechanism, giving you the IP address and the time the node last saw the peer.

As someone with universal access to a nodes connection:

You can see which transactions (and addresses) belong to a user.

That's about it really unless you want to start poking around for other services, such as a web server on port 80 which would give you a lot of information about the owner, but only if it exists. bitcoind is designed to leak as little information as possible.


Why doesn't Core know where the transaction is coming from Someone I know sent me a transaction. I know where it came from, and blockchain.info knows it too. But why does BTC Core say it's unknown?

Can't it find the address by looking at the blockchain?

The 'From' field was intended for online transactions, a feature that was removed many years ago. For more information, see IP Transactions.


How to get Master Chain Code I'm using NBitcoin and I created an ExtKey object. Now I need to get the Master Chain Code (see page 89 of Mastering Bitcoin for a good explanation) for this HD node. How do I do this?

According to Mastering Bitcoin a root seed is used with HMAC-SHA512 to create a 512-bits output. The left 256 bits are used for the master private key, the right 256 bits are used for the master chain code. When I call GetBytes() on my ExtKey object, however, it returns a byte[74] array. This corresponds to 592 bits. I don't know what the extra 80 bits are so I can't just take the right 256 bits.

I solved this with a pull request that adds a property to ExtKey and ExtPubKey that allows you to call the ChainCode property. See pull request 156.

It has been merged into NBitcoin 3.0.0.28 which is available on NuGet.


Why is it so that if some bitcoin is spent by any user, the rest of his account's amount should also be spent and paid him back? I guess this is called Circular spending.

Why is it required in the bitcoin protocol?

Because on the lowest level of bitcoin protocol there is no accounts. There are scripts inside transaction. The most common script says: show me public key, I will compute Hash160 of it, compare with given Hash160, and if they are equal, I will check signature.

Let imagine, transaction contains single output with 1 bitcoin. Script contains Hash160 (which we treat as account). There is no way to spent part of bitcoin. We have to spent entire output, which is equal to 1 BTC in our case.
Transactions, like blocks, form some kind of chain.


Would an increased blocksize lower the stress of the stress tests? I see that there are about 9000 unconfirmed transactions right now and that five of the last six blocks are under 1/2 Mb and 15 blocks in a row under 750 Kb.  This suggests to me that larger block sizes would not help alleviate the backlog of unconfirmed transactions.  For whatever reason (probably low transaction fees), miners are not including a lot available transactions.

Am I misinterpreting the data?

There's a few things going on here:

Saying that there are 9000 unconfirmed transactions is not a particularly good fit for how node memory pools work. Not all pools contain the same transactions, not all nodes have the same rules for what an acceptable transaction is. Operators are free to modify parameters that alter this on a case by case basis, and memory pool contents will not be retained across a restart.
Increasing the block size is not a solution to spam transactions on the network. If you keep making the limit higher there is no reason in the world people won't produce transactions to fill the space. Fee prioritization forces spam to have larger fees than other users which limits how much they can create for a particular budget, the price for a user to get above the spam is in the order of a couple of US cents.
Miners don't have to include any transactions at all if they don't want to. Some are paid out of band to include specific transactions in favor of others, some choose to only include fees above a threshold, some refuse to include free transactions at all, some choose to ignore transactions with specific properties. Not including intentionally spammy transactions that bloat the UTXO database is a desirable property, where it would be harmful to all network participants if miners mindlessly included all that have been broadcast.

"Stress test" is a bit of a cover term, the event you are referring to is a denial of service attack. If there was knowledge to be gained it would be happening in a testing environment, not being announced with the intention to disrupt use of the network.


How many nodes would one typically check to determine the longest chain? Before posting a solved block to the longest chain, how many nodes would one need to check before making sure that the longest chain was found?

Each node acts independently, the Bitcoin protocol is designed so that you do not have to trust any other nodes to verify the state of the network.

If your node hears about a new block at the chain-tip, it will check to see if the block is valid according to the network's rules. Assuming the block is valid, it will be added to your local copy of the blockchain.

If your node later hears about a longer (valid) chain that doesn't include the block you just added, then you would 'reorganize' the last couple blocks, in order to create what you now know to be the longest chain. The previously accepted block would be discarded, and become what is commonly referred to as an 'orphan block'.

By this mechanism and the related game theory, the network's nodes are able to maintain consensus around the blockchain's history. The more confirmations a block has (ie blocks mined on top of it), the more certain one can be that it will not be 'reorganized', meaning the payment is more permanently included in the blockchain.


How do you get the balance of an address in your wallet using the rpc interface? The current rpc interface only allows you to see either
1. The balance of the entire wallet
2. How much was received by an address (which is okay... if you never spend)

Basically, I want to know how to get the balance of a specific address in my wallet. I've searched high and low and cannot find anything.

If you are only using Bitcoin through RPC commands, you might want to look into accounts. Using those you can just call getbalance and you will know how much Bitcoins are in each of the accounts.

If you are using only addresses, you can only see how many Bitcoins you received with it through listreceivedbyaddress, which can be not reliable if you spend any money from them.

All in all, you ought to just use accounts, as they can encompass many addresses and provide a lot of functionality for separating your coins into many parts in the same wallet.


Dogecoin daemon bind error I wanted to install a dogecoin client on Debian and compiled myself. After starting it it stoped saying

Error: An error occured while setting up the RPC port 22555 for listening:  bind: Cannot assign requested address

I am sure that there is no other program using this port and IPv6 also works fine which I tested on my Apache server.

Hopefully you have an idea how to solve this.

I solved it somehow, even though I am not sure why this solved it.
I added the following line to the config:

rpcallowip=0.0.0.0


the problem is an incorrect implementation of BIP-0034 in my code, I thought the length of height should be at least 3 bytes which I was wrong,
"Coding Enthusiast" says :
"The block height has to be pushed with the minimal number of bytes:
Since BIP-34 activates at block 500 on RegTest, this is ignored on all blocks from height 1 to 499 and from block height 500 it starts being enforced and the invalid push is rejected."
the description of the answer is here: bitcointalk.org/index.php?topic=5293244.0


Effect of internet connection speed on solo mining I have a set of PCs hasing at 100 kH/s and currently the network difficulty is 2674.36329706.

My power usage is 200 W, and as per https://www.litecoinpool.org/calc?hashrate=100&difficulty=2674.36329706&power=200&energycost=0.12&currency=USD

the probability of me finding a block in 30 days is 2.23%

However, my internet speed has been curtailed at 52 kilobytes-per-second and I'm wondering if that changes the above probability from 2% to zero? ie, do I need to have a great internet connection to even have that 2% chance?

With solo mining, all you need to get from the Internet is the latest block. Since these come once every 2.5 minutes (average) and are at most 250 KB (typically ~10 KB), you should be just fine. You'd also want to get all the latest Litecoin network traffic in order to validate all the transactions you can, but that'd be pretty small, like the blocks.

You might find (on average) a few more stale blocks than the typical high-speed user, but this shouldn't be too significant: on the order of (your latency and download time - normal latency and download time)/2.5 minutes


Which transactions are being submitted in the very first blocks of some digital currency? This is more like general question about digital currencies rather than about Bitcoin specifically, but it still is relevant to Bitcoin I guess (at least this SE section is more suitable for this question than Stackoverflow).

I took some time to understand how digital currencies work, and it is common for all of them that transactions are submitted in blocks that are generated by miners.

And now there are dozens of cryptocurrencies out there, and all they maintain the same mining principle. But what I can't understand is that when a new digital currency is launched there are no transactions going on since there is no one trading it, which implies that there is no mining and no new coins issued.

So my question is, how does it begin? How these digital currencies develop and expand if there are no transactions initially?

Thanks in advance!

You don't need to have transactions in order to mine. A block always contains at least one transaction, the "coinbase" transaction that says where the block reward should go, but it need not contain any others.


Has anyone tried mining with visitors' computers Some sites like http://www.bitcoinplus.com/generate allow that.

But can javascript take advantage of GPU?

You should have a look at this question about web miners.

In general, web miners use JavaScript and WebCL in order to perform operations on the GPU.

However, it might not be as profitable as you think. Considering that most people have very poor GPUs. At the moment if you'd have someone with a decent 200MHash/s card on your website for 24h, you'd basically earn 3 cents. You can check how much you could earn by visiting my calculator. All in all, you're better with ads.


Second, Third, Etc Confirmations taking a long time, why? I have sent a bitcoin transaction of 0.18, you can see it here.

https://live.blockcypher.com/btc/tx/22bacef7d4fb78e4e90cd04540daad257a39cb4ab4510f9e0efe5a88efaf0f87/

I included a fee of 0.002 even though blockchain only recommended a fee of 0.00012 hoping it would help speed it along.

The first confirmation took about an hour, but I understood because it was spending an unconfirmed input.  Once that input confirmed, so did this transaction (at least I think thats why, I am not sure).

Anyway, that is fine, but now I have been waiting 40 minutes for the second confirmation.

I thought confirmations after the 1st were every time a new block was added to the chain.

So my question is,  why would this transaction take so long for a second confirmation?

Bonus Question:  Is there some way for me to see how many blocks have been added to the blockchain since the block my transaction is in?

Sorry if I'm way off or misinformed here,  but any help would be appreciated.

I thought confirmations after the 1st were every time a new block was added to the chain.

Yes, as long as the block being added is 'on top' of the most recent block.

  So my question is, why would this transaction take so long for a second confirmation?

Blocks generally come every ten minutes, but that's not guaranteed. Sometimes they come seconds apart, sometimes it takes an hour.

  Bonus Question: Is there some way for me to see how many blocks have been added to the blockchain since the block my transaction is in?

Yes, that's what the number of confirmations represents.


Have there been any examples of people manipulating transactions in a way that waiting for more than 1 confirmation would avoid? A lot of bitcoin exchanges require some minimum amount of confirmations before they consider money deposited.

Is there any evidence that this actually does anything? Has someone ever before manipulated a transaction on the bitcoin ledger because the recipient didn't wait for 10+ confirmations before accepting that the bitcoin has been exchanged successfully.

Or is this just to stop a theoretical attack from happening?

What you are referring to is likely a preventative measure for the possibility of a double-spend attack. Due to the nature of the Proof-of-Work algorithm in Bitcoin, the likelihood of such event on a transaction with 6+ confirmations is very low due to probability and the cost implications of re-calculating X amount of blocks.

  Is there any evidence that this actually does anything?

Suppose you have a large transaction that is very attractive to an attacker or someone looking to perform a double-spend attack. Once the transaction is included into its first block, it is considered to have 1 confirmation. Each block built on top of this chain adds to the number of confirmations of the transaction. This makes it increasingly difficult for a double-spend attack because the attacker would have to complete the same amount of computation (proof-of-work) to become the larger chain. In our example, 6 confirmations would require the attacker to mine 7 valid blocks to become large enough to be considered the valid chain. For example, having 20% of the total hash power of the network with 6 confirmations would yield a 1.42% probability of a successful attack. This number becomes exponentially smaller as the number of confirmations increases.

  is this just to stop a theoretical attack from happening?

One important aspect of Bitcoin is that nodes will always favor the blockchain with the most amount of proof-of-work (longer chain), this is critical to preventing double-spending.

  Has someone ever before manipulated a transaction on the bitcoin ledger

This is a slightly controversial question, and I would recommend reading this thread for various attack specifics.

The Bitcoin Wiki also has several charts and calculators that can be used to determine theoretical attack probabilities.


Must block contents be stored with the proof that they haven't been changed? The replication of the block contents across all full nodes has been bothering me for some time.  Isn't the header of a block enough for me to validate the block contents if and when I get them (which I wouldn't until something told me that I need that block)?  When I get blocks, I can save them, but I suspect there are a large number of blocks I don't need.  I'd be willing to pay a small fee to get a block from someone else if that means I get an extra 20 GB on my hard drive indefinitely.

I guess this is a bit like an SPV client, but I have seen no middle ground, where a client has a bunch of seemingly random blocks (but they aren't random - they contain all the transactions required to prove the current holdings of the person running it).  If such a client existed, it could hold and update the UTXO set as each new block comes in, all block headers, blocks important to the operator's acquaintances, and blocks the operator thinks might be valuable.

If we are trusting the network to provide the hashing power that prevents changes to the data in the blockchain, can't we also trust the network to provide the data itself?  Hashpower is valuable right now because of A) the subsidy, and B) transaction fees.  It makes sense to me that storage space is also valuable.  But while transaction fees are generally designed to cover that cost, they are allocated to hashpower rather than those providing storage.

Finally, if I had the complete UTXO set as of some previous block, and I've watched all the changes to it represented by all the blocks since (without necessarily permanently storing them), then I can determine whether or not any incoming transaction is valid.  I think the storage requirements for a client that does this are well under 10% of the storage requirements of a full node right now.

Am I missing something?

Sounds like you are describing a pruned node. As of Bitcoin Core 0.11, you can run it with the experimental -prune=N option, which only keeps the last N megabytes (min 550) worth of blocks, plus the UTXO set. In 0.11 it is only useful for some RPC commands and mining, but it disables the wallet due to being too experimental. In 0.12 the wallet function will be available in pruned mode.

All blocks and headers are still downloaded and validated fully, but the old blocks are deleted from disk occasionally.

Also, I think it is a bit incorrect to say that hashing power prevents modification of the block chain. Block chains are by means of hashing always immutable and only append-only. However, in the presence of multiple valid competing block chains, most hash power decides which one is to he accepted.


How can a closing transaction in LN have more than 2 outputs? I collected some data regarding closing transactions of channels in LN and I see that a small percentage of them have more than two outputs. How is this possible?

An example of such closing transaction type:
1235c0196785ea2e538fb5f3e45caeb17fc457c089a9f4a4bb01f1221539159a

There are 3 ways to close a channel.

The good way: mutual close
The bad way: force close
The ugly way: revoked close with penalty transaction

In the good case the closing tx should have 2 outputs as you expected. In rate cases even just 1 output.

But in the other two cases a version of the commitment transaction is published. The commitment transactions has additional outputs for pending htlcs that are not settled or timed out yet. So if the channel was routing funds and a force close or protocol breach is happening we can see more than two outputs.


zcash - current block reward Zcash implements the slow start strategy, as described here.

The reward for mining a block is meant to ramp up linearly and reach it's maximum value around block 5000.

How do I check the current reward value per block?

Easiest way would be to look at the latest block and see how much is the reward e.g. block 5846 has reward of 3.65385 ZEC
Or you can drectly see current reward here https://explorer.zcha.in/statistics


Is there a public repository/api of coin/token logos I am developing an cryptocoins related app and I would like to display cryptocoin logos there for all coins available for trade. Is there an API out just a publicly accessible repository that would give me those logos?

I was looking for the same thing and I found - https://www.cryptocompare.com/api


Can a Finney Attack make SatoshiDice betting profitable? Can a Finney Attack make SatoshiDice betting profitable? If you perform a Finney Attack whenever your bet fails (by replacing it with a transaction to yourself), then would it make betting profitable, even though the Finney attack won't always work? How much mining power would you need to break even on profitability?

The short answer is: yes, but it would not be profitable in the long-term.

A Finney Attack is not easy to pull off, because guessing when the rogue miner's block will be generated is imprecise and inaccurate. Guessing gets easier with the more hashing power the rogue miner puts on the network, but you probably won't see real profit unless you get a pool to participate in your attack.


Bitcoin mining reward in 2009 can someone confirm if this is true or false.  When a miner started to mine in 2009, they were automatically given five bitcoins?  That is 5 BitCoins automatically appeared in their wallet almost like a signing-on bonus.  Not much of a bonus since the value was less than a cent but you know what I mean.
Thank you

I believe all the following has applied since the beginning and is still what happens.
The mining reward is not given when starting to mine but is allocated when each block has been successfully mined.
The miner chooses what happens to the mining reward. They include as the first transaction in a block a special "coinbase" transaction that has no inputs and at least one output. The sum of the outputs cannot exceed the sum of the currect mining reward plus the total of transaction fees offerred by each transaction they include in that block.
The mining reward cannot be spent until 100 further blocks have been mined (by any miner) in a chain including the mined block.
The mining reward halves every four years roughly.

Related

What is the block maturation time?
What exactly is Mining?


Bitcoin transactions from mining companies So, I am mining bitcoins with a company called Genesis-mining. Every time I create an address with the purpose of receiving bitcoins from them, do I need to specify how many bitcoins I want to receive, since I do not have control of how many bitcoins will be created per day as far as my contract-mining goes?

Thank you.

After reading the FAQ's of genesis mining, it is clear that it is a kind of pool mining company, however, you do not buy the mining rigs for yourself but just pay them for the hash rate you wish to by. Now the amount of bitcoins you receive is decided by the ratio of your hash power to the entire hash power of genesis.

As an example, say your hash input is 1 hash/sec and the total hash power is 100 hashes/sec, and genesis mined a single block that day. Todays block mining rewards are 12.5 BTC. So you will be paid 12.5/100 BTCs. However the FAQ's also mentioned that they cut certain operational charges. So you will get a little less than the above figure.


mnemonic pass phrase generation in wallets / hardware wallets - security flaw? Wouldn't it be saver to generate a mnemonic passphrase manually by just taking random words from a lookup table?

My thoughts:

a wallet creator can can accidentally or on purpose use deterministic seeds for creating the mnemonic pass phrase

what is your opinion about this?

I'm using mycelium - so in theory I could check the code myself - but also using ledger nano s - so there is not really a way on verifying that the threat above is not implemented on the HW wallet, correct?

Wouldn't it be saver to generate a mnemonic passphrase manually by just taking random words from a lookup table?

No, it would not be. This method may even be insecure if you are actually doing it manually.

A BIP 39 mnemonic, if generated properly, is secure. It is just as secure if you randomly choose words too. This is because both methods require a Cryptographically Secure Random Number Generator. For BIP 39, you use a CSRNG to generate a 256 bit random number and split it up in order to produce the mnemonic. There's an additional checksum that makes the mnemonic represent a 264 bit number.

In your method, you generate 24 random 11-bit numbers (because there are 2048 words in the wordlist) and use each number to choose the word to use. While this is more random, you lose the checksum. Furthermore, it's only 8 bits more random, which is not much more random. Either way, the mnemonic is sufficiently secure, not because of the method used, but because a CSRNG was used to generate the numbers.

However if you actually do it manually, then it is likely insecure. If you are generating the numbers yourself (i.e. without the help of a CSRNG), then your seed is not going to be sufficiently random enouhg. Humans are a notoriously bad source of entropy, but you want your mnemonic to have good entropy. So doing this manually is not a very good idea.

Although you could use a 6 sided die to randomly generate your numbers, but that may not necessarily be a good source of entropy either. It would also require a few hundred rolls in order to have a sufficient number of bits.

  a wallet creator can can accidentally or on purpose use deterministic seeds for creating the mnemonic pass phrase

They could, but it would be noticed very quickly. The wallet is open source and people do actually audit the source code. People would notice if a change went in that modified its random number generation.

  but also using ledger nano s - so there is not really a way on verifying that the threat above is not implemented on the HW wallet, correct?

Not necessarily. Most of the Ledger Nano S's firmware is open source. And the seed is generated using from the secure element which has a True RNG which is AIS-31 Class PTG.2 compliant. You can check that the firmware calls the correct functions in the Secure Element SDK to use the TRNG for seed generation.

The Secure Element's firmware is closed source unfortunately, however I don't think Ledger can modify that firmware. I believe they only get a binary blob for the firmware from the chip's manufacturer, STMicroelectronics.


How long is a Bitcoin? I searched already but I couldn't find anything about the structure of a bitcoin.

My understanding is that a bitcoin, which is different AFAIK from a bitcoin address, can be interpreted as a string of numbers and characters (alphanumeric). How long is a bitcoin string (min/max)?

I found here (https://blockexplorer.com/block/000000000000000002109f32aeac7a036232b0116f939326651e739a28e6d6b6) now a size of: 934325 bytes for a particular bitcoin. Could this be the length of the particular bitcoin?

PS: I searched always for length and not for size...

A bitcoin is not a piece of data, and therefore does not have a length.  A bitcoin, the unit of currency, is just like any other unit of measurement.  It wouldn't make sense to ask "how much data is a meter?", and likewise it doesn't make sense to ask how long a bitcoin is.

That said, the amount of bitcoin that is stored by an individual is the sum of all the bitcoin denoted in the unspent transaction outputs (UTXOs) that are controlled by the individual.  These are pieces of data and do have a size...albeit a variable one.  These outputs do not need to be stored by the owner, as they are stored on the blockchain.  All the owner needs to store is private keys that allow them to spend the UTXOs, which is what a wallet manages for you.

I hope that helps.


Safely convert paper wallet to encrypted online wallet I started investing a not insignificant part of my salary into BTC a few years ago. I created 10 paper wallets (using bitcoinpaperwallet.com) on a dedicated laptop disconnected from the Internet. I then stored them in my office drawer however I no longer feel safe due to potential theft/elements etc. and I don't have access to a safety deposit box.

I want to digitize them and use strong encryption so I can store them on a few different servers that I own for redundancy. I don't need to regularly withdraw BTC from these wallets as they are for investment, I keep a separate small hot wallet on blockchain.info for spending. I'm confused as to how I should;

a) Digitize the paper wallets. I dont want to have to  manually enter the private keys and make a mistake. Is there software I can run on the disconnected laptop that can scan the QR codes for the private keys using the webcam? I know blockchain.info does this but the laptop doesn't have Internet access.
b) Once I have the private keys in a digital format (either in a plain text file or some wallet format) what form of encryption do you recommend. I'm currently planning on using PGP with 8k RSA keys.

Any advice would be most appreciated.

Not completely what you asked for, but if you have a significant amount of money in bitcoin it makes sense to store them on a hardware wallet like trezor, ledger, ... . These cost 100$ or less and are totally worth it for ease of use and peace of mind.

I would sweep the paper wallets with mycelium and send the btc to your hardware wallet. This completely eliminates the threat of your computer being infected/hacked/etc. Since you have 10 paper wallets, I'm presuming the individual amounts might be ok to store on your phone for a few minutes.

Regarding storage, all addresses on the hardware wallet are generated starting from a 24 word seed. So you could write down 2 or 3 copies of this seed and distribute them in vaults/to trusted people. These 24 words can of course also be encrypted etc. If your hardware wallet breaks, all bitcoins can be retrieved by using these 24 words and a new compatible hardware/software wallet.


Does any pool accept higher-fee transactions of a double spend, instead of the earlier one? Some pools use a modified bitcoind that uses different rules for choosing the transactions to include in a block. Are there any pools that knowing one transaction to be included in a block would discard it if another transaction on the same inputs would arrive with a higher fee? That is to say, when faced with a double spend attack between a transaction that arrived earlier and a transaction that pays them more, the pool would choose the latter?

It seems as if there is such a pool now, advertising the behavior as a feature to allow "reverting mistaken payments":

BitUndo

They also supply a patch to bitcoind.


Can trading be done on coinbase.com? On coinbase.com I tried to sell some bitcoins and was told I had to register a bank account.  I'd have expected that only if I were trying to withdraw dollars, euros, etc., from coinbase.  On mtgox one can sell bitcoins and have dollars in one's account.  Is that impossible on coinbase?  If so, how long does it take to move dollars to coinbase from a bank account and buy bitcoins?  If the price of a bitcoin goes up to what looks like an absurdly high price and I suspect it's a bubble that will burst, I might want to sell bitcoins and then 12 hours later, buy more at a lower price.  But if it takes a few days to get money back and forth between coinbase and a bank account, and it that must be done in order to do such trading, then coinbase is not the place to do it.

So what can and cannot be done there?

Coinbase unlike Mt.Gox is not a bitcoin exchange, it is a bitcoin wallet with the option of buying or selling bitcoins using a US bank account. You can store bitcoins on the site but not USD.

This is primarily done for legal reasons. When you allow people to trade currency with each other instead of just being a currency dealer you open yourself up to a whole world of regulatory problems. Namely people would have to be extensively verified and new anti money laundering systems would have to be put in place to comply with FinCEN.


Why are arithmetic script opcodes limited to 4 byte operands? The Bitcoin wiki script page says that:

Arithmetic inputs are limited to signed 32-bit integers, but may overflow their output.
If any input value for any of these commands is longer than 4 bytes, the script must abort and fail.

Does anyone know the reason behind this limitation? Why are arithmetic opcodes limited to 4 bytes?

From the source code:

  Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers. The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1], but results may overflow (and are valid as long as they are not used in a subsequent numeric operation). CScriptNum enforces those semantics by storing results as an int64 and allowing out-of-range values to be returned as a vector of bytes but throwing an exception if arithmetic is done or the result is interpreted as an integer.

This does not explain why overflowing is allowed, but I guess this has to do with preventing errors (say, 3 billion + 3 billion resulting in a negative number).

As for the 4 byte limitation, I assume this is for safety. If there was no limitation, then because CScriptNum stores numbers as signed int64_t values, overflowing that limit (not the stack item overflow described in the previous paragraph) would result in undefined behavior according to the C standard. This is bad practice in general, but very bad in consensus-critical code. Most nodes run x86 Intel processors, but could you imagine how deeply in trouble we would be if a transaction was valid on Raspberry Pi based nodes and invalid on miner nodes, or valid locally on your smartphone and not on the network? All kinds of bad stuff would happen: hard forks, double spends, you name it.

You could also have problems with very large numbers being added to increase their size past the 520 byte push limit, then hashed repeatedly to consume as much CPU time as possible, resulting in a DoS attack.


Is the reward for successfully mining a block a transaction on the bitcoin network? If so, what are inputs to that transaction? If not, how are rewards tracked in the network?

Yes, it is known as a coinbase transaction. It is the first transaction in every block and has some slightly different rules to all others. It has blank inputs, can not be spent for 100 confirmations, and can create a maximum of the current reward amount plus the fees collected in that block.


Transfert d'adresse BTC Segwit vers adresse BTC non segwit Bonjour, je viens de faire un transfert de BTC segwits vers une adresse BTC non segwit, pensez vous que cela pose un problèmes ???

Non, tout va bien ! C'est le même réseau « Bitcoin ».

Nope, all is fine ! They're both part of the same network.


Calculator for estimated TX-Fees First of all, this refers to

How to calculate transaction size before sending
What is the exact formula for calculating transaction fees?

I want to estimate the TX-Fee I would have to pay in a simple scenario where my wallet contains only 1 address Z that has received X payments.

I then want to pay all the wallets balance to Y different addresses at once.

Because I want to spent all of its balance, it would be great to know the transaction-fee, so that I can reduce Y, or pay the fee to Z in advance.

Since I prefer a worst-case-calculation, is it legit to count every incoming payment to my address as Input?

Is the following calculation correct?

normal_fee := 0.0005                            // Taken from Bitcoin-QT
size := X * 148 + Y * 34 + 10 +- X
fee := normal_fee / (1 - size / 500kB)

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

A fee may not be required at all, if the priority of the transaction is high enough. Generally 1 BTC, one day old, is enough age and balance that you can send without a fee.
If any of the individual payments are below 0.01 BTC, a minimum fee will always be required.
The minimum fee, when required, is 0.0005 BTC per 1000 bytes of total transaction.
The contribution of each input and each output to the total size is somewhat consistent, it only varies largely if there are compressed keys (standard for newly generated addresses on a recent client version), some examples:

A) 1 input/1 output (sending exact balance of one input) = 191 bytes
B) 1 input/2 output (sending money from single input with some change) = 258 bytes
C) 2 input/1 output (consolidating two address balances to one output) = 404 bytes
D) 12 input/2 output (sending from many inputs with change) = 1851 bytes

The easiest way to empty a wallet is to attempt to spend the entire balance with the transaction you desire, attempt to send it, and look at the "exceeds your balance after a 0.0xxx fee is included" message. Subtract the fee from the amount you are sending, and you should now be sending the entire wallet balance including the fee.


Blockchain.info API: How to cancel callback notifications Regarding Blockchain.info's Receive Payments API V2:

The 'Generating a Receiving Address' feature requires a callback_url, to which they send a notification of EVERY confirmation. For every transaction, potentially thousands of notifications will be sent to the callback_url.

When I use the 'Generating a Receiving Address' feature, can I receive a new address WITHOUT specifying a callback_url?
If I must specify a callback_url:
a. Is there any way to cancel the callbacks?
b. Can I limit the number of notifications that are sent?

1) No

2) your callback url must respond with the text "*ok*" without quotes and nothing else, just text. This will stop Blockchain.info from sending further notifications.


Transaction for real use / transaction for changin Bitcoin in other currencies? How can I calculate the ratio between this two type of bitcoin transaction?
Is it correct divide the total volume USD of the data at this link:
http://data.bitcoinity.org/markets/volume/5y?c=e&r=week&t=a&volume_unit=btc

by the total transaction volume (USD) of all the blockchain transaction?

No, this is not a way that you can accurately calculate this ratio, because trading is often an off-blockchain event. The sequence of events looks something like this:

You send bitcoins to the exchange, using the blockchain. (Or you send fiat money to the exchange.)
You make any number of trades internally to the site. The blockchain is not involved, only ledgers controlled by the site are updated.
You send bitcoins from the exchange to a wallet, using the blockchain. (Or withdraw fiat money.)

Trading volume measurements are measuring step 2 there. That volume is not directly related to the blockchain volume. But, if you have other data too, to help you make sense of it, you could estimate the ratio in question.