Is it possible to cancel an unconfirmed transaction? If you submit a transaction to the network but it hasn't yet be confirmed by a block, is it possible to cancel this transaction?

Bitcoin-Qt doesn't support anything like that.

Theoretically:

A transaction is canceled by publishing a second transaction which double-spends some of the coins used in the first transaction (this can be a send-to-self). If the second transaction is included in a block before the first one, the first one becomes invalid and can be considered fully cancelled after the second transaction receives 6 confirmations. It's normally not easy to do this. Network nodes won't accept transactions which double-spend coins used in a transaction they already know about. However, nodes gradually forget about transactions if they don't get into blocks, so a transaction could be cancelled if it doesn't make it into a block after several days and both the sender and recipient stop rebroadcasting it.

Bitcoin used to have a feature called transaction replacement. A transaction could be marked as non-final, which prevented this transaction from getting into a block, but allowed the transaction to be cancelled at any time. Satoshi disabled this a while ago, though. Transactions can still be marked as non-final, but they can't be replaced.


What is the fastest possible way to download the blockchain? How to download the blockchain with full bandwidth?

How to download the blockchain fast?

To download the blockchain with maximal speed you want to be connected to nodes with high bandwidth.

On default bitcoin will search and connect to random nodes. One can add nodes to bitcoin conf to tell bitcoin to connect to specific nodes.

To add a node to the bitcoin client to connect to, add the following to the bitcoin.conf file in:
Windows:/appdata/roaming/bitcoin/bitcoin.conf

Linux: $USER/.bitcoin/bitcoin.conf

ADD THIS TO BITCOIN.CONF

addnode=127.0.0.1

To find high bandwidth nodes go to:

  blockchain.info/hub-nodes

for example and browse the hub nodes section.
It is not required to add the node port, bitcoind will find the correct port.

....
Enjoy downloading at full speed.

EDIT: since the question / answer gained such an attention i decided to make this a community wiki :)


NEED SOLUTION - Validation Error-Mempool-conflict I SENT XPUB and tried to send many messages blockchain never respond. and one account has been more than 5 days.
i am having "validation Error-Mempool-conflict. what is this and how long it will take? Is this something blockchain stocks and steal our money? i have many accounts and two of my accounts got same issues since last week.

I found the solution guys.

Possible fixes, broadcast your transaction on localbitcoin blockexplorer (yeah they have one) :
https://localbitcoinschain.com/tx/send

All fine with your coins the problem is in blockchain mempool and to unblock need to send transaction manually to bypass the blockchain mempool.

Solution step by step:

Open chrome inspector in the network tab
Try to create a transaction and get "Validation error"
Open "Headers" of pushtx request and copy content from FormData, field tx: "You need that content"
Enter that transaction in form here https://localbitcoinschain.com/tx/send and click submit
You'll get transaction id and can check it in blockexplorer this transaction belongs to you and you need to wait when it will be confirmed


How does the Bitcoin forex work? Does it work differently in relation to a regular forex because of its underlying technology?

How can the market calculate its value?

No, it's all the same. Well, maybe there are some very small differences, but in general it's the same as forex. I would say that the cryptocurrency is much more unstable, and this is why I prefer trading CFDs on Investous broker. I am much better in that area, and it's much easier for me to analyze this market. However, it has the same thing at base, so, if you are already good in one area, you will be successful in the other one too.  I would suggest reading more information about that on the internet, there is a lot of information available on that topic


Bitcoin first versions Please excuse my ignorance.
I think I purchased some bitcoin quite some time ago within the early adoption phase, back then I think passphrases were non existent, Is there a way to access the old bitcoin or bitcoind software/platform, or what should I do? would that login if I can find it still work or will it automatically say enter passphrase? I am downloading the most recent full node to support although I am a at a bit of a loss at the sheer amount of information and need some expert advice please :)

If you purchased Bitcoin a long time ago, and it's on an exchange, and that exchange still exists, and you can recover your username and password to that exchange, then you should be able to transfer your money off of there.
If you used your own Bitcoin wallet software such as Bitcoin Core, then you will need to have your wallet.dat or other wallet file to recover the coins. Without this file, the coins are gone for good.


Where can i find instructions on how to install a NXT wallet app on my Ubuntu server so I can access it via the web? I want to install a NXT wallet client/server on my ubuntu server so i can access it from my website. Where can i find instructions for this? And is there a way to change the port # for nxt? currently it 7876.

Make sure Java 7 is installed on your Ubuntu Server

sudo apt-get update && sudo apt-get install openjdk-7-jre nano zip

Download the latest NRS release and verify the hash sum, example:

wget https://bitbucket.org/JeanLucPicard/nxt/downloads/nxt-client-1.1.6.zip
sha256sum nxt-client-1.1.6.zip
Compare with valid hash found on https://nxtforum.org/nrs-releases/nrs-v1-1-6/
unzip nxt-client-1.1.6.zip
cd nxt

To change NXT's properties (such as port), edit nxt-default.properties

nano conf/nxt-default.properties  (CTRL+O to save, CTRL+X to quit.)

Launch NXT

./run.sh and access via browser, ip:xxxx


Trouble with mtgox's withdraw bitcoins api call I have been trying to transfer bitcoins via mtgox's withdraw bitcoin api call with this http address

https://data.mtgox.com/api/1/generic/bitcoin/send_simple

and when I log the response to console I get

{ result: 'success',
  return: { trx: 'a748ee68583a1cedbdde694a5716909cad8feea1545e946145f48f95ced15037' } }

yet the number of bitcoins in my account remains unchanged.

What could possibly be causing this?

and I'm positive my api key has the correct permissions (unless it's merchant)

The problem I was having had to do with formatting. In the api documentation there is an amount_int param which needs to be passed with the http request. I had forgotten that mtgox requires anything with _int postfixing to be in the form amount * 10 ^ 8

so for example if you were trying to send 0.01 bitcoins for the amount_int field you would put

0.01 * 10 ^ 8 = 1000000


In what way does Spectre have "weak" liveness? In his article The Spectre Protocol, Aviv Zohar, one of Spectre's authors, mentions that Spectre has weak liveness.
Why does he mention that Spectre has "weak" liveness, and how would "strong liveness" differ from that?

The paper explains this:

  The  “weakness”  of  the  Liveness  property  corresponds  to  the
  fact  that  we  do  not  guarantee (though  it  is  still  hard  for
  an  attacker  to  prevent)  a  resolution  in  case  conflicting
  transactions were published soon one after the other. Contrast this to
  traditional consensus protocols, where all conflicts are required to be
  decided in finite time, a property usually referred to as
  Liveness. Observe, however, that an honest user of the system will
  never publish conflicting transactions,and will transfer money only
  after he robustly accepted the original funds (the inputs)
  himself; payments of honest users are thus guaranteed to meet the
  conditions formalized in Weak Liveness, and  to  be  robustly
  accepted.  On  the  other  hand,  an  attacker  trying  to  defraud
  must  keep  his attack secret before publishing the conflict, until the
  victim robustly accepts; but then the victim is  guaranteed  that
  w.h.p.  his  transaction  will  not  be  reversed.  Therefore,  these
  two  properties together  ensure  that  payments  of  honest  users
  will  be  robustly  accepted  in  constant  expected time, and that
  they remain robustly accepted forever, w.h.p.


Would proxying a lightning hot-wallet with a lightning cold-wallet make the hot-wallet safer? (Edit: I realize how Mt.Gox-y the below setup sounds, but I'm coming at it from a "lightning routing problem perspective", not necessarily a straight "bitcoin security perspective"...though...those two things overlap quite a bit.)

The setup/problem:
I have two lightning nodes: (A) a Casa lightning node ("Casa-Node") that I trust in my apt, and (B) a BTCPayServer lightning node hot-wallet ("hot-wallet node").

BTCpayServer makes it REALLY easy to integrate a btc and lightning payment pipeline into my website, however the btcpay website has a warning the lightning wallet is a hot wallet, unsafe(ish) :(

I'd like to use my Casa node with BTCpayServer but they (casa) don't have that functionality yet. I don't want to simply put thousands of dollars on my BTCpay LN hot-wallet, as I don't trust it. The think of the casa node = trustworthy-node, and the Hot-wallet = less trustworthy-node.

A potential solution?
Came up with this idea: use my Casa Node as my primary routing node with payments coming in from strangers/customers, and have only one channel between my Casa Node and my Hot Wallet Node..so all LNpayment requests generated by the Hot Wallet Node get routed through the Casa Node, and I can easily balance the Casa/HotWallet, channel balance as needed (at the end of the day, move the funds back to the Casa Node and close that one channel out on-chain).

Example flow:

CasaNode = CN
BTCPAY Hot-wallet = HWN
Other nodes trying to pay HWN = L1, L2, L3

Step 1: Setup my website with BTCPay server, and enable HWN for the lightning payment pipeline. (assume my website is CatToys.info, and I sell four different $25 dollar items..made up but it helps the picture).

Step 2: Create a big LNchannel between my CN (more secure) and HWN (less secure storefront node). E.g., create a $1,000 payment channel between my Casa Node and the BTCPay Lightning Hot Wallet Node.

Step 3: Create a bunch of random payment channels between CN and other big nodes in the lightning network. These random payment channels increase the odds of a routing path being found between a given website customer's LN node and HWN node that generated the LNrequest (e.g., the BTCpay server that is generating the lightning payment request).

Step 4: Random customer browses CatToys.info, checks out via, which causes BTCPayserver to generate a lightning payment request for $25 via the HWN node.

Step 5: Customer uses his lightning node (L1) to pay HWN...the routing proceeds as follows:

$25 (in btc) from L1 --> CN --> HWN.

Other customer use the same flow:

$25 (in btc) From L2 --> CN --> HWN
$25 (in btc) From L3 --> CN --> HWN

Step 6: At the end of the day, HWN has 75 dollars (from the three customers paying 25 each for a cat toy). When I want to "close the store down" (which is a brick/morter thing to say, but just stay with me), I move all the funds in the CN--HWN channel back to CN, so the full $1000 is back on CN (i.e., move $75 back to CN), then close the channel out on-chain.

Step 7: if I need to "open the store" for the next day, I just need to recreate a single channel from CN---HWN, which is cheap as it's only a single channel to open up, and CN is ready to go (always connecting to lots of nodes (and CN is trust worthy)).

This approach would: let me use BTCPay server's hot wallet (or any wallet that I don't trust too much) with larger-ish funds, and give my hot-wallet channel instant liquidity by connecting to CN, and I would only need to worry about closing/opening/rebalancing a single lightning payment channel between CN----HWN, instead of trying to constantly open channels with different amounts of funding to keep my website enabled to receive lightning payments.

Thoughts? Would the above sequence work in the lightning network? And be safe/secure, and would payments actually be successfully routed to the website okay?

Any input appreciated, thx.

First of all at this stage all lightning network nodes implementations are hot wallets. There are people / teams working on hardware wallets in lightning. Also I don't get your base assumption why you would trust casa which I believe  is not open source more than trusting btc pay server which I believe is open source. The only reason I see is that you control the hardware of your casa node and it is not some machine somewhere on the web in some datacenter.

But let us assume your setup and assumptions are valid then in step 6 and 7 of your process you don't need to close the channel. You could just withdraw the funds from your HWN to your casa node. As the entire channel balance is now at casa side there is no risk with HWN being compromised. This is as good as closing a channel moving funds and create a new one but saves onchain tx and fees.

In step 3 it is important to note that if you casa ode owns those payment channels your casa node can't receive funds or error payments to the HWN. Casa needs inbound capacity. So either you have others open channels to you (e. G. Your customers) or you have to use one of the many submarine swap services that exchange onchain to offchain funds. Such a service could also be used in step 6 and 7.

Overall the node of btc pay server could be private and configured to only accept traffic on port 9375 from your casa node. In this way you make sure only you have a payment channel with it. Since without rendez vous Routing all invoices of your store point to your casa node your cars node might now be at risk.

That all being said it seems to me that for the concerns that you have you don't need this setup with a proxy node. I am not saying that such a setup might not make sense for other reasons.


What does qt in bitcoin-qt stand for? just a simple question: what does qt in bitcoin-qt stand for?

Qt is a cross-platform application and UI framework for developers using C++. It's is used for UI in Bitcoin-Qt. See http://qt-project.org/


Does Sovryn really not allow you to use it if you use Bitcoin Core? https://live.sovryn.app/
This is apparently what Sovryn consists of. Not a downloadable application, but a website. It's very confusing, and so is its FAQ.
When I click the "Engage Wallet" button, it pops up a choice between:

"Browser Wallet".
"Mobile Wallet".
"Hardware Wallet" (disabled/greyed out).

Where is the "desktop wallet"? How do I use Bitcoin Core with this thing? Why would it support only "browser wallets"? I didn't even know that such a thing existed.
I keep hearing all these fantastic claims, but then when I try to actually use it, it's just... vapor? Fluff? Or am I once again missing something that you all understand?

Sovryn is built on the Rootstock Bitcoin-sidechain. It follows that you must run software that interacts with the Rootstock sidechain in order to use Sovryn. Bitcoin Core only interacts with Bitcoin's blockchain and is not aware of the Rootstock sidechain.


Ethereum Code bots...Scam or not? So new I cant even afford to trade crypto's yet, but looking and learning. I came across some Ethereum Code bot, promising 13k a day etc etc...one of those "sounds to good to be true" things really.
Research is varied in opinions of being a scam or not. The broker is called FTO Capital, unregistered etc...why would a bot need a broker?
Anyone able to say they have used any of these kinds of crypto bots and done ok? As a father of a daughter with a disability I need to play it safe...she needs equipment I simply cant afford at this point in time.

Cheers in advance,
Buck

promising 13k a day

It is almost certainly a scam. Stay well away from this.

  I need to play it safe ... I simply cant afford

Don't invest in volatile high-risk products such as crypto-currencies.


Mining of the Genesis block testnet? Bitcoin 0.14
I want to try mining first genesis block, a new time, but don't know how to start
testnet

used to create GenesisH0
https://github.com/lhartikk/GenesisH0

To mine the testnet genesis block you would use.

python genesis.py -z "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" -n 414098458 -t 1296688602

If you want to create a new genesis block run the following with your own time and leave out the nonce, you will be generated a new nonce.

python genesis.py -z "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" -t 1501755824

Here is what I get when running the above command, it will just take some time to find a block.

python genesis.py -z "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" -t 1501755824
04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73
algorithm: SHA256
merkle hash: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
pszTimestamp: The Times 03/Jan/2009 Chancellor on brink of second bailout for banks
pubkey: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
time: 1501755824
bits: 0x1d00ffff
Searching for genesis hash..
183984.0 hash/s, estimate: 6.5 h
nonce: 835054047
genesis hash: 00000000ad3d3d6aa486313522fdd4328509feefe8c37ead2a609884c6cbab92

To add your new genesis block to the Bitcoin testnet update the src/chainparams.cpp file, also delete any checkpointData entries on the testnet as those no longer apply to your new testnet chain.


Is BTCFrog bitcoin QR code generator hacked? The following URL is self explanatory. It is trying to generate a QR code requesting 0.005BTC at the shown address

http://www.btcfrog.com/qr/bitcoinPNG3.php?address=31oLAAQDmuRAGfkviHPDXFgV15To4idott&size=200&label=xx&message=yy&amount=.005

This generates the QR code below

When this QR code is scanned with any wallet of your choice the receiving address switches to something else! The address is clearly owned by someone and has several transactions.

Is it hacked or I'm doing something seriously wrong?

Unfortunately, that’s the hacker’s BTC address. There are way too many fake BTC QR generators nowadays, so the best way to do that is to ask your wallet to generate the QR for you (or use a well-known website).


What exactly is XBTC? What is xbtc? I saw many articles refered xbtc,just like "btc to xbtc". But there's no material telling what it exactly is.

XBTC is an asset representation of BTC in Counterparty.
Apparently, you could send Bitcoin to a Counterparty gateway, and get the same amount of XBTC back in turn. These could then be traded for other Counterparty assets. The operator of that gateway claimed that it was cheaper to trade thusly than on Bitcoin exchanges.

I've found an announcement for a XBTC gateway here: XBTC Gateway released. It appears to me that the service has since been shut down due to regulatory concerns.


Can I interrupt the initial blockchain download without losing progress? I just installed Bitcoin Core through brew on my mac.
The blockchain is now downloading but it's slowing down, so I would like to restart it.
Can I abort the process and restart it and will it pick up from the last block?
Or will it start from scratch again?

Ok, I just open anoter terminal window and do:
bitcoin-cli stop


listunspent rpc/cli command doesn't seem to list unspent unconfirmed transactions for watch-only addresses I am unable to list unspent unconfirmed transactions for watch-only addresses. Once the transaction gets at least 1 confirmation it gets included in the returned result.

This is the command I am running (split into multiple lines for easier comments):

bitcoin-cli
   -rpcwallet=*** # redacted wallet name
   listunspent 0 # minconf
   99999 # maxconf
   [] # addresses - empty seems to mean all
   true # include_unsafe

Documentation of include_unsafe:

  Whether this output is considered safe to spend. Unconfirmed transactions from outside keys are considered unsafe and are not eligible for spending by fundrawtransaction and sendtoaddress.

This statement makes me think that this is an actual bug. It's worth noting that for addresses generated by wallet (not watchonly) unconfirmed transactions are showing just fine...

So...

Seems like listunspent is actually working fine. However, importmulti doesn't seem to scan mempool for transactions.


Why does Bitfinex allow shorting with BTC as collateral? I made a mistake today where I shorted BTC on Bitfinex using BTC as collateral. Why is this even possible, I cant figure out why someone would want to do that?

Shorting is normal trading transaction on real financial markets. Without shorting you would not be able to speculate and profit on price decline. Assume that btc price is 400 USD and you think that the price will go down. By shorting one bitcoin you simply borrow one bitcoin from some lender and sell the bitcoin for 400 USD. If your assumption is correct and price goes down, say to 100 USD, you buy that bitcoin back and return it to the lender. Your profit then is 400 - 100 = 300 USD.


Bitcoin as an investment? I have a couple thousand dollars in a savings account. I am getting almost no return since the bank accounts interest rates are so very low.

I know nothing about the stock market, so investing there is not at the top of my list. If I put the money into a bitcoin wallet, theoretically, isn't it gaining value faster than the savings account? Even with any fees involved, it might be a good place to hold my money.

Also if things go bad here in the USA, I'd like to have some money safe.

Keep in mind that funds held in a Bitcoin wallet carry considerable financial risk (compared to a savings account). The value of bitcoin can increase rapidly, but it can also drop rapidly.

If you believe that long-term, the value of bitcoin will continue to increase, then bitcoin might be a good investment for you. However, the future is unknowable, and something could happen that causes the bottom to drop out of the bitcoin market and its value to plummet. Your choice.

Note also that in the US, you may be liable for taxes on realized capital gains through investment (this is not tax advice).


How do I get new unconfirmed transaction from mempool? I know there is a function that allows me to see all transactions that are in mempool, but is there a way to see every new transaction that enters mempool? Like log to file whenever new unconfirmed transaction enter mempool.

This PR got merged yesterday, you can build from master branch and maybe this should solve your problem: https://github.com/bitcoin/bitcoin/pull/19572
A tutorial about using bitcoind zmq: https://bitcoindev.network/accessing-bitcoins-zeromq-interface/


Is there a version of EasyMiner for Mac? I'm thinking about possibly getting a BitForce Jalapeno (http://products.butterflylabs.com/4-5gh-bitcoin-miner.html) It says that it needs "EasyMiner" which is only for Windows. (The download page links to a .exe file). Does anyone know if they're planning to make a version for mac? Are they any alternatives? (In software, not hardware)

I don't know whether EasyMiner will be ported to Mac. But there will be several other miners supporting the BitForce Jalapeno and other BFL ASIC products.

If you want a user-friendly alternative you may want to try out BitMinter client. It has been thoroughly tested with BFL FPGAs mining on Macs. Support for BFL ASICs will be added as soon as possible. This miner is available from http://bitminter.com. I am the author of this miner.


How do I convert Bitcoin to and from my local currency? I want to maybe try my hand in Bitcoin but I don't know of many places around here that use it so converting it would be the best route for me. Any information would be extremely helpful. Thank you

You will need the aid of a service or individual in order to exchange fiat currency to and from bitcoin.

You will also need a bitcoin wallet.

Some services offer both exchange and wallet functionality.

You may find these resources helpful:

How does one acquire bitcoins?
How to buy bitcoins (Lists of services available in many countries)

For the United States: http://howtobuybitcoins.info/us.html

Trade (A list of many options and services)


Public bitcoin node accessible to web code? I want to connect to the bitcoin network and broadcast a transaction.

I can't run my own bitcoin node on localhost because I'm in php on a web server (shared host), is there an internet-accessible open-to-the-public trusted reliable well-known node I can use?

Even blockchain.info api requires a local service to be running, so that won't work.

You can't do that using Bitcoin-core. What you can do as an alternative is using electrum servers.

You can find all the information about using it and commands in here.

Features:

Broadcast transactions.
Getting legacy address transactions, unspent and balance.
Free and public and there are many available peers.
open source (python).

If you want to get segwit address balance, transactions.. you should convert it to script hash first.

Note: using third party APIs & servers are less secure than running a self-hosted full node. It's recommended to avoid third-parties when you deal with money.


Signature for this request is not valid im testing the binance api but cant get over the signature problem can u spot a mistake on my signature?:

   const crypted = CryptoJs.HmacSHA256("timestamp=" + new Date().getTime().toString() + "&recvWindow=5000" , this.APISECRET).toString();

I am just taking a wild guess, your signature needs to be encoded correctly. You can see some examples in this ask.


SPV clients - how much does occupy the full blockchain headers? Does a spv client need to download the full blockchain headers? how much does it occupy? is it better for security? I saw a blockchain-headers file in my android wallet that only occupies -30MB.

SPV clients need to download the blockchain headers so that it knows that it is following the blockchain with the most work. Each header is 80 bytes, and with 474994 blocks (as of writing this post), the size of all blockchain headers is 37999520 bytes which is ~38 MB.


Blockchains beyond bitcoins There are suggestions that blockchains concept can go beyond crypto currency such as votings etc.  My question is that in those cases how could a “proof of work” is enforced? I guess adding any new blocks to the chains always require various kind of “independent” check. Without any incentives how could pow be done fairly?

Most current such systems (Ethereum, Neo, WAVES, etc.) rely on proof of work to secure the blockchain and issue the native token (ether and waves are issued, Neo was all generated at genesis).

The incentives in these cases are:

Transaction fees gained by executing contract transactions
Block reward, if it exists

There are also a number of private blockchain systems, such as Hyperledger, where the incentive is that the businesses maintaining the network will presumably reap some benefit from its continued functioning.


Bitcoin logo license and can i use it? Can i use Bitcoin sign to create logo? I can not find any resource that says it's not protected. For example http://localbitcoins.com/ uses Bitcoin sign in they logo.
I heard it's licensed with CC licence, but not sure.

Maybe someone know's this?

The images in the original thread are broken, but the text states that poster on bitcointalk placed the work in the public domain, i.e. the most permissive CC license. Prior to this the logo with "BC" was openly licensed by its inclusion in the Bitcoin source code.


Why was transaction malleability ever allowed? I understand that the data included in a transaction signature is not exactly the same as the data included in a transaction hash, but why was it designed this way?  I don't see any advantage in just making the data set the same for both purposes and there are apparently a lot of drawbacks.

Bitcoin transactions are intentionally malleable. Some forms of malleability are a feature, and by design. Many of the more advanced uses of Bitcoin transactions (see the Contracts wiki page) rely on the ability to modify transactions in specific - and limited - ways.

However, the current problems are unrelated, and because of unintentional malleabilities. Several are known (and have been known for years). Making them impossible requires changes to the protocol, to validation software and to wallets, so cannot be done very quickly. In fact, the reference client version 0.8 (released almost a year ago) made some types of malleability already non-standard, with the hope of someday being able to add a strict network rule to forbid it.

The reason why the transaction signatures do not sign the full transaction hash, is because that would require knowing the signature before signing. The signature is part of the transaction, so it influences the transaction hash. Because of the design of the scripting language, it however signs less than just not the signatures. This is the source of many (but not all) malleabilities. Some are due to ways in which the signature itself can be modified without invalidating it.


How many addresses are there now with segwit? Could you help me understand if with segwit activated do we have more available private keys and addresses in the Bitcoin universe?

With Legacy [1...], Compatible [3...] and Bech32 [bc1...] addresses do we have 3x more possibilities ?

Thank you.

There are 2160 P2PKH addresses.
There are 2160 P2SH addresses
There are 2160 P2WPKH addresses.
There are 2256 P2WSH addresses.
There are 16 defined but unused witness versions which can be encoded by BIP173 (Bech32) addresses, each with data length 2 to 40 bytes. That's 16*256/255*(25640 - 256) =~ 2324.006.

That's 2144363455669619533814323684450670475181580230986810095535626033037852598144837730344835022389248 in total.

The number of private keys has not changed; that's still slightly less than 2256, namely 115792089237316195423570985008687907852837564279074904382605163141518161494336. Only the number of ways to use them increased.


Incremental build for bitcoin I did use the Make to build bitcoin source  [https://github.com/bitcoin/bitcoin].
every thing went ok.

then I have changed one of file bitcoind.cpp , and issue the Make command again, but this time Make has tried to build all bitcoin source again.

my question is how to do Incremental build for  bitcoin?

my system is ubuntu, and g++ is Ubuntu 5.4.0-6ubuntu1~16.04.6

AFAIK there is no way to incrementally make. You either make or you don't.

But, you could try >make bitcoin-qt and see if it just makes that module? Nope:

>make bitcoin-qt
make: *** No rule to make target 'bitcoin-qt'.  Stop.


The complement of s (when s < curve order / 2) Bitcoinlib refers to the requirement that if s > ORDER / 2, then the complement of s should be used instead since it's one byte shorter

This sounds like it's referring to the inverse or negative s value, but I also know complement can be a computer science term.

The relevant code can be found here (perhaps someone adept with the Bitcoin Core code can chime in on what the code is doing), so, what is the complement of s referring to?

In ECDSA s can be on either side of the curve and the signature will still be valid. The term "low s" is referring to the value literally being being below the curve order (0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0). The requirement of low-s is arbitrary (high s would have worked just fine as well), and is one of the new BIP62 validity rules that are intended to combat transaction malleability.

Absent this rule, any person is able to take a Bitcoin transaction, flip s in any of its signatures, and push the transaction out again with a different TXID. Being able to do this only changes the hash of the transaction, and does not alter its validity in any way. Being able to mutate transactions breaks a number of potentially interesting transaction types in Bitcoin like payment channels, where chains of transactions will suddenly be invalidated by a parent being mutated and an alternate form included in a block.

By forcing valid transactions to always have low s this ability is removed, though a person with the private key for a transaction is still able to mutate their own transactions by resigning them with a new nonce.


How do I get old blocks while running a pruned node? Hello I'm trying to build a NodeJS app that fetches Bitcoin blocks, potentially old ones, and I'm running into issues. I've downloaded Bitcoin Core but I don't have enough space to run a full node and so I opted to run a pruned one. However, when I go to query an old block it tells me that the block isn't available in pruned mode. So my question is, why doesn't Bitcoin Core query the block on the fly from another node if it doesn't find it on disk? It clearly has the ability to do this, else how would it sync the blocks in the first place? If this is not possible with Bitcoin Core, could I build my own JS app that mimics the network calls used in the IBD to get blocks on demand, instead of saving them to disk? Also, I can't use a 3rd party block explorer API because they don't have all the features I want and they are less reliable.

This is a great question and something I've wondered myself. Since you mentioned JS, I implemented this on a branch of bcoin: https://github.com/pinheadmz/bcoin/commit/ec1f5c95bb76f86aa034ec5a288fc09dd15d9597

$ bcoin --prune --daemon

$ bcoin-cli rpc getblockchaininfo
{
  ...
  "pruneheight": 10823
}

$ bcoin-cli block 1000
{
  "hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",
  "height": 1000,
  "depth": 10112,
  ...

This is untested code and should not be used in production, but it does demonstrate a mechanism by which a pruned node (or maybe even SPV node or any application really) can use arbitrary getdata calls to retrieve full blocks from full nodes on the Bitcoin network.

See details about getdata in the protocol section of the wiki: https://en.bitcoin.it/wiki/Protocol_documentation#getdata

All you really need is a block's hash and a p2p connection to a full node.

In my implementation on bcoin, the headers are required to be downloaded which prevent the user from requesting a non-existent or invalid block. This implementation is dangerous because it breaks the model of the pruned node and does not attempt to validate the block when it is special-requested. It does not record the actual CoinView of the downloaded block and leaves the DB in a bad state that could cause issues if a big enough re-org happened that disconnected the block.

Disclaimers aside, what you're asking is definitely possible. You just need to be careful how you handle the data you retrieve from the network.

Also worth noting that requesting arbitrary blocks from peer is an important component of Neutrino light clients:

https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki


What are the advantages of Schnorr vs ECDSA? I understand that Schnorr signatures provide an improvement on ECDSA in that they are a fixed 64 bytes instead of the longer ECDSA sig format, however, I don't see how this is an advantage over ECDSA in any situation except multisig.
With ECDSA, transactions can be signed & verified without needing to include the signer's pubkey in the message. However Schnorr (as described in the recent BIP) doesn't have that advantage, which means that for any transaction not from a multisig address, the necessary space to store all data necessary for verification would be 26 bytes cheaper under ECDSA (assuming a 64 byte Schnorr sig with a 33 byte compressed pubkey vs a ~71 byte ECDSA sig without a pubkey).
With regards to that, why is Schnorr receiving such focus? Do multisig transactions make up enough of Bitcoin's load that Schnorr would be that significant? And why has there been little to no focus on implementing transactions without storing pubkeys (which ethereum has been doing all along)?

Your question seems to assume that the only goal is minimizing on-chain transaction size. Reducing size and related costs is certainly something that can be improved upon, but it's far from the only thing. The primary advantages of the Schnorr proposal are:

Better privacy, by making different multisig spending policies indistinguishable on chain. When combined with Taproot, this extends to pretty much all cooperative executions of contracts (which become just a single signature on-chain, regardless of complexity or number of participants)
Enabling simpler higher-level protocols, such as atomic swaps that are indistinguishable from normal payments. These can be used to build more efficient payment channel constructions.
Improving verification speed, by supporting batch validation of all signatures in a block at once (for a fraction of the speed of validating them individually).
Switching to a provably secure construction, perhaps preventing an exploit against ECDSA in the future.

As far as your specific suggestion of using public key recovery to avoid publishing the public key in a spend goes, there are some arguments against:

Public key recovery is incompatible with batch validation, and when ignoring batch validation it is (slightly) slower than normal validation on itself.
There may be patents that apply to public key recovery.
The same size savings can be accomplished more simply by using pay-to-pubkey instead of pay-to-pubkeyhash (again, when combined with Taproot this advantage extends to scripts as well as single key constructions).
Longer term cross-input signature aggregation holds much better potential size savings by reducing the total number of signatures per transaction (not just transaction input) to 1. Cross-input aggregation is also incompatible with public key recovery, though this isn't currenty included in the Schnorr proposal.

Also note that the lack of public key recovery isn't inherent to Schnorr - it is a result of choosing key-prefixed Schnorr. It's better to see it as a tradeoff between 3 properties:

Linearity: the ability to jointly produce a signature for the sum of public keys (the basis for all Schnorr multisignature constructions).
Lack of key malleability: with key malleability it is possible to take a signature for an existing public key and turn it into a signature for a related key (for example, one in the same BIP32 tree)
Public key recovery: the ability to reconstruct a public key from a signature and message.

Key-prefixed Schnorr lacks public key recovery. Non key-prefixed Schnorr suffers from key malleability. ECDSA lacks linearity. It doesn't seem possible to construct a signature scheme that has all three.


Block size depending on transaction count It's widely known that Bitcoin has a limit of 1 MB per block.

However, the average block size is currently about 0.6 MB:

(original data)

According to this thread, Bitcoin transactions has an average size of 512 B. For the sake of simplicity, I'm not considering the 80 B of block header.

Given that, it's possible to fit about 1200 transactions in a block today. Considering that a new block will be mined every 10 minutes, the current capacity of the network is 2 tps:

1200 transactions/block / 10 min/block / 60 sec/min = 2 transactions/s

This seems like a very low throughput, specially when compared to Paypal's average rate of ~115tps and Visa's average rate of ~2000 tps.

Now imagine that I want to build a side chain that can handle as much traffic as Visa network. I want to mantain most of the parameters of the Bitcoin's blockchain (10 min/block, ~512 B/transaction), but being able to process 2000 tps.

In this case, my block size would be the following:

2000 transaction/s * 512 B/transaction * 60 s/min * 10 min/block = 586 MB/block

Is the estimate above correct, or am I missing something?

If it's correct, what are the impacts of switching from a 1 MB block size to 586 MB?

Is the estimate above correct, or am I missing something?

Your estimations seem (more or less) fine.

  If it's correct, what are the impacts of switching from a 1 MiB block size to 586 MiB?

The two major ones I see are:

large blocks make full nodes more difficult/expensive to operate (i.e. requires better specs and better upload/download speeds); thus bad for decentralization as not many people will be able to run a full node
the blocks will take longer to propagate through the network, thus it increases the chances of orphan blocks and double spends.

For a more detailed list see here.

Note, that these concerns/drawbacks for an increased block size were raised for a 4, 8 or 32MBs increase... a 586MB increase would be way too excessive. And if you keep the parameters similar to bitcoin you would have the same issues in the side chain.


Can i recover exodus with 12 words form blockchain.info? At btgexplorer i saw that i have some BTG. I want to claim it from by blockchain.info wallet. I followed this article https://medium.com/@kuzdogan/how-to-claim-your-bitcoin-gold-from-blockchain-info-or-other-wallets-e7ff4242ecf2 but i cannot use Coinomi wallet. I like to use exodus wallet.

If i recover my bitcoin wallet (with 12 words from blockchain.info) inside exodus, will i still be able to use my blockchain.info wallet?

I would suggest:

Create a new blockchain.info wallet (or better yet, a wallet where you control the private keys)
Send all the BTC from your existing blockchain.info wallet into your new wallet.
Use your recovery phrase to generate any BTG-compatible wallet.  That should allow that wallet to "see" the BTG balance associated with that private key.

It's important to create a new wallet for your existing BTC since the 12 word passphrase is the only secret required to access those funds.  Creating a new wallet creates a new private key, which results in a new 12-word passphrase, thereby protecting your existing BTC (assuming you send it to the new BTC wallet).


Are there scientific studies related to the Bitcoin technology? Besides “Bitcoin: A Peer-to-Peer Electronic Cash System”, which is more like a brief description of the general framework, are there other ‘scientific or research grade’ studies about Bitcoin technology? Can similar decentralized crypto-currency models be found in the literature?

Bitcoin is a relatively new phenomenon and the peer-review process takes a while, so there is not much out there yet.

The most notable is a network analysis of bitcoin transactions done around the alleged "allinvain" theft earlier this year.

http://arxiv.org/abs/1107.4524

Other than that, there are currently a few articles published in academic journals that focus on bitcoin (as well as pop-sci and pop-compsci articles in various places)

For example

Grinberg, Reuben, Bitcoin: An Innovative Alternative Digital Currency (April 21, 2011). Available at SSRN: http://ssrn.com/abstract=1817857

The best answer may be to do this in the form of a community wiki where articles published in academic journals can be posted by subject, as if bitcoin survives it will obviously start to receive a lot of attention.


Can I defraud the merchant, or the merchant defraud me, on the bitcoin or lightning network? Suppose I am buying a smartphone from an online merchant I don't trust. Neither do they trust me. Suppose we're trying to defraud each other.
There are two attempted fraud scenarios I can think of:

The merchant attempts to defraud me: I pay X satoshi to buy a smartphone, but I never receive it, and I'm afraid the merchant will never deliver it to me.
I attempt to defraud the merchant: I pay X satoshi, and the merchant eventually delivers it to me; I then attempt to refund the X satoshi payment after physically receiving the smartphone. (This is assuming we're both using the Lightning Network).

Can these fraud scenarios be prevented in the Bitcoin network? Alternatively, if I decide to make the payment off-chain (i.e. Lightning Network), then how does the Lightning Network prevent these scenarios?
More importantly, is it possible to prevent both scenarios simultaneously?
It is a form of distributed transaction to pay BTC while "simultaneously" receiving physical goods. At the moment, I think that this type of distributed transaction is not achievable with the Bitcoin network or Lightning network alone. Will we still need to rely on the judicial system to settle this or perform some sort of rollback?
I'm not well-versed with the Bitcoin or Lightning protocol, so if someone can correct or explain to me, that would be great.

The merchant attempts to defraud me: I pay X satoshi to buy a smartphone, but I never receive it, and I'm afraid the merchant will never deliver it to me.

This is certainly possible, and Bitcoin-related scams like this happen all the time. If you're afraid of this, you really want to pay with Bitcoin, and you want to have some form of buyer protection, you should use a trusted third-party escrow service that will hold control of your coins until you confirm receipt of your smartphone, and the escrow can mediate any potential disputes. Most people in this situation would use a multisig wallet to keep the escrow themselves honest, but I don't think this is possible over Lightning Network (you'd need an on-chain transaction).

I attempt to defraud the merchant: I pay X satoshi, and the merchant eventually delivers it to me; I then attempt to refund the X satoshi payment after physically receiving the smartphone. (This is assuming we're both using the Lightning Network).

This is not possible with a completed Bitcoin transaction, nor over Lightning Network. Bitcoin transactions, once completed, are final.


What if Zcash Company turns evil? The "Company Values" section at the Zcash website states:

  we are not the controllers or the power-holders, and do not control
  the mining or distribution of Zcash. Every user of Zcash contributes
  to its decentralization, helping to protect it against failure and
  corruption.

but the zcash Security Information page reads that:

  If we are sufficiently hacked, or if we collectively turn evil, the above resources will not be sufficient to protect you. Luckily, the Zcash network is growing into a larger and more resilient community beyond Electric Coin Company itself. If you suspect that the company has been compromised, please also check other community resources unrelated to Electric Coin Company.

This is slightly confusing to me. I would have thought that the distributed / decentralised nature of it offers enough protection against anyone turning evil. What is the level of control that the Zcash have over the currency?

Zcash the currency requires the generation of parameters that must then be securely destroyed. If this data is not securely destroyed by Zcash the company they could undermine the currency, by being able to create new money. For a more thorough discussion, see also the Zcash blog post on the problem and one by Greg Slepak discussing the potential risks.

The process for securely generating these parameters has been described, and for the security assumptions to hold requires at least one of the parties involved to be honest. More information is provided in the Q&A section of a recent talk by Eran Trommer.

However, in the event that the parameter generation process was compromised this will be hard to detect, since the design of the network pretty much ensures that this would be kept secret as long as the currency is not sufficiently devalued to make it obvious that actually it was devalued. Such an attack can still not compromise the privacy of the users, but can create currency at will.


Bidirectional channel opening in c-lightning With the current version of c-lightning is it possible to open a bidirectional channel funded by both parties?
I managed to open a channel with fundchannel command, but that seems to be a unidirectional channel, since only I provided the funds.
I don't understand how the entire network can work if we can open channels funded by just one party.

There seems to be a mix in notation. Payment channels on lightning are bidirectional by design. However that does not mean that funds can always flow on both directions. Currently channels are funded by one party an as such can not receive funds after opening. As was mentioned in the comment what you mean is called a dual funded channel.

As soon as you use a channel to make a payment the balance changes and you will be able to receive funds. Since the lightning network is in use it is fair to assume that most channels by now are somewhat balanced in the sense they can send and receive. So at this time it might just be a matter of opening one channel t be able to pay some party on the network and thus have the ability to receive money again. There are services that reimburse you onchain once you pay their invoice. This can be used to have a balanced channel.

In deed in the very beginning with the channel design there was the cold start problem. But apparently this has been overcome. Though I agree with you it is hard to imagine that we have been able to do so without dual funded channels.

BTW lisa neigut is pretty far of implementing the dual funded channel protocol for c Lightning. So clightning will probably be the first implementation supporting dual funded channels.


How do custodial lightning wallets work? I just installed and tried to use a lightning wallet (bluewallet) on an Android device.

As per my understanding, when I fund my lightning wallet (This is an on-chain tx) with amount x, I open a direct channel with blue wallet of amount x. If I want to send a tx on the lightning network (say amount x) to a person B, they must have their own open channel with bluewallet of amount y where y must be greater than x for the tx to go through. If it goes through then it's routed via blue wallet to person B.

Is my understanding correct? Please correct me if I'm wrong.

What happens if the above conditions are not met, i.e. person B creates a wallet on blue wallet but doesn't fund the channel? What happens if the amount y is less than x?
Also, are my keys randomly generated on device only?

I am sorry to say but your understanding is wrong.

When you send x btc to Bluewallet you don't open a channel. You just give them your Bitcoin. Bluewallet and other custodial wallets run one (or possibly several) lightning nodes and allow you to use it with up to the amount of btc you have sent to them before.

So as long as Bluewallet users send each other payments no channel is needed as everything can just happen virtually in their accounting software. Also in a custodial wallet you can receive btc via lightning without providing liquidity first (as with your non custodial fullnode)


Which cryptocurrencies are considered base coins? Are these the only base coins: BTC, ETH, BTH and LTC?

Base coins are those that you can buy directly (USD -> base coin). Alt coins such as NEO, XRP and EOS require first going through a base coin.

In the context of defining basecoins as those that change directly with USD, there are actually quite a few. The 4 you've listed are available through Coinbase, which is currently the most popular fiat to cryptocurrency gateway.

However, there are many exchanges that still accept USD/EUR/JPY/KRW deposits with some level of verification. For example Bitfinex allows for fiat deposits after verifying your account, and they have 20 or so crypto assets (including EOS, XRP, NEO that you mentioned). I'm sure there are many more exchanges that allow fiat deposits, even if crypto deposits are growing increasingly popular for legal reasons.


How does Electrum wallet list my transaction record? I'm a beginner of Bitcoin and blockchain. I use Electrum as my BitCoin wallet, and install it on both home PC and office PC.

I can see all transaction records on Electrum wallet of both home PC and office PC.

You know a new receiving address will be generated when I require a new  receiving bitcoin every time. I think that the new receiving address is generated  randomly.

I think that Electrum wallet will not record all receiving address I used.

so I'm very stranger that how Electrum wallet find my transaction records from  blockchain quickly, could you tell me?

A bad way is to calculate all private key based seed, and calculate all public key and my receiving bitcoin address based private key, then find all transaction based all my receiving bitcoin address from blockchain. it's a huge work!

Electrum is backed by a number of electrum-servers (electrumx is a more recent implementation). These servers maintain the full utxo set, and also serve information such as block headers to electrum clients.

Since both your electrum installations are using the same seed, they will always generate the same addresses.

When you start electrum, it will contact an electrum server to retrieve the latest blockchain information. It will then utilize a simplified payment verification (SPV) system to query the node for transactions relating to your addresses. As it realizes addresses have been used, it will generate more addresses using the seed words.

The process of how addresses are created from a common root is described in BIP32. The SPV protocol is described in the whitepaper, and also by MultiBit (another wallet that utilized SPV systems)


Does sending coins to someone incur fees? Some noob questions.

If I send someone coins, will it incur fees?
If it incur fees then is it true for all other coins too?
If it incur fees then can I set fee for the transaction?
If I can set fee for transaction then what will be its impact if the fees is low or high? What if I set no fee at all?

Yes it incurs fees but it is as low as 0.001 so it doesn't really bother. Moreover you can set what fees you want to pay from the QT if you are running QT on windows you can set it by navigating to Settings >> Options >> Main and then fill the box which says "Pay transaction fee"

if you are running headles QT on linux then run bitcoind settxfee

The time taken by a transaction depends whether you are paying fees or not if you are not paying fees your transaction will take more time than usual


Is the UTXO set computed from scratch by new full nodes? When a new full node joins the network,
does he, by default, compute the UTXO set from scratch from the blockchain so far; or does he simply trust the UTXO set he received is valid?

The UTXO set cannot be validated, except by going through all blocks in history.

The P2P protocol does not even have a way to stream the UTXO set from one node to another, so yes, full nodes will always download and verify full blocks, and rebuild the UTXO set from it.

There are various ideas (some of which are very old) to make blocks commit (= contain a hash) to the UTXO set, or a related data structure. That way one could synchronize the UTXO set for a state in the past (which  means a trust in miners), and fully verify going forward from there.


Anything lower than 5460 satoshis is currently considered dust, that bloats the blockchain, while transferring a value that is lower than what it costs to store the resulting output on disk. From the bitcoinj source:

  Any standard (ie pay-to-address) output smaller than this value (in
  satoshis) will most likely be rejected by the network. This is
  calculated by assuming a standard output will be 34 bytes, and then
  using the formula used in getMinNonDustValue(BigInteger). Currently
  it's 5460 satoshis.


what is a discrete logarithmic assumption? how does it set-up trustless proofs? pending proposal of bulletproofs as a zk proof for confidential transactions relies on fiat-shamir heuristic to be non-interactive via creating a digital signature on interactive proof of knowledge and as cited in [bootle, wuille, maxwell et al] "Bulletproofs: Short Proofs for Confidential Transactions and More" paper also rely on discrete logarithmic assumption be a trustless proof (unlike snarks). this led to my question above as im not well-versed on this topic and would like to learn more about this, more specifically in its relation to setting up bulletproofs.

The discrete logarithm problem is a cryptography concept that underlies the basis of much of modern cryptography.

In general the discrete logarithm problem states that for the equation bk (mod p) = a where b, a, and p are known values and p is prime, finding k is hard.

This is hard because of modular arithmetic; in order to find k, you would need to brute force it. Furthermore, there are an infinite number of solutions because you don't know how many times p b^k is. The values b and p are also specifically chosen values which make this problem harder as some values (especially lower values and non-prime values) are easy to solve (easy in that it doesn't take much time but the time complexity is still the same).

Although there is no proof that the discrete logarithm problem is actually hard, but it is believed to be hard as no one has found a way to actually compute the logarithm quickly.

But Bitcoin actually uses a slightly different version of this problem known as the Elliptic Curve Discrete Logarithm Problem (ECDLP). With EC math, b is actually a point on an elliptic curve, it has an x and a y value. Rather than raising b to some number k, you actually do EC scalar multiplication with some number k, so it is

bk (mod p) = a

What this boils down do is adding b to itself k times, and the security comes from the fact that it is hard to figure out what two points were added together to get a third point.

The process of adding an EC curve point to itself means that you find a tangent line to the point, extend the line to where it intersects the curve, and the invert the y value of that point. Doing this, and reversing it, over the real numbers isn't that hard, but EC cryptography is done over a finite field of order p which is a large prime, which means that all values are (mod p) so, when you graph the curve, it's all over place in your graph. This means that, given a point on the curve, it is hard to figure out what other points were added to get to that point so it is thus hard to reverse this process.

In both ECDLP and the normal DLP, k is the private key and solving either discrete log problem would result in you finding the private key k.

There are algorithms such as Shors algorithm which can allow quantum computers to solve the discrete log problem.

Note that this stuff is hard and I am not a cryptography expert. This is just how I understood things and it may not be necessarily correct or make sense.


What can I expirement with BitcoinCore on my own? I have a simple faculty assignment where I have to do some experiments with transactions or experiment with the Bitcoin protocol or maybe with wallet code. Work on that assignment shouldn't last more than one day, however I cannot imagine anything I can actually do on my own. Every change in code seems too complex for me or pointless. All my changes will be tested on testnet or regtest and never published of course. Can someone help me with this with some sort of direction, link to some other experiments or maybe with a simple idea or pseudo code example?
Thank  you all!

There are lot of things you can learn and try from below link including designing complex bitcoin scripts:
https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line


How does blockchaininfo find out the difficulty? Do they have a client installed on their servers that pulls the info out of block headers? How does it do it? What's the command?

Blockchain.info definitely has a client installed on their servers, that's where they get all the block data from. I heard they're using a fork of BitcoinJ.

In the Bitcoin-qt daemon, you can get the difficulty of the latest block with the getdifficulty command, and you can get complete information about every block, including the difficulty, with getblock.


Bitcoind address index Does anyone know some reliable Bitcoind fork which allows to use address index?
I know that there are
 https://github.com/bitpay/bitcoin and
 https://github.com/btcdrak/bitcoin/releases

But is seems that there are not supported any more.

What I really need, it is getting unspend outputs for any address (not for the wallet only), and it need to work fast(max 1-5s).

The scantxoutset RPC in 0.17+ will do what you want, although unless you batch query several addresses at once it may be a bit slower than what you were asking for.


Does bitcoin qt need to synch before I can spend my change? Sorry for the follow up question...
i was trying to transfer my btc to a new wallet (believing the original one had been compromised).
I sent 2 tiny test transfers of $1 then when they arrived in the new wallet I sent the rest of my btc.
When I check the blockchain it looks like the two $1 transfers may have generated large ‘change’ transfers.
The big transfer didn’t appear.
Does bitcoin qt need to synch with the network before it will notice the change has been received and allow the big transfer to go ahead?
It is still rebuilding the blockchain...
Thanks in advance!
P

Additional info: the big transfer has not been confirmed but it looks like my wallet has sent it. The big transfer is not on blockchain.com. Only the first 2 small ones with their paired transactions (possibly change) can be seen.

Any idea why the 3rd transfer isn’t showing up?

Does bitcoin qt need to synch with the network before it will notice the change has been received

It won't know about the change transaction until it has processed the block containing that transaction. Your change transaction is in a recent block, your bitcoin software is still catching up earlier blocks and hasn't retrieved that recent block yet.

  allow the big transfer to go ahead ...  It is still rebuilding the blockchain

This seems like a misunderstanding on your part. If the block containing the "transfer" has 6 confirmations, it has already "gone ahead". It is absolutely irrelevant whether your wallet ever catches up or not. In this scenario wallets only ever do two things

send your transaction out to a few Bitcoin nodes it knows about hoping they will pass it on and that eventually a miner will notice it and include it in a newly mined block.
keep listening for newly published blocks and reading them to see if they contain any mention of any of the set of addresses the wallet thinks you are interested in (ones it generated for you).

Wallets do not "allow the transfer to go ahead". As far as the rest of the world is concerned, once your wallet sent out the candidate transaction, your wallet's role in the process ended.

Wallets generally try to dissuade you from using money associated with  transaction outputs the wallet has either not yet seen in a mined block or for which it has not seen at least 6 subsequent blocks built on the block containing the transaction.

Footnote:

For simplicity, and to avoid causing confusion, I have omitted possibilities like RBF, double-spending attempts, etc. I am assuming the normal simple process used in most ordinary regular boring plain transactions.


Sendmany transaction fees How high are transaction fees for "sendmany"?

Is it correct that using "sendmany" i can send Bitcoins to multiple addresses but only have to pay the transaction fee once?

The transaction fee is based on the size of the transaction (in bytes), among other factors. Each output adds some length to the transaction, so more destinations will mean a higher fee. With the current transaction fee schedule, roughly every five destinations adds an additional .0005 BTC to the standard fee.


Bitcoin Core wallet and Blockchain.com sorry for the n00b question, it's been awhile since I looked into this. I have a Bitcoin Core wallet on my machine with a backup of the wallet.dat. It's been ages since I opened the application, so I've upgraded it and am re-syncing it.
I also have a Blockhain.com account (originally opened when it was Blockchain.info). I remember that on Blockchain.com I could see my BTC amount. I now can't log into to Blockchain.com because my 2FA device changed and support hasn't gotten back to me for days about how to reset it. Googling suggests their support never gets back.
Since I'm not hearing back from support I'm wondering if I have lost control of my wallet funds. Did the action of creating a Blockchain.com/Blockchain.info account mean I have handed over my wallet to the company and lost this BTC?

Did the action of creating a Blockchain.com/Blockchain.info account mean I have handed over my wallet to the company

Yes.

and lost this BTC?

You are wholly dependent on the continuing good-will and competence of the business and its customer support systems and staff.
When Satoshi Nakamoto invented Bitcoin, his famous white-paper said

What is needed is an electronic payment system based on cryptographic proof instead of trust,
allowing any two willing parties to transact directly with each other without the need for a trusted
third party.

I feel too many people ignore this.


Block Validation: who does it? How much it costs? And is it present in all protocols? Different threads were posted in order to clear up this question, but there are some points that I would need to confirm:

When you become a full-node (NOT miner, you just downloaded the full blockchain with a wallet or smilar), are you automatically a validator? Meaning that every new block will be validated by you (and the rest of full-nodes) in order to publish to everyone else whether is trusted or not. Or it does not exist someone that can be only a "validator", and only miners can be also validators?
Does block validation process spend too much energy? Or validate blocks is not a "big deal"?
In protocols that use PoW and PoS/DPoS (Bitcoin, Ethereum, Cardano, EOS...), once a block has been constructed using one of those consensus methods and included into the chain, will be always being involved this "second" validation for the rest of the full-nodes in that particular blockchain network? (I suspect that this second validation could be work slightly different in each of them, but always including this validation for the rest of the nodes)
And finally: what happen if one full-node start to rejects new blocks (he/she considers that are not valid), but the rest of the nodes says that is correct? Imagine a troll/hacker that starts to say that all the nodes are invalid, can that people be banned? Or will be that person just ignored?

When you become a full-node (NOT miner, you just downloaded the full
  blockchain with a wallet or smilar), are you automatically a
  validator? Meaning that every new block will be validated by you (and
  the rest of full-nodes) in order to publish to everyone else whether
  is trusted or not. Or it does not exist someone that can be only a
  "validator", and only miners can be also validators?

Yes, all full nodes validate all transactions before putting them in their mempool and all the blocks they receive. You do not publish to anyone if it's trusted or not, everyone checks if it is valid by themselves.

  Does block validation process spend too much energy? Or validate
  blocks is not a "big deal"?

No.

  In protocols that use PoW and PoS/DPoS (Bitcoin, Ethereum, Cardano,
  EOS...), once a block has been constructed using one of those
  consensus methods and included into the chain, will be always being
  involved this "second" validation for the rest of the full-nodes in
  that particular blockchain network? (I suspect that this second
  validation could be work slightly different in each of them, but
  always including this validation for the rest of the nodes)

Not sure what exactly you mean here. Every full node will validate all blocks once.

  And finally: what happen if one full-node start to rejects new blocks
  (he/she considers that are not valid), but the rest of the nodes says
  that is correct? Imagine a troll/hacker that starts to say that all
  the nodes are invalid, can that people be banned? Or will be that
  person just ignored?

If someone rejects valid blocks he will be left behind as the other nodes will continue to build their chain. No one asks anyone if "other nodes are valid" or "other blocks are valid", they ask each other for blocks which they verify themselves when they receive them. If he tries to provide an invalid block when asked for one he will be banned by other nodes. That's the whole point of bitcoin, you don't have to trust anyone, you check yourself.


c-lightning channel announcement/establishment issue I've been running a c-lightning node over Tor with 2 open channel for a few months and it still hasn't forwarded any payment. Maybe it's normal due to the low amount of liquidity provided by my node, but I noticed my channels status shows this log:

CHANNELD_NORMAL:Funding transaction locked. They need our announcement signatures.

To me it appears like my channels haven't been publicly announced yet.
This is my config file:

network=bitcoin
alias=******
rgb=******
bitcoin-rpcuser=bitcoin
bitcoin-rpcpassword=******
bitcoin-rpcconnect=127.0.0.1
bitcoin-rpcport=8332
announce-addr=******.onion
bind-addr=127.0.0.1:9735
proxy=127.0.0.1:9050
daemon
log-level=debug
log-file=/home/bitcoin/.lightning/debug.log

Am I missing anything?

When the channel is opened the opening side of the channel chooses if the channel should be private or announced. Well actually the other side can also choose not to accept public channels. Maybe that has happened with both of your channels.
From the information you have we can only guess / speculate.
 If you want to you can try to open a channel with my node (details at https://ln.rene-pickhardt.de - the node does not speak tor tough) but I could look in my logs if necessary and we could together debug what is going on.


Is there a reason transactions aren't compressed? I have two similar questions

Why aren't transactions compressed in the P2P layer (and why wasn't this discussed in the agenda)?
Why aren't transactions compressed before they're added to a block? (Effectively a block size increase) Are there reasons other than avoiding a hard fork?

Transactions themselves do not compress well, they are mostly
cryptographic hashes and signatures. You can save a couple of bytes
here and there by bit-packing, but generally speaking there's not a
lot of reason to introduce massive complexity for moderate savings. Many wallets today grind the signatures to save an
extra byte, but this is possible without changing any of the other
software in the network.
A good portion of the transactions (30%) are produced by wallets which do not use compressed ECDSA keys, which is a more obvious optimization to make. The majority of these are likely produced by blockchain.com wallets.

See above. Compression at the block level also does not present significant improvements. It is possible to compress ECDSA public keys (that are in the uncompressed format) before storing them on disk, but this is very computationally expensive.


UTXO transaction consolidation? As a relatively new user, I have only generated a handful of public addresses. Usually, to move to a newly discovered and preferred wallet.

I’ve only recently learned that a single seed phrase can generate multiple key pairs, And each private key can generate multiple public addresses.

Nonetheless, I’ve heard the old wisdom of generating a new address for each transaction, but have no idea how to sensibly put this into practice, or why.

As new users, should we be learning about utilizing many public addresses for our transactions, or is it just fine to use one?

You should avoid reusing addresses. Bitcoin works on a UTXO model where each payment is one UTXO. 100 payments to 100 different addresses produces 100 UTXOs, as does 100 payments to 1 address. There is no different in UTXO consolidation with reusing the same address.

Using different addresses provides more privacy, and potentially, more security. You should not be reusing addresses and instead generating a new one for each and every payment that you receive. Modern wallets will give you a new address when you click "receive" in whatever wallet (there's usually a receive button) so just use the addresses it gives you instead of reusing the same one.


What is "canonical transaction ordering" that Bitcoin ABC is considering implementing? What exactly is "canonical transaction ordering", that Bitcoin ABC is considering implementing?

How does it help exactly, and why is it so controversial?

Could it be adopted in Bitcoin Core? Why yes/why not? Is that a protocol change, requiring a hard fork, or an implementation change?

Canonical Transaction Ordering is a different way to organise transactions in a block (different from Topological Transaction Ordering, currently used).

Bitcoin ABC's argument for CTOR
1. CTOR is simpler to implement than TTOR.
2. About 70% of block template creation time is due to ordering requirements. Eliminating this will improve performance.
3. Improves parallelisation
4. Easier blocks transmission
5. Security patch (large block with a transaction ordering that is as slow to validate as possible)
source

nChain's argument against CTOR
1. Unsecure (no technical explanation)
Note: nChain planned to implement CTOR in the past: source

It does require a hard fork.


How do I show my wallet from the command line? How can I show/open my wallet in gui-less linux version? I tried to show the contents with cat but it's only binary data (which makes sense). The --help option of bitcoin/bin/64/bitcoind also doesn't give me a hint.

Direct command-line access via bitcoind is not available any more. You can get access from the command line via the RPC (Remote Procedure Call) API, e.g. with python. The API calls list is found here.

To give a specific example, you can access wallet information via the Python RPC API. Given that the client was booted with rpcuser=user and rpcpassword=pass, the sample python script illustrates how you can call the getbalance command:

  from jsonrpc import ServiceProxy

  access = ServiceProxy("http://user:pass:8332")
  access.getinfo()
  access.listreceivedbyaddress(6)
  print access.getbalance()


Mycelium - more than one unused Bitcoin HD account Why can't I have more than one unused Bitcoin HD Account? What if I want to use a Bitcoin mixer that allows for 5 destination addresses?

You can have multiple addresses on one account.
Accounts are not a feature of the Bitcoin protocol, they are a feature created by some wallets to help you organise your money.


Is it possible to brute force the Secure Element of Ledger Nano S? Only things I could find about this subject always tell that Ledger has a secure element like SIM cards and credit cards have. Also something about another OS running near the main application. But simply when you cut the power isn't it just a storage device? SIM cards and credit cards are encrypted with a pin. I also think the secure element in Ledger is. So can an advanced adversary pull the secure element off and brute force a 6 digit PIN?

No. Secure elements are designed to be resistant to physical attacks. So you shouldn't be able to do anything physical to the chip that allows you to get data off of it. They are designed to prevent unauthorized access to their data so they also are more than just storage devices.

While you can desolder the chip and attach wires to its pins in order to interact with it physically, the chip specifications are not public and require signing an NDA. The manufacturers make it difficult for the general public to be able to know the functionality and ways to interact with the secure element. They are doing security through obscurity.

Furthermore, secure elements are generally complete systems with their own CPU, RAM, storage, etc. So it isn't just a storage device where you can get the contents. Rather they are tiny computers where you can only interact with them in a very specific way.


What does 'signal' and 'lock-in' mean in a BIP? I have a vague idea about the jargon used over there, but what exactly do 'signal' and 'lock-in' mean specifically?

Signalling simply means the miner of a block has set a bit in the version field to say that they support something. BIP 8 and 9 discuss this, it allows the miners to let the network know they are ready for the change or not. The version field of a block is 32 bits long, and if the top 3 bits are set to '001', 29 bits are free to be used for signalling.

After a certain start time defined for a particular proposal, miners can set the bit specified to signal their support. It is during this time that if at least a certain percentage of blocks are mined with the bit set in one difficulty retarget period (2016 blocks), specified as the threshold needed, that proposal becomes LOCKED_IN. Once it is locked in, it is ready to become active in the network. Locked in just means that it gained enough support to proceed.

This can all be found in BIP 9.


Bitcoin compilation error: conflicting declaration I'm trying to compile the Bitcoin source (1) on Ubuntu and I get:

In file included from bench/data.cpp:10:0:
./bench/data/block413567.raw.h:1:40: error: conflicting declaration ‘const unsigned char benchmark::data::block413567 []’
 static unsigned const char block413567[] = {
                                        ^
In file included from bench/data.cpp:5:0:
./bench/data.h:14:35: note: previous declaration as ‘const std::vector<unsigned char> benchmark::data::block413567’
 extern const std::vector<uint8_t> block413567;
                                   ^~~~~~~~~~~
...
/usr/include/c++/7/bits/stl_vector.h:270:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       vector()
       ^~~~~~
/usr/include/c++/7/bits/stl_vector.h:259:7: note:   candidate expects 0 arguments, 2 provided
Makefile:10306: recipe for target 'bench/bench_bench_bitcoin-data.o' failed
make[2]: *** [bench/bench_bench_bitcoin-data.o] Error 1

Internet searches aren't giving me very actionable clues.

master latest 3489b715120b1bf7559fbddf03cd87b889fdca47

I needed to remove stale files from old builds, just run make clean.

https://github.com/bitcoin/bitcoin/issues/16479#issuecomment-515791321


Search for bitcoin with ipv4 address I am working on a way to monitor bitcoin transactions and found that on blockchain info it's possible to find info about a bitcoin by ipv4 address. Is there an API supporting this on a larger scale? Or is bitcoin info using it's own database to connect ip with transaction?

All bitcoin transaction are not linked to user ip address, unless some wallets which links your transactions to your ip address.

I don't know what blockchain.info doing but what i know it's not possible to track any bitcoin transaction through ip address.


How can I import wallet.dat file to Bitcoin ABC wallet without downloading whole blockchain? I keep my BTC in Bitcoin Core wallet. I would like to start using my BCC but full node is downloading whole blockchain. How can I avoid it?

If you don't need a BCC full node, you can use an SPV wallet like Electrum (see instructions on BCC here).


How can you consolidate your personal UTXO set? (different wallet answers welcomed) With network fees so low at the moment, I've seen a lot of recommendations to take the opportunity to move funds to segwit addresses and consolidate your UTXO set. During peak congestion, many smaller UTXOs were simply not economical to spend and this is likely to occur again in the future. However I haven't found a definitive guide on how to actually do this.

I'm using the Ledger Nano S Bitcoin wallet, which doesn't provide the most granular control over software tradeoffs but not the most abstracted away either. As far as I can tell from the interphase I have two UTXOs in the wallet, one with the majority of my coins and one tiny one of change that I'd like to combine into the larger amount.

I thought this would be as simple as spending the full wallet amount to a new receiving address for the same wallet, and watch as the two inputs were combined into two outputs. However when I did this the wallet simply spent to two outputs of the same amount (minus a tiny fee) regardless. So since I'm assuming my end goal is to in fact combine them into a single output, what are my options here?

I thought this would be as simple as spending the full wallet amount to a new receiving address for the same wallet, and watch as the two inputs were combined into two outputs. However when I did this the wallet simply spent to two outputs of the same amount (minus a tiny fee) regardless

That is exactly what you are supposed to do. That it didn't work means that you did not specify the amount correctly. This could be because you either calculated the amount incorrectly or there is a software bug. I'm leaning towards the former.

If you calculated your amount by looking at a blockchain explorer, don't do that. It will result in an accurate balance calculation because of change addresses. Instead you should just use what your wallet reports back to you.

Most wallets have an option to send the maximum amount in a wallet. If your wallet has that option, use it instead of manually entering the amount. This will guarantee that your entire balance is sent to a single UTXO.


Bitcoin user characteristic I am starting with the execution of internet marketing activities for one Bitcoin gambling site that I owe, and I am trying to figure what best describes owners of bitcoin.

Are there any demographics information available? What sites / habbits dothe bitcoin user have, where does he browse sites online, is he using Bitcoin for gambling purposes etc etc

If someone can help with some insights or useful information I thank you in advance.

Luckily you are not the first person trying to figure this out.

According to an online poll, the average user of Bitcoin is a 32.1-year-old “libertarian” male, from a report at ThinkProgress.

There are some realy detailed Demographics out there:
Zerohedge.com
Simulacrum.cc


What unusal behavior would alert school's system administrator from mining bitcoin? I work in a lab and I have full access to the lab. I often leave my old laptop in this lab to do computational stuff (for lab or for my own stuff). If I want to mind bitcoin using this setup, what unusual behaviors will alert the administration of the school's network? Will there be a huge outgoing traffic? Does it require some ports to be opened?

I know it doesn't answer your question, but: don't do that.

Time to mine on regular computers, even with strong GPUs, is long gone. If you don't have powerful ASICs, forget mining at school computers.


Why does my full node need to load IP addresses from DNS seeds on restart? I stop one of my Bitcoin Core full nodes (v0.19.1) with 10 connections and then start it again. It needs to load IP addresses from DNS seeds. Why is this? Why doesn't it try the addresses of peers it was connected to prior to the shut down? Are they not persisted in addrman? It could then obtain more IP addresses through gossiping from those peers and not need to keep going back to the DNS seeds.

This appears to be resolved for me in v0.21 with this merged PR 16939 and some additional context in this issue and this Bitcoin Core PR review club.
Falling back to load IP addresses from DNS seeds should be the last resort and as you say addresses of previous peers should be persisted in addrman after stopping bitcoind and restarting.


Error - Electrum wallet RPC method not supported I install Electrum in Ubuntu.

sudo apt-get install python-qt4 python-pip
sudo pip install https://download.electrum.org/2.6.4/Electrum-2.6.4.tar.gz

Then I start RPC on port 7777 and run daemon:

electrum setconfig rpcport 7777
electrum daemon start

I try RPC by curl:

curl --data-binary '{"id":"curltext","method":"wallet.create_new_address()","params":[]}' http://127.0.0.1:7777

I got error output:

{"error": {"message": "Method wallet.create_new_address() not supported.", "code": -32601}, "jsonrpc": "2.0", "id": "curltext"}

  I tried the command 'wallet.create_new_address()' which can be executed in GUI console but RPC gives error.

There are two problems with your command.

First, any method you call should not be prefixed by wallet. or suffixed by ().

Also, there is no RPC method create_new_address. If you have a look at lib/commands.py you will see that the internal python method create_new_address() is called by the RPC method getunusedaddress, and only when the parameter force=true is given.

With the above in mind, try this:

curl --data-binary '{"id":"curltext","method":"getunusedaddress","params":{"force":true}}' http://127.0.0.1:7777

The equivalent shell command would be

electrum getunusedaddress --force

I tried this on electrum 2.8.3. Sadly, it always returns the same address. This is because the address remains unused.


Are there any poker websites that accept bitcoins? I would think that bitcoins would be a great fit for websites that allow for gambling, and with Texas Hold 'em being such a big card game it seems that a Hold 'em site might allow players to use bitcoins to fund their accounts. Does anyone know of a reputable poker site that accepts bitcoins?

The best resource to look for a poker site is the gambling section on bitcointalk.org.  There are a lot of smaller sites advertised in that section of the forums trying to cater to the poker players who want to use their bitcoins.

I think I've also seen people will to trade bitcoins for money on bigger poker sites, but I do not believe any major sites accept bitcoins directly at this time.


Reliability of Auroracoin distribution model based on Kennitala (Iceland National Id) How can the Auroracoin distribution verify that the recipient does not receive coins using the id of somebody else?

If Icelanders use their ids everywhere then many Icelanders potentially know another Icelander's id.

Does Aurora restrict each Icelander to have only one Aurora address per Icelander id?

Does Aurora filter the Icelanders' locations by IP address?

Good questions!

If I understood the site's content correctly the answer to 2nd question is yes: At each distribution, each Icelander citizen will be given coins only once, so I guess one AUR-address per Kennitala ID is enforced somehow.

The part I'd like to know is how they're going to track which citizen has applied for which distribution: Should a lot of coins remain unclaimed from 1st airdrop, the total will be distributed again, and again, and finally (in case a lot of coins are still unclaimed) a bunch will be destroyed and the rest donated to a charity.

So a crypto-currency savvy Icelander could potentially apply for all 3 distributions, a less savvy might apply for just the last 2 or even just for the last one. And they'd all be using the same address each time. Unless they're using a centralized database, how to know which citizen has not applied for current distribution round?

A theoretically perfect airdrop should concern only with a citizen with a valid Kennitala, not on whence in the world they're connecting from, hope organizers are not using geolocation.

POST EDIT

Some people have tried to hack the airdrop system. So far, it seems the Facebook algorithm is not so naïf as could be expected: as the activation via SMS to the citizen's registered cell-phone seemed much unlikelier to succeed, the blog's author grabbed a kennitölur number, located the full name and created a Facebook account ex-professo. It failed!

It must be indeed possible to game the system as some Icelanders have complained in the forums of someone else receiving their coins. But then some others complain of the system rejecting them (false negative). Too bad most of the recipients are cashing right away, provoking the drop in prices currently seen. In the future, other national-economy-savior coins should take this into account and do something to void it.


Do you need multiple wallets to manage your cryptocurrencies? I was wondering those who have many different coins, do they need multiple wallets? or one wallet with that supports different coins is enough.

Almost every coin has its own infrastructure, so yes, you will need another wallet for almost every altcoin.

Luckily, there have been some people who invented hardware wallets which simplify the process.

Meaning you can hold multiple altcoins in this one program. They still have their own wallet, but is just much more user friendly.

See,

These wallets are both open source, and you are the only one who has acces to your private key, which means that these are pretty secure.

https://coinomi.com/

  Supported Coins (64!!): BTC, ABN, AC, AUR, BTA, BELA, XBC, BLK, BRIT, CDN, CCN, CLAM, CLUB, COMP, DASH, DGB, DOGE, DGC, EDR, EFL, EMC2, ETH, ETC, EXP, FTC, GAME, GCR, GRC, NLG, INSN, IOP, JUM, LDCN, LBRY, LTC, MONA, XMY, NMC, NAV, NEOS, NVC, USNBT, NSR, OK, PKB, PPC, PSB, PIVX, POSW, POT, RDD, RICHX, RBY, SDC, SMLY, SLR, STRAT, SYS, UNO, XVG, VRT, VASH, ZEC, XZC

https://jaxx.io/

  Supported coins (12): BTC, LTC, ETH, DASH (not on iOS), ETC, REP, ZEC (not on iOS), DOGE, ICN, GNT, GNO, DGD


When running a mining pool how many (super)nodes should I connect to? Is it beneficial to connect your *coind instance to multiple supernodes?  Or Should I connect to more than the 8 standard peers?  Does this potentially improve the amount that could be earned in transaction fees or make found blocks distributed to the network any faster?

The only downside to more connections is increased bandwidth usage and slightly more CPU usage. Here, it's estimated that 2000 transactions per second is 7.8 megabits/second (average residential connect speed) and Bitcoin operates at the most at 7 TPS currently so you're in the clear.

Why you should connect to more nodes.

The more nodes you are connected to the more up to date you will be on network status and vice-versa. If the network comes up with a new block, you will be one of the first few notified.

If your mining pool comes up with a block, you will want to push your block out to the network as fast and spread as possible. You want as many nodes to know about your new and valid block as possible. Of course a new block incurs a domino effect with nodes, one node that knows of your block will tell other nodes about it. You can reach all nodes faster if you notify many nodes.

Why do I need nodes to know about my block?

Mining is a competition, you are competing against a massive amount of other players who all are probably hashing faster than you. It's very likely that they will also find a block in the time you do, this happens often. But only 1 block can be accept, and block acceptance is based on network majority. If you mine a valid block at the exact same time as another miner, and you can get a good majority of nodes your block, you will get the reward. The other block turns into an orphaned block and the miner who mined it loses all profit.

It's suggested you connect to as many large node as possible, you don't have to necessarily connect to smaller nodes as large nodes will rebroadcast your block to many small nodes. You may see some increased bandwidth usage but it's negligible considering what kind of connections servers tend to have.

Concerning transactions fees

Connecting to more nodes will net you more transactions to put into blocks, but it really won't be much. The 10 minute block time Bitcoin has means your node will have ample time to put together enough transactions for profit.

8 peer connections is not a lot and may mean you aren't receiving any inbound traffic.


Read only blockchain in bitcoind , patch ideas This question is related to to the ( already nearing 2 GB and always increasing size ) blockchain download needed to use the bitcoin network, and is referencing this previous question :
Is "Reclaiming Disk Space" already implemented? How effective will it be?
 Please read it before answering

Currently if I have bitcoind running on 20 machines, or 20 bitcoind running on the same machine, each of them need to download and store 2 GB blockchain, total 40 GB diskspace used and much bandwidth to dowload it 20 time.

I think the easiest way to make it better would be to have a "read-only" blockchain, one of the bitcoind writes it and the others only use it read only to check transactions.

This could be used to be my own trusted blockchain provider, for all my machines and bitcoind running, on the same machine or remotely using sshfs or other mounting options.

Now the questions :
1- How to implement this in bitcoind ? easiest way to do this ?
2- can this be a problem for the bitcoin network itself in any way ?

Rules : I dont want answers like "try poolserverj" or "you dont need that" please ;)

I already did working prototype for one bitcoind (with one copy of blockchain) managing multiple wallets: https://bitcointalk.org/index.php?topic=71542.msg96212 It is IMHO easiest thing to to with current codebase and it would fulfill the goal to provide for multiple users' wallets independently while using resources for only one running bitcoind.

But the discussion around it died somehow, looks like nobody tried the prototype and I got only some private inquiries.


BIP0016 pay-to-scripthash transaction validation BIP0016 says "Validation fails if there are any operations other than "push data" operations in the scriptSig".

What does it mean "push data operations"? OP_CHECKMULTISIG seems to be allowed but does not look like "push data" to me.

What does it mean "push data operations"?

Push data operations are when a script pushes a byte vector into the stack. Examples are pushing signatures, public keys, or scripts. It excludes all script opcodes apart from OP_PUSHDATA1, OP_PUSHDATA2, OP_PUSHDATA3.

  OP_CHECKMULTISIG seems to be allowed but does not look like "push data" to me.
  OP_CHECKMULTISIG is an opcode, however, since it's actually contained in a byte vector. You are pushing a full script to the stack, instead of just pushing the opcode.

So, if you look at a P2SH scriptSig:

  ...signatures... {scriptLength}{script}

You'll see that OP_CHECKMULTISIG is contained within {script} instead of being directly executed by whatever is parsing the scriptSig.


What does "16: mandatory-script-verify-flag-failed (Non-canonical DER signature)" error mean? What can this error mean?  I've read through the code for it, and several of my transactions have not met the criteria for the error, yet are still rejected.  I've tried decoding via several means (none are super detailed though) to no avail in discerning the problem.  Some have claimed by reading the bitcoin debug log one can find a more detailed reason, but my log says nothing about my rejected raw transaction.

Yes, there is another question very similar to this, but he provided code so as to get an answer for his specific code and the answers didn't address what could have caused it nor how to discern, more specifically, what may be causing it within the code.

Everything in my transactions that I've been trying are manually created.  But they meet those criteria specified.  I'm remaking some right now, but I was kind of wondering if there are other checks being done besides those you have referenced for this particular error.

I have even considered I got the wrong numbers in my manual creation of the variables, but I would think that would cause it to fail under a different error if that were the case.

What can this error mean?

This error can only mean that this function returned false:

bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {

When does this function return true? When all of these conditions are satisfied:

/**
 * A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
 * Where R and S are not negative (their first byte has its highest bit not set), and not
 * excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,
 * in which case a single 0 byte is necessary and even required).

How are you generating your signature?


First step in understanding lightning network I'm checking https://lightning.network/ and first paragraph of explanation says:

  Bidirectional Payment Channels. Two participants create a ledger entry
  on the blockchain which requires both participants to sign off on any
  spending of funds.

What does this step mean.
Is this ledger entry a transaction?
Is this ledger entry actually one broadcasted multisig transaction signed by both parties that ends on the blockchain?
Or two parties broadcast two multisig transactions, or two regular transactions?
Can you give a numerical example?

  Both parties create transactions which refund the
  ledger entry to their individual allocation, but do not broadcast them
  to the blockchain.

After the first step above then each party crate a regular transaction to refund what? (Can you continue on numerical example above)

  They can update their individual allocations for
  the ledger entry by creating many transactions spending from the
  current ledger entry output. Only the most recent version is valid,
  which is enforced by blockchain-parsable smart-contract scripting.
  This entry can be closed out at any time by either party without any
  trust or custodianship by broadcasting the most recent version to the
  blockchain.

The ledger entry is indeed a single multisig 2-of-2 transaction that is included in a block.

Then, both parties create a 1-of-2 multisig transaction that is not yet published to the network, but kept in reserve. This transaction is updated every time you make a transaction between both parties. Once either of the parties decides to close the channel, he or she publishes their second transaction and it is included in the blockchain.


Is a public message at blockchain.info embedded in the actual block chain? When sending a transaction using a wallet at blockchain.info you can add a public message. This message shows up when viewing the transaction at blockchain.info.

Is this message embedded in the actual block chain or is it just a record in the database of the server of blockchain.info?

It did for a few days, before the blockchain.info operator concluded blockchain bloat was not good for Bitcoin.  Now those are only stored on Blockchain.info hosts.

For more details, see:

http://bitcointalk.org/index.php?topic=40264.msg1165261#msg1165261
https://bitcoin.stackexchange.com/a/4709/153


Electricity cost of mining I've checked with my electricity provider, and I have been told the following:

Unit Rate (per kWh) = 0.1399USD
Standard Charge (per day) = 0.1645USD

While mining, if my computer is using 100w (which is a reading my electric monitor is giving me).

How do I work out how much this miner is costing me per hour in terms of electricity usage?