How can I get a private key for my watch only adress I'm new on bitcoin I have bitcoins that are stored on watch only address and I dnt have a private key for this address even when I add it to mycelium it says warning this address does not have a private key, but now the problem comes when I try to export a private key there is no option for private key from addresses I select manage and it gives this options.. Archive, transfer and spent no option for private key... Please help

I have bitcoins that are stored on watch only address

What are watch-only addresses?

A watch-only address is a public bitcoin addresses you’ve imported into your wallet. This is a cool, useful feature if you want to monitor activity at a particular bitcoin address. You can import any existing bitcoin address.

There is no way to get access to those bitcoins because it's a watch only address. You can only watch it, but you can't do anything else (sending BTC away, exporting the private key, signing something...)


USB hub busy when mining Peercoin with Red Fury ASIC running Minepeon I have a RasPI running minepeon 0.2.5, a DLINK USB Hub and a Red Fury USB ASIC Bitcoin Miner 2.2-2.7GH/Sec By BITFURY

I've added my pool https://ppcoin.d7.lt/ and things looked good except nothing is mining.

The miner states it's running but the device id is 0 and hashrate is 0.

I've tried to start the miner manually in accordance to https://ppcoin.d7.lt/getting-started

cgminer -o stratum+tcp://stratum.d7.lt:3333 -u miner.1 -p 99999

It starts up but states that the USB hub is busy, I see it testing the Red Fury but after that it still is not mining.

Am I missing something?

Related Posts:

http://www.peercointalk.org/index.php?topic=499.msg17709#msg17709
https://bitcointalk.org/index.php?topic=251675.msg4841184#msg4841184

This issue helped me solve my issue:

https://github.com/MineForeman/minepeon-base/issues/13#issuecomment-33760864

running the command

sudo lsusb -v

I get this out put, is this correct?

idVendor 0x03eb Atmel Corp.
idProduct 0x204b LUFA USB to Serial Adapter Project
bcdDevice 0.00
iManufacturer 1 BFMG
iProduct 2 Bitfury BF1

add the lines below to this file

/etc/udev/rules.d/01-miner.rules

add these lines

# BF1
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204b", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="minepeon"

rebooted the server and now I see my miner!


Where is the code which rejects transactions with insuffisent balance? Simple question but I can’t find the answer again.
Where is the code which rejects transactions when the value of inputs is below the value of outputs (because I think to recall that check works like this) ?

And what’s the exact error message which is sent to the log in that case ?

Below is the code that checks that the inputs consumed are greater than the output

const CAmount value_out = tx.GetValueOut();
if (nValueIn < value_out) {
    return state.DoS(100, false, REJECT_INVALID, "bad-txns-in-belowout", false,
        strprintf("value in (%s) < value out (%s)", FormatMoney(nValueIn), FormatMoney(value_out)))

You can find it here.


Multisig without P2WSH in Lightning The current Lightning implementations use P2WSH script format for multisig in the funding transaction. But it is also possible to use the CHECKMULTISIG opcode "natively", i.e., without P2WSH (see Mastering Bitcoin, Chapter 7). Can it be used for channel establishment? What would be the pros and cons? Was multisig used in Lightning at some point, or did Lightning go straight to P2WSH?

The main issue about using a non-segwit inputs in the funding transaction or a p2sh output as the channel anchor is the transaction malleability.

The recovery guarantee before a channel is funded relies on the commitment transaction building on top of the funding transaction. If the funding transactions txid were to be malleated, the commitment transaction becomes invalid and the funder becomes beholden to their channel partner for recovery.

In the case of using a p2sh output as the channel anchor, malleation of a unilateral force-close could be used to prohibit the counterparty from punishing the publication of an outdated channel state.

Therefore the funding transaction must be non-malleable and the channel anchor must be held in a script that is not malleable upon spending.


Testnet version history From Bitcoin Wiki: Testnet

  There have been three generations of testnet. Testnet2 was just the first testnet reset with a different genesis block, because people were starting to trade testnet coins for real money. Testnet3 is the current test network. It was introduced with the 0.7 release, introduced a third genesis block, a new rule to avoid the "difficulty was too high, is now too low, and transactions take too long to verify" problem, and contains blocks with edge-case transactions designed to test implementation compatibility.

I'm interested to know about Testnet(1) and Testnet2: the differences, the reason each version was deprecated (in particular, how/why people were selling TBTCs). I'm interested in the "historical context" as much as I am technical reasons for changing to a new Testnet version.

The testnet networks are very similar to each other. I listed all of the testnet resets here, and it seems like they make the minimum changes necessary to create a new blockchain.

It seems like the testnet3 reset came about because of compatibility issues:

  "Mark III" because this is the third genesis block for the testnet. The
  main reason for the reset is to get a more 'sane' test network; with the
  BIP16 and BIP30 and testnet difficulty blockchain rule changes the old
  testnet is a mess, with old clients serving up different, incompatible
  chains.

(Source.)

The creation of testnet2 predates the Bitcoin mailing list, but given this discussion in #bitcoin-dev, I think it happened because difficulty on testnet was too high:

17:04   slush   btw any chance to reset testnet?
17:05   tcatm   you could use your pool and a modified bitcoind to reset it in about 6 hours
17:05   slush   no, I don't want to connect pool to testnet ;)
17:06   slush   But new genesis block in next release should solve this, right?
17:07   gavinandresen   You talking about possible testnet reset?
17:08   slush   it would be nice. It's practically impossible to 'test' anything on testnet :)
17:08   gavinandresen   If you have two machines you can create your own private testnet
17:09   gavinandresen   ... but you can't test until they've generated at least 100 blocks.
17:10   slush   gavinandresen: agree, but is there any reason for keeping difficulty so high?
17:10   gavinandresen   Nope
[Edited for length.]

(Source.)


Receiving funds for the first time Disclaimer new to bitcoin: Do I need to make a transaction with an existing account before receiving first time payments to legitimate verify my account ?

All you need to receive funds is a valid bitcoin address. To create a bitcoin address, users will generally use some software that is capable of creating the cryptographic keys that the bitcoin address is derived from.

So, in the most simple terms, all you need to do is download some Bitcoin wallet software, which will then provide you with a bitcoin address you can receive funds to. All you need to do, is copy that address and send it to the person who wants to pay you.

Note that for every payment, you should send a new receiving address (any good wallet will give you a new address automatically each time a payment is received. This is very important for your privacy (and the privacy of those you transact with).

  Do I need to make a transaction with an existing account before receiving first time payments to legitimate verify my account?

Absolutely not.


Blockchain transaction verification I watched the 3Blue1Brown video about the blockchain and a question arose.
How is it ever guaranteed that if I send out a broadcast it will ever be put in a block that gets verified. For example it (my transaction) could reach miners who start verifying the block with my transaction but other blocks without my transaction get verified first therefore my block becomes obsolete because the everyone else is on another fork.
It seems like catching a moving train but with the chance that you run at the exact same speed as the train and never can get on it.

When blocks become stale, transactions in them are returned to the pool.
Transactions in the pool are available for inclusion in a subsequent block on the winning fork.


How to prune bitocoind indexes/txindex? In ~/.bitcoin/bitcoin.conf I set prune=5000.

That reduced the blockchain size to 5G.

du -sch /mnt/btrfs/bitcoind/*
...
5.0G   /mnt/btrfs/bitcoind/blocks
2.8G   /mnt/btrfs/bitcoind/chainstate
17G    /mnt/btrfs/bitcoind/indexes
....
25G    total

This is indeed a x10 improvement, before pruning, my bitcoind data directory was roughly 250G. Yet, it's still 25G total. I need to run on a small SD card where there is only 10G of free space.

Now /mnt/btrfs/bitcoind/indexes/txindex/*.ldb files take up the majority of space, 17G.

Is there a way to prune the txindex/*.ldb files?

If you have turned off -txindex (which should have happened when you enabled pruning), then you can just delete the the indexes/txindex folder as it isn't being used.


Can ECDH peers waste each other's time at will? Peter Dettman notes that ECDH peers can waste each other's time at will. What does he mean? Can this be weaponized against Lightning nodes?

It was in the context of the peer sending an invalid point. The proposed scheme would not detect that immediately, and so would do extra (wasted) work.

However the peer could equally waste your time by sending a valid point (possibly without knowing the private key) and just abandoning the protocol after you've done the work anyway.


If SPV clients didn't exist, would Bitcoin still use Merkle trees? I understand how full nodes use Merkle proofs to convince SPV clients that certain transactions are valid / invalid.

Does the Bitcoin software use Merkle trees in any other way?

The merkle root is included in the block header as a cryptographic commitment of the transactions that were included in that block. Without such a commitment, the POW for the block would be computed independent of the transactions included in the block. Transaction ordering is important, so a cryptographic proof/commitment needs to be included in the POW, otherwise the network would be unable to verify which transactions are in each block.

The merkle tree structure itself could be replaced by something else (eg just chain all transactions, hash that, and include the result in the header as a cryptographic commitment), but using the merkle tree structure has some added benefits (faster verification for SPV wallets, for example).

There may be some other reasons I am not remembering, but the cryptographic commitment is the most obvious that comes to mind.


Why is BIP32 root key different for different standards(purposes)? When generating key on https://iancolemen.com/bip39/, the BIP32 Root Key changes as I change the derivation path tab, e.g. BIP32, BIP44, BIP39 etc. Why is this the case? Isn't BIP32 Root Key the m at the beginning of the derivation path and the different standards are subsequent purpose that should not affect the root key?
Contrary to the above, when I generate addresses with the following code in go, the master key printed always matches the BIP32 Root Key on iancolemen.com. And changing the purpose does not affect the address generated in the end, it is always a BIP32(legacy) address, instead of a segwit which I would expect from BIP84.
m, err := hdkeychain.NewMaster(seed, chainParams)
if err != nil {
    panic(err)
}
fmt.Println("bip32 root", m.String())

purpose, _ := m.Child(hdkeychain.HardenedKeyStart + 84)
coin, _ := purpose.Child(hdkeychain.HardenedKeyStart + 1)
account, _ := coin.Child(hdkeychain.HardenedKeyStart + 0)
receiving, _ := account.Child(0)
index, _ := receiving.Child(0)
fmt.Println("address", index.Address)

EDIT: The wrong address printed in go was a result from not properly encoding the addresses to bech32 and by default they are interpreted as legacy addresses. The keys themselves are alright.

If you look closely, you'll notice that BIP 32 and BIP 44 actually have the same root key and it begins with xprv. Then BIP 49 and BIP 141 also have the same root key and it begins with yprv. BIP 84 has a root key that's different from the others that begins with zprv. Now if you were to take all of those root keys and Base 58 decode them, you'll find that they actually are identical except for the first 4 bytes and the last 4 bytes.
The last 4 bytes are because of the checksum used in Base 58 Check encoding.
But why are the first 4 bytes different? They are different because BIP 49 specifies for extended keys for nested segwit addresses should begin with the prefix yprv and ypub. Even though this is specific to BIP 49, this has been more generally applied to all extended keys for nested segwit addresses, thus you see it used for BIP 141. Then BIP 84 specifies that extended keys for native segwit addresses should begin with the prefix zprv and zpub.
These prefixes are what cause the different root keys as changing the prefix will cause the entire serialization to change as well.
By this logic, the xprv and xpub prefixes used previously then indicate that legacy addresses should be made. Hence BIP 44 shows xprv.
However BIP 32 is what specified the xprv and xpub prefix, and really this prefix is supposed to be independent of the derivation paths used and the addresses to be derived. BIP 32 is solely concerned with keys, not addresses. So xprv and xpub are used for general BIP 32 key derivation stuff too, which can make this confusing. But that's also why the BIP 32 tab shows xprv.


'Bitcoin Core - Error' I just tried downloading Bitcoin Core to my PC today for the first time and am getting an error. I am a noob to this, but was hoping someone could point me in the right direction in getting this fixed as I'm trying to get smarter on this stuff. Google led me to try re-indexing, but unfortunately that crashed as well after a few hours of running.
The below is the error message and the debug file. It appears it crashed due to a corrupt block found and potential hardware error. It could certainly be a hardware error as I only currently have the storage space for a full node on an old HDD, but haven't had any issues with this HDD previously.
Appreciate any help here. Thanks!

New Error When downloading on new SSD

This error occurs when a block that was written to disk is corrupted. This could be due to hardware failure or just simply random chance. Since the corrupted block for you occurred early on, the easiest way to fix this issue is to simply delete the blockchain and redownload it. To do that, just delete the blocks/ and chainstate/ folders inside of the datadir (the directory that contains the debug.log file). Then start Bitcoin Core.


Are there still miners or mining pool which refuse to implement SegWit? It was well known that initially while SegWit got more than 50% of hashrate after activation that a part of the mining pools refused to implement it.

But are there still blocks being mined by miners which refuse to implement SegWit more than 2 years later ?
For example, is this article or this article still true ?

No, in the past year, there were only 15 non-empty-non-segwit blocks mined which account for less than 0.03% of all blocks.

Non-empty blocks without segwit transactions

I've looked up the last twenty blocks that confirmed transactions but did not include any segwit data. The newest of these was mined on 2018-12-18, more than four months ago. The 21st-newest block in that series was mined on 2018-03-13 at height 513,267.

Given that we're currently at height 573,220, there were only 20 non-empty blocks that did not include segwit transactions among the last 59,953 blocks. Or put differently, over a period of time exceeding the past year, there were fewer than 0.034% non-empty-non-segwit blocks mined.

The two known miners that created such blocks without segwit transactions appear not to be doing that now:

Bitcoin Russia's last ten blocks were segwit blocks.

Bitcoin.com's last ten blocks were segwit blocks.

Empty Blocks

I did not count empty blocks (blocks that contain only a coinbase transaction) as the coinbase transaction has no inputs and therefore cannot be a segwit transaction. However, BIP141 specifies that the Witness Commitment is optional if there is no segwit transaction included. Therefore, there is no reliable way to determine whether or not an empty block is segwit or non-segwit.

Images via blockchair.com


What is "fed-peg" and "predefined functionaries" with sidechains? I am reading about side-chains, and what I read in this article is:

  The initial sidechain included in Sidechain Elements works on a
  federated security model; while it’s still peer-to-peer and
  consensus-based, security for the blockchain is provided by a set of
  predefined functionaries in an arrangement called a Fed-Peg. A number
  of academic groups and individual contributors have agreed to run the
  Sidechain Elements Fed-Peg, including blockchain groups at Stanford,
  MIT, and Princeton. The sidechain does not include mining or
  proof-of-work at this point.

I have no idea what that means. What is "fed-peg"? Why is that needed? Does it change in any way the security of the main chain? How does it differ from decentralized PoW?

I have no idea what that means. What is "fed-peg"? Why is that needed?

When you're creating a sidechain, you need a way to move Bitcoins from the main network to your sidechain. This is pretty straightforward. Counterparty, Ethereum, and NXT had various ways of doing this. (Admittedly, none of these allowed people to turn Bitcoin into the assets on these networks after they started, but I suspect that's due to economic reasons rather than technical ones.)

The more complicated, and more important issue, is how you move Bitcoins that are on the sidechain back into the main network. I've heard multiple proposals on how to do this, but all of them are either

insecure,
centralized,
or require very complicated changes to the Bitcoin protocol.

This approach is centralized.

The idea with that you have several authorities, each of whom has a private key. Those private keys together control a multisignature account. When you move Bitcoins onto the sidechain, you deposit them into the multisignature account. When you want to move them back to the main chain, you do so on the sidechain; those federated authorities will independently validate that transaction. Then, all of them sign a withdrawal from the multisignature account to the main network address you specified in your sidechain transaction.

The blockstream paper suggests a 3 of 5 multisignature account. The issue with this is that if 3 of those keys are compromised (or if 3 of them collude) then they can take all of the money out of the multisignature account.

  Does it change in any way the security of the main chain?

No. It doesn't modify the main network. Future incarnations might, though. There's not enough detail about those possible future systems to answer that at present.

  How does it differ from decentralized PoW?

The federated authorities have two roles in this system: gating transactions into the system by producing timestamped blocks, (something normally done by miners) and the previously mentioned multisignature account.


Can you deposit to an unplugged Trezor? I just want to confirm if my logic is correct. If I send Bitcoin to my Trezor address while the Trezor is unplugged does the web wallet then receive the private keys from the transaction and only once the Trezor is plugged in again are the keys taken offline? Also access to the web wallet is impossible without the Trezor I assume (ignoring recovery seed). Technical answers are welcomed!

Yes.

When you initialize your Trezor, it generates a private and a public key. Private key never leaves the device (that's the core value proposition). That means you can't sign transactions (spend coins) without Trezor plugged in. However, the web wallet can remember your addresses (derived from the public key). Even without the Trezor plugged in, you can check your balance and send coins to your addresses from elsewhere.


Does bitcoin mining need a lot of internet bandwidth I'm going to be a bitcoin miner and my question is

does it require a lot of internet bandwidth to mine with a pool ??

I'm gonna use guiminer with slush's pool

I have 1MB dsl is it enough ???

Bitcoin mining doesn't require much bandwidth at all!

It's worth noting that the higher the hash-rate of your rig, the more bandwidth it will require (as you will get through work units faster - downloading new ones and feeding back more frequently).

Seeing as though you are planning to use guiminer, you most likely won't use much bandwidth (most high-performance mining is now done with dedicated equipment as opposed to GPU/CPU mining).

If you're new to mining bitcoins, these sites might be of interest to you:

https://www.bitcoinmining.com/
https://en.bitcoin.it/wiki/Mining


Can the same wallet be run from multiple computers How can i personally utilize many of my home and office computers to mine bitcoin for the same address or user? Does bitcoin allow that? Also if i have supercomputing facilities does it mean i can generate bitcoins every minute?

The same receiving address can be used as many times as you like, though with some loss of anonymity.

However, if you run the client on multiple computers with the same wallet file, you'll run into problems; even if you start with an exact copy of a wallet on both computers, they'll get out of sync eventually if you make transactions from each copy.

The Bitcoin-QT client generates up to 100 addresses in advance and stores them in the wallet, but at some point will generate more. Most "send" transactions use one of those addresses as a change address. If you're sending from 2 clients which started with the same copy of a wallet file, at some point they will start using addresses that did not exist in the original wallet file. At that point, bitcoins in one wallet will not be available to spend from the other wallet.


Is it safe to store mnemonic seed in the email if I change random 2 words? If I store 12 word seed in the email like gmail and my phone as well but change 3rd and 7th words in the seed for example with other bip-39 words and remember it, would that be safe? I can't think of a way for someone to be able to efficiently brute-force it.

It would be trivially brute forceable.
There are 2048 BIP 39 words. If you change two words AND the position is known, it's simply a matter of computing all possible combinations of what those two words can be replaced with - 2048*2048. That's only 4194304 - A smartwatch could do that in a few minutes without breaking a sweat. It would take you longer to write a script to run through all of those than it would take for the script to run.
If the positions of the changed words aren't known, it is slightly harder, but not extensively so - the first words can be placed in any one of 12 slots, and the second in any one of 11 - that gives you 2048 * 2048 * 12 * 11, or 553648128 possible combinations - slightly better - the attacker might now have time to make some coffee while he steals your coins.
If you genuinely want to security your mnemonic, you should consider one or more of:

Encrypt it with AES, store the encrypted version and the password in two separate places
Split it into M parts using Shamir Secret Key sharing, store each part in a different, secure location
Write it down and store it in a secure vault or deposit box.

You can combine the above to protect against various threat models.


What is the easiest way to "listen" to the network? If I want to automatically check up on payments and ensure they are not double spends and check the confirmation count, what is the easiest way to do so?

https://blockchain.info/ , 'nuff said.

They feature live events of transactions appearing in the network, as well as blocks.

Other than that, there is this - http://bitcoinmonitor.com/ . It shows such events graphically, along with currency trades.


Why does every "defi" thing only support garbagecoins and never Bitcoin? I swear, I seriously feel like I've already gone insane and I can't even trust my senses at this point. I've been chewing through website after website listed as "defi", repeatedly finding the exact same thing:
Bitcoin is not supported, and they all want me to "connect my wallet" inside the browser.
What's with this? Why do they support 927 different garbagecoins I've never heard of (outside of these websites) but never Bitcoin (BTC)?
I honestly believe that all of those websites are made by the same entity, and that they are all some kind of elaborate scam. But what I can't figure out is why none of them even support Bitcoin -- the only real crypto currency.
What am I missing?

Bitcoin is pushing most use cases and applications to second layers (e.g Lightning, sidechains) because blockchains don't scale. Most "DeFi" apps use the blockchain for transactions, filling up blocks and raising onchain transaction fees. Development is easier if you assume blockchains scale and can stay decentralized as they scale (which they can't).
It is true that Ethereum's Solidity is more expressive than Bitcoin Script (allows for infinite loops etc) but you can still do a lot with Bitcoin Script. Ethereum has found a niche of making it very easy to issue tokens and selling them at vast prices. It is much harder to support an infinite number of tokens moving over say Lightning where channels are primarily denominated in Bitcoin.
There are some projects buildings "DeFi" like applications on Lightning e.g. discreet log contracts (DLCs) but it takes a lot longer to build if you actually want to keep it decentralized rather than merely labelling it "Decentralized" (De).


How often does peercoin minting pay out? If I have a peercoin wallet and generate coins with the PoS system, how often does it pay me the 1%? Can I change this to every week/month/half year?

Minting is random. There is no guarantee that you will get 1% in a year, you could get 0% or 75%. You will get them when you successfully mint a block.


How long should I wait to consider that the transation is "definitely" confirmed? When one transaction is broadcasted, what is the probability that it won't be confirmed? (By probability, I mean the observed probability on the blockchain. If a person intentionally spend twice 1 bitcoin, I imagine that the probability is roughly 0.5). What are the reasons that the transaction will be invalid.

one of the reason is double spending.

Now since every 10 minutes, a block is mined. After 10 minutes, what is the probability that the transaction will be invalid. I read that 6 confirmations (so 6 blocks) is a good number.

Now after 60 minutes, what is the probability of invalidating the transaction?

I'm not sure it's exactly what you're asking about, but pages seven and eight of the Bitcoin white paper are concerned with calculating the probability that an attacker could, after having sent payment to a recipient, change the transaction to instead pay himself - specifically, from the paragraph that begins, "We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can't change the transaction," onwards.

https://bitcoin.org/bitcoin.pdf


Connect Trezor (T) directly to a printer to generate paper wallets Is it possible for a Trezor or Trezor T to connect with and directly interface with a printer? The Mycelium Entropy device is very useful to print paper wallets while minimizing MITM attacks. I'd like the Trezor to do the same.

It is a feature that this is not possible. You do not want to use a printer to print paper wallets as this is highly insecure.
Printers have a track record of having low security - so people can hack the printers - wait for it to print something that looks like a private key and send them home(not yours).
Also some printers have build-in hard drives that save every document printed - so there are also attack vectors where the printer does not need to be compromised before printing.
Also have a look here: https://events.ccc.de/congress/2011/Fahrplan/events/4780.en.html
https://media.ccc.de/v/28c3-4780-en-print_me_if_you_dare


Redeem bitcoins of non-standard transactions made with eligius As I understand it, Eligius is the only miner pool accepting non-standard transactions.
The Opcodes for the scripts are here.
Some use cases for non-standard transactions can be found here.
My Question:
If I pay some Bitcoins to a non-standard pubkey script mined and accepted by Eligius, can these BTCs be redeemed by a non-standard redeem script (also mined at Eligius) or are these BTCs just lost forever?

Yes, if you pay bitcoins to a non-standard pubkey script, you can spend them in a later signature script using Eligius.  But there are some conditions:

The pubkey script must be spendable.  For example, a pubkey script starting with OP_RETURN can never be spent.  It's up to you to craft your non-standard script to make it spendable.
Eligius will only mine valid transactions.  For example, you can't have a data push of more than 520 bytes in either the pubkey or signature script.
The IsStandard() checks check more than just op codes---they also require minimum network fees (to avoid "dust" spam) and correct transaction version numbers.  Eligius still includes these parts of the IsStandard() checks.
Eligius has its own minimum fee for non-standard transactions: 0.00004096 BTC per 512 bytes according to their FAQ.

If you're going to send custom transactions, I highly recommend that you test them on Testnet first.  (Testnet allows non-standard transactions.)

Note also that Bitcoin Core 0.10 will likely relax the IsStandard() rules for P2SH, making it possible to use pretty much any script you want as long as you wrap it inside P2SH.  (That won't help you now, but it's a good thing to consider when developing your script.)


Why aren't Bitcoin transactions processed and verified by normal Bitcoin clients? My understanding is that the blockchain is exclusively built by miners. My question is, why isn't that verification done by every Bitcoin client - kinda like p2p file sharing programs allowed people to use the network (download) and support the network (upload)?

Update:

What is the difference between "verifying" the transaction, and the "proof of work"? My understanding of verifying transactions is that all inputs to and outputs from an address are added up, ensuring along the way that there is enough that has in-come before-hand to allow each output. If each node in the network does this, all nodes will agree and blockchain spoofers would be drowned out by the masses. Is this not sufficient proof?

Transactions are in fact verified by every network node (computer running bitcoin-qt). A transaction which is not valid will not be propagated and the client will not display it to the user as a payment.

However, a transaction being valid doesn't mean there are no contradicting transactions. What miners do is synchronize the transactions using proof of work as a signal.


How long does it take to propagate a new broadcasted message in the Bitmessage? When a message has been signed off, it is propagated to the entire network. I would like to know how long does it take "on average"?

There are two types of messages, private messages and broadcast messages.
Private messages are encrypted with receiver's public key.
Broadcast messages are encrypted with sender's public key.
Having said that, there are few reasons for message propagation delay in the network, following are my assumptions.

In the private key's case: once the message is signed off and broadcasted, every node tries to decrypt the content with his own public key, but fails.
Do nodes forwards the message only after trying to decrypt or promptly after receiving it? Because this definitely causes message propagation delay.
Is it the same for the broadcasted messages, i.e. do nodes forward the message only after failing to decrypt it or promptly after receiving it?
Does the message size matter for decryption and propagation?
Network latency delay is regardless of the message size.
The diameter of the network is out of the question as well.

Does anyone keeping track of Bitmessage statistics similar to the Bitcoin's?
I tried to access http://bitmessage.adammelton.com/ but fail to do so, does it work for you?

P.S. Sorry this question might look a little bit irrelevant in the bitcoin's stackexchange, however we consider that Bitmessage is a Bitcoin without a blockchain and the most of techniques were inherited from the Bitcoin. In addition I believe that many developers follow both Bitcoin and Bitmessage. Therefore dear all, please do not remove this question :) Many thanks.

Curently, with around 5000 nodes, a message shouldn't take longer than about 15 seconds to propagate. Typically, it's faster.

Messages are forwarded if the Proof of Work is sufficient. There is no signature verification on forwarding, since only the recipient of the message can verify that. Nowadays, PyBitmessage runs the decryption attempts in a separate thread, therefore forwarding and decryption run in parallel.
Some versions have different delays in forwarding depending on what type of object it is, some do not have delays. But this has nothing to do with decryption attempts, it is an attempt to mitigate timing attacks.
For propagation size does matter, because it takes longer to transfer, however I don't think the difference is that big, in particular if you're on a fast connection. For decryption, the data itself is encrypted with AES-256-CBC, and that's pretty fast, on my laptop I get like 100MB/s, so you shouldn't see a big difference.
Latency does influence the speed a bit, but some network operations are asynchronous, at least in PyBitmessage, so from practical point of view it's not a big deal.
I don't understand this. It takes a bit longer if there are more nodes in the network, but on the other hand if they are well connected, it's faster. PyBitmessage will by default attempt to maintain 8 outbound connections, and refuse incoming if it has more than 220 total connections.

Recently a new stats website was launched: https://beamstat.com/, which works nicely, just the node count is incomplete.


Ethereum's PoW difficulty Bitcoin's block time is about 10 minutes while that of Ethereum is 15 secs. Both are using PoW at this moment, right? How come Ethereum's block time is so short compared to Bitcoin? Is hashing a lot easier?

Because it was designed to be that way. Ethereum targets 15 seconds, so the difficulty adjusts to make the block interval 15 seconds. Bitcoin targets 10 minutes, so the difficulty adjusts to make the block interval 10 minutes. It is unrelated to how difficult it is to produce a hash; it is only related to what hashes are considered valid.

The set of hashes considered valid is set by the difficulty adjustment. Making it smaller means that it will be take longer or require more hash rate to find a valid block hash. Making it larger has the reverse effect. So Ethereum has a larger set of valid hashes than Bitcoin, so valid block hashes can be found more quickly as fewer hashes need to be tried, on average.


Countrywide Internet isolation, inevitable fork Many countries around the world have provisions for shutting off the Internet as well as isolating itself from the Internet (where networking within borders still flourishes), any transaction processing (mining) going on within that country will only find nodes within that country and start following its own chain.

Is this a correct assumption?

Secondly, if this is a correct assumption, how will the network deal with this once it comes back online?

I foresee alt-chains emerging due to this, and persisting with their own exchange rates, very similar to the different fiat currencies today.

So:

Are my assumptions correct?
What, if any, provisions does the bitcoin protocol have for forks of this size (which wouldn't necessarily be that large, but still have real consequences for people forced to use them)?

Your assumptions are perfectly right. Since there is no information exchange between the two partitions while the network is partitioned, and Bitcoin guarantees liveness, the global consistency suffers (see CAP Theorem). This means that each partition will have its own blockchain fork, unaware of each other. The forks are incompatible not just because the chain is defined to be a single path from a single header block to the genesis block, but also because transactions in the partitions will contradict each other (not least the mining generation transaction in the block).
Should the partition be prolonged the forks may even start to diverge in difficulty, as they will only see the computational power in their own network and adjust accordingly.

As for the merge, this is still being discussed and we do not have a good contingency plan. Letting the system merge the forks by itself, i.e., dropping the fork with the least work in it, would roll back the entire transaction history in that partition. A manual intervention by making the fork persistent (the alt-coin scenario you mentioned) is also not desirable, as it results in an immediate doubling of the funds in circulation, Furthermore it is likely that one of the forked alt-coins is going to whither and eventually be abandoned anyway. For now the best we can do is attempt to avoid prolonged chain forks, but the risks you pointed out are real and worth discussing before it's too late.


How to transfer my wallet.dat to dedicated Ubuntu server Sorry for dummy question at first.

I have developed an application on my local dev machine. Now I want to make a realease on production server located elsewhere to which I have ssh access.

I dont want to put my wallet.dat in git. Of course.
But dedicated server doesnt have access to my local virtual ubuntu developer machine where wallet.dat is kept.

So I have to copy my wallet.dat from one virtual machine it terminal to another terminal. I thought I could dump keys to some text file and simply copypast it between servers. But dumpwallet command creates file with hundreeds of addresses and each one of them should be than imported on by one by importprivkey and there is no option to import dumped file (weird, no?)

Though not really bitcoin related...
How are the two systems connected? I mean, can you already login via ssh? Or do you only have a terminal running on both, and no ssh daemon?

If no ssh daemon, then netcat is the tool of choice.
If ssh daemon is running, use secure copy tool:

scp -port source target

e.g.:

scp -P 22022 ~/.bitcoin/wallet.dat 192.168.92.117:/home/mybitcoinuser/.bitcoin

And lastly, if the target server doesn‘t run ssh daemon, you can for sure start one in your terminal, and execute the scp from the target server (adopting the source and target).

There is a capital P when using scp.


Closed wallet in MultiBit, is it gone for good? I have just installed MultiBit and transferred my bitcoins into it.

I closed the wallet using "close wallet" in the file menu, thinking that it would save it, but it seems to have not just closed it but removed it from existence.

Is this just a lesson not to be so stupid in future?

I still have a record of the wallet address, but that's it.

The user crowther had his wallet stored in:

C:/Documents and Settings/"user name"/AppData/Roaming/MultiBit


Source code for SPV node on iOS - where to start? I'm working on a proof-of-concept for a blockchain project and at its core it will need a modified SPV node running on iOS. The reason I need to modify it is so I can build non-standard (e.g. OP_RETURN) scripts without seat-of-the-pants techniques like hacking into the transaction hex.

I'm aware of some basic starting points such as picocoin and libbitcoin which I should be able to compile for iOS. But is there anything else available that would specifically make an SPV node easier to develop on iOS?

BreadWallet for iOS is open source, has a permissive license, and uses SPV https://github.com/voisine/breadwallet/blob/78d67870cdb887bab69ffeab8d808a3cb24d3759/BreadWallet/BRPeer.m


What is the implication of Induced Demand for Bitcoin scaling? For the purposes of this question the working definition of Induced Demand is taken from Wikipedia:

  Induced demand, or latent demand, is the phenomenon that after supply increases, more of a good is consumed.

As the literature and research attests, Induced Demand has most impact in large public networks such as public roadways and healthcare networks. The observed phenomenon is illustrated by cases where widening of a public road - as a means of relieving congestion - merely results in temporary relief: the increased road capacity (supply) soon attracts additional traffic (demand) and the congestion returns.

Bitcoin is a large scale public network and it is evident that there is much latent demand for its use. Does Induced Demand have relevance for efforts  to scale the Bitcoin network? What would be the specific expected impacts if blocksize is doubled from 1MB to 2MB?

The preferred answer will be short, evidence-based, and devoid of "blocksize debate" rhetoric.

Although the phenomenon of Induced Demand is critical to effort to scale Bitcoin, it has not often been cited in public discussion. I refer to the following article, from Wired magazine, that discusses the issue in layman's terms:

https://www.wired.com/2014/06/wuwt-traffic-induced-demand/

If we make an analogy between an urban public road network and the public Bitcoin network, then the analogues are:

road capacity is block capacity
individual commuters represent transaction outputs (UTXOs)
each vehicle represents an actual bitcoin transaction

So, a regular P2PKH transaction is like a vehicle transporting two people - who represent two outputs: the actual send amount and the change amount.
Every vehicle must pay a toll (mining fee) to travel from A to B through the road network. Unlike a usual flat-fee road toll, this road network allows users to bid for access to the road. So, as congestion increases, users will pay higher and higher fees in order to drive on the road network.

In the case where there is more or less permanent congestion, fees will be permanently high. The self-evident solution is to simply add one or two lanes to the road network in order to increase capacity and relieve the congestion. However, as the linked article discusses, road planners have found, over the years, that increased road capacity (increased supply) almost always leads to increased demand, and the congestion soon returns.

Induced Demand and its impact on large public networks warns us that simply increasing block space will not necessarily have the expected outcome of lowering tx congestion and high fees.

Typical roadway solutions include reducing the number of private vehicles on the road by incentivising people to travel via buses or a transit system. A bus can hold 50 people and uses less road space than their 50 (or, say, 25) individual vehicles combined. A monorail, built above the highway, can transport 200 people in one trip, and commuters might disembark at stations along the road network from where they take bus routes to their destination.

The monorail and bus routes represent the Lightning Network. The road capacity remains unchanged but it is used more efficiently - reducing congestion and reducing fees.

Note that the congestion and fee relief is neither constant nor permanent, but the solution is smarter and more manageable than simply increasing block space. It is always possible to add additional monorails (protocol layers) and buses, whereas simple block size increases run into the problems implied by Induced Demand, and soon require another block size increase. Bitcoin security (decentralization) is systematically degraded by larger and larger blocks, so this is a critical drawback of applying on-chain scaling only.


How does the blockchain know if its block hashes have been tampered? I'm dealing with some problems to finally understand how implicit consensus works and I've come across with one question. Suppose the following:
A malicious miner proposes the following block to be included somewhere in the middle of the blockchain. If he just copies the value of the previous block's hash pointer in the new block's header, and recalculates the following blocks hash pointers till the end of the chain, by coping the same header in each block in the original chain, wouldn't this blockchain be as valid as the original, considering that the new hash pointers match with the content of each previous block?
A way of trying to clarifying myself and answering to the question was to think of the implicit consensus. Could it be that the other well-behaving nodes will deny this proposing block by storing a copy of the previous state of the blockchain and comparing the old blockchain with a new one?

Changing the previous block hash in all of the subsequent block hashes will change those block's hashes too. They become different blocks and are treated as different blocks by nodes. When other nodes try to verify those other blocks, they will extremely likely compute a block hash which does not meet the Proof of Work requirement, and thus those blocks would fail validation.
The way around this is for the attacker to recompute the Proof of Work, but then that takes a lot of time and computing power and is thus difficult to do.


How to determine what's mine? I for example own 10 BTC does that mean, in some Blocks in the valid part of the blockchain is written, that I received at some point in time a certain amount of BTC? How do I prove that the Transactions in this block belong to me (without loosing ownership).

How hard is it to find all transactions in a chain which belong to me. Some how this should be possible in $\mathcal{O}(l\cdot m\cdot log(n))$ because of the merkle tree in each block for m blocks and l transactions representing my complete ownership (3 BTC + 4 BTC + 3 BTC = 10 BTC)

Could everybody check my amount of bitcoin if he knows my alias or whatever is used to mark my transactions as mine.

Could I just spend someone elses coins?

Thank you very much in advance.

PS.:
My Plain written math expression was displayed wrong so I edited as tex code but it still does not work. Anyone who can read tex will still be able to read this formula (probably better than before)
If sb knows how to fix it, plz provide a solution.

I for example own 10 BTC does that mean, in some Blocks in the valid part of the blockchain is written, that I received at some point in time a certain amount of BTC? How do I prove that the Transactions in this block belong to me (without loosing ownership).

Essentially, yes. Owning BTC simply means that one or more transaction outputs somewhere in the chain exist, that are spendable by you. In a normal case, this means that you have control of the private keys required to spend these outputs.

To prove you own them, you can sign a non-transaction message using your private key. This signature can be verified against your public key, and the public key can be verified against an address, thus proving that you own the outputs associated with that address.

  How hard is it to find all transactions in a chain which belong to me

If you do not know the transaction IDs, the merkle tree will not help. The merkle tree is only useful if you want proof that a known txid is in some block. If you only know the addresses that your outputs are at, but not the txids, you must scan the entire chain and match the output scripts against your addresses. This will have a worst case of O(n).

  Could everybody check my amount of bitcoin if he knows my alias or whatever is used to mark my transactions as mine.

If they know which addresses belong to you, yes.

  Could I just spend someone elses coins?

If you are able to satisfy the output script requirements, then yes. For regular transactions, this would imply that you have been able to compromise the keys owned by someone else.


What are the segregated witness tradeoffs? Segregated witnesses sound like a win in a lot of ways, I'm just trying to understand how they apply to scalability. If I understand correctly, there is a second Merkle tree of witnesses mirroring the transaction data. The witness tree's root is committed to in the coinbase, but otherwise this second tree lives outside of the block.

Don't the witnesses still have to be relayed to other nodes to validate? Why is it acceptable now to send more data, but raising the block size was dangerous, and exclusionary of nodes on slow connections before?

Also, if witnesses are outside of the block and prunable, how will a fresh fully validating node get up to date? If a smaller subset of full nodes hosts all witnesses, does that trade off security for amount of transactions in a block?

If I understand correctly, there is a second Merkle tree of witnesses mirroring the transaction data. The witness tree's root is committed to in the coinbase, but otherwise this second tree lives outside of the block.

That is my understanding as well.

  Don't the witnesses still have to be relayed to other nodes to validate?

Only nodes that actually care about the signatures. There are thousands of SPV nodes, for example, that want to be able to calculate the TXID of the transactions they care about but that don't actually need the scriptSigs other than that, since SPV nodes rely on confirmations for security instead of fully checking scripts.

  Why is it acceptable now to send more data, but raising the block size was dangerous, and exclusionary of nodes on slow connections before?

Many people rejected the idea of increasing the block size limit simply because it was a hard fork. The extra data and exclusion of some nodes is still an issue, and I'm sure there will still be plenty of arguments about how to count the witness data. This just eliminates/postpones the hard fork max block size debate.

Pieter Wuille's current proposal is to give a 75% discount on signature data, increasing the effective max block size to about 4 MB in the worst case, but that would probably never come close to being realized in any normal, non-malicious, circumstance. I would estimate that a full 1M normal block would be a 1.8 MB block of completely SW transactions.

  Also, if witnesses are outside of the block and prunable, how will a fresh fully validating node get up to date? If a smaller subset of full nodes hosts all witnesses, does that trade off security for amount of transactions in a block?

When a full node comes online now, it currently doesn't even check the script evaluations in anything older than the most recent checkpoint. In this sense, it's not a 'fully validating' node, it's more of a 'fully validating from 6 months ago onward' node. But, unfortunately, to build the UTXO set right now you still need to download the scriptSigs, even though they're not used for any validation. The Segregated witness change makes it so that in the case of SW transactions, excessively old scriptSigs that wouldn't be verified anyway don't have to also be downloaded, because the TXIDs don't use them.

Note that some transactions using Segregated witness doesn't magically make old-style transactions more prunable, unfortunately. However, if Segregated witness were fully in use by all transactions today, then in 5 years from now, a node that was getting up to sync wouldn't have to download a lot of the signature data from the past 5 years, just the most recent signature data.

So, there is a security trade-off there, but it's the exact same trade off that already exists. With SW, though, you just have to download less data (~60% less of the new SW transaction data) for the same security.


Can a smart mind explain block difficulty calculation in lay terms? I tried to read it here: https://en.bitcoin.it/wiki/Difficulty

But it is closer to a rigorous math proof than to an explanation.

I am interested to understand that so I can understand what makes a block or a block chain more difficult than another. It is said that when a bitcoin client starts it chooses the most difficult block chain it sees.

Can a smart mind explain that in simple terms?

I am interested to understand that so I can understand what makes a block or a block chain more difficult than another. It is said that when a bitcoin client starts it chooses the most difficult block chain it sees.

In order to mine a block, one needs to attach work to the block header. If too many blocks are created, the requirement for work is increased, meaning the difficulty increases. When two chains are compared, the difficulty of each block is totaled up, and the chain with a higher score wins.


secp256k1 recovery id and how does the code work Here I have some questions regarding the recovery id (recid) defined in secp256k1 implementation.
I had found few posts about how the recid is defined and what does it mean, also the source code (https://github.com/bitcoin-core/secp256k1/blob/master/src/modules/recovery/main_impl.h).
As explain by bitcoin developers like Peter Wuille the recid is [27~30] for compressed pubkey and [31~34] for non-compressed pubkey.
my question are:
1). from the secp256k1 code I did not find 27~34 value, all I found are 0~3; so where the difference come from?
2). I guess [27~30 and [31~34] such value set does not come from nonsense, but why using these two value set to map to [0~3]? Guess some tricky hidden inside--is that because of some trick on bit-level operation?
3). can someone help to explain this piece of code (come from https://github.com/bitcoin-core/secp256k1/blob/master/src/modules/recovery/main_impl.h#L104-L112)
looks for me recid &2 (0x10) actually select recid=2/3 case.
and if recid !=2/3 all left code will be executed--is that understanding correct?
if (recid & 2) {
    if (secp256k1_fe_cmp_var(&fx, &secp256k1_ecdsa_const_p_minus_order) >= 0) {
        return 0;
    }
    secp256k1_fe_add(&fx, &secp256k1_ecdsa_const_order_as_fe);
}
if (!secp256k1_ge_set_xo_var(&x, &fx, recid & 1)) {
    return 0;
}

1). from the secp256k1 code I did not find 27~34 value, all I found are 0~3; so where the difference come from?

The serialization as a 65-byte signature + recovery byte happens on the Bitcoin Core side, not in libsecp256k1. See key.cpp:
vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);

2). I guess [27~30 and [31~34] such value set does not come from nonsense, but why using these two value set to map to [0~3]? Guess some tricky hidden inside--is that because of some trick on bit-level operation?

There is nothing special about it. I just picked an arbitrary offset so the signature byte arrays wouldn't be confused with public keys or other signatures. But there is no special meaning to the number 27 (and in retrospect, it's a rather strange choice).
I'll try to expand this answer later to explain the code.


Trying to send bcc with bitcoin-qt but getting "16: mandatory-script-verify-flag-failed" - error I'm trying to use the method from this reddit link to send a raw transaction to the bcc-network, but keep getting the error: "16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) (code -26)"

Is there anything different to that method when sending a transaction to the bcc network? Everything works fine until i try to do the sendrawtransaction.

To quote from the link above, these are the steps i'm doing:

createrawtransaction:

createrawtransaction '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '{"mtRWdkBpAyz8pUoCYobABvnEe1xFPqvkJN":0.36972432}'

result:

0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c0100000000ffffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000

then signrawtransaction:

signrawtransaction '0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c0100000000ffffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000' '[{"txid":"0cb0c97c206bf2229fac8800fe05410d23bbc5afe2b243ff921ef2065b210b34","vout":1,"scriptPubKey":"76a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac"}]' '["cUhHXQLPaNSPNh2rRiWSarn5jEoJ26HvrAYjLCfxnDsAYZenTthe"]'

result:

{ "hex" : "0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c010000006a47304402200d3f8a6430f952199d7f4550328ae980f9926b13f7c78f8a5640ecd445aa20bf022074a7e1ec5d27d83da6bb19a8fe9ef9757e40fa86a9b1437c27031be015d82db40121032effa843ad1052540de3ae323a165101bc2e980c76b69bdc69444e3ef599054effffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000", "complete" : true }

then sendrawtransaction:

sendrawtransaction '0100000001340b215b06f21e92ff43b2e2afc5bb230d4105fe0088ac9f22f26b207cc9b00c010000006a47304402200d3f8a6430f952199d7f4550328ae980f9926b13f7c78f8a5640ecd445aa20bf022074a7e1ec5d27d83da6bb19a8fe9ef9757e40fa86a9b1437c27031be015d82db40121032effa843ad1052540de3ae323a165101bc2e980c76b69bdc69444e3ef599054effffffff0280969800000000001976a9148d9222948aff2a22c6c0fe7a05f7edd3c1b0ab9f88ac10919b01000000001976a9144e03fd2b3eff32ee90d29524eb6f058719f3b50f88ac00000000'

result:

16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element) (code -26)

Since i'm sure others will encounter the same problem, the solution is that BCC requires you to put in the amount-tag when signing a transaction. You have to put in the full amount that is shown on the listunspent-command though, else you won't be able to send the transaction.


Help me use python-bitcoinrpc I have got the api working and i can run commands like

access = AuthServiceProxy("http://root:123@127.0.0.1:8332")
access.getinfo()

However not sure how to use more complicated commands such as:
move "fromaccount" "toaccount" amount ( minconf "comment" )

Tried something like this, but i get a syntax error in python.

name = "bob"
name2 = "sam"
balance = 0.0001
access.move(name name2 balance)

Doing it like this i get JSONRPCException:

name = "bob"
name2 = "sam"
balance = 0.0001
access.move('%s' '%s' '%s'), (name, name2, balance)

Any help appreciated.

Try this:

access.move(name, name2, balance)


Sending a Bitcoin (BTC) to a Bitcoin Cash (BCH, aka BCC) address in Kraken exch. without receiving the private key? Why cant Kraken simply receive full access to Alice account which she is willing to give. Kraken does not have to give Alice the private key. Kraken can create a wallet if that is really necessary or use a wallet that is already created which they have full access too, send the bitcoin to the wallet and then send it from the wallet to Alice BTC deposit account, give the Admin of Alice's Kraken account back to Alice's, therefore, No private key was given to Alice, security is still fully secure, Alice has the Bitcoin in her BTC account now. Alice pays Kraken for there services. Kraken is happy, Alice is happy. Why is this plan difficult?

Basically they don't have enough staff with security clearance to handle manual cross-chain recoveries. So only substantial amount will be considered.

  It is Kraken's policy not to engage in efforts of recovery where BCH
  is sent to an XBT address or XBT is sent to a BCH address. Our last
  three blog posts have emphasized this point. Also, as you said,
  recovering your XBT funds will require manually handling the private
  keys associated to your BCH deposit address. Kraken has extensive
  security policies and procedures in place to ensure the safety of our
  customers' and our own funds. This means that the access to any
  private keys associated with any funds is extremely limited.

Source: https://www.reddit.com/r/btc/comments/6vpuy5/14_of_my_btc_held_in_limbo_at_kraken/


Where to buy huge amounts of Bitcoin? I read the following article:

Bitcoin surging higher after mystery trader buys $344mn in cryptocurrency, Russia Today, February 19, 2018.

Where could the man buy such a large amount of Bitcoin? On an exchange?

Such amounts will not be bought in a single transaction. Instead buying them will be spread out across different exchanges and different periods of time. If this is not done such a transaction would buy up the whole sell order book of an exchange and would run up the price through the roof.

A total of 34k bitcoins is about 3.6% of the volume of the bitcoin market in the last 24 hours. Your Russian friend is a whale by any definition for sure, but 34k bitcoin is not an impossible amount to buy.


How do I set up a fee for my p2pool node? I'm running a p2pool node for dogecoin.

Since running the node costs me some money, I set up a small fee with

./run_p2pool.py --give-author 0 --net dogecoin -f 0.5 -a DSomeDogeAddressIOwn DOGEUSER DOGEPW

but I don't seem to get any fees.
The local hashrate is around 10 MH/s, so I should get at least a few dogecoins.

Basically I used this setup: http://doges.org/index.php/topic,5586.0.html

It is running on an Ubuntu 12.04 Server, everything else works.
When I use the webinterface, "http://example.com:22550/fee" displays '0.5' as expected

Am I missing something?

Found out why I'm not seeing the fees:
The fee payouts are of type 'mined' so in the client history, they don't show up with an address.

http://dogechain.info/chain/Dogecoin/q/addressbalance/DMYSTUPIDADRRESS

Told me that there must have come some coins in.
Wow, such joy!

Edit:
seems like the new client shows to which address it was mined.


Where is the spec of HashCash so that I can implement it in Java from scratch? I would like to implement HashCash in an efficient/fast/garbage-free way. Is there a spec to do so? How can someone go by implementing HashCash from scratch?

Not necessarily answering your question, but I found a HashCash implementation in Java already here: https://github.com/ryancwilliams/JHashCash Perhaps you can contribute or fork it?


Transfer Bitcoin to Google Wallet I need to pay someone who doesn't use Bitcoin. I don't use paypal.

Is it possible to create a Google wallet and add Bitcoin to the balance? I have seen conflicting answers. I believe you cannot do it directly but I have seen sites that claim to give you $1.5 in Google Wallet money for each $1 in BTC you trade.

Is there a safe way to do this or another method?

Google Wallet does not support bitcoin.

You could send him PayPal and then he could use https://xcoins.io to convert into Bitcoin.

Or you could purchase Bitcoin with Paypal from https://xcoins.io and then send the Bitcoin you purchased to his Bitcoin wallet address.

Another option if you're not in a rush is to use https://coinbase.com but buys are not instant for new users as far as I know.

The only reason I recommend xCoins is because you said PayPal and Bitcoin.. and xCoins is the quickest way to get Bitcoin.

NOTE: I work for xCoins as a engineer.


How does one mine Stellar I was able to mine Ripple for a time using boinc, will Stellar offer something like this? are there other ways to mine Stellar?

The Stellar network does not have a mining-based currency. At the network's genesis, 100 billion stellars were created. The only other stellar creation mechanism is inflation. To account for both economic growth and lost stellars, there is a fixed 1% annual rate of new stellar creation. These new stellars will be generated on a weekly basis and distributed via a direct voting method.

Mining in the Bitcoin network:
1) creates the currency
2)distribute the currency
3) verifies transactions across a distributed, decentralized system.

Stellar achieves the first by generating the stellars at genesis. Distribution of stellars is regulated by the Stellar Development Foundation, the nonprofit that supports the protocol. 95% of all the stellars are set to be distributed to as many people worldwide as possible through a series of giveaways specified in their mandate. Stellar achieves the third—decentralized agreement—with the Ripple Consensus Algorithm.
In future, Stellar plans to switch to a new consensus algorithm called Stellar Consensus Protocol (SCP). The technical details of SCP are detailed in a white paper by Stanford Professor David Mazieres.

One can acquire stellars by trading on an exchange, trading within the Stellar network, being a recipient of inflation voting, and/or through the Foundation's giveaway programs.


How are utxos associated with a particular address? Is there a way to add or associate utxos with a particular address without creating a transaction?

Is there a way to add or associate utxos with a particular address without creating a transaction?

No. UTXO stands for Unspent Transaction Output. The only operations on UTXOs are creating and spending them, and both of those operations involve a transaction.


Number of transactions in block why sometimes block has 16 transactions and sometimes over 2000?
I checked it on https://blockexplorer.com/blocks.
Thank you

Since the block size is fixed (but has changed since genesis block) there are 2 main reasons:

Transactions are not all the same size in bytes. One transaction can have multiple inputs and outputs, increasing the size of the tx in bytes.
The market might not fill a block with transactions (esp. in the beginning blocks) because usage is low.


Non bitcoin like blockchains I have been going through a lot of articles lately which stress on the fact that blockchain technology is going to revolutionize a lot of industries like finance, supply-chain, health care, etc. On further research in the matter, I found that almost all the articles only prophesized the same above claim, but none of them had any hint of a solution how it would happen.

Later I searched for libraries and frameworks provided by people and almost all that I saw were forks of Bitcoin Core.

Can someone please tell me some other blockchain schema unlike bitcoin's. And some help in explaining how blockchain, and specifically bitcoin blockchain is applicable in say the health care sector.

That's just bullshit bingo material. They try to get attention by throwing a few buzzwords around. It happens all the time with other terms. Not long until some politician tells a sentence like this:

  I'm expecting exponential, rapid market growth in our big data IoT
  blockchain technology system solution tightly scheduled as a low-risk
  low-cost sales-driven facility revolutionizing the way we think about
  proactive, granular approaches to problems concerning the whole of
  humanity in the digital millennium.

You see, "blockchain" is merely one term in there, composing that bullshit.

Blockchains don't necessarily have to use proof of work but all blockchains contain the entire history of their entries in a way which wastes storage space.

In the case of Bitcoin, that's okay because all of the advantages of blockchains can be used and no better solution is available. But if the data isn't going to be disputed (e.g. because the data is stored by and retrieved from a single entity anyway or because only trusted participants can modify the data), it's just useless.

Banks won't be able to use blockchains because they are centralized entities. They are better off with normal databases. Like relational databases, NoSQL databases, etc. Heck, even just storing files with JSON or even CSV data in them on a file system would be better. And they currently use normal databases. However, they see themselves threatened by Bitcoin as people begin to dislike banks and centralized financial control more and more and Bitcoin subsequently rises in popularity. This is why they write articles, claiming they are researching how they can use blockchains.

If someone has a problem, what they ought to to is to find a solution to it. However, banks take blockchains (which is a solution) and try to find a problem fitting the solution. Not to actually solve the problem but to solve their problem of them losing popularity and trust.

In health care, there may actually be a problem which can be fixed by blockchains. That is, how does a doctor make sure they got all of a patients data with no records having been thrown out because they are unpleasant for the patient but potentially constitute relevant information?

You can imagine a scenario in which all health records of each patient are stored digitally. Each health record has a parent health record, except for the initial one. To add a new record, the record's contents together with the previous record's signature is hashed with a cryptographic hash function and signed by an authority which every day uses a different private key which is then discarded at the end of the day and only the cryptographically related public key is kept and even made public.

It then is impossible to retroactively remove health records from the chain without losing newer records, too.

However, you can easily see how people wouldn't be happy with this and would sue against it. Furthermore, there are obvious problems like people newly entering the system because they used to live in a different country which doesn't use the system.

They may be other uses but right now, most uses of the term "blockchain" other than in regards to crypto currencies are only for the sake of having used a buzzword.

Because it has almost become a tradition to link to this article in such a situation, have the link and give the article a read.


Can we assume that the ordering of vout matches n index in json rpc Just a random transaction for example:

bitcoind getrawtransaction e16829044c498e1d1c8fa9dc831a7c96c3b74f55b984b54a7d48c4d0156ffcf5 1

Gives:

{
    ...
    "vout" : [
        {
            "value" : 0.09076500,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "",
                "hex" : "76a914cc4ac9ecfe26163f4e657e5ce9eee9947d0459b988ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1KdCSYosbepwC4yMKWziwM3ytqWfAGg1n8"
                ]
            }
        },
        {
            "value" : 0.00200000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 04d075b3f501deeef5565143282b6cfe8fad5e94 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a91404d075b3f501deeef5565143282b6cfe8fad5e9488ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1STRonGxnFTeJiA7pgyneKknR29AwBM77"
                ]
            }
        },
        {
            "value" : 0.00200000,
            "n" : 2,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 42d163a80a1fb2579ba05c9dde70152cc1463b19 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a91442d163a80a1fb2579ba05c9dde70152cc1463b1988ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "176JSHRoCTo2jPMFy5ZMR9FHU4LbtZX6Jj"
                ]
            }
        },
        {
            "value" : 0.27422642,
            "n" : 3,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 3871de7b4bd8c08048f8ac112790050406109cba OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9143871de7b4bd8c08048f8ac112790050406109cba88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "169TFWEpspsX9Xp5Hwq6bu5FyEe4syGu2f"
                ]
            }
        }
    ],
    "blockhash" : "00000000000000006053fc5faf2c099f30be416175488b34e947ea44480aae83",
    "confirmations" : 265,
    "time" : 1400729945,
    "blocktime" : 1400729945
}

My question is about the orders of the vout array.  Can we assume that the ordering matches "n"?  Ie.  The first vout has n=0, the second vout has n=1 etc.

The reason for asking is to take advantage of array index lookups instead of having to loop through looking for matching n values.

Yes, that's how inputs reference outputs as well.


Can AntMiner L3+ mine any scrypt coins or just lite coin I am planning to buy ant miner l3+. Can AntMiner L3+ mine any scrypt coins or just lite coin?
Should I buy Antminer s9 or L3+?
However, I can only afford one piece of anyone.

The L3+ is the best option right now (however if you're ordering now, you won't get a new one for some time, and the second hand ones are being resold for huge profits), however this will change as more of them are made/released.

The L3+ is a Scrypt miner, so it could in theory mine any Scrypt based coins, Litecoin being the big one.

Bitmain don't appear to be shipping anything out any time soon, Avalon (http://canaan.io) or Ebit (http://miner.ebang.com.cn) also sell alternative miners, they're not as power efficient as the S9 (and slower), but cheaper, so if you're dipping your feet into the water to test the temperature, it's an alternative.


How to import private key on testnet and verify balance of wallet? I have a python library to create wallets and play around with private key generation and stuff like that.

But i can't find any service / wallet - preferably online - where i could import my generated testnet-private-key and check the balance...

I can get coins thru Testnet Faucet and see the balance of an address on testnet via Blockcypher but where can i test importing private keys on the testnet?

EDIT: I don't really want to download the whole blockchain so some online service would really be great!

I wrote this python library since pybitcointools is no longer supported. You can check testnet balances like this (it pulls data from blockchain.info)

import os
os.environ['CRYPTOTOOLS_NETWORK'] = 'test'

from btctools import Address

address = Address('n2NGrooSecJaiD6ssp4YqFoj9eZ7GrCJ66')

>>> address.balance()
0.55


How to create a p2sh transaction with a scriptsig of OP_true? How can I create a p2sh transaction with a scriptsig containing OP_TRUE only, removing the need for a digital signature, which will be broadcasted and mined?

Also could some one provide an example of such a transaction?

Here you have an example of a transaction spending from a P2PKH output and creating a P2SH output with an OP_1.
And here you have the counterpart, a transaction spending from the first one (with an input script '0151') and generating a P2PKH output.
I've created both using a Python library i'm coauthor of. You can check it out here.


Unconfirmed Transactions on Balance and History Is there any way to see the unconfirmed transactions within the balance of the CoPay's Bitcoin Wallet and get notifications when it receives an unconfirmed transaction?
Because I didn't see my transaction and had to search it in the blockchain to be sure that it exists .. and I remember that some other wallets already do this with an UNCONFIRMED tag.

You should enable this feature in copay settings:


Hashrate required for Finney attack on SatoshiDICE Say I have an address with 1000 different 0.01BTC outputs. I send all of the outputs (in separate transactions) to the 48% SatoshiDICE address. At the same time, I craft a transaction for each of the outputs that sends the money back to myself. Once I find out which of the bets succeeded, I start mining. I include the SatoshiDICE bets where I won, and I cancel the ones where I lost (using the conflicting transaction I generated earlier). So basically if I mine the next block, I cancel all the bets where I lost, and only keep the ones where I won. My question is, what percent of the network hashrate do I need to make this profitable?

There is no magic barrier above which you will make a profit, it's a tradeoff. The larger your hashrate the higher your chances of successfully completing the finney attack. The odds at SatoshiDice are a bit at your disadvantage, but in a system where you'd get back what you wagered in expectation you'd always make a profit.


How do I download specific blocks directly from peers, without downloading the entire chain? My dev environment is quite limited in terms of bandwidth and storage. I need to make a database out of transactions containing opcode 0x6a since a given epoch.

[Scan blocks, going backwards from the latest, until a given blockheight]
[If the transaction outputs contain OP_RETURN, save it with associated metadata]

Is there a way I can do this with bitcoind without having to store the entire chain?

You could use the pruning mode to only store blocks after the height you are interested in. I think you'll still have to download it to verify the past history, but you won't have to store it all on disk.

See this RPC call for more information.


find a CTransaction from a prevout in Bitcoin source code I'm trying to come up with this function: CTransaction getTxFromPrevout(COutPoint prevo);

The idea being... when a new transaction is about to be validated, it will go through all of it's tx.vin[i].prevout and check for them funds (utxo).

So I want to find and identify the CTransaction tx such that tx.vout (of type vector<CTxOut> ) has any i element such that it's CScript is a normal payment (tx.vout[i].scriptPubKey.IsNormalPayment() == true) and the tx.vout[i].scriptPubKey has within it a match for the prevo

If I use a web based explorer I can take the prevo and extract the hash from it, then search the web for the tx... but that doesn't help me, since I want to be able to use this within the code itself, adding this new function. I tried following the code on an explorer and it uses the rpc api, and it was not easy to follow.

What I'm thinking is that there should be a utxo database structure or class that will make this easier to crawl through. If I suppose there is such a class named UTxODatabase - that I know there isn't, but just imagine there is - then the function I need to code would look like this:

CTransaction UTxODatabase::getTxFromPrevout(COutPoint prevo);

/*************************************************/

EDIT 1:
I put this at the very end of the CheckTransaction() function, in main.cpp

BOOST_FOREACH (const CTxIn& txin, tx.vin){
        std::cout << "txin.prevPubKey.ToString(): " << txin.prevPubKey.ToString() << std::endl;

Then I've ran the wallet and the output shown for each txin was just: txin.prevPubKey.ToString:, without any prevPubKey data.
I am really confused about this.

My thinking was that if I'm able to get those prevPubKeys from the CTxIn, then I'll be able to track the utxo. But why would there be no information on that member of the txin at that stage?

I think what you want is to use this function:

bool CCoinsViewMemPool::GetCoin(const COutPoint &outpoint, Coin &coin) const

You can find the definition here: https://github.com/bitcoin/bitcoin/blob/v0.17.0.1/src/txmempool.cpp#L885

It will set the Coin object you pass as an argument. For an example of usage, see bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints) in https://github.com/bitcoin/bitcoin/blob/v0.17.0.1/src/validation.cpp#L364

This is supposed to "provide access to all Coins which are either unspent in the
 * base CCoinsView, or are outputs from any mempool transaction".


Litecoin miner crash with no apparent reason I have a machine with 1 R9 X280 running on Intensity 13. It ran for 2 weeks with no problems, and now it's been crashing every day, or even up to 4-5 times a day. (Crashing as in  rebooting with no actual reason in Event viewer.)
The card is running at 73-76 Celsius; it is in an open case.
I tried disabling the CCC, but that didn't help.
What can I test to look for the problem? It is a brand new computer.
Details
CGMiner 3.7.2
Mining command:
cgminer --scrypt  -o x -u x -p x --gpu-platform 1 -I 13 -g 2 -w 256 --gpu-memclock 1500 --gpu-engine 1080 --gpu-powertune 20 --thread-concurrency 8192 --auto-fan --gpu-fan 30-75 --temp-cutoff 90 --temp-overheat 85 --temp-target 70

Your settings look good.  If it was working OK with same settings for a while, then started acting up, either you have a software upgrade that's causing issues, or (more likely) you have a new/developing hardware issue.

I had one doing the exact same thing last week (would run for a few hours and then reboot). I ended up reloading the os and then from windows to linux (bamt) and it was still doing the same thing. Under closer inspection, turned out two of the gpu card's power wires were burned straight through and had broken off (both yellow ones in my case).  Don't know how it worked at all with two missing power wires, but maybe it was getting some power from the motherboard and only needed the extra capacity under heavy load.  Either way, I replaced the burned out pciex power connectors and it's been running with no issues for a week now.


What are orphaned and stale blocks? If I understand it right, a stale block is a block for which an earlier confirmation has been found and was accepted by majority of people. This block is considered invalid and is later never used.

But what is a orphaned block. How is it created? How is it verified that it is orphaned and what is done to the orphaned block?

There are several definitions with overlapping meanings.
The first is perhaps best called extinct blocks. These are blocks that were produced by building on a block that is no longer the active tip of the chain. Some nodes may have considered it to be the best block at some point, but they switched to another chain which does not contain the relevant block anymore. They are valid, verified, and their ancestry up to the genesis block is fully known - they're just not currently 'active'. They are sometimes called stale blocks (typically in the context of mining software realizing it built on old data) or orphan blocks. The latter name originates from the fact that payouts from extinct blocks are denoted as "orphaned" in the reference client (referring to the fact that their coinbase transactions are now orphaned).
However, there also exist real orphan blocks, with orphan in its original meaning of "having no parent". These are blocks received by a node that does not have its entire ancestry (yet) and thus cannot be validated. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The client does not show these, so when people talk about orphan blocks, they are most likely referring to extinct blocks. Note that since Bitcoin Core v0.10, there are no such orphan blocks anymore, due to a significant change in the download mechanism.
Terminology is confusing here :)


Blockchain android app did a stupid thing! First of all, Sorry for my terrible English!

On Sep 24 i installed the BLockchain.info android app, before that, i signed up in their web application and made my account strong with 2-step-verification and wallet recovery phrase.

When i used the app, i logged in first time and it wants my verification(email and phone number 2FA), I just fill them and wait for app, but after it all of my bitcoins send to another address without my confirmation ( the address is 16hUh5k9V41EMzcuYW3kmkTCzyqju7RXr1 and yesterday had a another transaction ).

So what's going on exactly?

Their support says it must be hackers or malware, but how? It was their app.
After all, i just installed the app on 3 different devices, each of them shows the same picture in attachment with same address.

Please help me, and tell me what i must do?

Really, I'm SORRY FOR MY ENGLISH!

It was my fault. What a stupid who i am. I'm really sorry.
It is fake application:
https://play.google.com/store/apps/details?id=android1.blockchain.piuk.bitcoinwallet

Report application to google If you can to prevent from another SCAM.
Thank You.


Canceling my pending withdrawal BTC How can i cancel my pending withdrawal BTC of $1,240. Its been pending for 2 days. it has no confirmations and on the blockchain it says it receives 0 and sent 0. Someone PLEASE help me!

You can not cancel the transaction, but what you can do is to spend that same UTXO to a different address of yourselves (effectively a double-spend).
The reason it has no confirmations is likely that the fee is not sufficient for miners to prioritise your transaction in their mempool. As long as it has no confirmations, you can still double-spend to an address of your choosing.


Unable to open Backup binary file Linux I recently reinstalled Linux mint; I backed up my wallet, and I am unable to import the backup created from the original wallet (Qt version 4.8.6.) to the newly installed wallet(Qt version 4.8.6.) I have just installed. When I try and open up the backup (binary file) using Bitcoin-QT a textbox appears with the message:

  Payment request file can not be read or processed! This can be caused by an invalid payment request file.

Can anyone help with this please? Or, just point me in the right direction.

To restore a backed up wallet.dat file, you need to replace it manually.

Just overwrite the one in your data directory (see https://en.bitcoin.it/wiki/Data_directory to find it for your platform).

Opening the file with Bitcoin-Qt means you're trying to process a payment request; it's not for opening a wallet.


Converting satoshis to bitcoins issue using PHP I am having PHP calculation problems (I think - i am reasonably new to PHP).

I am using

function convertToBTCFromSatoshi($value){
    $BTC = ($value / 100000000 );
    return (float)$BTC;
}

If $value = 10000 the result is correct of "0.0001"

Yet if $value = 5000 the result is "-5.0E-5"

Any ideas please :-)

You really should not use floating point math for precision decimal values.  It is a little-regarded truth of computer programming that when you're dealing with money you should avoid the usual IEEE floating-point math like the plague.

This is the reason why Bitcoin transactions store values as 64-bit integers.  Because storing them as floating point numbers is error-prone.

For example, in your interactive PHP shell you can do something like this to find out where your math begins to break:

php > echo 10000.00000001 * 2;
20000.00000002
php > echo 100000.00000001 * 2;
200000.00000002
php > echo 1000000.00000001 * 2;
2000000

I'm running 64-bit PHP, too.  If you are running 32-bit PHP the situation becomes pretty dire.

The take-away here is that overall precision of floating point numbers is limited.  The bigger your number, the fewer meaningful decimal places it can have.

The correct way to address this problem is to use PHP's BC Math functions.  You keep your data as strings, and BCMath will let you perform arbitrary-precision computations.  It isn't as fast as floating point math, but it isn't exactly slow either.

/** Convert Satoshis to a string that can be displayed to users.
 *  input: $value Integer or string that can be parsed as an int.
 *  output: string (eg: "1.00400000")
 */
function convertToBTCFromSatoshi($value){
    return bcdiv( intval($value), 100000000, 8 );
}

If you want to trim the zeros from the end of the output, you can use the trim() function:

rtrim($value, "0"); // trim zeros from the right-hand side


How to find my transaction from root of Merkle Tree How could I verify my transaction from the root of Merkle Tree.

First of all, you need to use gettxoutproof

$ bitcoin-cli help gettxoutproof
gettxoutproof ["txid",...] ( "blockhash" )

Returns a hex-encoded proof that "txid" was included in a block.
...

you receive data including your transaction id with another txids (privacy purpose).
then you need create empty merkle tree and place txids inside leafs, check this link to know how you can do it. You need to work even with little and big endian

After that you have to concat leafs and do SHA256 twice until the merkle root.


Is there a service providing historical data for crypto exchanges? I mean not just prices but candlestick and other data that usually is available on FX platforms?

This is supplied by bitcoincharts.

http://api.bitcoincharts.com/v1/csv/


What happens if I use same k twice in DSA algorithm? To sign a message , we choose nonce k but what happens if we use same k twice to sign a message using DSA algorithm?

If you sign two messages using the same nonce, then it is possible for someone to derive your private key. See How do you derive the private key from two signatures that share the same k value?


Why is the mining fee so high? I recently bought $15 CAD worth of bitcoin from an bitcoin ATM nearby, only to receive $5.87 CAD worth of bitcoin(0.00047179BTC).

I am assuming this is because of the miners fee.

Why is it getting so high? Will it eventually drop? In total I payed a over 50% in miners fees.

Edit #1

Here is a link to the transaction https://live.blockcypher.com/btc/tx/7a24badf6dc3e7c7c788739e1e7d035fe0a10332d9f0531b0589f33ae8d9f953/

https://Blockchain.info shows the transaction has a fee of 0.00063014 BTC, or about $7.77* CAD.  This seems to indicate the ATM took around $1.50 for the transaction, and the fee sent in the transaction by the ATM was set to 155 satoshis per byte.  Since the transaction is 404 bytes, that makes for a total fee of 0.0006262 BTC for the transaction.

https://bitcoinfees.earn.com/ shows that 155 satoshis per byte is a reasonable transaction cost that will result in the transaction being processed in around 5 to 15 minutes.  If the ATM provides the ability to specify the fee per byte, you might be inclined to set it to a lower amount knowing that the transaction will take a longer time to be processed, allowing you to retain more of your dollars.

*as of 2017-11-28 3:08 UTC.


How this is possible to generate blocks with no transactions? I found this block in blockchain explorer. It is pretty well confirmed, but it has no transaction inside, except "Newly Generated Coins" one. How this can be possible and what for?

Additional question: If this is so easy to generate such blocks, what stops miners to generate these (lightweight) blocks as many as possible to earn new bitcoins? Thanks.

How this can be possible and what for?

A miner is under no obligation to include transactions in a block, but there are incentives for them to do so:

the miner will make more revenue, since they will collect transaction fees
miners are invested in their operations, and thus want to see bitcoin succeed. If no miners processed transactions, bitcoin would not be functional (and thus miners may lose money on their investment)

There are some times that it makes sense for a miner to make a block with no transactions in it, for example when a miner hears about a new block on the network, they may first validate the header, and then afterwards validate the entire block. The miner wants to begin mining on top of the new block ASAP (mining on an old block would be a waste of money), but they have a small problem in that it takes a tiny bit of time to download and validate the entire block's contents. During this time, the miner will be unsure of which transactions are in the new block, so in order to guarantee they do not accidentally re-use an already-confirmed transaction, they will attempt to mine an empty block while waiting for the validation of the previous block to finish.

Even though this only happens for a very short amount of time, given enough blocks, probability says that eventually, a miner may find a valid, empty block in the seconds following the last block.

  Additional question: If this is so easy to generate such blocks, what stops miners to generate these (lightweight) blocks as many as possible to earn new bitcoins?

The number of transactions in block does not affect how easy it is to mine a block. Finding a valid empty block is no easier than finding a valid full block.

Some related questions that may be of interest:

How often does a block have only 1 transaction?
Why does antpool mine so many empty blocks?
Creating empty blocks vs full blocks


How is network time enforced? I've seen how nodes gather network time data, but how is it enforced in the blockchain?

Are all of the timestamps digitally signed and included in the block as proof?

First, where do these time samples come from: when your client connects to peers in the network it exchanges a version message with them. Among other things this message contains the current UTC timestamp at the peer. Your client then calculates an offset between the time at its peer and its own clock. The network time is simply the local timestamp + the median of all offsets of its peers. So you can see that we have a relatively simple attempt at synchronizing the clocks in the network, but depending on the sample of peers you connect to they can still vary wildly.

About enforcing the timestamps: there are very few places the timestamp appears in the communication between peers, likely the only place where it is actually enforced is in the block header. Should a peer receive a new block while being synched with the network, and the timestamp differs more than 2 hours from its local timestamp, it'll discard the block as invalid (source). The idea behind this check is that a client could attempt to skew the perceived difficulty seen by a node that is synchronizing with the rest of the network.


Learning as I go but needing help understanding the concept So my first and main question is how do you get bitcoins? Do you use money off a card to purchase them, do you win them, or what?

You can get bitcoins by mining them. This is currently done by special mining hardware. You can mine alone or as a part of a larger mining pool. Before that you should buy this relatively expensive hardware (for example AntMiner S9).

The usual way to get bitcoins is buying them with regular (so called fiat) currencies (like USD, EUR...) through bitcoin exchanges. More on the process: https://www.investopedia.com/terms/b/bitcoin-exchange.asp. To get more details you should check on particular exchanges mentioned in the article (like for example: https://www.kraken.com/).


Litecoin transaction fee structure? I am exploring litecoin and I am confused about transaction fee.

What is the minimum recommended fee per kb?
Is the fee structure enforced by the miners or only by the clients?
If I somehow craft and send a transaction with zero fee, what will happen? (will it not be accepted by the network or will it be accepted and eventually confirm?

The client calculates the priority of the transaction, which is defined as coin days destroyed (i.e. number of coins times coin age) divided by transaction size. If it is above a certain level, the transaction may be sent for free. Otherwise, a 0.001 LTC per KB fee is enforced by the client. In general, this also happens to be the minimum recommended fee per KB.

Some miners choose to enforce these fees and won't include a transaction in a block they mine if it does not have enough fees. Other miners don't care and include any transaction in their block.

As you can see in an example block, most transactions of any decent size don't require a fee. Generally, if you send 1 LTC which you did not receive very recently and is not composed of a lot of small input transactions, you do not need to pay a fee. If you try to send a transaction with zero fee when it needs one, miners might skip over your transaction, and you'll need to wait until some miner is willing to include it in their block. If you grow tired of waiting, you can broadcast another transaction using the same coins (but this time with a fee). It will be included in a block, and the previous transaction will be regarded as a double spend and thus be rejected and disappear from the network.


How do Cloud Mining Websites Divide Profits? I have a simple question. Suppose that I sign up with some cloud mining service. I would like to know a bit more about how the system works. Let's say that the cloud mining service I use has n users, N = 1,...,n}, each user i contributing w_i> 0 CPU cycles to creating the block. In order to complete a block, T cycles are needed (this is a simplification, I assume that the number of cycles needed is a random variable; however, you can reasonably talk about the expected number of cycles).

We managed to create the block and got a reward R for it (R = 0 is reasonable, that just means that resources were committed, but we failed at getting the block).

How is R shared? Is it proportional to the number of cycles? Is it just equal division? Is there a more clever method involved?

Bonus question: what is normally the ratio between the amount of work invested and the actual work needed? Is it the case that the number of cycles committed is much greater than the number of cycles needed? Is there even a need to commit cycles, or is it the case that once a block is done, the pool moves on to mining another block?

I have tried to find an answer online, on the websites of the big cloud mining companies, but all they offer are promises of revenue, rather than an explanation of the revenue division mechanism.

There are many different reward schemes used. One thing almost all of them have in common is that they base the rewards on "shares". Each miner earns one or more shares by producing hashes that are sufficiently low. Essentially, miners prove they're actually trying to find blocks by providing a sample of their best attempts to the mining controller.

Reward schemes generally try to do two things:

They try to even out the reward so that miners have less variation in the rewards they get if they mine at a constant rate.
They try to prevent people from strategically joining or leaving different mining pools to prevent schemes that give miners more than their fair share.

The simplest scheme is called PPS (pay per share). With PPS, each share earns a fixed reward, regardless of how well or badly the pool as a whole does. This provides the least variation to miners, but gives the pool operator the most risk.

One of the most common sharing mechanisms is called PPLNS (pay per last N shares). With PPLNS, when a block is found, the reward is divided among those who earned the most recent shares, proportional to the number of shares each miner found during that window.

Other schemes can get fairly complex.