What can I do when the blockchain synchronization is stuck at a specific block? I hadn't started/used my Bitcoin client for ages. Now, whenever I start the client, it is downloading block 135407 and does not progress past it.

What can I do?

I had this happen to me once. It was apparently caused by an incompatible peer node.

Delete $HOME/.bitcoin/peers.dat
Restart bitcoind

Afterwards, new compatible peers will be found, and hopefully, you'll start processing blocks as expected again.


OP_CHECKSIG: reasoning behind construction of message to be signed I've closely studied the deservedly famous OP_CHECKSIG explanation found here, including the diagram found here. That explanation details how to construct the message that is signed via ECDSA, producing the digital signature for SigScript. All good.

By way of summary, the aforementioned message is an amalgamation of the new transaction under construction (with its ScriptSigs nulled out) and the scriptPubKey from the sourcing transaction output. For clarity, the "sourcing transaction output" is the one identified in the transaction input under construction by its Transaction Hash field and its Output Index field. All good.

MY QUESTION: in the new transaction under construction, its Transaction Hash field already "fingerprints" the sourcing transaction output. Why go to the effort of inserting the aforementioned scriptPubKey from the sourcing transaction output into the message? That seems redundant, given that the hash digest in the Transaction Hash field fingerprints the entire sourcing transaction.

I ask this question in order to more thoroughly understand the logic behind the intricate construction of the message that is signed via ECDSA.

I think, since with some sighash types, the scriptPubKey is not part of the txid. So it is not automatically taken into consideration when the txid is already part of the hash.


My Radeon 7570 that comes with my hp envy h8-1409 is not being detected by CGminer (Litecoins) I'm using Windows 8.1 and CGminer 3.1.0 trying to mine litecoins

What's odd about this computer is that the video card is some kind of HP OEM device, that's getting driver updates (latest August 2013) in the windows device manager and plays video games well, even without Catalyst and/or the SDK installed.  When I do install the latest 13.1 CCC it doesn't do anything, the card isn't even being detected in there.  GPU-z and Afterburner show my card as a 'radeon 7500 series' and 'Radeon 7570' respectively.

There are all sorts of AMD drivers in the /windows/system32/drivers section

This is what CGMiner says:

So I go ahead and log in:

Does anyone have any suggestions?  I noticed that the new CCC doesn't list 7500 series (not saying they don't support them) but maybe an older version of CCC?

I recently did a driversweep where I ripped all of the 7570 drivers out of the system and reverted it back to a Windows Basic Display Adapter, and installed Catalyst.  That didn't work, I had to do a system restore.

Any suggestions welcome!  Thanks :D

EDIT #1  CGminer would just hang and eventually a windows "This application is not responding" screen would come up before I installed the SDK.  I forgot to mention this earlier.

It's a bit janky, but I've finally found a solution to this situation.

Download this driver sp57510.exe
Attempt to run the installer - it will eventually get to a point and then fail. When it gets to the point that it tells you 'Unsupported System' with an OK button, don't press OK just yet. Open /appdata/local/temp. In there, find the most recently created folder. It's contents should look like this:

Go into the /src/ folder, and you should find an ATI Setup.exe. Run that. My driver was up to date, but it did add the AMD APP SDK stuff and now CPU-Z reports that OpenCL is available, and cgminer is chugging away.


Where are block announce times recorded? Times at which a block is initially announced to the network aren't recorded in the block. Does bitcoind record at least the local time each block was seen the first time? Does anyone have any suggestions about how to record these times?

I'd like to be able to use local data rather than hammer someone else's servers.

The creation time is recorded in the block:

https://en.bitcoin.it/wiki/Protocol_specification#block

And since there's no benign benefit in deferring announcing it, it would seem likely creation time and announcement time would be pretty close.  But I accept there are variations, and pretty close may not be good enough.

However there is another approach.

You can use the bitcoind/bitcoin-qt -blocknotify option, described here:

github.com/bitcoin/bitcoin/pull/743

To record the time of new best blocks (which seems to be the like what you want.)

I used

blocknotify=echo date", %s" >> /home/userid/.bitcoin/blocknotify.log

And got:

Sun Jun 23 20:14:15 NZST 2013, 0000000000000069a26870e6f6693d733e32d57174bebb7d21f0fac1212fd83b
Sun Jun 23 20:33:04 NZST 2013, 000000000000003359dff8a8bd1033b02a52c6c2ff3ebb2f8dbffd171c97e83c
Sun Jun 23 20:43:11 NZST 2013, 000000000000004ec1559bd7e955ce8914a29a04b378bbcc34adf5bea077f73d

To clarify, that example of blocknotify was in bitcoind.conf, but it works on the command line too, with appropriate quoting of shell significant characters.


Solo mining: gen=1 needed when using minerd? I'm guessing maxcoind follows the same conventions as bitcoind. I've read up most everything except the actual source code but it seems that's the only place to find my answer!

Anyways, so when I go ./maxcoind getmininginfo - I get hasheshpersec = a fraction of what's pumped into it by ./minerd.

When I go ./maxcoind setgenerate false, hasheshpersec drops to 0... while minerd still happily spits out a huge KH/s rating per thread.

My question is thus: Does the wallet daemon (maxcoind/bitcoind) need generation to be set to on in order to mine solo with minerd?

And why doesn't those hashes show up in hashespersec?

As I understand gen=1 makes bitcoind/maxcoind mine... and that makes sense, seeing as that the hashrate reported is basically equivalent to the hashrate per thread I get from minerd. So if that is so, where do I see the total hashrate fed in by minerd?

And also, can I push multiple minerd instances on many PC's into the same wallet daemon?

Thanks so much for explaining all this!

In the case of bitcoind (as you say, maxcoind should be the same), setgenerate only affects whether bitcoind itself will mine.  It does not need to be on in order for an external mining program such as minerd to work.  All minerd needs is an RPC connection to bitcoind in order to find out what work it needs to do - and bitcoind will happily provide this regardless of the state of setgenerate.

Likewise, getmininginfo and its hashespersec number only reports the status of bitcoind's own mining - it has no way of knowing what other mining programs are running, or getting statistics from them.  minerd reports its own statistics directly to you.

bitcoind's internal mining code is not very well optimized, and isn't economical to use.  I don't know whether maxcoind is the same, but my guess is minerd is better, so just use it instead.  There's no point in using both as they will just compete for CPU resources.

Your final question should really be asked in a separate post, but anyway: there should be no problem with having many minerd instances fetch work from the same bitcoind, within reason.  (If you have millions of minerd's, bitcoind might not be able to keep up.)


There is at least one totally "offline" backup of blockchain? I know that it can be a little paranoid yet, but anyone ever did an offline backup of blockchain in case of a kind of geomagnetic storm? Imagine if all clients of the world lost the data. I know the entire world will be a mess, but the Bitcoin could keep safe.

Maybe it isn't necessary (or even possible) to keep an offline copy of blockchain, but it could be in a hard disk isolated in a special hardware.

Is it possible? Am I thinking something wrong? Thanks.

This question in Skeptics SE asks "Will the Sun's magnetic activity disrupt electronics on Earth?"

As I understand it, the disruption has a limited geographical area of effect, and protection for a device can be achieved by simply disconnecting the power and network cables to disconnect it from long-distance grids (which amplify the effect).

I'm sure there would be some offline backups available even if every PC that was plugged in was fried. I would assume servers in data centres would mostly have adequate protection already. For the vast majority of people with an interest in Bitcoin, the other effects that might come with widespread power and network outages would almost certainly be a bigger worry than any issues with bitcoin.

All that said, I recommend keeping multiple backups of your wallet in a variety of locations. Maybe you should keep a reasonable amount of cash handy in case of emergency too, if you're worried about geomagnetic storms...


Why does bitcoin-cli return strange version numbers for blocks? I've been looking at the version numbers of blocks, but I'm getting strange results from bitcoin-cli getblock.

"version": 536870913

However, when I run the same command with the false option (to get the serialized block data), it shows a version number of 1:

 "result": "010000 ...

Why is this happening?

Example: https://chainquery.com/bitcoin-api/getblock/0000000000000000054AFA8DDFAE5908D9FE2DC157FD137C03F71C87439BCB6D/false

Great question. I had to do some research to find out.

Currently version is actually 4 bytes. In the case of this block (and many other recent blocks, as it turns out) it's 01000020. This is little endian, so when you reverse the bytes in hex it's:

0x20000001 = 536870913

Which in binary is:

00100000000000000000000000000001

It turns out that the bits here follow the BIP0009 spec. You can get a more user-friendly explanation of BIP0009 here. Essentially, BIP0009 specifies that version bits are to be used to signal support for a soft-fork. In this particular case by using that that extra "1" at the end, the miner that mined this block is expressing support for BIP0112 otherwise known as OP_CHECKSEQUENCEVERIFY.


Can coin wallets create their own network/blockchain? In other words, I want a coin with NO premine and NO mining.  Can the wallet, alone, generate the coin(s) and the blockchain, based solely on inter-wallet communication (establishing a wallet "communication" network (kinda like the game Marco Polo in the pool) and chatting between users would generate a certain number/percentage of coins, per user, every day) and direct coin transfers between wallets?

I know very little about blockchain technology, so maybe what I'm describing is already done, to one degree or another.  But one person I spoke to thought what I was describing was crazy, so I figure my idea must be a pretty radical departure from traditional implementation, if even possible.

I'll gladly describe it in further detail, if interested, or it's even feasible.

Mining solves two problems: double spending and initial distribution of funds.
Double Spending
You need some way of addressing double-spending; otherwise people can just copy money over and over. Besides Bitcoin's system, there are two secure, distributed ways of addressing double-spending: Ripple's solution and Proof of Stake with broadcast checkpoints.
Ripple's solution is to have a handful of semi-trusted nodes called validators, which are picked by humans. They come to a consensus, and then they all sign the consensus. A client will refuse to trust the state of the network unless all of its validators have signed off on it.
Proof of Stake is a system where nodes generate blocks like normal, but instead of trying to repeatedly hash them, they use their funds as proof that they're a real node. You also need to have checkpoints regularly broadcast by a central node, because otherwise the system is susceptible to an attack where someone rewrites the entire history at once.
This is the harder of the two problems.
Initial Distribution of Funds
You also need some way to issue funds in the first place. There's a bunch of ways that you can issue initial funds: per email address, per IP address, per phone number, et cetera. The problem with this there's generally no way of implementing them in a distributed fashion.
For example, suppose you make a rule saying that a person must prove that they own a Twitter account, and then they get 100 coins. But when other nodes are checking this, half of them get a response saying that the account doesn't exist. (This has happened a couple of times in the past with Twitter.)
A good compromise solution is to have a key held by the developer that has the power to mint X coins every Y hours. Then, have a central server that issues coins according to whatever policy you want.


CHECKSIG description from the wiki I have been using the Bitcoin Wiki to know more about the CHECKSIG, and the graphic which is shown there.

This question will be rather long, but it would already help me a lot if you could just read my description and just let me know if I am correct or wrong.

My question is regarding how to calculate the hash (from the serialized transaction) which is then signed.

Generally the way I understand it, we first create a new raw transaction with input and outputs with pubKeyScripts.

Then to create the signature, we copy the pubKeyScript from the transaction we are spending into the SigScript at the input of our new transaction. Then we serialize the new transaction, appending to the string the hashType (SIGHASH_ALL/SIGHASH_NONE, etc.) and then create the signature for that string.

Then we clear the SigScript and put the public key and signature into the SigScript and have a signed transaction. When the bitcoin network validates the transaction it will create the serialized transaction string in a smiliar manner and check that the signature delivered in the SigScript of the new transaction is for the calculated string (and from the correct private key).

First of all is this correct? And if so, why is the pubKeyScript of the transaction we are spending used when calculating the serialized string of the new transaction we want to sign?

The new transaction is already referncing the ID of the spending transaction in the input of the new one. Therefore I cannot see why it is useful to also temporary copy the pubKeyScript of the spending transaction into the SigScript of the new transaction to make the signature?

Furthermore, I was trying to look in the source code from Bitcoin to find out what happens. I am not a programmer, escpecially not in C++. But I found out that the signature is checked here:
https://github.com/bitcoin/bitcoin/blob/48efbdbe986355bd2478f0fdd366b20952fbf30a/src/script/interpreter.cpp#L847

The referehnce to "scriptCode" in line 838, which is used as argument to checker.CheckSig() seems to contain only the pubKeyScript from the transaction being spend (without input, outputs, etc. from the new transaction?).

I was not able to find out where exactly in the source code the function checker.CheckSig() is defined.

But does checker.CheckSig calculate the serialized transaction as I have described above by adding the scriptCode into the SigScript and serialize it? If so do you know where in the source code that happens?

I hope you can give me some inputs to it. Thank you!

The purpose of signatures is to 'capture' some data about the transaction - it's outputs, and so on. Signers have control over some of it, using SIGHASH flags, but some of it is enforced by the network.

Remember that anyone verifying your signatures needs to know what you're asserting in your signature, and how to reproduce the same hash for ECDSA.

When producing the signature, and verifying one, SignatureHash() is called on every input, because each input has it's own signatures.

For each input, the transaction reserialized with a CTransactionSignatureSerializer which makes the input-specific modifications to the transaction. It will null inputs/outputs given some SIGHASH flags, and also requires that the scriptPubKey of the previous transaction is included.

It seems you were enquiring partly about this. The reason for capturing this through a hash is it means the signature can't be used on other transactions. A signature is only valid for a given input, and all the requirements of its scriptPubKey.

Hence, you will find that services which verify signatures need to have the scriptPubKey of the transaction being signed for.

Edit: Actually, more specifically, what is included as the script while signing is any script starting from the last OP_CODESEPARATOR, or from the beginning of the output script. So if the script contains OP_CODESEPARATOR, only a part of the output script is signed.

One point where you appear confused is this:

  Then we clear the SigScript and put the public key and signature into the SigScript and have a signed transaction

This is not correct - the serialized form is forgotten once the hash is produced. Signatures are put into different transaction instance.

checker.CheckSig() code - Note that it calls the SignatureHash() to produce the hash, and then VerifySignature() calls pubkey.Verify(sighash, vchSig) which is the actual call to ECDSA.

So, most of what you're looking for verification-wise is at the bottom of interpreter.cpp, but also check out interpreter.h for the interfaces.


what do these values in chainparams.cpp do? what do these values in chainparams.cpp do?

consensus.nMajorityEnforceBlockUpgrade = 2;
consensus.nMajorityRejectBlockOutdated = 3;
consensus.nMajorityWindow = 3;

and how do I find them in the existing blockchain when upgrading end for new?

first time I think it's when start diff grow up, but now think it's wrong.

what do these values in chainparams.cpp do?

If nMajorityEnforceBlockUpgrade out of the last nMajorityWindow blocks have signaled support for a softfork, enforce the softfork's rules on the blocks that have signaled support.

If nMajorityRejectBlockOutdated out of the last nMajorityWindow blocks have signaled support for a softfork, mark blocks with an old version as invalid.

These are for BIP34 style softforks.


Can I transfer Bitcoin from Binance to an Electrum Wallet? I wanna be sure that it's possible.
I want to transfer Bitcoin I bought on Binance for trading purposes, to an Electrum wallet. Is this possible? If yes, can you explain me how to do it?
Thank you very much.

Yes it is possible, as long a Binance is willing to let you withdraw your coins.
Steps:

Open your electrum wallet. Open the 'Receive' tab, and copy the 'receiving address' to your clipboard.

Open Binance. Navigate to the page where you can initiate a withdrawal.

Paste the 'receiving address' from Electrum into Binance withdrawal form. Be sure to triple check that the address you pasted into Binance is exactly the same as the address that is showing in Electum

Submit the withdrawal to Binance, and then wait until they send you the coins. You will see confirmation of this in the Electrum wallet, as long as it is properly synced with the network.


What is an extended fingerprint (xfp) and how does it differ from an xpub? Coldcard requires the xfps of all of its cosigners to be able to verify and sign multisig transactions. Providing the coldcard with just the xpubs is not enough, which I believe to mean that the xfp can't be gleaned from the xpub.

So, what is an xfp and how does it differ from an xpub?

The fingerprint of a public key is defined in BIP 32 as the first 4 bytes of the RIPEMD160 hash of the SHA256 hash of the public key. The fingerprint of a particular xpub can be gotten from that xpub, but this is not useful information.

What the Coldcard wants is the fingerprint of the master xpub. It wants the fingerprint of the key at derivation path m. This is because the Coldcard uses BIP 174 PSBTs. In particular, a PSBT can include the derivation path for a public key involved in an input in the PSBT. This derivation path will also include the master fingerprint so that the particular signer (e.g. hardware wallet) for that public key can be identified.

The master fingerprint provided does not need to be the actual master fingerprint. It just needs to be a fingerprint that will be present in the PSBT when the coldcard signs it. This way the coldcard will be able to know which xpub to use to derive a particular public key so that it can verify that the input is a multisig that it recognizes.


Bitcoin curl no reply Hi I have made a curl to my server but get no reply . What am a missing

 rpcuser=rpcusername
 rpcpassword=rpcpassword
 rpcauth=rpcusername:generatedkey
 daemon=1
 server=1
 rpcport=8332
 rpcbind=0.0.0.0:8332
 rpcallowip=0.0.0.0/0
 listen=1
 rpcconnect=0.0.0.0
 prune=10000

Whats strange is that it worked on another server. Why am I bot getting any reply. Bitcoin cli commands all work well . I get no reply not even the usual "empty reply"

You are trying to call the RPC interface incorrectly.  Your curl -

$ curl --digest -u rpcusername:rpcpassword -X POST 127.0.0.1:8332/json_rpc -d "{\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"getwalletinfo\"}" -H 'Content-Type:application/json'

has an incorrect path 127.0.0.1:8332/json_rpc you are posting to.  You should create your curl request with the following path - 127.0.0.1:8332/.

Working example, printing verbosely with -v

$ curl -v --digest -u rpcusername:rpcpassword -X POST 127.0.0.1:8332/ -d "{\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"getwalletinfo\"}" -H 'Content-Type:application/json'


What is the Big-O for LN bandwidth? Can anyone answer this or provide a link to a spec that is sufficient enough for us to calculate it? When I worked at Google, if someone wanted to deploy a network application they would need to provide a document to the SREs detailing the behaviour of the application at scale in terms of Big-O. Does something like this exist for LN?

I understand that we would have to make some assumptions about the network topology, that's fine. What I really need to know is simply what are all the network functions and when do they fire.

This is an excellent question but still probably a little bit under specified. Let me try to give an answer and elaborate.

When looking at network bandwidth there are several componants playing into it.

The most obvious (and probably most dominant) one is specified in BOLT 07 routing-gossip. There are 4 messages which are used to provide the information about the gossip protocol to every node.

The announcement_signatures Message
The channel_announcement Message
The node_announcement Message
The channel_update Message

While the first one is only sent between two peers to decide if a channel stays private or not the second and third needs to be delivered to every node. The way how gossip achieves this is by forwarding the message to each peer if it was received and novel to the node. The amortized / expected network bandwidth for those messages should thus be O(E/V*(E+V)) where E/V ist the average node degree. And E the number of edges and V the number of nodes. In the worst case (unrealistic) of a fully connected graph we have E=V*V and thus O(V^3 + V^2) = O(V^3)

The situation is even worse for the 4th message. Everytime the routing fees are adjusted by a node this message needs to be delivered to every other node and creates O(E/V*(E)) messages. While the 3rd and 4th message will only be propagated when received first. The update message can be send every second and will be propagated Everytime. This the network bandwidth req can be arbitrary (? Still bound by the second) large even for small networks. This is obviously also a ddos attack vector. There is the million channel challenge by rusty to stimulate this behavior.

Other less dominant components are messages that are only exchanged between peers to maintain the channel state. While connecting, handshakes etc seem neglictable there is the case of routing. Let us in a first step assume that every routing process is successful the bandwidth will then grow as O(b*t) with t being the number of transactions or payments being done by the network and b being the betweeness centrality of the node on the fee graph which according to this video is likelihood of that node being on a cheapest path. This would have to be corrected by the likelihoid of routing failures. For the overall network it could be the product of number of transactions times average Pathlenght times average number of routing attempts.

There is also the network bandwidth coming from the Bitcoin node but that should not change with the growth of lightning.

I hope I didn't miss anything. Stuff changes drastically with AMP routing since every payment is split into several small payments.


bitcoin block time after halving? I would like to know why the bitcoin block time is taking longer than 10 minutes, I know that bitcoin halving had decrease reward and increase difficulty but according what I read the blockchain itself will regulate the block time by adjusting difficulty to create a new block in order to have the same block time as first block was ever mined.Now block time are taking even hours what is it ?

thanks a lot

After halving, the reward goes down by 1/2. Some miners may find it unprofitable to mine and thus shut down their mining operation. However, the network difficulty remains the same until the next difficulty adjustment, which is every 2016 blocks (14 days approximately). Thus, the block time will increase to > 10 mins per block until the next difficulty adjustment.


bitcoin address from xpub key I want to create bitcoin address from extended public key, without exposing private key but did not get any success till now. Do someone know how to do it? I am using bitcore-lib package

According to BIP32 you're trying to generate a non-hardened child address, see BIP32 - Public parent key → public child key.

Using bitcore-lib, to derive a non-hardened child public key and a P2PKH address:

var bitcore = require('bitcore-lib');
var Address = bitcore.Address;
var PublicKey = bitcore.PublicKey;
var Networks = bitcore.Networks;

var hdPublickey = new bitcore.HDPublicKey('tpubD6NzVbkrYhZ4XLMmry7XriYJ6Xgx1vQqoUZHLUXQPDB32n7pQYaWSMpRttm2sHzYjsQqrsAZYyJCmoEJB51oSdqZxq7epGjP4vHriCYz7Tp');
var orderPublickey = hdPublickey.deriveChild("m/44/145/0/0");
var pubkey = new PublicKey(orderPublickey.publicKey);
var address = Address.fromPublicKey(pubkey, Networks.testnet);
console.log("address", address);

Returns:
address <Address: mkVBk6gZ7rBLYXvpdcKwTEq6SjHvSeLwZ8, type: pubkeyhash, network: testnet>


what does this error mean "Script did not clean its stack" while signing segwit transactions I'm trying to sign raw transaction on Bitcoin fork (Bitcoin-ABC 0.16.2) but I get Script did not clean its stack

        [args] => Array
            (
                [RAW] => 0200000001455f65335121517a3cd72737bd6d49dd0523dacc68465cac514dd723624f92f40000000000ffffffff0280c3c901000000001976a91409fed3e08e624b23dbbacc77f7b2a39998351a6888ac80bbaf4b000000001976a914c1f41b20bb5a64080f19347fb03f1cafbb19793e88ac00000000
                [PRVKEY] => Array
                    (
                        [0] => cPsVieHs6F5UBcWjG7Sp12bEjC6Jn6Qnbdj8CsrPDH1cCF6sdqiU
                    )

                [INPUTS] => Array
                    (
                        [0] => Array
                            (
                                [txid] => f4924f6223d74d51ac5c4668ccda2305dd496dbd3727d73c7a51215133655f45
                                [vout] => 0
                                [scriptPubKey] => a9140ef96a27286c7ce607623cf4f8ca4ba2ec977b2c87
                                [amount] => 13.000000
                                [address] => 2MtcQEbyzHoELWmzeMonsfbbLpBsTdU8BbD
                                [redeemScript] => 00143b7ec6d6e7697ed406f3bb825e028238ab5cc623
                            )

                    )

            )

    )

Simple answer, Bitcoin cash doesn't support segwit.


RPC call gettransaction does not work on bitcoin 0.10.2 Hello I have upgraded my bitcoind to 0.10.2, some of my rpc request now doesn't work.
This is an example:
bitcoin-cli gettransaction 6f5dfa31bef79d0c8cdd58530fc9f0ed2427e7085d421755f3fe78c
a6ac326ef
error: {"code":-5,"message":"Invalid or non-wallet transaction id"}

i have in bitcoin.conf
txindex=1
reindex=1

any suggestions?


What can we do with XRP? I'm trying to get my head around XRP, "the native currency of the Ripple network".

I understand that it's a currency that's only used within the Ripple platform to allow for transactions and serve as a "currency of last resort".

So I would imagine banks and financial institutions are quite interested in buying XRP so they can join the platform, since it allows them to cut off their operational costs.

However, it seems there is another group of people interested in XRP purely for speculative purpose.

What I don't quite understand here is how those people will actually "use" XRPs since it can only be used within the Ripple platform. Of course they will hold it until it surges in value but that would mean that, during that period, the XRP held by those speculators will not be available within the Ripple platform unless they "use" them in someway within the platform.

However, since those individual speculators aren't banks or financial institutions that are doing transactions with different currencies, I don't see any use cases of XRPs for them other than selling them, which would mean they are basically "hoarding" XRPs while waiting for their values to go up.

So I guess my questions are:

What does it mean to buy XRP as an individual OTHER THAN speculation?
(If investing in XRP could mean something other than speculation) How can we "use" XRP to do something other than speculation as an individual?
How is it possible that the Ripple protocol can operate even when there are many people buying XRP and therefore "holding" it, making it "unavailable" to the rest of the network. (I would imagine there are constant supply of XRP, which is enough to keep up with the "hoarded" XRP)

Any suggestions will be really appreciated.

Thank you.

What does it mean to buy XRP as an individual OTHER THAN speculation?

You can also use it as a means of payment and as a means of exchange for other assets on the network.

  (If investing in XRP could mean something other than speculation) How can we "use" XRP to do something other than speculation as an individual?

You can pay it to other people to settle obligations. You can exchange it for other assets on the XRP Ledger. You can use it to fund transactions on the XRP Ledger to issue, redeem, transfer, or hold other assets.

  How is it possible that the Ripple protocol can operate even when there are many people buying XRP and therefore "holding" it, making it "unavailable" to the rest of the network. (I would imagine there are constant supply of XRP, which is enough to keep up with the "hoarded" XRP)

XRP that is held is effectively out of circulation. Taking XRP out of circulation increases the value of the XRP remaining in circulation by reducing the effective supply. This makes it possible to use the remaining XRP for higher-valued transactions because its value is higher.

But even more importantly, speculation creates demand and trade volume. Because there are speculators who buy and sell XRP for US dollars, there is a robust trade between XRP and US dollars. This helps to establish and stability XRP's value and to assure that there are easy ways into and out of XRP for people who use XRP as a vehicle currency.

On one day recently, speculators traded about $1 billion worth of XRP. This helps to provide a reliable and stable measure of XRP's value without which it could not be used as an intermediary asset.


what is the significance of the rpc port and it's relation to the functionality of bitcoin In this outdated but seemingly comprehensive guide to creating an altcoin fork of bitcoin they make special mention of the need to change the rpc port.
Although in the intervening time the file names have changed the variables remain so I think this advice is still valid.
What is the purpose of these ports? What information do they transmit? Why are they there and why must we change them when creating a new network?

Step 4- Ports(required)
a) bitcoinrpc.cpp
    -change RPC port.

    Code:
    ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 55883));

    Code:
    if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "55883")))

b) init.cpp
   -change RPC port

    Code:
    -rpcport= " + _("Listen for JSON-RPC connections on  (default: 55883)") + "\n" +

    -change Testnet and Common port(P2P).

    Code:
    -port= " + _("Listen for connections on  (default: 55884 or testnet: 45884)") + "\n" +

c) protocol.h

  -Testnet and P2P port again.

    Code:
    return testnet ? 45883 : 55884;

There's no reason why you need to change them if you're not concerned about running Bitcoin and an altcoin on the same device/IP address.


convert 12 word seed into 24 word seed I used bitcoinj library for wallet and it generates 12 word mnemonic seed.

But I made changes in it and created 24 word mnemonic seed.

But I need to convert old 12 word mnemonic seed into new 24 word mnemonic seed.

Please help me with this.

This is not possible.

The mnemonic words are an encoding of the entropy used in the seed, essentially. A 12 word seed has less entropy than a 24 word one, so you cannot get 24 words out of it. Similarly, you cannot get a 24 word seed to turn into a 12 word one.

Your best bet is to generate a new 24 word seed and move funds over.


Can I use my mtgox BTC balance on the mtgox checkout button/payment platform while my account is pending verification? Can I use my mtgox BTC balance on the mtgox checkout button/payment platform while my account is pending verification ? Like purchase goods and services from people who use the mtgox merchant tools to accept BTC on their sites.

Yes, verification is only for increasing the amount of BTC and other currency you can move

"up to 10x your current daily limit, and up to 5x your current monthly limit"

through their service. It also enables you to use other services with mtgox such as dwolla.


How is mining profitable if a $10.000 ASIC will generate like $63.23 per month? This $10k ASIC miner has 1TH/s and by this hashing calculator (I know they're not THAT precise but...) it'll generate like $63.23 per month? Why would anyone invest in this?

That particular miner is way overpriced.  Nobody should buy it at that price.  The seller either listed an incorrect price, or is very confused about the current market for mining hardware, or is hoping to find a customer who is a sucker.

For comparison, the Antminer S5+ has a (claimed) hash rate about 7x higher and costs about 1/4 as much, making it about 28 times more economical.


How do exchange sites know all user deposit transactions? If they use transaction/wallet listener, how do they detect deposit transactions when their services are not running, do they fetch blocks at every height to scan for deposits to avoid any missing?
Thanks,

They're running full-node implementation.

  how do they detect deposit transactions when their services are not
  running?

It's blockchain, all data available for anyone, they able to fetch data from blockchain anytime.

  do they fetch blocks at every height to scan for deposits to avoid any
  missing?

There is a couple ways to get address deposits:

You can check the balance of particular address every N seconds.
You can parse a block and check if there are transactions related to particular address.


Why blocks are validated instead of transactions? In most of the conventional blockchains, blocks are validated instead of transactions. Why cant' transactions validated directly?
The structure of basic blockchains are linked lists, by having DAGs, is it possible to have a graph-chain of transactions?

Some transactions cannot be fully validated outside of blocks.

If you use OP_CLTV, a transaction can be valid only after a certain block height, and not before ; if you don't know which block it's in, there's no way to know if it is valid or not.


A question about CTransaction::UpdateCoins() in 0.8.6 The logic of this function is quite simple:
1, mark inputs spent
   Call coins.Spend()
2, add new outputs to database.
   Call inputs.SetCoins()

My question is in step1, it invalidate the old output because it has been spent.

But in function coins.Spend(), I only found it kick out the spent output, I didn't find  where the function update the database. If the old output is kicked, the database should also be updated, but coins.Spend() is only update the memory data structure.

Looks for pcoinsTip->Flush(), which batch updates the underlying database CCoinsView.

It is not called for every update as that would require many writes. The way it is implemented now means many outputs can be added and marked spent entirely without needing to hit disk. The result is a disk database that is slightly out of data with the memory version, which means more work to redo when a node crashes, but this case is rare, and having faster block relay is more important.


How does Ven work compared to Bitcoin? The Ven FAQ states that Ven is a basket of currencies, but how is it determined? Is it done privately or in the style of a committee? What trade offs are there in relation to Bitcoin?

Links: official site, wikipedia entry

It appears to be completely unrelated (hence the close vote I just casted).

  Ven is a digital social currency used to share, buy, sell and trade in
  the world of Hub Culture and beyond. The value of Ven floats against
  other currencies and the price is based on a basket of currencies,
  commodities and carbon futures.

,

  Can I trade my Ven back to national currencies like the Dollar, Euro or Pound?

  No

Apparently it's just a bad-old centralised virtual currency.

Nothing new, nothing special, nothing relevant. And definitely nothing related to Bitcoin.

since I just skimmed over it, I might have got something wrong, but as far as I've read that's unlikely


Buy Order to Exchange I am looking for a tool with which to place a purchase order which is higher than the current price.

As an an example.

Wallet Exchange: $ 100
Course NEO: 50 dollars

Order: Buy at $ 54

Does anyone have an idea how to do something like this?

Many decentralized exchanges like etherdelta allow you to buy Ether assets at higher prices. If you're looking for Neo specifically, I believe bittrex.com allows you to buy and sell above/below the current price.


How would Bitcoin usage be affected within a country that severed its Internet connection? Clearly this system depends upon data exchange.  What happens if national authorities in one or more countries decide there exists a "national emergency", "requiring" the shutdown of the internet in those nations?  How then does this system work?  Will commerce aboard this platform come to a halt, or is there a redundant communications method?

A government that shuts down its Internet to civilians is a government in crisis

The economic cost of shutting down all government regulated Internet connections within a developed country is enornmous. It is extremely unlikely that a first or second world government would take this step simply to block Bitcoin transactions. It may be that if Bitcoin rises to become an ISO recognised currency traded by governments the decision is made in order to somehow preserve sovereign wealth in the native currency that is now under threat from Bitcoin, but that is a long way off from today and would ultimately prove futile. It would also show very poor financial planning on behalf of the nation since they can simply continue their mandate that all taxes and fines must be paid in legal tender forcing a conversion out of Bitcoin to their native currency.

The question of how Bitcoin could respond to such a switch off is similar to how the Internet itself would route around the problem. There are a multitude of ways that ad hoc networks can be established. Bitcoin has been shown to be at least as resilient as the Internet in terms of the myriad of ways that transactions can be made to reach an Internet connected node. For example, Bitcoin transactions have been transmitted over HAM radio, NFC and Bluetooth. There are many alternative digital networks that can serve as backup routes to the wider Internet.

Even in the total absence of electricity, the Bitcoin network can survive through physical bitcoins. So long as trust is maintained in the security seal protecting the private key it is only necessary to conduct occasional verification checks that the amount displayed on the token represents the amount accessed by the key. Simplified pricing schemes (to allow accurate change) would enable invisible private key based trading. An occasional radio broadcast to co-ordinate the current bitcoin value against other currencies in use would be sufficient to allow merchants to price their goods accordingly.

Remember that in times of trouble people will seek to use whatever they can to get by. If bitcoins are perceived by most as being the best way to conduct trade as, say, the dollar enters hyperinflation, then they will use them. If something else provides a more stable medium that is more appropriate to their circumstances they will use that. However, Bitcoin is by far the most flexible form of money ever invented so it seems likely that it will survive better than others.


How to verify locking and unlocking scripts? I've selected an arbitrary transaction id and retrieved its associated transaction details using the blockcypher explorer as follows:

from blockcypher import get_transaction_details
get_transaction_details('0db8ca471c0e0fd3ce6f24197d9a9cec9647fd3df5ab6aa2e174e0ea85949146')

The output is the following python dictionary

{'addresses': ['17uP1g6ppdKVonMQWJ2ojeUZ8r9AhH2tgf',
'19jaGQFE39oH71WdR1ZJjpajjnP8tWNZdv', '1PJwNGYympRP3kJ8hqkY2ayHDVHokrASrv'],
'block_hash':'0000000000000000032ba4f95d39b86b2cc24c27e3c0d3201070945faf890e0d',
'block_height': 419922,
'block_index': 1,
'confidence': 1,
'confirmations': 186323,
'confirmed': datetime.datetime(2016, 7, 9, 4, 3, tzinfo=tzutc()),
'double_spend': False,
 'fees': 311300,
 'hash':'0db8ca471c0e0fd3ce6f24197d9a9cec9647fd3df5ab6aa2e174e0ea85949146',
'inputs': [{'addresses': ['19jaGQFE39oH71WdR1ZJjpajjnP8tWNZdv'],
'age': 418553,
'output_index': 0,
'output_value': 44695270,
'prev_hash':'81b3bcc34490facea42a729ae166f599c7933501273010d0eb0c2a0efe190153',
'script': '483045022100e664861517c0ea91df7e4bde7001b7cda6b034a7f4c4c6e622b681a57bf72c4102207b02fa4046f6ca5c180aa60ee57e67fff4e82c09a7e60515b15a989cd4bd5d3a012103017e89c4294b1ca99533b424c367db4f18747c0cacad393e3fb103640bcdb2ce',
'script_type': 'pay-to-pubkey-hash',
'sequence': 4294967295}],
'outputs': [{'addresses': ['17uP1g6ppdKVonMQWJ2ojeUZ8r9AhH2tgf'],
'script': '76a9144bb8c253f24fa707f6796a0b3c542f78c94b4dcc88ac',
'script_type': 'pay-to-pubkey-hash',
'spent_by': '43a771f414804dcc5ef5b4a577961a1e694ce8f477b391da1a404a600a14c8e3',
'value': 18695900},
{'addresses': ['1PJwNGYympRP3kJ8hqkY2ayHDVHokrASrv'],
'script': '76a914f4b738bc3ee9ebad027381304b2b3e81a618a60488ac',
'script_type': 'pay-to-pubkey-hash',
'spent_by': '0ea2858001f752c4eb7d0bba88568e9dfb25cdcc76adab42bc1ccfbf27c8bda1',
'value': 25688070}],
'preference': 'high',
'received': datetime.datetime(2016, 7, 9, 3, 41, 4, 370000, tzinfo=tzutc()),
'relayed_by': '80.249.197.154:8333',
'size': 226,
'total': 44383970,
'ver': 1,
'vin_sz': 1,
'vout_sz': 2}

Now, from what I understand, the input script should be

<sig> <PubKey>

and the output script should be

DUP HASH160 <PubKHash> EQUALVERIFY CHECKSIG

In the above transaction details I see that there is one input script and two output scripts, which the blockcypher documentation says are raw hexadecimal encodings. However, when I put the encoding under the "scripts" fields into a hex decoder I get nothing that makes sense. My questions are:

1) How can I decode the strings in the "scripts" fields of the transaction details dictionary to see the actual scripts. When I do, will they follow the format I outlined above?

2) How can I verify that the unlocking (input) script, indeed works on the locked (output) scripts? Is that possible using only the transaction details I have generated above?

1) How can I decode the strings in the "scripts" fields of the transaction details dictionary to see the actual scripts. When I do, will they follow the format I outlined above?

Scripts are just raw bytes that follow a certain format that is somewhat explained here. In order to see it in the format you outlined (OP_DUP,...) you have to "decode" these bytes. Basically you start by reading the size of the entire script to know how many bytes should be read (when using an API that returns deserialized tx, you won't see this size). In this transaction the SignatureSCript size is 0x6b=107. Then start "interpreting" the script. To do that, you start by reading 1 byte, then based on that byte decide what to do next. For example in your SignatureScript the first byte is 0x48 (in the link above you see it in Constants table in the word column N/A), this value indicates size of a follow up data to be pushed onto the stack. So now you have a data push of size 0x48=72 bytes:

<3045022100e664861517c0ea91df7e4bde7001b7cda6b034a7f4c4c6e622b681a57bf72c4102207b02fa4046f6ca5c180aa60ee57e67fff4e82c09a7e60515b15a989cd4bd5d3a01>

In this particular transaction, this happens to be a signature. Then read the next 1 byte which is 0x21 and just like above you have another data to push with size =33 that happens to be a public key:

<03017e89c4294b1ca99533b424c367db4f18747c0cacad393e3fb103640bcdb2ce>

Do the same with other scripts. For instance for PubkeyScript the size of the script is 0x19=25 and the first byte in script is 0x76 (you'll find it under Stack) this value is OP_DUP (unlike previous two bytes, there is no follow up data to read, only an "action" to perform that is duplicating top stack item). Next byte is 0xa9=OP_HASH160 (find it under Crypto) and so on.

  2) How can I verify that the unlocking (input) script, indeed works on the locked (output) scripts? Is that possible using only the transaction details I have generated above?

You'll always need at least 2 transactions. 1 is the current one you have and want to verify, and the other is the transaction output it is spending. Here it is the transaction with txid 81b3bcc34490facea42a729ae166f599c7933501273010d0eb0c2a0efe190153and outIndex=0. Now you use the PubkeyScript of previous transaction from the corresponding index (locking script) with the SignatureScript of this transaction (unlocking script) together and perform each operation. See this example for each step.


brainwallet.org Low Entropy Generation I was reading that brainwallet.org uses low-entropy RNGs, so any address generated using their website will be unsafe. I used their website to make a cold storage address last December, and so far no one's stolen anything from it. Is it worth it to make a new address on a more secure website? I've put a large amount of time into the current one; I memorized the first 2/3 of the private key and have the last third written down (most secure method in my opinion).

I used WarpWallet. I booted my computer into Linux, copied WarpWallet off my flash drive, ran it, put in my passcode (39 random hex digits that I've memorized), and I had my address. (I triple checked that the same passphrase always gave me the same private key, and all this time the computer was, of course, disconnected from the internet) I wrote down the public key on a piece of paper, then transferred all my old cold-storage bitcoin to it. https://blockchain.info/tx/13fd0f4ef557317871965f12d02e17069dc782d3dce9f2f44c4b751c3c856595


What's the difference between a 4 core VM running a Bitcoin Node vs. a 16 core VM? I'm trying to help out the Bitcoin network as efficiently as possible. I have access to VM's, with a $1200 monthly budget. I'm trying to figure out if a single 16 core/ 56gb RAM VM would be better than a multiple barebone dual core/3.5gb RAM VMs.

Here's the pricing list:

https://azure.microsoft.com/en-us/pricing/details/virtual-machines/

How would you set up these VM's the most efficient way with a $1200/month budget?

There's very little value in running a Bitcoin node on Microsoft servers. The idea of nodes is not to add processing power to the network, but to increase decentralization and redundancy. Running multiple instances on servers completely controlled by Microsoft does not help that goal.


If someone wanted to pretend to be Satoshi by posting a fake signature to defraud people how could they? If a random fraudster wanted to post a bunch of mysterious ECDSA signatures that the public would believe came from Bitcoin's creator, in order to disrupt the Bitcoin market, extract money from people, or otherwise convince people to listen to them.  How could they do that?

Unfortunately, given the public's limited of understanding of cryptography this is apparently an easy fraud to pull off.

The key trick is that non-technical people are prone to believe things that just sound jargony enough and that technical people tend to think they know a lot more than they actually do-- and so they're easily sent off into the weeds.

In cryptosystems the details are more important than you could possibly imagine.  So all you have to do is make a forgery that works for a slightly modified cryptosystem and then lots of people who THINK they understand how ECDSA works will rush out to claim the result holds.

Most modifications that you can think of are sufficient to make the scheme insecure.

So, for example, a couple years ago Craig Wright claimed to 'prove he was Satoshi'  by simply copying some pre-existing signatures out of the blockchain and posting somewhat obfuscated instructions on verifying them. It was figured out pretty quickly, but still managed to fool a lot of people-- they were too caught up in the mumbojumbo to think of the obvious.  The "modification" in this case was that the message the scammer was claiming to sign just has no relationship to the message that was actually signed.

More recently it appears that someone attempted something similar again, but this time with 'signatures' that weren't from the blockchain... resulting in 'verification' from the developers of some BCH clients to an engineer at RedHat. But it turns out that, again, that the attempt was fake and people's partial but incomplete understanding of crypto burned them.

As Bitcoin developer Pieter Wuille notes "ECDSA signatures where the message isn't a hash and chosen by the "signer" are insecure."-- this time the scammer just published 'hash', r, s tuples.  The hash part of ECDSA is integral to the algorithm. If the verifier doesn't run the hash themselves, the security properties of ECDSA don't hold and an existential forgery becomes trivial.

[This same vulnerability was baked into the original OP_DSV opcode in BCH-- it originally didn't hash the incoming data but left that up to the user-- but I reported it and they appear to have fixed it before deploying it.]

If the verifier doesn't perform the hash himself but just accepts a value given by the signer, he becomes susceptible to the following: Given public key P, pick random nonzero values a and b. Compute R=aG+bP. Now (R.x, R.x/b) is a valid signature under key P for "message-hash" (R.x*a/b).

This doesn't compromise the security of real ECDSA because you cannot find a message that hashes to a chosen (R.x*a/b) value.

People should be wary of obfuscated or overly technical 'proofs', -- things that look "like" a secure system but for some reason have people verifying it working with raw numbers or code. Well designed cryptographic software put in a lot of effort to avoid users being fooled by stunts like this. This stuff is tricky and anyone could be confused into accepting a false proof if they were convinced to effectively implement a bespoke cryptosystem themselves. A cryptosystem is not secure simply because you, personally, don't see how to break it.

Here an an example Sage script to produce forgeries that will fool someone that accepts an ECDSA 'signature' without hashing the message themselves. It works with any EC key, including one that the forger hasn't seen a signature from before.

F = FiniteField (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F)
C = EllipticCurve ([F (0), F (7)])
G = C.lift_x(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798)
N = FiniteField (C.order())
P = P=-C.lift_x(0x11db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5c) # block 9 coinbase payout key.
def forge(c, a=-1):  # Create a forged 'ECDSA'  (hashless) signature
  # set a to something other than -1 to be less obvious
  a = N(a)
  R = c*G + int(a)*P
  s = N(int(R.xy()[0]))/a
  m = N(c)*N(int(R.xy()[0]))/a
  print 'hash1 = %d'%m
  print 'r1 = %d'%(int(R.xy()[0]))
  print 's1 = %d'%s
for c in range(1,10):
  forge(c)

This code produces fake forgeries of the sort that was used to trick people recently.

hash1 = 25292222169426362969760742810503101183086560848420849767135309758511048414376
r1 = 61518691557461623794232686914770715342344584505217074682876722883231084339701
s1 = 54273397679854571629338298093917192510492979773857829699728440258287077154636


Lighting Network transaction I have never used LN, but read about it and I am confused about one thing, if I am send BTC through channel, then receiver exactly know who send this and can in some way check how much sender's balance left and even locate original BTC address that create sender's channel? Only I know that transaction is sent in onion manner, so participants don't know if sender is guy that sends him tx, or if next receiver tx is end receiver of transaction.

You only know the balance of the channels you have open with your peers. And because the payments to you can be routed through other people's channels, you cannot simply get the information about the sender's balance or other sensitive information.


Is there a wallet app for iPhones? I have an android phone as I can not afford an iPhone, but my friend has an iPhone. I am using Bitcoin Wallet from Andreas Schildbach and it's really easy. Is there something like that for the iPhone as we can't seem to find it?

Apple does not allow Bitcoin wallet applications on its devices.


relating the UTXO set to the total supply of bitcoins If the number of Bitcoins in the UTXO is always equal to the number of mined Bitcoins

See:
How is a wallet's balance computed?

then why do the number of bitcoins mined depicted here:
https://blockchain.info/charts/total-bitcoins
differ drastically from the UTXO set depicted here:
https://blockchain.info/charts/utxo-count

This is an apple : oranges comparison. The size "Number of Unspent Transaction Outputs" set is independent from the number of bitcoins in existence.

An unspent transaction output might be for a fraction of a bitcoin (some number of satoshis) yet it still counts as one unspent transaction output, a member of a very large set (over 55 million UTXO's according to the chart provided).

To put this in other terms, suppose every single UTXO was spent into a single bitcoin address. (It will never happen, this just a thought experiment)  Then that address would hold all the bitcoins in existence, (a bit more than 17,100,000) and then there would only be one member in the "Unspent Transaction Output" set.


Mediated transfer of funds between three parties Alice wants Bob to transfer 10btc to Carol, and is willing to pay Bob 11btc for the transfer.

They both entrust Trent to mediate the transaction, and Alice is willing to pay Trent 1btc as commission.

What is the correct and most secure protocol for performing this contract?

Edit: does the following protocol make sense?

Alice broadcasts a transaction (Tx1) with 2 outputs:

11btc with an output script specifying 2-of-3 multi-signature verification, specifying Alice, Bob and Trent as recipients
1btc to Trent (commission)

Bob verifies Alice's transaction:

Verified: Bob broadcasts a transaction (Tx2) sending Trent 10btc
Rollback - Bob is unsatisfied or fails to transfer the funds to Trent: Trent broadcasts a transaction (Tx3) sending Alice her 11btc back, specifying Tx1's first output as an input and signs the input. When Alice wants to spend Tx3, adding her signature to the input satisfies the 2-of-3 requirement (and the process stops here)

Trent broadcasts a transaction (Tx4) sending Bob the 11btc, specifying Tx1's first output as an input. When Bob wants to spend Tx4, adding his signature to the input satisfies the 2-of-3 requirement
Trent broadcasts a transaction (Tx5) sending Carol 10btc, specifying Tx2 as an input

Your protocol makes sense, but i would modify it as follows

the 1btc sent to trent should also be mutlisig with Alice's signature as the 2nd one, so that if Trent fails to do what he promised he gets no commission. ((the 1btc will stay in limbo, unless Alice and Trent can somehow work this out)
The Tx2 should also be multisig and Carol's signature should be added, that way Trent can't run with the money.


What EURO exchanges have web APIs currently? I'm wondering what exchanges in that operate in native euro, who most likely support sepa transactions have web apis?

Bitcoin-24.com was great until they had banking problems. now who is left? Is BTCe the only one?

There are quite a few exchanges in Europe with APIs. Use the Bitdango exchange search to find exchanges in European countries:

http://bitdango.com/exchanges?countries=BG,CZ,DE,FI,FR,GB,HR,MT,NL,NO,PL,SE,SI

Or use the Bitdango market search to find markets that use Euros as quote currency:

http://bitdango.com/markets?quoteCurrencies=EUR


What is the difference between Trading Volume and Transaction Volume? Looking at the Bitcoin Statistics summery from Blockchain.info

there are Trading Volume and Transaction Volume listed.
I understand that transaction volume represents the amount of bitcoin used for transactions, eg. user sends bitcoins over to another user.

What about trade though? How is the value for trading value determined?

Trading, in this context, refers to the exchange of Bitcoins for fiat currency (dollars, euros, etc).

Major exchanges report on the number and total value of trades made on their platform.  Presumably the numbers on blockchain.info come from aggregating that data.


How do I get imported Bitcoin in my blockchain wallet without having to pay more for the private key? ich habe Geld investiert anscheinend bei Betrügern, dass lief Alles über Facebook Messenger , ich habe ein Blockchain Wallet erstellt und dummerweise Wallet ID und Passwort rausgegeben, als es um die Auszahlung ging wollten Sie immer wieder Geld und dann war das Facebook Profil gelöscht. Vor ca 2 Wochen, wurde da Profil wieder aktiviert und Sie haben mir versprochen ,jetzt den Gewinn auszuzahlen , aber auf einem neuen Wallet und tatsächlich haben Sie Bitcoin auf das Wallet übertragen , aber nur " watch only" also importierte Bitcoin . Sie wollten wieder Geld für den Schlüssel , einmal habe ich gezahlt , danach wollten Sie wieder Geld und das mache ich nicht mehr , ich habe auch kein Geld mehr . Kann ich irgendwie an den privaten Schlüssel rankommen ? Die Betrüger sagen ja es ist mein Profit . Seltsam ist das diese importierte Adresse bekannt ist .
Bitcoin.org wird von der Community unterstützt: 3FkenCiXpSLqD8L79inRNXUgjRoH9sjXa

Translation by Google:

I invested money apparently with scammers that ran everything through Facebook Messenger, I created a blockchain wallet and stupidly gave out wallet ID and password, when it came to payout [they] always wanted money and then the Facebook profile was deleted. About 2 weeks ago, the profile was reactivated and [they] promised to pay off the winnings now, but on a new wallet and indeed [they] transferred Bitcoin to the wallet, but only "watch only" imported Bitcoin. They wanted money again for the key, once I paid, then [they] wanted money again and I do not do that anymore, I have no more money. Can I somehow get to the private key? The scammers say yes it's my profit. Strange is that this imported address is known. Bitcoin.org is supported by the community: 3FkenCiXpSLqD8L79inRNXUgjRoH9sjXa

You cannot get the private key. Your money is gone and you will not get it back. Report the crime to your local police.

Google's translation:

  Sie können den privaten Schlüssel nicht abrufen. Dein Geld ist weg und du wirst es nicht zurückbekommen. Melden Sie das Verbrechen Ihrer örtlichen Polizei.

For more information see the answers to Reg: Watch only Address and the answers to the linked questions there. There are numerous other people who have been cheated in the same way.

Do not use the blockchain wallet you created. Any money you put there will be taken by the criminals who tricked you into giving them access to it. Their access cannot be revoked by blockchain or anyone else.


How is bitcoind "shy" when exchanging `version` packets? This is more of a technical/programming question.

I am referring to this line of code: https://github.com/bitcoin/bitcoin/blob/be992701b018f256db6d64786624be4cb60d8975/src/net_processing.cpp#L1699

I understand the logic behind not sending a version packet to a newly accepted connection unless they send one first, but the code I linked to does not quite do that, or does it?

At that point we are already inside an if block which verifies that the command received is "version", so the peer has already sent us a version packet, irrespective of who initiated the connection. Am I missing something?

First the peer who chooses to connect shares their version.
Each of the peers can only send one version message.

PushNodeVersion is used to send the version message. It is called by two functions

1) PeerLogicValidation::InitializeNode when the connection is outbound.

2) ProcessMessage when a message is received. It looks like this:

bool static ProcessMessage(...) {
    if (strCommand == NetMsgType::VERSION) {
        if (pfrom->fInbound)
            PushNodeVersion(pfrom, connman, GetAdjustedTime());
    }
}

If it was

    if (strCommand == NetMsgType::VERSION) {
        // If this if clause didn't exist: if (pfrom->fInbound)
            PushNodeVersion(pfrom, connman, GetAdjustedTime());
    }

Consider the following case:

1) Client A connects to Client B

2) Client A sends its version to Client B

3) Client B, as an answer, shares its version

Now, if that if caluse didn't exist, Client A would send the version message once again.

The comment // Be shy and don't send version until we hear is actually irrelevant.


Trezor Custom Mnemonic How do I go about using words I pick in a trezor seed? I only want words that I select and in an order I select.

I'm not worried about this being a less secure way to generate a seed. I will be doing all this off line with a disposable computer if necessary. I want to use a custom word list in conjunction with some custom math that with generate the correct order of my seed.

I have yet to find a way to do this with my trezor. I personally think that my backup seeds are safer in my head then on a piece of paper.

I tried generating public/private keys with a custom mnemonic with custom words. Didn't work.

I tried generating public/private keys with a custom mnemonic with a word list generated from myTrezor.com (A-Z, excluding X, approximately 10 words to choose from per letter)[I did this by typing in each letter and copying the choices from the drop down] Didn't work. [Error: Action was interrupted Invalid mnemonic, are words in correct order?]

Shouldn't a valid public/private key pair be generated regardless of the words I pick and the order I put them in?

That's pretty easy! Just try the steps here:

Open the wordlist.
Choose 24 words
Go to mytrezor.com, press "Trezor recovery" and type the words you chose.
Don't forget to write down your words to somewhere.


Bitcoin price drop in the past few days (25/10/12 to 27/10/12) Does anyone have any solid ideas or knowledge on why the price has dropped so much over the past few days? There is a lot of speculation, but nothing I have read to date seems to adequately explain the recent drop.

The drop is illustrated here, and shows a decrease in price of roughly 14% over the two days:

All you'll ever get is speculation. Nobody knows why prices change.

It's just like when you listen to the news and they tell you that stocks dropped because of "profit taking". Clearly, people were selling if stock prices dropped. But nobody really knows if people were taking profits, cutting losses, or something else entirely.

These are emergent behaviors of complex systems and only in rare cases can you explain price movements. The most popular theory I've heard is that at least one significant factor is BitInstant downtime.


What is better, pre-existing Bitcoin-core API bindings for python or custom wrapper functions How advisable is using the following code to query the bitcoin core as compared to using some python RPC library.

import os
btc_prefix = 'bitcoin-cli '

def getblockcount(btc_prefix):
    print("in getblockcount")
    cmd = ' '.join([btc_prefix, 'getblockcount'])
    response = os.popen(cmd).read()
    return int(response)
getblockcount(btc_prefix)

It is kind of a wrapper function for the core API's. What are the drawbacks/advantages of using the above code. Also, does it affect security in anyway.

bitcoin-cli is just a wrapper for the RPC functions so you're essentially doing the same exact thing as an RPC call. Generally, using RPC is preferred since you don't have to rely on the bitcoin-cli executable being on the system and in your current path. This most likely won't work on windows, for example.

In general RPC is preferred because you can access it from other systems. With your program, you'll only be able to run it on the system that has bitcoin core installed whereas with RPC, you can run from other systems.


Light clients transaction verification How does a light node know which block its transaction got included in?

Say a light node sends out a transaction spending its UTXO. Does it get some sort of notification when its transaction is mined in some block or does it need to manually ask a full node if its transaction is present in every new block that is mined after it made the transaction?

Also, say a wallet program was loaded after a month of inactivity. Now the wallet needs to know the balance of its address? How does it go about reconstructing its balance after downloading the latest block headers?

Note here that I'm asking about the low level apis and not any service like a block explorer!

How does a light node know which block its transaction got included in?

Most SPV wallets use BIP 37. The protocol defined in BIP 37 is roughly as follows:

Wallet sends to a full node a bloom filter which, when applied to transactions, indicates whether a transaction applies to that wallet.
Full nodes, for every block and transaction, applies the filter to see if there is a match.
If there is, relay the transactions to the wallet.
If there is a match for a transaction in a block, generate a merkle proof and send the proof with the transaction to the wallet.
Update the filter on matches.
When blocks are received, send the block header to the wallet.

This is generally how all SPV wallets work too, even ones that don't use BIP 37. They may not use bloom filters, but they use some kind of filter and rely on a full node to check things against the filter and then send along the things that match.

For privacy reasons, the filters do not match exactly. They have a false positive rate (but not a false negative rate) so some things are sent to the wallet that do not apply to it. The wallet just ignores those things.

  Also, say a wallet program was loaded after a month of inactivity. Now the wallet needs to know the balance of its address? How does it go about reconstructing its balance after downloading the latest block headers?

It connects to a full node, sends it the filter to use, and then asks the node to send all of the transactions that match that filter that are in all blocks since block X where X is the latest block header the wallet has.


Can a customized or non-bitcoin node be made to talk to a bitcoin node? Is it possible to create a node with some different code from the bitcoin nodes but still able to talk to the bitcoin nodes? Is it possible for someone to customize their own node to add some functionality but still connect to bitcoin network and talk to other nodes?

Of course.
Bitcoin nodes are just software that implements the Bitcoin P2P protocol. There are many software packages out there that do so (including full nodes, standalone wallets, indexing software, ...). There is no magic sauce that somehow blesses a particular piece of software into the realm of nodes - anything that speaks the protocol will do.
Furthermore, most of these (and probably all the ones you should care about) are open source, so making modifications to add functionality yourself is very much possible.


Is it possible to splice a new participant into a LN channel factory? I am reading paper named "Scalable Funding of Bitcoin Micropayment Channel Networks".

If Alice, Bob, and Charlie created a channel factory, I thought that only these three people can make a payment channel within themselves. However, the paper says "Users will be able to enter the system with one blockchain transaction and then open many channels without further blockchain contact." (page 3).

In the above case (i.e., Alice, Bob and Charlie created a channel factory), Hook transaction becomes 3-of-3 multisig. If Diana wants to join the channel factory, Hook transaction consisted of three peoples already. so I think Diana can’t join in their channel factory.

There is no example in this case in the paper(above picture). Is the way I understand correct ? or not ?

And I wonder how to refund without closing and re-opening ? As you can read in this paper, When a party enters a channel factory, the deposit that the party input is already set at that moment. or.. the meaning of refund in here is moving funds to different channels ?

You are correct. It is not possible to get Diana into the Channel Factory without a transaction that closes and reopens with Diana.

Splicing-in and splicing-out as explained by Decker et al. in the paper you mention is not secure.

Imagine the following situation:

Alice, Bob and Carol spliced out Dave by creating a new Allocation within the same factory, similar to how Decker et al. explain in figure 9 of their paper. Bob and Alice might tell carol that R^2 is the last update of their channel, but actually they updated to R^3, completely invalidating the new allocation. Carol might have accepted payments in such new factory that will never be reflected. For this same reason, splicing in users is also not secure.

Ranchal-Pedrosa et al. refer to this problem as the broken factory, and suggest alternative factories constructions, comparing them, in their paper Lightning Factories.


Bitcoin unconfirmed transaction help me please Been over 24 hours unconfirmed Transaction please help !!!
13fsWbUWdAPY9BajN7oiMerJSvw66eSYi2  It never takes this long

Thank you

The bitcoin network is overloaded. You must wait 1-3 days before your transaction will go through. There is nothing you can do now but wait.

Next time, you may send transactions with a higher fee so a miner gives it more priority.

Don't spend any money on a site that claims they can speed up your transaction. They are scams.


Derive the bech32 address from the transaction 'txinwitness' witness data in Bitcoin Core 0.16 I'm trying to extract the bech32 address associated to an input or output using the txinwitness field included in every pure SegWit transaction.

An example with transaction 0x6b6167a3d35efb043639837bbac853903d2c800ba1e324be0fffb2858e251da0 would return this output:

$ bitcoin-cli decoderawtransaction "$TX_DATA"
[...]
  "vin": [
    {
      "txid": "22b3f827d5574045f4b9b1dea448d66d92b2f334741687b8a3d778672530cfea",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "30450221008695b35cee8bd73fe870868b9f281ffd6f375b6082369310c910f35d524536fe022050c7c8442823af465acec6034283adb13b9481d57741a2be668d59322ea50b3701",
        "02959a2410df7168279d9c8372bbd7b7e2d27959987dd3fae64b10e9c2d62b2e75"
      ],
      "sequence": 4294967295
    },
[...]

I'm using the API in Bitcoin Core 0.16 but I haven't find any way of querying the Segregated Witness tree with that txinwitness data.  The documentation or Google hits about this are almost non-existent, other than people commenting that sites like e.g. blockchain.info don't use Bitcoin Core and they have other ways of getting that information (because they show the bech32 address in the transaction info page).

I'm trying to extract the bech32 address associated to an input or output using the txinwitness field included in every pure SegWit transaction.

This is not entirely possible unless you're willing to make assumptions that will almost certainly break in the future.  The problem is that part of the data contained in a segwit address is not part of the txinwitness field---specifically, the witness program number that allows upgrading segwit to new script rules in the future is included only in the scriptPubKey of the output being spent.

That means, to be safe, you need to use an RPC like getrawtransaction with the transaction index enabled to retrieve the output being spent in order to get the address.  This is unfortunately slow if you need this information for a lot of inputs.

The unsafe assumption you can make is that the witness program number is 0, as is the case with all standard segwit transactions right now.  Then you can just hash the final entry in the txinwitness per the BIP141 rules, prefix its length (either 0x14 or 0x20), and prefix 0x00 to indicate it's witness program 0.  But if you make that assumption, you will print the wrong address for transactions that use a different witness program number in the future, which could cause users of your system to lose money, so I highly recommend against that.


What does it mean when a confirmed transaction gets reversed? I am using bitcoin-cli to do verification of transfer. From the wiki, it mentions that a transaction has a higher confidence in confirmation after 6 blocks deep. However, a block that is put into the blockchain should not to be reverted or removed.

So I want to know what will trigger a confirmed transaction to become invalid and what will actually happen to the blocks and the blockchain?

Especially in bitcoin-cli when I get a block with the target transaction, what will happen if this transaction does not get the final confirmation?

Reference: https://en.bitcoin.it/wiki/Confirmation

Every now and then, blocks become orphaned during what is called blockchain reorganization.  This happens when two valid blocks are found at about the same time, and the network is split on which one is considered the top of the blockchain.  These two blocks can contain different sets of transactions, so one block may contain your transaction while the other one doesn't.

This situation will be automatically resolved.  Let's call the two blocks A and B.  Eventually, a new block will be found on top of one of the two competing blocks.  Let's say this new block, C, is found on top of A.  When C is broadcast, any nodes recognizing the B as the tip of the chain will see that more work as been done on the other fork, and will orphan B in favor of A and C.  It will be like B never happened.  If your transaction was confirmed as part of B, it will be like your transaction never happened.

The good news is that it is likely that A and B share a good deal of the same transactions.  Even though you may have been recognizing B instead of A, there's a good chance the transaction will be already confirmed in A when you come around to recognizing it.  If not, it means the transaction will still be in the mempool, and is likely included in C or will be included in a later block.

As you can see, the odds of this happening go down as each new block piles on top of the block containing your transaction.  By the time 5 blocks have been mined on top of the block containing your transaction (thus 6 confirmations) there is no reasonable chance of that block being orphaned.  The transaction is now permanent.


which is the relationship between ouput adresses and their value in a specific transaction? Some days ago, I write a program to extract output addresses and its value in tx messages of a sample bitcoin pcap.
extracted addresses are all valid and we can find them in block explorers.

after that, just for testing, I send a specific value from one wallet to another wallet and capture all input/output packets during this transfer.

When I test my program with this sample traffic, some addresses and values are generated, one of those addresses was my own address and its value was the same value which I transferred, but some other addresses are generated which are all valid addresses and valid values but I don't know their value.

I guess that these values are UTXOs, but how I can sure about that?
Also, I see same value and same address which i sent in my wallet, in multiple packets with different source and destination IP addresses. for example I send A bitcoin from one wallet to another one, and beside that B bitcoin sent to

When a Bitcoin transaction is created, unspent transaction outputs (UTXOs) are used in the inputs of the transaction. Your wallet will use as many UTXOs (and therefore create as many inputs) as necessary to achieve the value you're trying to send in your transaction.

UTXOs have to be spent completely, so most likely the total value achieved by the sum of the inputs will be greater than the amount you wanted to transfer. There's where change outputs come into play (the additional outputs you're getting). In order to avoid having to send more value than you wanted to the destination address (addr_dst), the difference between the sum of the inputs (vi) and the value to be sent (vo) is sent to a change address (addr_chng), i.e:

vo - fee is sent to addr_dst

vi - vo - fee is sent to addr_chng

That change address is usually owned by you.


Please help me to understand lightning-cli getinfo more I have now clightning running for a month. I watch very often lightning-cli getinfo

Here I found in the first three weeks:

"msatoshi_fees_collected": 0

A week ago it changed to

"msatoshi_fees_collected": 1445

and since today:

"msatoshi_fees_collected": 50483

Now my questions:

I believe it is my earnings resulting from using one of my 36 channels. Which one(s)?
I want to know my channel info including name, address of nodes and fundings on both ends.
Is there a skeleton for a python program available that could fetch info and put it into a table like an excel sheet?
I got this message:

  I created a channel with you. If any of your channels to
  TrueVision.club, LightningTo.Me, or blindedbythelight has all local
  balance and no remote balance, then I can help equalize those balances
  for you. Doing so would also mean my channel to you would have local
  and remote balances more equalized so there wouldn't be a need for you
  to create a channel back. It requires a bit of coordination so I
  understand if you'd rather not. Feel free to create a channel back if
  you want.

Frankly, I don't understand it. What should I do? How can I see what happen here? RENE, I need your help ;-)

bye

Ronald

First of all yes these are your earnings from routing. You can check lightning-cli listforwards to get a list (in json) to see through wich channel routings have been attempted and settled or failed. In particular you can analyze the routing fees per channel from the output of that command.

If you are interested in channel balances you can use lightning-cli listfunds to see how much balance is on which side of the channel.

As for the message you received someone offered you to balance their channels through you by asking how your capacity is organized on particular channels. You can find that information with the above mentioned listfunds command. You also have the power to share this information. Morally you should have the consent of your channel partners.

As for python: Checkout my Hack a LAPP video series or my git repo for the code of that LAPP that shows how to interact with the Lightning rpc interface.

most important lines will be:

from lightning.lightning import LightningRpc
rpc_interface = LightningRpc("~/.lightning/lightning-rpc")
print(rpc_interface.listforwards())
print(rpc_interface.listfunds()["channels"])

If you know python it should be easy to adapt to xls output


How do you get a mtgox api key? I can't seem to find where to get my MtGox api key. I've been linked to https://mtgox.com/settings/apps-and-api, but all I get is a blank page in the "Access" section. Do I need to verify my account in order to get API access? Is there any way I can get API access immediately without verifying my account if this is the case?

Once your logged in go to Security Center and then you will see a tab which says Advanced API key Creation click on that and you will see the permission options, a key name field, and a key generation button.


How to invest in a bitcoin startup Is it possible to invest in a bitcoin startup/company without being an accredited investor?
Say for example I would like to invest in coinbase.com, is this possible?

Yes it is possible, though I highly doubt that you would be able to invest in a coinbase round without being an accredited investor with lots of experience in the bitcoin space. That's not because of legal requirements, it's just where they're at in their business. As a general rule though, anyone can invest in a startup if they're able to convince the existing controlling shareholders to allow it.


Where are contracts used in the real world I'd be interested to see some examples of Bitcoin contracts used right now.

Websites that provide escrow services.
Smart properties.
Trading of contracts.
Oracles.

Or are they not really in use right now?

Gregory Maxwell, Pieter Wuille, and theymos are using a 2-of-3 address to store a bounty for contributions to CoinJoin.

https://bitcointalk.org/index.php?topic=279249.msg2983911#msg2983911

Update: A 2-of-3 escrow and arbitration site recently launched: https://www.bitrated.com/


Urgently need advise for unconfirmed transaction I have a transaction as below which had not confirmed for more than 2 days. May I know what is the problem or what I can I do to speed it up?

https://www.blockchain.com/btc/tx/d69c2c14897a516917932f0ed0c2e04ed0380c63709d103d66541e6c77e34406


Installing insight blockchain explorer - is bitcore mandatory? What I have: bitcoind on Linux running.
What I want: to have insight api+ui local website running.

Earlier it was possible to add insight querying your bitcoind. Now it seems they made some bitcore base for insight.

If I install bitcore is it gonna replace bitcoind? How do they interact?

What's the best way to have local insight explorer running now?

Bitcore is a javascript library for interacting with Bitcoin. Bitcore is built on top of bitcoind and doesn't replace it.

Insight is probably the simplest way to run explorer-style queries if you've already got bitcoind set up.

Alternatively: I believe btcd and Toshi offer similar functionality, but with different implementations than bitcoind.


old wallet.dat from 2013/14 with some btc not confirmed or in mempool Found a wallet.dat from 2013/14 with some btc received from a pool as i did a bit of mining.  4 received transactions in latest bitcoin core wallet but 0 confirmations and says not in mempool.  Balance is 0. TXs not found on Blockchain.  The address comes up but shows only a recent tx i tried on the wallet just to see if it worked.  the old txs are nowhere to be seen. Tried rebroadcasting but came back with 'missing parents'

some help would be greatly appreciated

15m5h2E3L4Hy4t7qnZn1ooVmegCRNdkezB  this is the address concerned.

It looks like you actually have an LTC wallet.

Bitcoin is the base source for many coins (Litecoin, Dogecoin, etc). Due to this, the wallet files are often compatible.

If you open the wallet for another coin, you will usually see the kind of situation you describe - unconfirmed transactions that don't show up on explorers/cannot be broadcast.

If you convert 15m5h2E3L4Hy4t7qnZn1ooVmegCRNdkezB to an LTC address, you get LPz2xEXsQiY2KgozxhmK5pZXrtZhVWZyEG, which has confirmed transactions on the litecoin chain.

Try opening the wallet in Litecoin-qt instead.


Could it be possible to secure transactions against double-spending with other utxos? I'm new to Bitcoin Script, and I was wondering if it is possible to use funds from one utxo to "insure" that other utxo will not be double-spent (until the Lightning Network will save us all).
Suppose I have 0.1 bitcoin in a utxo with pubkey pubKey1, and 10 bitcoins that I would send to an output script that would do something like:

If nLocktime is greater than X, verify that the stack contains a signature that matches some pubKeyHash2.
Otherwise, verify that the stack contains: <sig1> <payload1> <sig2> <payload2>, such that <payload1> != <payload2>, and <sig1> matches pubKey1 + <payload1>, and <sig2> matches pubKey1 + <payload2>.

i.e. until nLocktime passes, anyone who can find 2 different signatures of pubKey1 (of two different payloads) can win the 10 btc prize.

This will create a huge incentive for me to never sign two transactions (or any two payloads) with the private key of pubKey1. I could obviously take the risk, double-spend the 0.1 btc by publishing two transactions, and immediately try to claim the 10 btc prize myself, but once I published the two double-spending transactions, the miners would try to take all the 10 btc to themselves (and probably ignore any transaction that tries to take even a small portion of the prize without offering them 100% fee).

I don't see how the current op-codes allow this kind of script - I couldn't even find an "OP_CHECKLOCKTIME" (found only "OP_CHECKLOCKTIMEVERIFY"), and "OP_CHECKSIG" operates on data from the transaction and not on arbitrary payloads in the stack.

What do you think? Could this be implemented in the future? Could this be implemented in other cryptocurrencies? This could be useful when you don't want to wait for even a single block confirmation, for example in ATMs.

This is a creative idea, but I see one massive issue with it:

While it works to stop malicious double spends, it does so by making participating transactions 'One try or die'. Malicious double-spends are punished, but so are normal transaction failures.

Consider what would happen if a user used this technique to make a payment, but for whatever reason, they set the fee-rate too low. Now their transaction will not confirm for a long time, in fact it may never confirm if there is a sufficient volume of transactions paying higher fee-rates.

So now the poor user that owns any UTXO used in that transaction may never be able to attempt to spend it again, since doing so would put their other 'insurance' UTXO at risk of being claimed. This is a obviously a massive issue.

I think that it may also even create incentives for other nodes and miners to censor transaction propagation/confirmation, in hopes of seeing conflicting transactions published at a later date.

Any wallet implementing this would have to strictly enforce a policy of no address reuse. Otherwise, after successfully completing the 'insured against a double spend' transaction, the user's BTC stored at the insurance address will still be at risk! An attacker could send a small amount of BTC to the address that the original payment was sent from, and then a naive wallet implementation might use that new UTXO as input to a new payment. This would create a second valid signature, that could be used to claim the insurance UTXO.

Another issue: we should expect that services receiving payments would want to use this, but users would not (doing so would just cost them more tx fees, after all). Why is this an issue?

Consider what would happen if you arrived at a retailer that required such a transaction: you would have to create an 'insurance' UTXO that relates to some other UTXO you own. In order for that insurance UTXO to take effect, you will have to wait for a confirmation! So now we are still stuck waiting for a confirmation anyways.

I don't think building off of an unconfirmed insurance UTXO makes much sense, what is to stop someone from double spending the insurance UTXO? It is the same 'issue' we had in the first place. Creating insurance UTXOs ad infinitum is clearly not a good solution.

Alternatively, the user could prepare and get confirmation for insurance UTXOs in advance, but what is their incentive? To appease a retailer, at risk of losing the insurance UTXO if something goes wrong?

Perhaps I am missing something in my critique, so I'm interested to see if someone smarter can see ways it could work (or not). Neat idea, anyways.


Is Electrum's label sync a decentralized service? I have some questions about the electrum tool plugin "label sync".
How does it work?
I had a look into in the QA's here how electrum server/client do work, the random server setup sounds quite resilent.

Do the electrum server save IP information by default?
How and where are the labels stored?
Does the plugin direct to a central server or is the information some how stored on all the server nodes?
Is the transmission of the labels encrypted?

thanks in advance

You can view the source of the Electrum label sync plugin on github.

  How and where are the labels stored?

They appear to be stored on sync.bytesized-hosting.com:9090.

  Is the transmission of the labels encrypted?

The labels are encrypted with AES using using a truncated SHA1 of the wallets Master Public Key, this should be reasonably safe. IV appears to be static, this is fairly weak but not disastrous. For most people the server should not be able to decrypt any of the information stores within the label sync service.

    self.encode_password = hashlib.sha1(mpk).digest().encode('hex')[:32]
    self.iv = hashlib.sha256(self.encode_password).digest()[:16]
    self.wallet_id = hashlib.sha256(mpk).digest().encode('hex')

  Do the electrum server save IP information by default?

The source of the sync server is available on github, however you should ideally assume that all traffic to it is logged. This would include the hash of your master public key, your IP address, and the times you were using the wallet which can be correlated with transactions. This is probably never going to be an issue for most people but it is something to be aware of.


Import/Export wallet vi bitcoin-cli. Bitcoin abc node I'd like move my bitcoin cash wallet from one server to the other using the cli.

Server 1: bitcoin abc: 0.17.2.
Server 2: bitcoin abc: 0.18.0

I have done the following:

ran the command: backupwwallet "myfile.dat" on server 1 successfully.
copy the "myfile.dat" to server 2.
rand the command: importwallet "myfile.dat".

I get the following the error when trying to import the wallet:

error code: -8
error message:
Cannot open wallet dump file.

I have also tried to replace stop the node on server 2 and copy the wallet.dat over to the other server and then start the wallet up again on server 2.
I get the following error in the logs:

CDBEnv::Open: LogDir=/home/cryptodaemon/.bitcoincash/database ErrorFile=/home/cryptodaemon/.bitcoincash/db.log
2018-09-09 07:48:21 Failed to rename wallet.dat to wallet.dat.1536479301.bak

How can I move the wallet from one server to another?
Could anyone give me pointers in doing this?

importwallet is the opposite RPC of dumpwallet, not backupwallet.

backupwallet creates a copy of your wallet.dat file. You restore that file by putting it back in the data directory.

dumpwallet creates a wallet dump (just private keys, no history, addresses, labels, accounts, ...), which can be imported into an existing wallet using importwallet.


Bitcoin Core txindex vs default mode vs pruned mode in depth You can run bitcoin in:

txindex mode: Which allows you to query any transaction on the
blockchain with getrawtransactions (any other benefits?). This takes
up the most space
default mode: this allows you to only getrawtransactions for your own
transaction
Pruned mode: Like default mode but you only keep a few GB of the
latest transactions.You download the blocks verify then throw them
away.

But I would like to know in more depth the differences between the modes.

What part of the Bitcoin blockchain does each mode store on the local machine? What does it download and verify? What does it discard? What abilities do you lose with the different modes?

TxIndex
Most use cases do not require a tx-index. The wallet keeps track of the relevant transactions (if you run a wallet). A complete tx-index may be useful for block-explorer-like interfaces or for research, etc.
It requires some disk space.
Pruning & TxIndex: You can't use a txindex with a pruned blockchain. Pruning will throw away scanned blocks. Having an index that points to a tx in a block that is no longer on your disk seems a waste.

Pruning
Autopprune (-prune=550) allows you to reduce your historical blockchain data to a given target (in MB, example uses 550 which is the minimum). You can't throw away all blocks because you may need to "roll back a couple of block" if there is a chain reorganisation.
If you set prune=1 (== manual mode), you can then manually prune your blockchain (use RPC call pruneblockchain <height>) [since 0.14]
The only reason to keep old blocks (say deeper then 144 blocks) is to allow other peers to bootstrap the blockchain and to serve (filtered) blocks to SPV client.
There are little "end-user" use case (expect the txindex) to keep old block.
UTXO set
Important to know is, that your full node will keep track of all unspent transaction (only those are relevant for validating blocks/the chain).
This database is (at the moment) roughly 2GB large and will (and must) also be present in pruning-mode. This database is essential for a full node.

Default mode
Keep all blocks (take up ~80GB of disk-space). This will allow other peers to verify the blockchain and it allows SPV peers to ask for relevant transactions in all possible blocks.
If no one will run in this mode, the blockchain history may be lost (exaggerated).


Is there a Bitcoin exchange comparison site (fees, details) like distrowatch.com or http://cmsmatrix.org/? Is there anybody that knows of a site that does a fairly thorough comparison of all currently active exchanges, and their fees especially. Like there is distrowatch.com and cmsmatrix.org.

The closest i've seen is on the bitcoin wiki : https://en.bitcoin.it/wiki/Buying_bitcoins (and related pages)

anyone?

bitcoincharts.com pretty much is what you look for I think. They got a huge list of exchanges and detailed informations about each site.


How would I hand code a Bitcoin transaction Form the Bitcoin Wiki - Transactions I see a transaction has the following format.

Input:
Previous tx: f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6
Index: 0
scriptSig: 304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d10
90db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501

Output:
Value: 5000000000
scriptPubKey: OP_DUP OP_HASH160 404371705fa9bd789a2fcd52d2c580b65d35549d
OP_EQUALVERIFY OP_CHECKSIG

The input in this transaction imports 50 BTC from output #0 in transaction f5d8... Then the output sends 50 BTC to a Bitcoin address (expressed here in hexadecimal 4043... instead of the normal base58). When the recipient wants to spend this money, he will reference output #0 of this transaction in an input of his own transaction.

I'm assuming I could use BlockExplorer to find the Previous tx and Index.

How would I generate the scriptSig ? Is it something that could be done on the command line e.g. openssl.
The OP_DUP OP_HASH160 is that literally placed into the transaction text or is it a pseudonym ?
The 40437... in the scriptPubkey, how would I create that ?

Technically, the ScriptSig depends on the particular type of transaction output you're trying to claim, but for all standard scripts, it consists of the signature of this transaction and (usually) the public key corresponding to the private key the signature was made with. The public key must be the correct one to claim the transaction output this claims, that is, the one the coins were sent to.
Bitcoin scripts use opcodes. They're documented in the wiki.
That is the Bitcoin address that can claim this output (in raw binary form), assuming the transaction is a transfer to a Bitcoin address.


Restoring old wallet I am trying to restore an old bitcoin backup i found in my google drive.
The original backup date is 2013, and i am quite interested to see if there is any money on it :)
I tried to follow this https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md but i get an error stating : Unknown wallet version from the future
I found the file named "secret.backup" and i just changed it to "wallet" with no type.
Opening the file in nodepad, the only readable part is : org.bitcoin.production
My end goal would be to check for funds, and transfer to my exodus client

I have taken another crack at it, and ended up succeding.
I followed this guide: https://walletsrecovery.org/recovery-docs/bitcoinwallet-recovery.html
BUT i cloned and older repository, i choose release 0.11 as it came out in 2014 and i saw my backup was from 2013.
It is now succesfully syncing.


Full node storage requirements for new 2MB block which is only 10% full If blocks were 2MB, and a 2MB block that is only 10% full gets confirmed, then how much additional storage is required on a full node?

I am guessing the correct answer here is 200K?

Thanks in advance for any guidance in this matter.

Full nodes are not required to store blocks (they can be pruned). So the answer is 0.

If a 200 kB block does get stored, it takes 200 kB to store it.