How to send user input data(Bitcoin address) from iPhone to server and then send Bitcoin back to user's Bitcoin address? Background I just got started yesterday learning Python and I'm currently building my first iPhone game.

What I'm trying to do is create a Bitcoin Pot Jar inside an iPhone app like Sarutobi:https://itunes.apple.com/us/app/id932194840?mt=8

You can test out the game to see how it works. All the user does is paste their bitcoin address in an input field, somehow this data goes somewhere and then the user receives randomly small tip during gameplay. How do I create something like this? What code is used to make this work?

How do I send a Bitcoin address from an iPhone to my server?

Basic Python client socket example:

  Server side:

import socket

serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.bind(('localhost', 8089))
serversocket.listen(5) # become a server socket, maximum 5 connections

while True:
    connection, address = serversocket.accept()
    buf = connection.recv(64)
    if len(buf) > 0:
        print buf
        break

  Client Side:

import socket

clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientsocket.connect(('localhost', 8089))
clientsocket.send('hello')

How do I make a Bitcoin transaction using Python from my server?

How to make a simple payment with the python-bitcoinlib?

  (Rewritten for brevity)

  Run
  bitcoind,
  install python-bitcoinlib, then run this code:

from bitcoin.core import COIN, b2lx
from bitcoin.base58 import CBitcoinAddress
import bitcoin.wallet
import bitcoin.rpc

rpc = bitcoin.rpc.Proxy()
addr = CBitcoinAddress('1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T')

txid = rpc.sendtoaddress(addr, 0.001 * COIN)
print(b2lx(txid))


Feasibility of using Ring Signatures with CoinJoin Technique There is a Ring Signature implementation in C++ by Libbitcoin team. We can find the details in the following GitHub repository. Is it feasible to use Monero like Ring Signatures together with the CoinJoin Technique in Bitcoin without a soft fork on the core protocol.

Using ring signatures off-chain to form a coinjoin transaction sounds hard, especially since because BTC doesn't have ring signature support without a hard fork or a soft fork.
You may find Cashfusion, an instance of CoinJoin shuffling, interesting, it's fully applicable to BTC and it uses TOR, which is simpler than Ring Signatures.


watch-only addresses doesn't work properly in bitcoind v0.10.0 I imported a watch-only address to bitcoind by using below command:

bitcoin-cli importaddress <myaddress> "testacc" true

According to release notes it should support some rpc calls for this watch- only address:

  The following RPCs have optional support for watch-only: getbalance, listreceivedbyaddress, listreceivedbyaccount, listtransactions, listaccounts, listsinceblock, gettransaction.

Even it is not written in release notes, i can catch new transactions by calling listunspent. But the problem is when i try to call

bitcoin-cli listtransactions testacc

or

bitcoin-cli listreceivedbyaddress 0

the first call returns an empty array and the result of second call doesn't contains any information about this watch-only address. What may be the problem here?

It seems that v0.10.0 is not documented yet, apart from the release notes. Referring to the github repository: Issue #4045

It appears that a boolean watchonly argument is needed at the end of those commands. Thus below commands would work:

bitcoin-cli listtransactions testacc 100 0 true

or

bitcoin-cli listreceivedbyaddress 0 false true [account, includeempty, includewatchonly]


How are transactions collected into new block? How are the latest transactions collected into new block to send them to miners for hashing? Which part of the network is responsible for giving miners the correct block to hash?

The mempool as it is called, stores transactions that are propagated by the peer to peer network.  Miners have the ability to select which transactions they include in the block.  It is beneficial for the miners to collect as many transactions as possible so they can obtain the most amount of fees that they can.


Lightning?full node question I'm running a full node as well as a Lightning Node with 4 channels open. I also have incoming ports enabled. I've noticed that my balance varies daily by a few thousand Sats. I'm new to running a node so wondered if someone could explain why this happens (or maybe link me to an article explaining).

Many thanks...

If it is only the balance of your channels that is changing I would assume that your node is routing payments. The lightning network is all about forwarding payments.

So the following explains what could have happened assuming you have two channels to a node A and a node B:

  (A)--20sat------40sat--(you)--30sat------50sat--(B)

meaning:

node A has 20 satoshi
your node has 40 satoshi + 30 satoshi = 70 Satoshi
node B has 50 satoshi

Let us assume B wants to pay 15 satoshi to A this does work via lightning and via your node. The channels will update their balance:

  (A)--35sat------25sat--(you)--45sat------35sat--(B)

meaning:

node A has 35 satoshi
List item
your node has 25 satoshi + 45 satoshi = 70 Satoshi
node B has 35 satoshi

Probably your node even takes some routing fee which could have a standard value of at least one satoshi in that case your final balance would look like this

  (A)--35sat------25sat--(you)--46sat------34sat--(B)

meaning:

node A has 35 satoshi
your node has 25 satoshi + 46 satoshi = 71 Satoshi
node B has 34 satoshi


Is receiving address description public domain? Exploring Electrum and see that I can add a description when generating a receiving address.
The description cannot be edited later... would you happen to know why? And is that description public domain?

I don't know why the description cannot be edited, that sounds like an implementation quirk. You could try looking at the Electrum documentation or inquiring on the Electrum GitHub project, if nobody else here can tell you.
The address description is your reference to identify what invoice the address belongs to. Some wallets include the description when sharing the address as QR-codes, or even have separate fields for your reference and a message to the sender. Generally, wallet addresses are neither registered nor gossiped on the Bitcoin network, they are just transferred out of band from receivers to senders when the receivers indicate how they'd like to get paid.


How to work out the balance for an HD Wallet extended private key? I am working in C# with NBitcoin.  I have created an extended master private key, and I can create the hierarchy of derived keys.  In TestNet, I have requested some coin from a faucet, and the transaction has gone to the test address (checked in testnet.blockexplorer.com).

I have a local testnet chain running (and a mainnet chain, but testnet for now is all that matters) and I am trying to interact with it via the bitcoind RPC, as per the Bitcoin developer examples.

How do I work out the balance (value held) on my private key, that pairs to the public key, that generated the receiving address?  Am I right in thinking that the RPC bitcoind client will not show this, as it maintains it's own keys?  If so, how can I query the blockchain for transactions on this address?  There is an RPC to import an address, but that seems like a kludge.  I should be able to do what the bitcoin core does for it's own local addresses, but for my locally generated addresses.

Thanks in advance for any guidance.

I have since found out that you can only use the bitcoin core to find addresses that are generated in the bitcoin core wallet.  You can add external addresses to the wallet, but then you need to re-index.  Code changes are in the works to add addrindex=1 to the config, which will index your local chain for all addresses.  Alternatively, you can use a block explorer website API service, or run Insight on your own chain.  So, no easy answer.  Probably best to use website APIs initially, and updated bitcoin core in the medium term.


2nd 'air-gapped' computer / cold wallet setup for travel I travel quite a bit and don't want to lug around a 2nd 'air-gapped' computer. I know that connecting a hardware wallet like a Ledger Nano S to the Ledger Live desktop app running on a computer that's connected to the internet not considered a 'fully cold' wallet setup.

I asked if a non-networked VM would do but it sounds like there's no extra security with that.

So, what would be a good solution for a 2nd 'air-gapped' computer for travelers? Perhaps Tails installed on a USB stick or 'OS on a stick' products that are out on the market, such as the Intel Compute Stick:

https://www.amazon.com/Intel-Compute-Computer-Processor-BOXSTK1AW32SC/dp/B01AZC4NHS

https://www.amazon.com/Intel-Corp-BOXSTCK1A8LFC-Compute-STCK1A8LFC/dp/B00W7KAABK

I'm looking for a solution where I can use my laptop's screen and keyboard.

This seems a lot like an XY problem. For the vast majority of users, the threat model simply does not require more guarantees than those provided by a solution such as Ledger.

Naturally, if you are dealing with very large amounts, you would be wise to take better steps to secure it. But something like a Ledger, which will parse the tx being signed and display the outputs on the Ledger itself prior to signing, should cover most use cases.

Additionally, as Chytrik mentioned, you have wallets such as the Cold Card which can operate without being directly connected to a computer at all, transferring Partially Signed Bitcoin Transactions via an SD Card.

Beyond that, if you really do need the security benefits offered by a fully offline computer, you should consider buying a cheap netbook or laptop, epoxy the ports, strip out any networking hardware, and verifying it as far as you can to be in a secure state - If you are genuinely moving amounts while travelling that merit that kind of security, then your best bet is to carry the extra 800 gram to 1 kilogram of weight.


How i use bit coin api with my project? How to use bitcoin api in my code  or how i integrate it with my code ?
it required any charge ?

In order to use the Bitcoin API, you need to either run bitcoind, or run Bitcoin QT with a server parameter and also having RPC username and password set (in bitcoin.conf file). After that, you communicate with it over JSON RPC at port 8332 (by default).


WitnessScript vs. Script Witness In BIP 174/PSBT, there is a PSBT Input key-value pair called "PSBT_IN_WITNESS_SCRIPT" (0x05) and another called "PSBT_IN_FINAL_SCRIPTWITNESS" (0x08). What is the difference between a WitnessScript and a scriptWitness?
From what I understood, a witness script is the witness data for a single input (the signatures and scripts that unlock it). Is the scriptWitness something different?

PSBT_IN_WITNESS_SCRIPT is specifically the actually executed script for a P2WSH or P2SH-P2WSH scriptPubKey being spent. It is added by an Updater who knows it.
PSBT_IN_FINAL_SCRIPTWITNESS is the witness stack needed to spend an output, including scripts, signatures, public keys, ... whatever is needed. It is created by a Finalizer, using other fields necessary (including PSBT_IN_WITNESS_SCRIPT) to produce it.


Shower thought: would continually broadcasting 1mb blocks help with scaling? Currently, when a miner mines a block, they broadcast the next 1mb block and the mining competition begins on that block.  It will take 10 mins for the block to be mined.  In that 10 minutes, the network is not being used for block transmission.  We're fully engaged in compute.

What if, at an agreed block in the future, the bitcoin protocol changed such that:

The winning miner broadcasts a 1mb block in the usual way and the network gets mining.  Call this CB (current block).
The winning miner continues to broadcast 1mb blocks every P seconds. Call these blocks NB1...N (next block)
All miners, currently busy mining CB, now are also in the background assembling a larger block from all the NB1...N blocks
Once a miner mines CB, its announced to the network, along with a new 1mb block, called LNB (last next block)
All miners now assemble a new larger block from LNB and all the NB1...N they already have, and begin mining on it this larger "goldilocks block" - a block that is just about the right size given what the network can handle in terms of throughput.

P is tuned to allow fair propagation of the NB blocks.  Lets say it's 60 seconds.  This would make the goldilocks block an effective 10MB in size.

I don't know if this idea works or not.  It's a meditation retreat thought more than a shower thought, but I wanted to bounce it off people who might know better, so, if nothing else, at least I can learn something :)

Thanks for listening.

That's essentially what Bitcoin NG does.

There are some differences between your suggestion and theirs though.

The first block is a "key" block. It contains no transactions, but does contain a key to sign the next blocks, and a description of how to split the block reward.
The blocks afterwards are "microblocks." These include transactions.
The next key block commits to a specific set of microblocks. This is to prevent the miner from signing a new set of microblocks that include different transactions.


What founders obliged to do if their ICO hadnt raised the required sum If ICO hadnt raised the required sum is it considered failed and what founders of the company obliged to do with sold tokens and their investors?

It depends by the terms of the ICO your are investing in.

Some ICO will refund users if they do not reach a minimum amount of funds before the end date scheduled for the ICO itself.

Some others ICO can however hold the funds also if they do not have reached the maximum cap and if they haven't set a minimum cap to consider ICO successful.

Every ICO has its own terms & details, and different specifications about timelines, roadmaps, coins/tokens distribution etc.

You should do your due diligence and read carefully the ICO terms each time you are willing to send funds to any projects.

Hope this helps.


Wallet.dat in the mobile hard disk is not backed up after sending Bitcoin Wallet.dat in the mobile hard disk is not backed up after sending Bitcoin, what can i do if the data recovery cannot found it? I have the original wallet.dat and private key， but there are no coins in it. help !!!

there are no coins in it.

Bitcoin wallets do not really contain coins. The only important information in a Bitcoin wallet is the private key (or several if you imported several rather than sweeping). Bitcoin wallets are more like your key-ring and not like the leather wallet in your back pocket.

Knowledge of how much money you control is in the public shared/replicated blockchain.

A wallet will typically show you a "balance" which is an amount it has calculated by examining the blockchain. A "full-node" wallet might not show the correct value for the balance if it has not yet "synchronised" its copy of the blockchain. An SPV wallet might show the wrong amount if it cannot contact a Bitcoin full-node.

  Wallet.dat in the mobile hard disk is not backed up after sending Bitcoin

Although frequent backups are a good idea, you should be able to recover control over all your money just by using the private-key(s) (or seed-phrase for some wallets) to recreate your wallet. You should practice this sort of recovery. Neither the private key nor the seed-phrase change when you spend Bitcoin.


getrawtransaction not working for 0th BTC block transaction I am trying to insert BTC blocks and transactions in MONGODB collection from count 0 using Python3. getrawtransaction is giving output for block 1 but not for block 0. Can somebody help me why this happening?

It's a result of a quirk from the original Bitcoin client which has been carried forward to today. Originally, the UTXO database held entire transactions; it was similar to/basically the same as the transaction index that exists now today. However the original Bitcoin client had a bug where it did not include the transaction data of the genesis block. This is because the genesis block was not processed like every new block so it's data never made it into the UTXO database. Because it was never part of the UTXO database, it affects consensus so this bug cannot be fixed without a hard fork.

Fast forward to today and the genesis block is still not processed like other blocks in order to keep UTXO databases consistent so there is not a hard fork. This also means that the transaction in the genesis block won't be part of any databases, including the transaction index, which is why you cannot look up that transaction. Fixing this so that the transaction were added to the transaction index would require significant changes to fix this one special case as the block cannot be processed or it may cause a hard fork.

Instead of trying to query the transaction, you should use getblock using verbosity level 2. This will decode the block even further to give you the transactions decoded instead of just their transaction ids. Since the block itself is known and in the block index, the block can be fetched and decoded so yo ucan get the transaction data that way. In fact, I would recommend that you always use getblock with verbosity 2 so you can get the block data and all of the transaction data decoded with one RPC instead of needing multiple to fetch each transaction in a block.


Would it be possible to change the p2p protocol used by the bitcoin-clients without a hard-fork? I had a look at https://en.bitcoin.it/wiki/Protocol_documentation where the p2p protocol is documented. Although it states incompleteness I thought it is a good starting point to understand the protocol.
To my initial understanding the protocol is based on c-structs that are directly sent over the wire. This makes implementations in other languages more complex.

Would it be possible to introduce a new protocol based on a well known communication method (for example JSON) and make a smooth transition between the protocols? For example with bridge nodes, which are using two protocols in a transition period?

Yes, the p2p protocol itself is not consensus-critical. Of course there can not be two completely seperate networks, so you will have to take care to create bridges between the two. But other than that you could make a sneakernet p2p network where people exchange USB sticks if you like.


Why doesn't directory.io list addresses starting with 3? Why doesn't directory.io list addresses starting with 3? I have no idea why it is so.

Directory.io is a joke (see FAQ), or rather an illustration of just how vast the Bitcoin address space is.

It just shows standard P2PKH addresses, which don't include addresses starting with 3.


Do I have to try to mine bitcoin in order to verify peoples transactions? I started investing in bitcoin about a year ago, did minor research and decided mining wasn't worth it because of the odds against finding a bitcoin.  Lately I've started wanting to verify peoples transactions because of the high price of bitcoin and because from my understanding if you verify a transaction you get a small cut for the work of your computer.
The thing is I still don't know if I want to mine, I can't leave my computer connected to the internet all day and have it's processor tied, but from the research I've done I am under the impression that in order to verify transactions I need to be mining as well.
So I guess my question is, can I verify transactions without trying to mine bitcoin, can I do it here and there when my computer is free and connected to the internet, and is there any resource I should read to help get me started?
Thanks for the help, sorry for the noob question.

Verifying the validity of transactions is not the same as mining. Verifying transactions means that you are just running a full node; mining is taking those transactions and putting them in blocks so they are committed to the blockchain. You can run a full node and verify transactions, but you won't get compensated for it. Only miners can earn money as they are spending the energy and work required to generate blocks.


collecting block reward and transaction fees i was reading document about transaction data and there seems to be two contradicting paragraphs:

Every block must include one or more transactions. The first one of these transactions must be a coinbase transaction, also called a generation transaction, which should collect and spend the block reward (comprised of a block subsidy and any transaction fees paid by transactions included in this block).
Blocks are not required to include any non-coinbase transactions, but miners almost always do include additional transactions in order to collect their transaction fees.

my questions are about coinbase transactions and transaction fees:

is a coinbase transaction automatically added (ie: assumed by consensus) for each block, or do miners have to add it explicitly as the first transaction in each block? if so, how do they mark it as a coinbase transaction? is it enough to set no inputs and list it as the first one?

how do miners collect transaction fees? do they have to explicitly add non-coinbase transactions with their own address as output? if so, do fee-collecting transactions have the same type as other transactions, or are they special in some way?

the first paragraph of cited text seems to imply transaction fees in a block can be collected through the coinbase transaction, but the second paragraph seems to imply miners need to explicitly add non-coinbase transactions to collect transaction fees; if miner M wants to collect fees from a transaction A->B, must M also include an additional transaction A->M besides A->B? if not, how do others know where the fees are collected, that is to say, the address of M?

Miners independently create coinbase transaction for block. To create coinbase transaction this transaction should be first in block and have only 1 coinbase input. Coinbase input means that outpoint transaction is 0000000000000000000000000000000000000000000000000000000000000000 and output index is FFFFFFFF. Inputs amount fro transaction calculated like block reward amount according to block height, plus all fee amounts for all other transactions inside block. Miner able to take this total amount on outputs. Miner specify own address and amount of block block reward plus fee reward. In case the miner incorrectly calculates amounts and specify greater than expected, block will be rejected by other nodes. In case miner specify lower block will be accepted, but miner lose money.

Example in mainnet when miner lose all reward due to an error:

https://bitaps.com/410995608537d591d6ce5ff2a7966fa84f891c5e2269ef85e8ecdb68d5188f9b


Scrypt based merged mining pools Does anyone know why there are no Scrypt based merged mining pools out their yet? I would imagine that if it was possible it would have been done already. There is no problem to do it with SHA-256 based coins, so why can't we do it with Scrypt?

Found a helpful post at litecointalk:

  It won't work because the aux work must be explicitly provided by the merge coin.  All of these coins cloned from Litecoin lack that code as Litecoin doesn't have it.  As a result you cannot merge mine these coins.

  It is the same reason you can't merge mine Terracoin or Freicoin with Bitcoin.  Freicoin considered it in the past as means to stabilize their network, but I'm guessing they decided against it because they are afraid of their value collapsing even more.  Trouble is none of the small PoW coins are able to maintain a stable network if they are subject to sudden reorg attacks at any moment as many of the scrypt clone networks often experience.  Thus avoiding merge coins to preserve "value" is illusory and self-defeating.

Also, apparently there is a scrypt coin designed for merged mining with Litecoin called UnitedScryptCoin, though I didn't have a chance to try it yet. Link to UnitedScryptCoin thread in bitcointalk.


What is the recommended lowest fee for a segwit transaction when sending coins from a bc1 address? What is the lowest fee for sending 1 btc from a segwit bc1 address?

1000 satoshi for 1000 bytes

sorry, your question has no sence. the fee depends on network utilization.


Bitcoin core txindex option - does it take argument or not? -txindex is documented (in multiple places) to take no (numeric) argument and that "default: 0".

Does this mean that you have to say -txindex=1 to set txindex, or does the mere appearance of -txindex on the command line set it to 1?

(IOW, is the value of the naked -txindex option 0 or 1?)

This is my interpretation from looking at the code.

First, -txindex is parsed, defaulting to false if it doesn't exist.

The argument is to -txindex interpreted as a boolean, which assumes no argument is the same as a true value (or else a non-zero argument is true).

So you do not need to provide an argument to -txindex, but if you do, it should be non-zero.

Don't provide -txindex: don't index
Provide -txindex with no argument: do index
Provide -txindex=0: don't index
Provide -txindex=1 (or any other non-zero value): do index.


How scalable is a Blockchain-based system? This question as stated above is a bit vague, but let me make it a bit more clear:

Recently, I have seen many services pop up that state that they are secure, fault-tolerant, trustless and scalable because they use a blockchain (often the Bitcoin block chain, the Ethereum blockchain or one of many other or proprietary 'block chains') to store the important parts of the data the services handle.

Now, security and fault-tolerancy I can understand, because (after a few more blocks are mined):

Everone can check the integrity and authenticity of a transaction because ECDSA-signatures are used, giving the system non-repudiation as property.
Everyone has a copy of the block chain so-far stored locally, making it virtually impossible to destroy data. ❦
it becomes virtually impossible to alter a previously-made transaction, because this means that all hashes of blocks after that need to be re-calculated.

Now, because of ❦, the system is also trustless, assuming everyone can read/understand the data from the blockchain directly (i.e. the service's interface to the block chain is released as open-source software). This is where quite a few services claims fall short.

However, the final claim: scalability. I cannot understand how a system can be scalable if it involves the copying of all the (trans)actions its users did to all other users' computers (again, this follows from ❦): It will
both take a lot of time and a lot of disk space to do all this copying, and at some point a physical limit will be reached in which more actions are taken than can be written to the blockchain and in which it takes longer to catch up to the head of the chain than that new transactions appear. In both cases the system will break down (?).

I can see only one ways to resolve this, which is to use 'light wallets' for the end users, in which case the system is no longer trustless, as these users need to trust that the parties they talk with are honest in the version of the block chain they show, so this breaks the other claims.

I don't believe all of the systems that state 'Blockchain inside' use this approach.

So my question: What other techniques are used to make a Blockchain-based system more scalable, and how scalable (in transaction throughput) is a system as a result?

Blockchains are not really scalable. For the most security, blockchains need to be replicated on as many devices as possible. Those devices are full nodes and must download and verify every single block and transaction. In order to increase the number of transactions, transactions have to become smaller and blocks have to become bigger. Unfortunately increasing block size and transaction capacity will result in more resources required to verify and store them all.


Is the probability of generating invalid blocks reduced by mining transactions unknown to others? I've got a question concerning a possible mining strategy.

I've not found any proof of the strategy, but it seems reasonable to me.

If two mined blocks inserted in the block chain include the same transaction (not a double spent, but simply a transaction mined two times), one of the two blocks is discarded (assuming that all the other transactions in the two blocks are legit).

This is a probable fact, since each transaction is shared/"broadcasted" by a user.
Therefore, a possible mining strategy may let miners keep a list of transactions, mine them without letting others know such transactions exist, hence publish/spread them, just before sending the just mined block.
In this way, the probability to generate a potentially invalid block is reduced.

Am I right? Is this strategy adopted or not? Is it reasonable?

No, this strategy makes no sense because of how blocks are structured in the blockchain. Also, it is trivial for network participants to keep track of which transactions are confirmed, because that's the whole point of mining and the blockchain.

It is possible for miners to keep transactions secret and publish them when they discover a block. This may make sense when a transaction is secret in the first place, and has particularly large fees.

However:

Most transactions are not secret.
Usually, transactions get relayed via the Bitcoin network to the miners, so everyone else knows about the transactions as well.
Blocks compete in other ways besides the transactions included.
Blocks reference their predecessor. Therefore, when two blocks are found at the same time they will both reference the same predecessor. However, only one of the competing block can be part of the longest chain since the following block can only reference one or the other.
The problem of accidentally including a confirmed transaction is non-existent.
Every network participant keeps track of which Unspent transaction outputs (UTXO) exist. Transactions that try to spend a UTXO that was already used are invalid. This includes doublespends, and a replay of a confirmed transaction. Since each node will always consider exactly one block to be the current blockchain tip, it is trivial to notice that a transaction was previously confirmed. (Or rather, that it is no longer available to be confirmed.)


Processed withdrawal not reflecting in my blockchain wallet Given below are the transaction details for the transaction which is not reflecting in my blockchain wallet,

Transaction batch :f28888630e090d083ce2be5658f526b148d3e8259a33bbcfa58063cc13e8a4c0

wallet address : 1NUf8TSGw5nuDpUre42n927dKhpDmeMdTo

Please note that i have some bitcoins before from 1HG43hWnE7ZZAcbhA3umYxB7JgPU99kATJ using the same wallet. So for the above transaction i just took the above wallet address and forward it to the one who was supposed to send me other bitcoins.

The transaction is showing on the blockchain explorer but it hasnot reflected in my blockchain wallet.

Please kindly assist, how can i recover the bitcoins if possible.

Kushie

The transaction shows for me. If it doesn't show for you, perhaps your wallet is out of sync or on the wrong chain. Easy thing to try is to restart the wallet.


Can wider acceptance cause the value to fall? I've noticed lately that more vendors/companies are accepting Bitcoin: Microsoft being one of the latest and largest.

As far as I can tell, though, these companies seem to (mostly) immediately convert the currency into "real" money at the current exchange rate, and the transaction is often only completed once your Bitcoins are sold.

Again as far as I can tell (with my limited knowledge of economics), this will increase the Supply of BTC on the open market (more coins being sold) without particularly increasing the Demand (people without BTC are likely to just pay cash, rather than going through the hassle of buying BTC with cash to use with the vendor)

Does this mean that as more companies accept BTC, the value will drop?

The point you bring up is fundamental to understanding how the bitcoin market operates.

The majority of companies that have grown quickly in the space help merchants accept bitcoin. As you mentioned, these merchants generally end up selling bitcoin for fiat currency. Companies that provide bitcoin payment processing have grown more quickly over the past year than consumer wallet companies (which help consumers purchase bitcoin). Consequently, the bitcoin price has experienced downward price pressure over the past year, since we find more market participants selling bitcoin than buying it.

As regulation and banking becomes more attainable for bitcoin businesses over the coming year, we should see consumer wallet companies grow, which would lead to more people buying bitcoin. Until then, expect to see continued downward pressure on the bitcoin price.

PS: I'm the CEO of bitcoin exchange Coinsetter.


How can I get a private key for this address Is it possible for me to withdraw my bitcoin I invested here?
I don't have the private key

How can I get a private key for this address

There is essentially no way.

  Is it possible for me to withdraw my bitcoin I invested here? I don't have the private key

No.

It looks like you fell for a common scam.

I've been asked to share wallet credentials to participate in mining. Is that a scam?
my money gone from wallet scam
BTC Stolen from Blockchain
"Hidden Wallet" onion site
Recovering the private key from a blockchain wallet address
Where do I obtain private keys?

About watch-only addresses (some of these are also probably victims of this type of scam)

Watch only wallet
how do I transfer from watch only wallet to my other wallets
blockchain account has watch onl on i
I have watched addresses in my wallet..how do i use them?
To generate private key
Unable to get private key for Blockchain wallet


Could BitCoin network be destroyed if blockchain would get corrupted? This thought came to me whilst watching mr. Robot where the entire database of a financial corporation has been encrypted.

Would that (in theory) be possible if a virus was spread that would target machines in BitCoin network and encrypt the blockchain stored on these machines?

After that attackers would demand users to pay them in a new cryptocurrency which is not available for purchase yet. This would force all the users to mine their currency and (in theory) this currency would become equally as valuable as BTC since the cost would be the entire blockchain.

The answer would likely be no.

Since blockchain is anyone that has fully synced so it would take the attacker for a long time to destroy every single one of the blockchain. Bitcoin node also can reject an bad data (and temporary ban them) so that it does not mess up the blockchain.

Even if attacker managed to attack it, bitcoin core developer would likely to update their bitcoin core for a higher security before attacker can even finish attack all the blockchains.


Difference between downloading bitcoire core from bitcoin.org and compiling from Github I'm following instructions to install Bitcoin Client in Andreas Antonopoulous' Mastering Bitcoin.  In Chapter 3, the author details options of installing the bitcoin core from bitcoin.org or compiling it from the source code.  From a practical perspective, what is the difference?

What do I lose by just installing it from bitcoin.org?  (Since that seems easier than making sure that I have all required dependencies in Linux)

The main advantage of building from the source is that you have the option of manually inspecting the code to make sure you trust that no one has inserted any nasty logic (in practice this won't be feasible unless you are already familiar with the code).

A second advantage is that if you want to get the latest and greatest improvements for your bitcoin software. The releases on bitcoin.org occur approximately every two months so if there was a change you'd like to use before the official release and building from source will let you do that.

If you were to checkout the source on branch 0.15 and tag v0.15.0.1 and build that then theoretically you'd be running the equivalent logic to the latest release (as of 23 Sep 2017).


How fast can Ripple transfer money from bank to bank? I had a debate last night on how fast Ripple is.
If I am moving money from bank account a to bank account b, how long would it take?
I was told by one person that adding a block takes 8 secs. Another person said money can be moved cross border from any bank account to any bank account in 6 secs.

It will depend on exactly what combination of technologies are being used. If it's ILP and the banks (or market makers) already have payment channels setup, it can be virtually instantaneous. If it's a direct on-ledger payment, it would be about 7 seconds on average. If it's an ILP outer payment that requires both an on-ledger lock up and on-ledger settlement, it can be closer to 15 seconds.

It also depends what you mean by "Ripple". For example, if you mean any bank-to-bank payment using Ripple Connect (the product Ripple sells to banks), that could include payments that uses all kinds of combinations of technologies. For example, if it's an ILP outer payment and the settlement is on the bitcoin block chain, then it can take as long as an hour, because that's how long for payments to be reasonably certain on the bitcoin blockchain.


Using Bitcoin ATM in NYC I'm new to Bitcoin, so I'm grateful for anyone's patience with my perhaps uninformed questions.

I live in NYC and I'd like to buy some Bitcoin.  I understand that due to a recent law, exchanges aren't operating here, but there are several ATMs.  Is there a downside, other than the service fee, to the ATMs?  I'm prepared to lose some money on that, especially since it doesn't seem to be possible to purchase them another way here. Ultimately, this is a gift for my husband, and we see it for the high risk investment that it is.

Assuming I do purchase some at an ATM, what happens next?  I know I come across like a total idiot, but I really haven't figured that part out yet.  How do I keep track of them?  Where do I store them?  How could I give them to someone else?

You will need a Bitcoin wallet to store your coins. Check out https://www.bitcoin.com/ for some options.

After you set up a wallet you will get an address where you can store coins. (The address will be a long string of letters and numbers but you will also get a QR code, which is basically the same address but in a form you can scan)

If you then find an ATM you can insert cash, scan your QR code at the machine and you will get the coins sent to your wallet.

That's basically the process of how ATM's work.


What would be the implications of limiting Bitcoin transactions to fifty inputs? One of the issues of increasing the blocksize is the possibility of creating attackblocks which would take significantly longer to parse than the common block. The mechanism to do so is by creating a transaction that fills the complete block exploiting the quadratic cost of verifying input scripts.

Bitcoin Classic proposed to limit the number of sigops per block. It seems to me that limiting the number of inputs to be used in one transaction would incentivize reduction of a wallet's UTXO footprint.

Has limiting the number of inputs been discussed as a potential solution? What would be the upsides and downsides of such a change?

The main concern with sigops is the quadratic behavior of the pre-segwit signature hash.  I believe specially constructed transactions with lots of OP_CHECKSIGS but few inputs would be similarly bad as transaction with many inputs.

Having additional limits also makes life a little harder for anyone working with the system; e.g. you have to be under 100k, AND under 50 inputs.

Ultimately the best solution is to avoid quadratic behavior like the new signature hashing in Bitcoin did.


How to identify a transaction in Bitcoin I have a webshop, and I would accept Bitcoin payment. I have a Bitcoin address where I accept payment.
Is it a procedure to pass an id or ask an id to / from the transaction? When I query the received transactions I nee to know to which program it was bought. Who is the user, what is its email.
At other payment providers that create a paymentId and return it to the shop, and that paymentId will be also in the payment I can fetch later. How could it work with Bitcoin?

It's recommended to give every single transaction its own, unique Bitcoin address to receive the payment at (you should not reuse them). Then, you know any payment made to that particular address should be credited to the invoice that that address was issued for.
Most places don't ask for a transaction ID. They simply automatically check all of the addresses they've given out, then credit the payment according to which address the payment was sent to.


Why bother having limitations on Bitcoin Coinbase Transaction Scriptsigs? There are a few limitations on the structure of the coinbase (reward) transaction in a block.

There is only one input. vin.size() == 1 (source)
It doesn't reference any previous output. vin[0].prevout.IsNull() (source)
The scriptSig is not too big. vin[0].scriptSig.size() <= 100 (source)
The scriptSig is not too small. vin[0].scriptSig.size() >= 2 (source)

I don't see the point of any of these. #1 and #2 enable BIP34, but they are not necessary to achieve the same outcome. The size constraints don't really limit anything, if a miner wants to make a large block they can just many many outputs in their coinbase, or many many transactions into their block.

Why isn't a coinbase transaction just a transaction which:

Has at least one input that doesn't reference any previous outputs (for use in BIP34)
Allowed to claim up to (block reward + fees) more than it can spend

In particular, the coinbase could optionally have further null inputs and could spend previous outputs.

I know for Bitcoin it's likely too late for these to change. Is this a case of over-designing, or are there security reasons for any of these constraints on the coinbase? Loosening constraint #2, in particular, makes me pause because of a bitcoin development mailing list email concerning how allowing the coinbase to spend prevouts would enable securely paying a miner to mine a chain reorganization in a particular way.

The correct answer is: ask Satoshi.

My guessed answers to the questions you asked:

Why only one input? You can't predict when a particular coinbase transaction will make it into a successful block and you can't spend the output of a coinbase transaction for 100 blocks.  That means using a regular transaction is much superior for any normal spending.  If there's no normal case for adding inputs to a coinbase, maybe Satoshi thought it best to disallow inputs to prevent un-thought-of attacks.
Why reference a null outpoint? Using the same basic format as a regular transaction probably allowed code reuse.  If he had optimized the coinbase, we would've saved 36 bytes times 338,692 blocks (so far), or about 12 MB.  Not a big deal.
Why limit coinbase size to 100 bytes? We know Satoshi used the coinbase to put a message in block 0.  Maybe a 100-byte limit was his attempt to prevent anyone else from using that same mechanism to add overlong messages.  This was probably quite smart: from the fairly early days through today, many miners add messages to all of their coinbases---we can only imagine how annoying and wasteful those messages would be if they weren't limited to 100 bytes.
Why specify minimum coinbase size as 2 bytes? Highly speculative here, but maybe Satoshi foresaw the easy-duplication-of-coinbases described in BIP30 and wanted to require people use something like the original extranonce to help prevent accidental TXID collisions.


Why I haven't received my transfer from BTCGuild? Possible Duplicate:
  How long does it take to receive bitcoins?

At BTCGuild site it shows on Payout History:

2012-01-26 19:01:06 1BiNp9GmFJv1VuoudsJy8Ke79qvh6BPDzp  0.20000000
2012-01-22 07:29:27 1BiNp9GmFJv1VuoudsJy8Ke79qvh6BPDzp  0.11390889
2012-01-20 01:36:25 1BiNp9GmFJv1VuoudsJy8Ke79qvh6BPDzp  0.23492573

But in Bitcoin software, I haven't received the first (0.20000000) payout.

Only the second and the third were received.

Why have I got this problem?

According to the Blockexplorer, you should see all of those transactions when you reach block 163971. Your client probably needs to finish synchronising with the network, as the first transaction is the newest one. If you see the second transaction, then you still have about 7 days at most to synchronise. Just leave your client on for a couple hours and you should see your last 0.2 Bitcoins arrive.


What portion of the mining process does an ASIC perform? If ASICs were described as a black box, what would their inputs be?

Obviously, the actual hashing, the churning of the SHA-256 function is performed by the ASIC. Also, they must of course be able to tell when they have succeeded, so they must have a mechanism to store and compare the target to their result.

Yet, how much of the pre-processing steps do ASICs perform? I would assume that they increment the nonce, as it is raced through in less than a second and perhaps the extra nonce? Can they change the timestamp? Do they manage the complete block header? How much of the block header do ASICs vary by themselves?

Do ASICs assemble their own blocks?

TL;DR: ASIC input/output is the bold text below.

No, the ASIC does not assemble a block.

The block is assembled by a mining pool server. If you are solo mining you could let bitcoind assemble the block but you'd still need mining pool or proxy software in between to make a modern ASIC machine (stratum only) and bitcoind (getblocktemplate only) communicate.

Modern ASIC miners have a small computer built-in, acting as a controller. Some use a beaglebone. This is a low-performance computer which handles the stratum protocol, generating work, pushing work to the ASIC chips in the machine, and receiving results from them. The ASIC chips only handle the part of the number crunching that must be repeated many billions of times.

When the miner receives data over the stratum protocol it is allowed to change the nonce, the timestamp and part of the coinbase (often called the extra nonce). An ASIC chip goes through all possible nonce values pretty quickly, so the controller needs to be able to make more work using the extra nonce.

When the controller changes the extra nonce it needs to generate a new hash for the coinbase transaction (which has now been modified) and use this hash together with a merkle branch received from the pool server to generate a new merkle root. This merkle root goes in the block header.

After a merkle root is generated the controller can now calculate the midstate. The bitcoin block header is 80 bytes. SHA-256 hashing is done in chunks of 64 bytes. Since the interesting parts which we are going to change are not in the first chunk the controller will hash the first chunk once and then the ASIC chip will do the rest billions of times while changing the nonce in the second chunk each time. The midstate is the state of the SHA-256 hashing engine after the first chunk has been processed.

So the input for the ASIC chip is the midstate (32 bytes) and the 16 bytes of the second chunk (last 16 bytes of our bitcoin block header). The outputs are nonces (4 bytes) that resulted in hashes below the target. These nonces are retrieved by the controller and passed on to the pool server.

So what are those 16 bytes of data the ASIC chip needs in addition to the midstate? These 16 last bytes of the bitcoin block header are the 4 last bytes of the merkle root, 4 bytes of timestamp, 4 bytes of "bits" indicating current bitcoin target/difficulty, and 4 bytes of nonce.

In reality the ASIC doesn't need to receive a 4 byte nonce from the controller. It is going to try different nonce values on its own. So we are left with this:

The inputs to the ASIC chips are a 32 byte midstate, the last 4 bytes of the merkle root, a 4 byte timestamp, and 4 byte "bits" (target/difficulty).

If I managed to explain the above properly then you should now see why the ASIC chip is focused on this specific part of the work. For each time the work up to completing the midstate is done, the work after that point is repeated billions of times.

You can also see that generating a new midstate (which also entails generating a new merkle root) is a lot more work than just incrementing the timestamp. So once you have enough midstates to keep the ASIC chips happy for one second, you can reuse the same midstates over and over every second just by incrementing the timestamp. If the controller is slow enough and the ASICs fast enough then this "time rolling" may be necessary for the machine to work.

The slowness of the controller can also mean that the ASIC machine has a minimum difficulty it can operate on. Otherwise it will get more results (nonces) than it can handle. But the same thing goes for the mining pool server which would also not want to be spammed to death.

For maximum efficiency the ASIC is designed to only handle a limited area where expensive specialization really pays off, while the rest is handled by a tiny computer that is very cheap and very energy efficient.

Note: there are of course some differences between manufacturers. For instance some ASIC chips do not scan the entire nonce range. But the above should be the gist of it.


Did BitGo terminate its "BitGO instant" service? Why? This is the launch announcement.

https://www.bitgo.com/instant is a dead link now.

I can't say for sure, as I don't use the service, but the current page appears to be here: https://www.bitgo.com/info/solutions#instant .  It's linked in the Solutions menu on the header of every page, so they're not hiding it.


How many hash calculation is needed to reach one BTC? What I am asking for is a formula and it's source of numbers to put in there and calculate how many hashes must be calculated to get 1 bitcoin today(or every other day in future)?

For example, if I put 1,000,000(1TH/S) in hash rate field of the table of the this site http://www.alcula.com/calculators/finance/bitcoin-mining/ , it gives me

  "Average time to find one block: 1386.91 years"

, but I am not sure if it's calculation is true? I also like to know the formula that website uses?

Double SHA 256 follows a uniform distribution that means all hashes are equally likely to occur. So, your chances of finding the block header hash that is less than the target is same for every round of hashing.

With the current mining difficulty of 10183488432890, the target bits are 0x171ba3d1. This means you will need to find the block header hash that is less than or equal to 0x0000000000000000001ba3d10000000000000000000000000000000000000000. For one round of double hash that is a probability of 2.28631x10-23. Let's call it P. So the probability of not finding a valid hash is (1-P). For N hash attempts, the probability of not finding the valid hash is (1-P)N. To be sure that you find a block we need to ensure that (1-P)^N -> 0. Since P -> 0,  (1-P)^N = 1-N*P (using Taylor expansion). Solving both equations you get N = 1/P = 4.3738x1022

At your hash rate of 1 TH/s it will take you 4.3738x1010 seconds which is 1386.91 years.


multiple deposits using the same address for investment i am new to the bitcoin thin and i want to know if i can keep the same adress for send and recive some money.
I use multibit HD wallet.
Beyond the line is what the help of he investment party tells me but since i am new i do not realy understand.

– There is no registration — you are identified via your bitcoin address only.

– Do not use Shared coin transaction.

– You are able to make multiple deposits using the same address.

– Until your payment is confirmed in the bitcoin network (included into a block), it is not deposited and does not appears in the list of recent payments. It can take several minutes, sometimes up to one hour, to mark the transaction as confirmed.

please some help/advise.
thanks.

yeah it seems like your correct, just make sure to be in control of your private key.


Why is this 12-word mnemonic deemed invalid by multiple wallets? I have a 12-word mnemonic from a Blockchain.info wallet created in May 2013. But now the Blockchain recovery page[1] tells me this is an invalid seed.

I'm sure this is not user error, since the recovery phrase was found in two different places: backed up in a file on S3, and printed on a piece of paper.

I also tried the Blockchain app as well as Mycelium, and got the same result.

I'm wondering if the standards have changed since 2013 and the type of seed I got is no longer valid? Is there a tool I can try to feed this mnemonic into so I can generate the wallet?

[1] https://blockchain.info/wallet/#/recover

Blockchain.info did not use HD wallets or BIP 39 in 2013. Their change to HD wallets and BIP 39 mnemonics was fairly recent (within the past year or two IIRC). The 12 word mnemonic that you have is not a BIP 39 mnemonic. Rather it is a custom mnemonic used by blockchain.info for recovering passwords. The mnemonic itself encodes the password to your account (or information to recover the password from blockchain.info). It can only be used with blockchain.info and their legacy wallets.


When are blocks validated? Are blocks validated just before they are stored to memory,  upon receipt from an RPC submit call, or at some other time? Can you point to the place in code where this validation process begins? Is this process starting point the same for transactions?

I think you are talking about the consensus rules and when they are enforced...

To get the whole picture I would suggest to read about this topic in the book "Mastering Bitcoin" by Andreas Antonopoulos.

https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch10.asciidoc#decentralized-consensus


Transfer from exchange to my Electrum cold wallet I have created a wallet on an offline computer and regenerated it as a watching-only wallet on my online computer using the public key of the offline computer wallet.

So far, so good. Now, how can I transfer my bitcoins from the exchange service to the cold wallet? Is it fine to just enter the first address I get when clicking the "receive" tab on the online computer (watching-only wallet), will bitcoins transfered to this address also 'arrive' in my cold storage (offline computer) wallet original?

The assumption stated at the end of your question is correct:

You can send bitcoin to the address that is presented by Electrum's Receive tab and the funds will be sent to that address - accessible (spendable) from the cold wallet.

Electrum's Receive tab seems to choose a random address from your wallet's address pool. If you want to use a specific address, or a new address for every funds deposit, then go to the Addresses tab, right-click on a specific address and choose Request Payment from the drop-down menu.

Note: the xpub (extended) public key format is used by BIP32 deterministic wallets (such as Electrum seed wallets) to recreate all of the addresses associated with your xprv (master) private key. This master private key is stored in your cold wallet but not in the watch-only wallet that used the xpub key (at watch-wallet creation time) to generate the addresses it will watch.

By using the xpub key associated with the xprv key, your watch-only wallet contains all of the same addresses that were generated when you created the cold wallet. Anytime you manually generate a new address in the cold wallet you will have to manually import it into the watch-only wallet.

Never reveal your xpub key to anyone as they will be able to recreate all of your addresses and your privacy will be compromised.


Are vanity addresses Vanitygen generated really safe to use? I’m not talking about whether Vanitygen can crack an any existing wallet or not. I know it is practically impossible, considering the computational resources required.

But what if, it’s to crack vanity addresses generated by itself, Vanitygen?
If Vanitygen is deterministic and does not take any input (such as a seed) other than the desired pattern, in other words, does not walk along random steps, given the pattern input is the same, it would always require the same amount of computational resources to generate the identical first match, which is mostly affordable.
Do Vanitygen have some kind of countermeasures for this problem? Is it safe to use Vanitygen-generated wallets, free of the threat of Vanitygen-regen?

The key point here is that vanitygen is not deterministic - It relies on entropy provided by the system it is running on, which is why running it multiple times with the same pattern will produce different addresses.

As long as the entropy provided by the system used to generate the address is sufficiently random, keys produced by vanity gen are as good as keys produced by any other program that would have used the same entropy.

Naturally, you should be verifying that the binary you are running matches the source code, and is using a good source of randomness, before moving any funds to those addresses.


Can I buy bitcoin at a lower price? Let's say that I have some money (not a lot) and I want to maximize how much bitcoin I can get. Is there a way, besides waiting and technical analysis, to get cheaper bitcoins through legal means? (In other words, I want the lowest exchange rate possible.) The reason that I think this is feasible is because bitcoin was two dollars just 7 years ago, and though I don't expect this valuation, I would like to get it in the lower thousands (preferably below the 2018 bottom price) or hundreds without having the price crash. I think that, because of the above reason, caring people would have somewhat of an incentive to sell their bitcoins to an individual buyer through something like a dark pool: the price won't crash and they could sell more of their old BTC. Note: I won't sell it right away unless I bought at the top in order to maximize returns.

Note: mining bitcoin is not currently viable, though it is expected to be even after the impending halving because of the demand created by this halving partly from speculation.

If there was a special place to buy bitcoin at a lower price, peoples or bots will rush it to buy all of them then resell it rendering this special not so special any more.

Still there is some places where you can find some interesting offer I guess, like https://localbitcoins.com/ which offer to buy bitcoin from people in real life and https://bisq.network/ which is a decentralized exchange, I suppose there must be some shady link like on the tor onion network too. Be careful of scam especially those offering to sell discout bitcoin from past hacked exchange.


Is it a threat if top mining player merges? It just strikes to me that if top 2 bitcoin miners which would own more than 50% mining, merges can they control bitcoin.

In hypothetical scenario if have bad intension can they control the price etx of bitcoin ?

You are speaking of 51% attack or Majority Attack

You can read more about it in here

If they join, yes they can double spend or so.

But they can't change the price though, as that purely depends on the market demand.

Till now, there has been no Majority Attack on BTC, though it has been demonstrated on small altcoins.


What level of mathematical understanding do I need in order to contribute or to understand the crypto behind bitcoin? My mathematical knowledge is up to CALC II (college level.) Is this enough mathematical maturity in order to understand the crypto in bitcoin or do I need more knowledge? If I do indeed need more knowledge than please point me to good books/resources to learn them. Thanks!

I'm no expert, but hopefully this answer helps a bit. In my opinion you only need about year 11 calculus and algebra to understand the basics of elliptic curves and modular arithmetic. You can learn everything you need to know by googling and watching youtube videos. Here are some resources:

a layman's guide to elliptic curves
a visual guide to secp256k1 i started (incomplete but still useful)
an introduction to modular math by the khan academy

and if you are familiar with python or keen to learn then pybitcointools has a native implementation of all elliptic curve functions used by bitcoin. once you are familiar with the math then this code will be very useful for verifying your results.


Private Key has no fund I tried to import my private key from the BTC Core Wallet into another wallet because it doesn't work anymore, it says that there is no fund, even if it is 100%, as I can see on the Explorer.

I really need help. My Btc Core wallet is not running, but I was able to open a new wallet with my Dat.dat file and check my private key, it's all correct.

It sounds like the problem may be that the new wallet derived a different type of  address from your private key.

Normal wallet function will present you with a new address each time you receive coins. Each of those addresses will have an associated private key, that needs to be used to spend the funds. Note that the same private key is not used to derive multiple addresses in a wallet, there is a 1:1 relationship for private keys and addresses.

So when you want to import that private key to a new wallet, you need to make sure the new wallet derives the correct address from it (ie, the same one your original wallet did, when you originally received the payment), otherwise the new wallet is showing a different address then it will not show your funds, since it is looking in the wrong place.

This question has a bit of info about different address types.

As a first step, compare the first characters of the address that holds the funds, and the address that the new wallet generated. If they are not the same (eg the original is 3... and the new wallet is bc1...), then you will need to either instruct the new wallet to generate the correct type of address, or if this is not possible, you will need to find a different wallet that is capable of doing so.

Note: if your bitcoin-core wallet is fully synced, you can run the command bitcoin-cli listunspent, to get a list of UTXOs that the wallet is keeping track of. You can look through the list to confirm the balance of specific addresses using this command, to ensure you are attempting to export the correct private key.


Notifications on low balance of a bitcoin address Is there a service or wallet where I can subscribe my email address to notifications on low balance on my bitcoin address?

blockonomics will mail / send you push notification whenever there is transaction on your address. Doesn't have a feature for low balance yet, but should be straightforward to implement.


Forwarding BTC without approval Since all I need in order to send a transaction is the receiver address.
What is the mechanism  (if any) that stops me to send transactions to someone BTC without his approval?

Since all I need in order to send a transaction is the receiver
  address.

You also need a private key. In order to send someone coins from your wallet, you need a signed transaction with your private key.

  What is the mechanism (if any) that stops me to send transactions to
  someone BTC without his approval?

You don't need an approval of someone to send him transaction.


I traded XRP for BTC. How do I withdraw my bitcoins from ripple.com? I traded XRP for BTC. How do I withdraw my bitcoins from ripple.com? I guess I need to withdraw to bitstamp.net somehow?

If you traded on the Bitstamp/BTC exchange, then log into your Bitstamp account (create one if you don't have one), select 'Deposit' and then select 'Ripple'. Follow the instructions.


Do we Need Pay Tax for Mining for US Govt Do you need to pay Taxes for US Govt for doing Bitcion  Mining.??

I am in Singapore and mining through one of my friend in US.
Will the US Governement will issue TAX on My Name..?? Is it Legit ..?

If so, How much Taxation..?
Does Univted States TAx Revenue Board send the TAX Invioce on my Name

Thanks a lot

Do you need to pay Taxes for US Govt for doing Bitcion Mining.?

You are not liable for income tax because:

You are not a US citizen and
You are not working in the USA.

Someone in the USA who is selling you a service might be required to charge sales-tax (though that sort of tax is often not applied to foreign sales).

  Does Univted States TAx Revenue Board send the TAX Invioce on my Name

As far as I know, there is no USA government branch named "United States Tax Revenue Board".

The USA Internal Revenue Service (IRS) would not charge you personally for sales tax. So far as I know, US sales taxes are a state tax not a federal tax

Scams

When buying "mining services" be aware that, unless you have a really good understanding of how bitcoin mining works, you are likely to be the victim of a fraudster.

One of the things fraudsters do is repeatedly invent superficially plausible (but actually false) reasons for you to send them money.


Changing prune size in working bitcoin daemon I need to free some disk space in bitcoin server.

Will bitcoind download all blocks from scratch again if I change 'prune' value in bitcoin.conf over working daemon?

The prune value merely sets the limit of how much block data is kept.

If you increase the value and restart, no block data will be deleted for a while. New blocks will be received and validated and stored, and old ones won't be deleted until the new prune value is reached again.

If you decrease the value and restart, the oldest blocks will be deleted at startup.

You cannot go from pruned to nonpruned. That requires starting over.


How to get address from CTxIn object I'm reading bitcoin core source code. I want to know how to get bitcoin address from CTxIn object.

I have a CTransaction object. I found the way how to get addresses from vout like the following. But I don't know about vin.

UniValue out(UniValue::VOBJ);
ScriptPubKeyToUniv(txout.scriptPubKey, out, true);

UniValue u = find_value(out, "addresses");
UniValue uv = u.getValues()[0];
newDestination = uv.get_str();

CTxIn has a scriptSig. I think I can get address from it.

CTxIn

https://dev.visucore.com/bitcoin/doxygen/class_c_tx_in.html

Update 1

I found how to get the pubkey by using ScriptToAsmStr. I know this works for only P2PKH address.

vector<string> array;
CScript s = _tx.vin[0].scriptSig;
string a = ScriptToAsmStr(s, true);
boost::algorithm::split(array, a, boost::is_any_of(" "));
if (array.size() == 2) {
    cout << array[1] << endl; // 0396f8781a4900372a5d72d84718d146170d5983e67dff8b4a28fef80690c09767
}

I'm now looking into how to convert the pubkey to bitcoin address on mainnet.

Update 2

I tried it like following but "invalid" is showed..

const char *cstr = "0396f8781a4900372a5d72d84718d146170d5983e67dff8b4a28fef80690c09767";
std::vector<unsigned char> vec(cstr, cstr + strlen(cstr));

CPubKey pubkey(vec);
if (pubkey.IsValid()) {
    cout << "valid" << endl;
} else {
    cout << "invalid" << endl;
}

Update 3

Thanks to the Andrew Chow's answer, I could make a CPubKey object. All that is left is to output the bitcoin address from the object.

#include "utilstrencodings.h"

std::vector<unsigned char> vec = ParseHex("0396f8781a4900372a5d72d84718d146170d5983e67dff8b4a28fef80690c09767");

CPubKey pubkey(vec);
if (pubkey.IsValid()) {
    cout << "valid" << endl;
} else {
    cout << "invalid" << endl;
}

Update 4

Finally, I got a bitcoin address from a CTxIn object. I think this is not smart way. There might be other ways.
And still not sure about CKeyID's meaning. I will look into it in detail.

CKeyID id = pubkey.GetID();
CBitcoinAddress address(id);
if (address.IsValid()) {
    cout << "valid" << endl;
} else {
    cout << "invalid" << endl;
}

cout << address.ToString() << endl; // 15L7U55PAsHLEpQkZqz62e3eqWd9AHb2DH

I suppose you are the same person who made this thread on bitcointalk: https://bitcointalk.org/index.php?topic=1969807.0

I'll answer you here too to help other people too.

You are treating the pubkey as a string, but it is really a blob of binary data that is 33 bytes long. What you want to do instead is initialize an array with your pubkey and then use that to initialize your CPubKey.

Your code should look like this:

unsigned char pk[] = {0x03, 0x96, 0xf8, 0x78, 0x1a, 0x49, 0x00, 0x37, 0x2a, 0x5d, 0x72, 0xd8, 0x47, 0x18, 0xd1, 0x46, 0x17, 0x0d, 0x59, 0x83, 0xe6, 0x7d, 0xff, 0x8b, 0x4a, 0x28, 0xfe, 0xf8, 0x06, 0x90, 0xc0, 0x97, 0x67};
std::vector<unsigned char> vec(pk, pk+ sizeof(pk));

CPubKey pubkey(vec);
if (pubkey.IsValid()) {
    cout << "valid" << endl;
} else {
    cout << "invalid" << endl;
}


What makes the initial download of the blockchain so slow? If you download a bootstrap copy of the blockchain through torrents, it will be faster than getting that same data through the Bitcoin network.

Ofcourse the BitTorrent protocol is more optimized for bulk data transfer, but is there any other reason for the huge difference in bandwidth? Is it artificially limited in the client right now, or by design?

I found this post by Jeff Garzik (one of the developers):

  Initial blockchain download occurs from one peer at a time.  If that
  peer is slow, then your entire blockchain download is slow.
  Yes, it's stupid and yes it needs fixing (patches welcome).


Would it be possible to create a soft-fork for reducing miner reward? Context:

There is a bet going on r/bitcoin about the possibility of doing a user activated soft fork for reducing current miner reward to 0.25 BTC.

One of the users says the bet had two points:

the change must be a soft fork (aka it doesn't break consensus)
no miner must be able to claim more than 0.25 btc.

Would it be able to make a change to the Bitcoin consensus rules that would meet this criteria?

Yes, it is possible. The rule regarding the coinbase reward is that a miner cannot take more than the block subsidy plus the transaction fees in the block. This means that a miner can opt to take less than the full reward that they are entitled to. This has happened before in Bitcoin a few times. The coins that they did not collect are gone forever.

So, you can use this rule to your advantage if you want to decrease the block subsidy via a soft fork. In your soft fork, you simply create a new rule which results in the coinbase reward being less than the current coinbase reward (e.g. the block subsidy is smaller). Because of the rule mentioned earlier, non-upgraded nodes will still accept blocks that have these coinbase transactions with a smaller coinbase reward. Thus this is a soft fork because the new rule is backwards compatible.


Tamper - evident log with hash pointer We know that the hash of the previous block is included in the header of the next block. So, if an adversary change the data in the block no. 10, then they hash of it will be changed and the header of the block no. 11 will be no longer  true.
But, in the textbooks that I read to understand the blockchain, the said that the change in block no. 10 will change the whole blocks till the header of the genesis block prevent.
Why the change of the data do backward from no 10 to the first not from no. 10 to 11 and so?

See this for example:
Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth. This will completely change the chain, which is impossible. This is exactly how blockchains attain immutability.

The current block is the child and the previous block the parent. If the parent changes in any way then this will cause a change in the previous block hash pointer of the child. So the change does not ripple back to the genesis block. However what this does do is that once a block has many generations following it then it makes it very difficult to change. So the genesis block as the first block is impossible to change because changing it would make it necessary to change the previous hash of every block that followed it.


How can I recover a electrum wallet with passphrase and keystore file? Is there a way to recover a electrum wallet without the seed? I have the adress, passphrase and the wallet file. I tried restoring it but it asks for seed/ master key. I don't have those? Is there anything else I can try? When I load the file..it gives a unicode error. It looks like this. Is there a way to know, if this corrupted?
楏ĸ滐막댁痡䋆篅㧟ᑺ铙ꋧ亿龏レ祯᧻檊�籅−⥷㳀⁼澀秴思緽쏹褪髊灒轣ꀠ垥�ﰘុ᝱缉疰ᘹ뮋戔〤ୠ紟糸綝⩵懼ݦ젗䲢墜賕派쭈ꑘ䗙�奲쯅Ს䫨꥓ሌ昗﮽ꯔፇ婤㹱䍈삗휶쨜⽐⭳暷ᢠ蘘᭩췛뻦庄
I opened it in a hex editor to look for seed. There is no seed in it.

Is there a way to recover a electrum wallet without the seed?

To recover the wallet you need either

the password/passphrase of the wallet and a good backup of the wallet  or
the seed phrase which is sometimes called a recovery phrase or backup phrase.

Since you have neither, you cannot recover the wallet.
Many scammers will contact you and offer to help, but they will just steal money from you.

It is sadly too late for you, but anyone else reading this should take note of the advice offered by user-guides for wallets like Electrum:
See  https://bitcoinelectrum.com/creating-an-electrum-wallet/

Before you begin
You will need to download and install electrum first. You can download it from here. If you are on Windows you should use the installer version and not the portable one.
You will need a pen and a notebook (recommended) or piece of paper to write down the seed mnemonic. The notebook will have to be kept somewhere safe once you are done with the installation process so it can’t be a notebook that you use on a day to day basis.

...

Electrum displays the seed to you as a 12 word mnemonic. It’s important at this stage to write down the seed in a notebook. You must put it down on paper. Don’t keep it on your computer!

Also write down “Software: Electrum” in your notebook below the seed mnemonic. You wouldn’t believe the number of users who forget what software they used!

(my emphasis)


separating proof of work from mining possible? I (think to) understand that proof-of-work is the process through which transactions are verified and the health of the network is being ensured.

I also (think to) understand miners get bitcoins for successfully verifying transactions as a reward.

But can the actual mining of coins (in a fork) be separated of proof-of-work in the context of transaction verification?

Like for example a hardware device generating coins with a different ruleset (e.g. let's say for simplicity: a car drives 100miles --> generates one coin). If that would be possible, would transaction verification still be possible or is it intrinsically linked and in itself one process?

Hope I am making myself understood.
Never mind if the question is making a fool of me.

All nodes verify transactions in Bitcoin. This helps propagate transactions in the network fast and given a majority of honest nodes you propagate valid transactions faster.

Given that anyone can verify transactions it will not be difficult to have some dishonest nodes to verify 2 of my transactions spending the same bitcoins (double-spend). We do not want that, so we need to make it difficult to publish (verified) transactions to the network. Thus we have proof-of-work/mining** and some of the above nodes also mine.

So the introduction of PoW was so that publishing*** (verified) transactions is safe from double-spends. And to incentivize the process bitcoins are rewarded.

Your example with the car (I assume that it could work although I see several issues :)) could work as PoW since it requires effort. But you need to prove your effort for something. In Bitcoin it is for adding (and verifying) new transactions to the blockchain. What will it do in your example? And how would you safeguard from double-spending a car-coin?

** Also works as an anti-spam measure.

*** The reward is for publishing a block (set of transactions) in the blockchain not just for verifying. Even though many others will verify only the nodes that prove their work are allowed to add a new block in the blockchain.


Transfer between different e wallet Can we transfer cyptocurrency to anyone so long they  hold an e-wallet, even in different part of the world?

Yes, so long as both parties have wallets that support the same specific cryptocurrency - e.g. both support Bitcoin (BTC).

The two parties do not have to use the same wallet software. For example, one might use a bitcoin-core wallet and the other might use an Electrum wallet. It doesn't matter.

Physical location is irrelevant - though local laws may affect parties to the transaction.

Remember that cryptocurrency transfers are usually irrevocable - you cannot cancel or reverse the treansaction if you change your mind or discover that the recipient is a liar, cheat or fraudster.


What kind of messages are those used by Bitcore When creating a transaction proposal with Bitcore,
the options include a "message" field, both for the transaction and the single outputs.

Are these messages those used by the Bitcoin network peers (like 'ver', 'inv', etc..)?

Where are these messages stored?

This is the answer I received from a Bitcore developer (see here)

Messages are stored in the BWS server database encrypted by the wallet encryption key.
Therefore, the BWS server maintainer can not see any of the messages, but the copayers can see it because they have the decryption keys.
These messages only exist on the BWS server, so if the BWS server disappears. So does all your messages.
Wallets can be restored outside of BWS, but messages are tied to the BWS server.


Should a node follow the longest chain, or the chain with most work while syncing? I'm reading mixed things online - some saying to follow the longest chain, and some say to follow the chain with the most work. But I'm not convinced of the former.
If the node follows the longest chain, what is to stop the scenario of a bad actor sending a completely false chain to my node with a really easy target of 1? The chain could be longer than the main chain, and I can't see any consensus mechanisms preventing that chain from technically being invalid.
If following the chain with the most work is the way to go, then how can we verify most work? Is it just a case of following the chain with the lowest integer value for its hash (as my understanding is that the hash needs to be below an ever-increasing target, and shrinks in size as more miners join the chain)?
Any guidance would be much appreciated.

Nodes follow the chain with the most cumulative work, not the lowest hash of the latest block (which would be most work for the current block).


BIP38 on multisig? Does it work? I was making a multisig account with 3 of my Bitcoin addresses. The multisig account needs 2 of 3 private key to spend the Bitcoins in there. Then, I came up with an idea that nobody on the internet (at least, nobody on the first page on google) had tried or thought about.

Can I use BIP38 encryption on the private keys (in multisig)?

Yes, you can use BIP38 with multisig.

It's not exactly a brand new idea, though. I've spoken with some people from Gem (https://gem.co/), that's exactly what their API lets you do.


What does Litecoin offer over Bitcoin? Litecoin is different from Bitcoin in the following ways, however none of them are particularly useful and on the contrary are only less worthy.

84 million vs 21 millions: since Bitcoin is divisible upto atleast nine decimals and also micro BTC can be used for dealing with low amounts
Faster blocks, 2.5 minutes vs 10 minutes average: six confirmations of Bitcoin are not equivalent of six confirmations of Litecoin, so Litecoin payments are usually confirmed after many more confirmations. It also wastes mining power because in Litecoin, most of the time miners may start work with non-best blocks.
scrypt vs SHA-256: since scrypt can be relatively efficiently run on CPU/GPU, it means botnets can easily control a lot of hashing power. Also, scrypt is relatively less analyzed and used than SHA-256, so it may not be more secure than SHA-256.

Technically, Bitcoin does what Litecoin does in an equal or better way. Also, Bitcoin testnet can be used to experiment with new features.

Why do we need Litecoin that actually has monetary value (around USD2.7 per LTC now)? Is it just promoted by a group of people who missed the Bitcoin get-rich boat?

Bitcoin is a novel concept and early adopters rightly earn their rewards for the risk they have taken.

Well, Litecoin's main aim is to make mining easier for the common man.

The problem with pure SHA-256 mining is that it is not very hard to design hardware that can perform mining at an astonishing speed. We can see this with the currently very much ongoing rise of the ASIC mining industry.

Since scrypt is more complex when it comes to hardware - scrypt not only requires many processor cycles, but also requires intensive memory use - it is harder to design hardware specifically for scrypt mining.

The result of this is that Litecoin mining will be profitable for the average joe for a longer period of time than Bitcoin mining did, when it would be adopted just as fast. Since it does not, the arrival of dedicated scrypt mining hardware will be even more deferred, to the benefit of the miners.

Besides this, I have to agree with you that the other differences between Litecoin and Bitcoin are only minor. Total currency is really not that important since both are very divisible. And faster confirmations are not required either, most Bitcoin transactions are considered valid upon first notice, since it is hard to perform a double-spend attack. (Note that you should better require a transaction to have a fee included when you want to consider it confirmed upon first notice.)
Also, after one confirmation, pretty much all transactions can be considered final.


Bitcoin-Qt client: Easy way to using a wallet.dat not in its default location/when it asks for my password at all? It doesn't have to be called "wallet.dat", right? That would be too obvious. Can you call it anything, with any extension?

Bitcoin-Qt is just not so trivial to me to use since the trivial way would be to have an option File -> Open wallet (at starting the program), then enter password if encrypted. TrueCrypt for example is trivial in this way, you select any volume, type in a password, mount, and dismount images.

I don't understand that either that you encrypt your wallet.dat file, close the client, open the client and it doesn't ask for your password?

Bitcoin-qt only asks for your password when you do an operation that requires it, such as sending coins.

Currently, wallet.dat must be called that and reside in the Bitcoin data directory. It might be possible to use symlinks to work around that.


How can I recover an Exodus Wallet with lost password? Four years ago, I bought Bitcoin for my son. I bought this via Coinbase which I then transferred to an Exodus Wallet. I lost my Exodus password. I saved a string with 34 characters containing a mixture of numbers, upper case and lower case letters. I can't remember what this was for. Is there anything I can do to recover my 12 word phrase?

you need to search for the seed.seco file which should be in your appdata/roaming folder named exodus.wallet
this file cointains your encrypted 12 word seed.


mapOrphan overflow, removed 1 tx I'm trying to download the block chain and synchronize with the network (using Bitcoin-qt 0.8.6). I have a 2 year old wallet.dat file with a fractions worth of unconfirmed bitcoins.

After over a day downloading the blocks folder has stopped increasing in size and is at 13.4GB.

In the debug.log file the following messages are repeatedly shown.

stored orphan tx 8d724a...ad48cfb140 (mapsz 10001)
mapOrphan overflow, removed 1 tx

It will then add another orphan transaction and then remove another one from the pool. The pool stays at 1001.

Should this be happening?

The message in the client says it has processed 0 of 280295 (estimated) blocks of history and that I am 162 weeks behind.

First of all, backup your wallet in a couple of places...

If you are in linux, move your ~/.bitcoin to ~/.bitcoin_old, once you've done that start bitcoin-qt, wait another day for the whole blockchain to download. This time it should be working OK.
Replace the wallet in ~/.bitcoin with your wallet in ~/.bitcoin_old and resync.

Remember to have your wallet.dat saved before you do anything (I would have 2 or 3 copies in different places (usb, external HD, etc ...)


Can I retrieve my Bitcoins when I only know my receiving address? I lost my wallet identifier and mnemonic. What I only have is my Bitcoin receiving address, 1EAd1Qua6fzyenPeSMRxYcpbcKgYUBpxQ7. I also lost the "Welcome to my wallet..." message in my e-mail. What do I do now? Please help, my bicoins are inside!

If you neither have the mnemonic, the identifier, or the wallet file, there is probably nothing that can be done to restore your wallet.

Especially, the receiving address is not sufficient to restore your wallet. Otherwise, any other user could claim your wallet as it is public knowledge. Clearly, that would not be secure.


Testnet Bitcoin Generation Time 2 Parts to this.

1st - What is a typical winning block (I get coins) generation time when running on testnet.

Ive done numbers with calculators and all that but given I cant work out accurately what the 'normal' difficulty for testnet is, I dont know where in the range of numbers I've seen is right to consider normal.

2nd - How can I be sure that I'm actually mining, not that I'm just computing useless hash after useless hash thats getting sent to a black hole somewhere?

So far, using 2 machines CPU mining on testnet (and even trying unsuccessfuly for an hour to get GPU mining to work as well, figuring that if it worked, i can just stop this after a few minutes and get on with my work) to generate a bunch of coins for testing some bitcoin related transaction handling software.

I have managed to generate zero bitcoins.

1Mhash/s and 500Khash/s for over an hour each. Plus the hour trying various gpu mining things on and off. And no coins. I'm confused & wondering how to debug this. Since I can send and receive bitcoins without issue.

I gave up trying to testnet mine since I was able to use a generous faucet to borrow some for testing. But the geek in me is very very irritated at not having worked out what was broken and fixing it. And now I'm in the situation where I'd like to put my own machines horsepower back to work mining on the testnet in order to speed up the transaction confirmation times, even if its not by much, so im stumped.

Edit -- More specific hashing figures. I lowballed my numbers a fair bit.

Laptop [ Macbook Air ]

CPU [ 2Ghz i7 ] Using:

bitcoin-qt internal miner ~1.5Mhash/s over ~4hrs

Desktop [ Custom ]

CPU [i5-2500K@3.3Ghz] Using:

bitcoin-qt internal miner between ~4.2Mhash/s and 2.3Mhash/s over ~2hrs
GUIminer/poclbm OpenCL ~1Mhash/s over ~2hrs

GPU [ AMD 6900 Series GPU-Core@830Mhz Mem@1300Mhz ] Using:

poclbm OpenCL ~325Mhash/s over ~30min
DiabloMiner ~325Mhash/s over ~30min
cgminer wouldnt run, kept crashing on start, debug log didnt have any clear cause, the log actually looked like it died half way through trying to say something. The last entry was something like 'Tha'

So, yeah all that and no coins.

What is a typical winning block (I get coins) generation time when running on testnet.

I plugged your rig statistics into this calculator, and I find that you should be getting 60 blocks a day at difficulty 1. Seems to be oscillating between 1 and 42 at the moment. Maybe you should try running for longer.

  How can I be sure that I'm actually mining, not that I'm just computing useless hash after useless hash thats getting sent to a black hole somewhere?

The standard client is pretty good about not even trying to generate when it's not connected. Perhaps you could join a testnet pool? :)


How do I transfer bitpay wallet from one machine to another (PC or oth. type of device) I have a new PC that I want to host my bitpay wallet on, so I need to migrate it from the current machine. I did a superficial search on the current machine for *wallet.dat* file in my C: drive w/ dir /s *wallet.dat* but it seems like bitpay uses a different storage model.

Question: How do I migrate bitpay wallet from any type of device to another device of any type?

Found it. There are 3 ways to do that in bitpay.

Export by scanning the QR code that can be found in: Settings > "Wallet name" >
More options > Export wallet
Export to file w/ password. Same path as before.
The backup option w/ the backup phrase, in: Settings > Backup


Calculating height of block How do I calculate a possible height at which a block should be mined some time between 2 given times (say 8:00 am - 10:00 am)?

The average interval between blocks is 10 minutes for BTC. There are twelve of intervals of ten minutes in two hours, so nine or ten blocks is a good estimate.


Coinotron wont show updates from cgminer I type this into command on windows

C:\Users\developer\Desktop\cgminer-3.7.0-windows\cgminer.exe --scrypt -o stratum+tcp://coinotron.com:3334 -u exploithb.1 -p x

and it looks like its working, Im getting 1.4 MH/s for lite coin. But when i log into coinotron i don't see my workers Speed value and It stays at 0.0 KH/s. Could it be that I'm doing something wrong? I let it sit for a half hour to see if i see any updates and nothing ever shows up.

I found out why it didn't show. These mining pools out there just like coinotron arent running super servers and there are multiple people connected and it cant always pull that kind of strain on the server to request up to date/time of your local hash speed, so it displays what it can for everyone. Also After initialy starting your miner you have to wait atleast 5-10 minutes depending on your bandwidth for cgminer to officially connect and for your worker to show some kind of data. In cgminer look for where it shows A:# and HW:#  if these values are 0 then the connection hasnt been made yet. Just wait for 5-10 minutes and its value should keep going up. Once you see its values going up look to the right there should be something that says shares accepted , its value should be going up in time as well. If A:# or HW:# has not changed and stays and 0 then something is wrong ,you need to reconfigure your commands that you typed for it.

If you find this helpful upvote :p


How can I best implement Bitcoin in my business? Is there any good tutorial, discussion or implementation of bitcoind for business?
What's the best Bitcoin.conf?
How to expose the Bitcoind API to the internet?
How to guarantee confidentiality, integrity and availability?

Basically I'm looking for advices on how not to turn my small online shop into the new mybitcoin.com :)

Just some quick tips to get you started:

run with 'noirc=1' so that your node IP isn't discoverable via IRC
run with several 'connect=' so your node only connects to other specific nodes that you trust
do not expose the json api to the internet at large, confine it to localhost or specific ip only.
if you plan to hold a significant amount of bitcoins, then estimate how many you'll need for your daily float, and save the rest in an offline wallet (also generated on an offline computer - don't leave traces of your keys on any internet-connected disk)
do not accept 0-confirmation transactions, other than for really trivial amounts where speed of delivery is of the essence.
do use new bitcoin addresses for every new customer and order. address reuse makes it easier to track your customers.

There are probably a more items that could be added to the list, this is certainly not to be treated as comprehensive.


Non SegWit P2SH bytes structure I'm working on a bitcoin block explorer in golang, in which I'd like to gather as much informations as possible about transactions.
I am able to extract addresses from every type of output, and mostly every type of input, except I am struggling to find clear P2SH documentation.
BIP16 doesn't say much about non-SegWit P2SH byte structure. I read many examples where OP_0 is the first byte, as opposed to P2WPKH in P2SH and P2WSH in P2SH where the first field is scriptSig's total length followed by 0x0/OP_0.
From what I understand, a non-SegWit P2PH address is obtained by hashing the redeem script, but I'd need something to anchor to, like for example 1st byte is OP_0, then comes the size of the data (probably a signature), loop until finding OP_TRUE followed by OP_PUSHDATA1?
But is this the unique, standard format?

A P2SH locking script on an output has the following structure:
         Output (scriptPubKey)
--------------------------------
OP_HASH160 <scripthash> OP_EQUAL

The address comes for this comes from the <scripthash>, creating a "3address". This is the standard format for a P2SH, so you can identify it and work out the address from there.
That's all you need to get the address, but explaining a little further...

Interestingly, the <scripthash> can be the hash of any kind of script you like. However, it's most commonly used for putting the hash of a P2MS in there. So when you come to unlock this script, the scriptSig may look something like this:
          Input (scriptSig)
-------------------------------------------
OP_0 <signature> <signature> <redeemscript>

What you're seeing here is basically a complete script for what would have been a classic P2MS scriptPubKey and scriptSig, where the <redeemscript> is a data push of a normal script with opcodes.
          Input (scriptSig)
-------------------------------------------
              scriptSig       scriptPubKey (as a data push)
---------------------------- --------------
OP_0 <signature> <signature> <redeemscript>

With P2SH it's like you have a complete scriptSig+scriptPubKey contained inside the scriptSig, and it can contain any script so it doesn't have a standard form.
Anyway, this complete P2MS script starts with a OP_O, because all P2MS scriptSigs have to start with that due to the off-by-one bug that the OP_CHECKMULTISIG opcode. This is nothing to do with the OP_0 you get in Segwit scriptPubKeys.
When this script executes, the <redeemscript> will firstly be hashed and compared with the <scripthash> in the output to make sure it matches. If it does, the <redeemscript> is deserialized to see the opcodes:
      Input (scriptSig)
-------------------------------------------
              scriptSig       scriptPubKey
---------------------------- --------------
OP_0 <signature> <signature> OP_2 <pubkey> <pubkey> <pubkey> OP_3 OP_CHECKMULTISIG

So this is what you would see on a classic P2MS output, but this just happened to be wrapped in a P2SH script because it's cheaper for the sender. So this is the standard format for a P2MS: (OP_N <pubkeys...> OP_M OP_CHECKMULTISIG).
This particular scriptPubKey does not actually have an address. There are <pubkeys> in there, but it wouldn't be technically correct to say those <pubkeys> have an "address", because an address refers to a specific locking script pattern, and is not just the friendlier version of any <pubkey>.
Examples:

P2SH with a P2MS inside it: https://learnmeabitcoin.com/explorer/transaction/d3adb18d5e118bb856fbea4b1af936602454b44a98fc6c823aedc858b491fc13/output/0#scriptPubKey
P2SH with a non-standard script inside it: https://learnmeabitcoin.com/explorer/transaction/7d46745463a28049cb93d2c964320912d9c296c1038cb24cc3716255c397a87f/output/1#scriptPubKey

Links:

https://learnmeabitcoin.com/guide/p2sh
https://learnmeabitcoin.com/guide/p2ms
https://learnmeabitcoin.com/guide/address


bitcoind daemon mode When running bitcoind from a systemd service, as in https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service, what is the role of the -daemon flag?

Basically I'm asking what does -daemon do in a situation where bitcoind is run as service, and not as a wallet. And what happens if -daemon is not used -> in a systemd service file.

If one sets daemon=1 in bitcoin.conf, is it redundant to also use the -daemon flag when starting

When running bitcoind from a systemd service, as in https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service, what is the role of the -daemon flag?

-daemon starts bitcoind in the background as a daemon. So if you run bitcoind -daemon in the terminal, the program will exit immediately but bitcoind is still running in the background. Without -daemon, you will see that bitcoind appears to hang in the terminal, but that just means it is running. If you stop the command, then bitcoind will stop as well.

  If one sets daemon=1 in bitcoin.conf, is it redundant to also use the -daemon flag when starting

Yes. This applies for all command line options.


Can more bitcoins be transferred to a paper wallet address once it is created? I created a paper wallet from coinbase with some initial amount and secured it. I want to keep adding more bitcoins to the same address. Can I do that? Are there any issues doing it?

Yes, you can.

The wallet itself does not hold any money. It is just a private key, to which the coins will be associated.


Bitcoin QT restore old wallet.dat - needed for Israel supreme court Though I am sure it's probably not the first time you get this inquiry,
I am pretty sure it has some unique characteristics.
My name is Roy Arav. I am from Israel. In Israel, banks totally forbid getting/sending money that is related to crypto. So in 2018 I sued the bank in Israel's highest court. In February 2021, I won. (For those of you that know Hebrew, it was published in Israeli newspapers and the verdict was published online.)
Well, the bank appealed this verdict to Israel's supreme court. Winning or losing, it's going to be compelling precedence for all similar cases from now on.
Why am I telling you all this?
I need to prove that there is no money laundering (there isn't) by showing
the route of the money (how I bought it, what transactions I did, and how I sold it back to shekels). One of the nodes in this route is an old bitcoin-qt wallet I had till 2019. It's empty now, but I can't access the wallet to see the transactions or even to see some public addresses.
I have my password and an old wallet.dat (I am not sure it's the most up to date one), and I am trying now to re-sync the whole thing (it's going to take at least a week). Any advice? (I don't mind publishing the wallet.dat and password since the wallet should be empty.)

Being that you have the wallet.dat file (and the password), one option that you may want to consider is using pywallet to dump the private keys and public addresses from the wallet.dat file.  See https://medium.com/crypto-blog/how-to-recover-old-crypto-wallet-private-keys-with-pywallet-bafdaeb4928e for more info.