text:
How Ripple actually transfer money from one bank to another?
Imagine there is bank A from USA and bank B from England, and they are both on Ripple Network.
Bank A wants to transfer $100 to bank B.

How does bank A put money in the Ripple network? Does it need to buy XRP from some gateway?

Suppose bank A already has the equivalent of $100 in XRP.
Bank B then receives XRP, but bank B is not interested in XRP, it wants pounds.

How will bank B convert to pounds? Does it need to find a gateway?
What if the exchange rate at this gateway is terrible for him?

The way Ripple's public ledger system works is that you propose a payment by specifying the source and destination accounts and currencies and then the system gives you a quote based on public offers. You can then specify a maximum amount you are willing to pay to complete the payment and submit it. If the payment is possible for the amount you offered or less, the payment succeeds. Otherwise it fails and you can try again.
Ripple uses pathfinding to figure out how the payment is possible, if it is. Essentially, it looks for a chain of market makers or currency traders willing to put together a trade where one of them gets the asset you're paying with and one of them provides the asset you're paying with.
In the short term, to ensure payments work, banks typically do the very same thing they're doing now. They put exchange offers into the system the same way they would if they didn't have Ripple.
This still gives them many advantages:

The payment is instantaneous and the receiving bank knows the instant the payment occurs.
If there are cheaper paths than the regular one the bank would use, it can be taken.
There's flexibility to use multiple paths for a single payment.
The bank can net their payments with other people's payments so that the cost drops for everyone.

thanks a lot. I understood how the transfer is made. But how bank A gets money in and bank B gets money out of the Ripple network?

Reading here http://bitcoin.stackexchange.com/questions/7617/does-sending-non-ripple-money-through-ripple-require-two-people-to-be-connected, it seems that bank A must give money to a gateway, and as you said that he can choose the destination currency, bank B will receive in pounds. but where are these pounds? still on the Ripple network? do you have a link to a paper that you show to banks how does the process work?

The banks could operate as gateways themselves. They could also have gateways that operate accounts at that bank. They can also do it exactly the way now and use the ledger just as a way to do distributed confirmation and reconciliation.

One way it is currently happening is the bank extends credit to a gateway. That allows any Ripple payment that can deliver an asset issued by that gateway to result in a credit to a customer at that bank (and vice versa for outgoing payments).

Just to try to get some clarity around this.  If a bank were to act as a gateway itself, does it necessarily end up holding onto XRP for long periods of time?  Or is XRP just a momentary utility whose purpose is to validate a secure transaction so the bank can near-instantly decrement it's holdings in 1 currency and increment holdings in another?   If it's the case that it holds on to XRP for any period of time, I don't know how it could responsibly gauge how long manage holding such a volatile asset.  Especially the first few banks to join RippleNet.

@thataustin The banks don't have to hold XRP. They can either not settle through XRP (though it's slower and more expensive) or allow others (market makes) to provide the liquidity. Holding XRP is not as bad as you might think because the gains and losses due to volatility mostly offset.We do have a lot of tools to help manage that, including offloading both the upside and downside of the holding to another party.

I think it's necessary to first consider the question: Without ripple, how do banks "actually transfer money" from one bank to another?
Suppose that you and I are banks, and I want to send you $10 million. I'm probably not going to actually physically ship you $10 million worth of bills and coins. Instead, there are a few ways we could do this:

You and I privately agree that I now owe you $10 million. I don't send you the money, just an IOU. Next month you might want to send me $8, and so you just cancel $8 million of that IOU. We keep track of who owes who how much, but might never actually need to resolve it, since in the long run we're both sending a lot of money back and forth. This is difficult, however, because every bank has to maintain debt with every other bank.
You and I make an arrangement through a mutually trusted third party. I agree to owe them $10 million, and they agree to owe you $10 million. Later, someone else might send me $10 million the same way, negating my debt to the third party. A "wire transfer" in the US is just this, where the third party is the Federal Reserve.
You and I announce to a trusted third party that $10 million of my money should now be considered yours. This third party isn't a middleman who holds debt, like the central bank described in #2 - it simply keeps track of IOUs and regularly announces to all parties who owes who how much. The ACH system in the US (a.k.a. "Direct Deposit") works this way.

So, for the most part, bank's don't actually send money to each other at all -
 they just keep track of who owes who how much. Actually settling those debts, if it happens at all, has to happen outside of the systems above.
Ripple, as I understand it, can be thought of as a decentralized version of #3. It's basically a distributed public ledger of IOUs. (And those IOU's can themselves be traded as currency, when they're written by a trusted party.)

This seems much easier to get than the accepted answer.

Except it's not correct. The movement of XRP does actually settle the debts.

This is a response from XRPChat that I hope will add to what David explained:
Evan Schwartz (October 22, 2015)
https://www.xrpchat.com/topic/333-ahbritto-ilp-will-potentially-increase-value-of-xrp-as-a-bridge-currency/#comment-1986
"If two ILP connectors have XRP, each would set their rate between XRP and whatever other currencies they're trading. That rate would be publicized off-ledger, potentially through a standardized API. When it comes to executing a cross-currency payment bridged through XRP what you would see on RCL would be an XRP payment from one connector to the other. We've already built a proof of concept that did this on the test net (which has Suspended Payments support already)."
Therefore once the transaction is complete the receiver would have already exchanged the XRP to the desired currency at the agreed upon rate. In other words, due to the near instantaneous speed of Ripple the agreed upon rate would have been achieved at the completion of the transaction. Based upon this understanding Bank B does not have to "find a gateway" or worry that "the exchange rate at this gateway is terrible" because this has all been resolved and agreed to prior to the transaction and achieved by the completion of the transaction.

I understood the question as being about RCL. Reading over it again, it could be about ILP. The mechanism is similar -- someone accepts the sending asset and someone provides the receiving asset and the system arranges the intermediary transfers to everyone is happy.

Thank you! so bank B already receive the pounds in one of its accounts outside the Ripple network? hmm but there must be some audit here. I think this must be allowed be their central banks, right? like, they cant simply say: this 100k pounds came from the Ripple network, or they can? I'll study more to understand how international transfer can happen without interference/knowledge of the parties' central banks. thanks again!

There are several different flows, but the general ideal is that the ownership of funds already at the bank changes. For example, some money that previously belonged to one of the bank's customers that was stored at the bank now belongs to the bank. If the bank owed Alice $500 and now doesn't owe Alice $500 because of the transaction, the bank acts as if it was paid $500.

So I just found this discussion through Google, and I want to thank everyone here for doing a good job explaining the utility of Ripple.
However now that I feel like I understand.... Does anyone else think that the conversation above really just makes the current banking system (and therefore Ripple) sound completely obsolete?
Ripple to me sounds like the equivalent of the slide ruler.  Sure it was great for a while during a brief period where mankind hadn't quite gotten over the old ways of doing things.  But even meager mechanical computers made it seem antiquated.  Then electric calculators were invented - and slide rulers disappeared overnight.
Ripple may find use longterm with the banks that are left standing 10 years from now, but let's not pretend Ripple actually does anything that useful when DASH/Ethereum/Bitcoin/etc already remove the entire need for banks in general...  Oh, and why can't banks just make their own network now and remove the middle man?

If you think cryptocurrencies remove the need for banks, then you don't know why banks were invented in the first place. Would you store all your lifetime savings in your laptop? Of course not.

@Leandro - If you subscribe to philosophies of distributed systems, you certainly would.  Ironically, I think it's you that haven't grasped the point of distributed networks.  In this case, you actually WOULD store it on your laptop, and on my laptop, and on Tom Splittstoesser's.  Because all of our laptops would be playing by the same cryptographic principles, unable to convince the system to play any differently.  So, humbly, I'd have to ask you to reconsider the purpose of cryptographic transactions such as those in BTC, ETH, etc.


text:
New To Mining - How Much US$ Am I Making / Day?
I am using a GTX 1050 ti SSC with fans at 100%. I got really lucky and this card might be the best overclockable one ever, I boosed performance by about 20%, when other people are happy to get 10%. Anyways, I am using MultiMiner and I am curious how much US$ I will make every 24 hours on average. The difficulty says 440.79B, price is Bitcoin, Profitability says 100%, Average is 386.21 MH/s, and Intensity is D. Thank you for help and is this good or bad?

also see: In the ASIC-age, is it worth starting mining Bitcoin at home?

First of all, are you trying to mine bitcoin?
And if you are then I am very sorry to tell you but trying to mine with 386.21 MH/s with the current bitcoin difficulty, means that you will mine close to no bitcoin. The power cost will be much higher than the mined bitcoin and thus will be unprofitable.
Currently, I am not aware of any person still trying to mine bitcoin with GPU's, I might be wrong, but the difficulty has gone up so much that it is not profitable anymore.
You can use this site to check your profitability, but as I said if you're trying to mine bitcoin I don't think you will find it profitable.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Why is wif prefix 0x80 more than pubKeyHash prefix
I forked a coin and found that whatever I put in pubKeyHash prefix, I need to add 0x80 to it, to calculate wif prefix and hence generate an address keypair, i.e address and private key corresponding to that address. If I add anything apart from 0x80, to calculate wif prefix,the private key generated doesn't correspond to that address.
Would anyone tell me the reason for the same.

0x80 is the version number for private keys. It allows a decoder to know what to do with the data it received and to check that you have entered the correct thing. Like many magic numbers in Bitcoin, it was arbitrarily chosen by Satoshi Pieter Wuille.

Nope. It was arbitrarily chosen by me.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Unconfirmed Transaction (after two days)
Okay, so I have done research on this. My problem is that my fee was embarassingly low. Ive always had my wallet do it automatically and I switched wallets and it was set at .0005 BTC/kb (I didnt check until after a day of no confirmations). Is there any way someone could help me get this transaction confirmed (fee is a whopping 32 cents). Now that I understand how this works, I have set my wallet to manual fee per transaction where I will do $20-30 per transaction for now on. This is extremely embarassing and I meant no disrespect to the miners or the community
https://blockchain.info/tx/c326f5652d7b36a0fb593874714a69b67db3fc810e34b73e0b6eecb087508fb9


text:
git checkout v0.16.3 gives error
Trying to update my bitcoin core installation on raspberry pi with git checkout and it's giving the error "error: pathspec 'v0.16.3' did not match any file(s) known to git." Any recommendations?

That error likely means that you have not done a git pull or git fetch. Those are required so that you can pull down the latest source code and tags so you can then do git checkout.

I've done git fetch as below (refers to https://github.com/bitcoin/bitcoin):
"git fetch origin master"
"git checkout v0.16.3"
after which I get the error

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Ripples stucked in old Android wallet
Recently I found some ripples in an Android wallet called RippleWallet. This application doesn't exist on the Play Store anymore and I don't remember where I downloaded it (dumb I know but it was 2 years ago and I didn't cared much).
When I try to send these ripples, the application is unresponsive and doesn't do anything.
So do you know if these coins are lost forever? Or maybe I can get access to them by finding the secret key using adb or any other kind of file explorer? I don't even know what to look for..
Thanks in advance,
PS : This is my first time posting here, let me know if I infringed any rules.


text:
What happens to the blockchain after the miner wins the puzzle?
I have some problems understanding the flow of consensus mechanism, so far I know, In PoW when validating a transaction the miners will compete with each other to solve a puzzle, the miner who find the nonce first will get the chance to validate.
My problem is, I don't understand the process after this. I want to know what miners will do after solving the puzzle?
Thank you.

My problem is, I don't understand the process after this. I want to know what miners will do after solving the puzzle?

After miner A found the nonce, he broadcasts his "solution" to the network (miner B and miner C for example) and starts to build a new block and try to find the new nonce.
Miner B and miner C both validate the "solution". If it's a correct block, they add it to their local blockchain and broadcast it to others (Miner D, E, F...) and right after that, they do also build a new block and try to find the new nonce for that one.


text:
Why miners solve a puzzle in proof of work
I am new to block chain, In PoW, I know a puzzle is given to the miners to solve and the miner who solve the puzzle and find the nonce first will create the block.
But I don't understand why there is such a mechanism like solving a puzzle and finding the first one to create the block, is this puzzle is used to find the miner with more computational power? so he can create the block quickly?

No, the time spent creating a block is tiny and even a simple cell phone could make it in a few microseconds, if we leave aside the puzzle-solving time.
The purpose of mining is not to find who has the most computational power, but to make those miners with lots of computational power to 'waste' electricity. I say 'waste' but it's not actually wasted because mining itself is important. I mean in the sense that, to create an artificially scarce resource - bitcoin - mining was designed to take advantage of naturally scarce resources: electricity and computer time.

Ok, there are number of miners who spend their electricity and computation power, and only one will get the mining reward, what will happen to other miners resources?

They are wasted. However, they don't mine for only 10 minutes, by for days, weeks, months. On average, every body will find blocks proportionally to their computer power.

Proof of work is not really a 'puzzle', this is just a simplification that is sometimes used to describe what happens.
Mining involves creating a new block: the miners will take data such as the previous block's hash, transaction data, a timestamp, a nonce, etc, and put them together in a certain pre-defined way. Doing so is computationally easy, but the block created is not necessarily valid. In order to determiner if the block is valid, the next step is important: the miner will take the block they have just created, pull the 'block header' portion of it out, and run that data through a hash function.
The output of the hash function is what matters in determining whether or not a block is valid. The output must be within a range of values, as defined by the current network difficulty (as more mining power joins the network, the difficulty will increase, and the range of accepted hash values will diminish).
If the block's hash does not fall within the accepted range, then the miner will change the data in the block slightly, and recompute the hash function to get a new output. In practice this is done an unimaginably large number of times in order to find a valid block, as the chances of finding a valid hash on any single attempt is very small at this point in time.
So you could describe the way a miner assembles data into the block structure as a sort of 'puzzle', but I think the word puzzle gives the wrong idea in some ways too. The 'puzzle' is not hard because it requires a lot of computational power to do, it just takes a LOT of tries in order to find a valid block (and it takes a lot of computational power to try that many times).
Any single attempt could find a valid block, so it is not a matter of "the miner with the most computer power will win", however a miner with a lot of computer power will have a better chance of winning.


text:
Network status: What is "Difficulty"?
How to understand "Difficulty" and how to use it?

Difficulty is a measure of how difficult it is to find a hash below a given target.
The Bitcoin network has a global block difficulty. Valid blocks must have a hash below this target.


text:
Bitcoin Cash tx with bx
Is there a way to craft a transaction with bitcoin explorer (bx) on the Bitcoin Cash blockchain ?


text:
Confused about buy/sell definition in trades history
I'm looking at some trade history provided by the kraken.com API (formatting mine):
    Price         Volume         Time        Buy/sell Limit/market  Remarks
["7833.00000", "0.17400000", 1559721453.3446,   "s",      "l",        ""],
["7830.00000", "0.04984709", 1559721484.6288,   "b",      "m",        ""]

What I understood about trading so far:
Limit trades go on either side of the order book, at the limit set by the initiator. Buy orders go to the bid side and sell orders to the ask side. When a bid meets an ask a trade gets executed, up to the lowest amount from either side. Any remainder will remain on the order book until matched again.
Marked trades are executed near-instant by emptying the order book on the appropriate side until the order is filled.
As such, a trade is always both a buy and sell in the same time.
My questions: what is the exact definition of a buy/sell indication in the trade history? Is the sum of the volumes the total volume traded? Or should it be divided by 2?

what is the exact definition of a buy/sell indication in the trade history?

A trade whether it will be marked as buy/sell will depend on how the order book is consumed. Assume the last traded price (LTP) is $100 and for simplicity sake assume the order book allows only integer increments in the bid and ask prices. So your order book will have bids starting from $99 all the way down and the asks starting from $101 all the way up. When a user posts an order that consumes the order book from the bid side, it is treated as sell while on the other hand if an order consumes the ask side it is treated as a buy.

Is it the sum of the volumes the total volume traded?

No. It is the amount consumed from the order book. So going back to our previous example, assume there are 50 ask units at $101 and 50 at $102. When a user places a buy market order for 100 units, the trade book will show:
Price      Volume     Buy/sell   Limit/market  Remarks
["$101",     "50",       "b",        "m",        ""],
["$102",     "50",       "b",        "m",        ""]

Now the LTP is $102. There will be bid orders starting $101 all the way down and ask orders from $103 all the way up. Assume we have 50 units each in bids ranging from $101-$95. Now assume a user wants to sell 100 units and his risk tolerance allows him to sell only at $101. Hence the user will place a limit sell order at $101 for 100 units. But since there are only 50 units at the bid, that will be consumed and the rest 50 units will be added to the ask side of the order book. Now the trade book will be:
Price      Volume     Buy/sell   Limit/market  Remarks
["$101",     "50",       "s",        "l",        ""],

Excellent explanation!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Issue on configuring the bitcoin core build on Ubuntu-18.0.4
I am trying to configure the bitcoin core build , as I use make , I received the following issue .
~/Desktop/bitcoin$ make
Making all in src
make[1]: Entering directory '/home/fu/Desktop/bitcoin/src'
make  all-recursive
make[2]: Entering directory '/home/fu/Desktop/bitcoin/src'
Making all in .
make[3]: Entering directory '/home/fu/Desktop/bitcoin/src'
  CXX      addrman.o
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h:56:24: error: invalid use of incomplete type ‘BIGNUM {aka struct bignum_st}’
 class CBigNum : public BIGNUM
                        ^~~~~~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from allocators.h:15,
                 from serialize.h:9,
                 from netbase.h:13,
                 from addrman.h:8,
                 from addrman.cpp:5:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of ‘BIGNUM {aka struct bignum_st}’
 typedef struct bignum_st BIGNUM;
                ^~~~~~~~~
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In constructor ‘CBigNum::CBigNum()’:
bignum.h:61:9: error: ‘BN_init’ was not declared in this scope
         BN_init(this);
         ^~~~~~~
bignum.h:61:9: note: suggested alternative: ‘BN_print’
         BN_init(this);
         ^~~~~~~
         BN_print
bignum.h: In copy constructor ‘CBigNum::CBigNum(const CBigNum&)’:
bignum.h:66:9: error: ‘BN_init’ was not declared in this scope
         BN_init(this);
         ^~~~~~~
bignum.h:66:9: note: suggested alternative: ‘BN_print’
         BN_init(this);
         ^~~~~~~
         BN_print
bignum.h:67:30: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘BIGNUM* BN_copy(BIGNUM*, const BIGNUM*)’
         if (!BN_copy(this, &b))
                              ^
bignum.h:69:31: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘void BN_clear_free(BIGNUM*)’
             BN_clear_free(this);
                               ^
bignum.h: In member function ‘CBigNum& CBigNum::operator=(const CBigNum&)’:
bignum.h:76:30: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘BIGNUM* BN_copy(BIGNUM*, const BIGNUM*)’
         if (!BN_copy(this, &b))
                              ^
bignum.h: In destructor ‘CBigNum::~CBigNum()’:
bignum.h:83:27: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘void BN_clear_free(BIGNUM*)’
         BN_clear_free(this);
                           ^
bignum.h: In constructor ‘CBigNum::CBigNum(signed char)’:
bignum.h:87:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(signed char n)        { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
bignum.h:87:37: note: suggested alternative: ‘BN_print’
     CBigNum(signed char n)        { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(short int)’:
bignum.h:88:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(short n)              { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
bignum.h:88:37: note: suggested alternative: ‘BN_print’
     CBigNum(short n)              { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(int)’:
bignum.h:89:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(int n)                { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
bignum.h:89:37: note: suggested alternative: ‘BN_print’
     CBigNum(int n)                { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(long int)’:
bignum.h:90:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(long n)               { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
bignum.h:90:37: note: suggested alternative: ‘BN_print’
     CBigNum(long n)               { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(long long int)’:
bignum.h:91:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(long long n)          { BN_init(this); setint64(n); }
                                     ^~~~~~~
bignum.h:91:37: note: suggested alternative: ‘BN_print’
     CBigNum(long long n)          { BN_init(this); setint64(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(unsigned char)’:
bignum.h:92:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(unsigned char n)      { BN_init(this); setulong(n); }
                                     ^~~~~~~
bignum.h:92:37: note: suggested alternative: ‘BN_print’
     CBigNum(unsigned char n)      { BN_init(this); setulong(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(short unsigned int)’:
bignum.h:93:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(unsigned short n)     { BN_init(this); setulong(n); }
                                     ^~~~~~~
bignum.h:93:37: note: suggested alternative: ‘BN_print’
     CBigNum(unsigned short n)     { BN_init(this); setulong(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(unsigned int)’:
bignum.h:94:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(unsigned int n)       { BN_init(this); setulong(n); }
                                     ^~~~~~~
bignum.h:94:37: note: suggested alternative: ‘BN_print’
     CBigNum(unsigned int n)       { BN_init(this); setulong(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(long unsigned int)’:
bignum.h:95:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(unsigned long n)      { BN_init(this); setulong(n); }
                                     ^~~~~~~
bignum.h:95:37: note: suggested alternative: ‘BN_print’
     CBigNum(unsigned long n)      { BN_init(this); setulong(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(long long unsigned int)’:
bignum.h:96:37: error: ‘BN_init’ was not declared in this scope
     CBigNum(unsigned long long n) { BN_init(this); setuint64(n); }
                                     ^~~~~~~
bignum.h:96:37: note: suggested alternative: ‘BN_print’
     CBigNum(unsigned long long n) { BN_init(this); setuint64(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(uint256)’:
bignum.h:97:37: error: ‘BN_init’ was not declared in this scope
     explicit CBigNum(uint256 n)   { BN_init(this); setuint256(n); }
                                     ^~~~~~~
bignum.h:97:37: note: suggested alternative: ‘BN_print’
     explicit CBigNum(uint256 n)   { BN_init(this); setuint256(n); }
                                     ^~~~~~~
                                     BN_print
bignum.h: In constructor ‘CBigNum::CBigNum(const std::vector&)’:
bignum.h:101:9: error: ‘BN_init’ was not declared in this scope
         BN_init(this);
         ^~~~~~~
bignum.h:101:9: note: suggested alternative: ‘BN_print’
         BN_init(this);
         ^~~~~~~
         BN_print
bignum.h: In member function ‘void CBigNum::setulong(long unsigned int)’:
bignum.h:107:33: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_set_word(BIGNUM*, long unsigned int)’
         if (!BN_set_word(this, n))
                                 ^
bignum.h: In member function ‘long unsigned int CBigNum::getulong() const’:
bignum.h:113:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘long unsigned int BN_get_word(const BIGNUM*)’
         return BN_get_word(this);
                                ^
bignum.h: In member function ‘unsigned int CBigNum::getuint() const’:
bignum.h:118:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘long unsigned int BN_get_word(const BIGNUM*)’
         return BN_get_word(this);
                                ^
bignum.h: In member function ‘int CBigNum::getint() const’:
bignum.h:123:43: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘long unsigned int BN_get_word(const BIGNUM*)’
         unsigned long n = BN_get_word(this);
                                           ^
bignum.h:124:33: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_negative(const BIGNUM*)’
         if (!BN_is_negative(this))
                                 ^
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In member function ‘void CBigNum::setint64(int64_t)’:
bignum.h:172:37: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
         BN_mpi2bn(pch, p - pch, this);
                                     ^
bignum.h: In member function ‘void CBigNum::setuint64(uint64_t)’:
bignum.h:199:37: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
         BN_mpi2bn(pch, p - pch, this);
                                     ^
bignum.h: In member function ‘void CBigNum::setuint256(uint256)’:
bignum.h:227:37: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
         BN_mpi2bn(pch, p - pch, this);
                                     ^
bignum.h: In member function ‘uint256 CBigNum::getuint256() const’:
bignum.h:232:50: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_bn2mpi(const BIGNUM*, unsigned char*)’
         unsigned int nSize = BN_bn2mpi(this, NULL);
                                                  ^
bignum.h:236:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_bn2mpi(const BIGNUM*, unsigned char*)’
         BN_bn2mpi(this, &vch[0]);
                                ^
bignum.h: In member function ‘void CBigNum::setvch(const std::vector&)’:
bignum.h:257:46: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘3’ to ‘BIGNUM* BN_mpi2bn(const unsigned char*, int, BIGNUM*)’
         BN_mpi2bn(&vch2[0], vch2.size(), this);
                                              ^
bignum.h: In member function ‘std::vector CBigNum::getvch() const’:
bignum.h:262:50: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_bn2mpi(const BIGNUM*, unsigned char*)’
         unsigned int nSize = BN_bn2mpi(this, NULL);
                                                  ^
bignum.h:266:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_bn2mpi(const BIGNUM*, unsigned char*)’
         BN_bn2mpi(this, &vch[0]);
                                ^
bignum.h: In member function ‘CBigNum& CBigNum::SetCompact(unsigned int)’:
bignum.h:302:36: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_set_word(BIGNUM*, long unsigned int)’
             BN_set_word(this, nWord);
                                    ^
bignum.h:306:36: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_set_word(BIGNUM*, long unsigned int)’
             BN_set_word(this, nWord);
                                    ^
bignum.h:307:46: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_lshift(BIGNUM*, const BIGNUM*, int)’
             BN_lshift(this, this, 8*(nSize-3));
                                              ^
bignum.h:309:40: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘void BN_set_negative(BIGNUM*, int)’
         BN_set_negative(this, fNegative);
                                        ^
In file included from bignum.h:17:0,
                 from chainparams.h:9,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In member function ‘unsigned int CBigNum::GetCompact() const’:
bignum.h:315:30: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_num_bits(const BIGNUM*)’
         unsigned int nSize = BN_num_bytes(this);
                              ^
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h:318:40: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘long unsigned int BN_get_word(const BIGNUM*)’
             nCompact = BN_get_word(this)  0)
                                ^
bignum.h:381:54: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
             if (!BN_div(&dv, &rem, &bn, &bnBase, pctx))
                                                      ^
bignum.h:387:32: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_negative(const BIGNUM*)’
         if (BN_is_negative(this))
                                ^
bignum.h: In member function ‘bool CBigNum::operator!() const’:
bignum.h:420:31: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_zero(const BIGNUM*)’
         return BN_is_zero(this);
                               ^
bignum.h: In member function ‘CBigNum& CBigNum::operator+=(const CBigNum&)’:
bignum.h:425:35: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)’
         if (!BN_add(this, this, &b))
                                   ^
bignum.h: In member function ‘CBigNum& CBigNum::operator*=(const CBigNum&)’:
bignum.h:439:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
         if (!BN_mul(this, this, &b, pctx))
                                         ^
bignum.h: In member function ‘CBigNum& CBigNum::operator>=(unsigned int)’:
bignum.h:469:28: error: cannot convert ‘CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
         if (BN_cmp(&a, this) > 0)
                            ^
bignum.h:475:41: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_rshift(BIGNUM*, const BIGNUM*, int)’
         if (!BN_rshift(this, this, shift))
                                         ^
bignum.h: In member function ‘CBigNum& CBigNum::operator++()’:
bignum.h:484:47: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)’
         if (!BN_add(this, this, BN_value_one()))
                                               ^
bignum.h: In member function ‘CBigNum& CBigNum::operator--()’:
bignum.h:501:45: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_sub(BIGNUM*, const BIGNUM*, const BIGNUM*)’
         if (!BN_sub(&r, this, BN_value_one()))
                                             ^
bignum.h: In function ‘const CBigNum operator+(const CBigNum&, const CBigNum&)’:
bignum.h:526:27: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_add(BIGNUM*, const BIGNUM*, const BIGNUM*)’
     if (!BN_add(&r, &a, &b))
                           ^
bignum.h: In function ‘const CBigNum operator-(const CBigNum&, const CBigNum&)’:
bignum.h:534:27: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_sub(BIGNUM*, const BIGNUM*, const BIGNUM*)’
     if (!BN_sub(&r, &a, &b))
                           ^
bignum.h: In function ‘const CBigNum operator-(const CBigNum&)’:
bignum.h:542:43: error: cannot convert ‘CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_is_negative(const BIGNUM*)’
     BN_set_negative(&r, !BN_is_negative(&r));
                                           ^
bignum.h: In function ‘const CBigNum operator*(const CBigNum&, const CBigNum&)’:
bignum.h:550:33: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_mul(BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
     if (!BN_mul(&r, &a, &b, pctx))
                                 ^
bignum.h: In function ‘const CBigNum operator/(const CBigNum&, const CBigNum&)’:
bignum.h:559:39: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘1’ to ‘int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
     if (!BN_div(&r, NULL, &a, &b, pctx))
                                       ^
In file included from bignum.h:17:0,
                 from chainparams.h:9,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In function ‘const CBigNum operator%(const CBigNum&, const CBigNum&)’:
bignum.h:568:10: error: cannot convert ‘CBigNum*’ to ‘BIGNUM* {aka bignum_st*}’ for argument ‘2’ to ‘int BN_div(BIGNUM*, BIGNUM*, const BIGNUM*, const BIGNUM*, BN_CTX*)’
     if (!BN_mod(&r, &a, &b, pctx))
          ^
In file included from chainparams.h:9:0,
                 from protocol.h:13,
                 from addrman.h:9,
                 from addrman.cpp:5:
bignum.h: In function ‘const CBigNum operator=(const CBigNum&, const CBigNum&)’:
bignum.h:591:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
 um& a, const CBigNum& b) { return (BN_cmp(&a, &b) >= 0); }
                                                 ^
bignum.h: In function ‘bool operator(const CBigNum&, const CBigNum&)’:
bignum.h:593:83: error: cannot convert ‘const CBigNum*’ to ‘const BIGNUM* {aka const bignum_st*}’ for argument ‘1’ to ‘int BN_cmp(const BIGNUM*, const BIGNUM*)’
 um& a, const CBigNum& b)  { return (BN_cmp(&a, &b) > 0); }
                                                  ^
In file included from util.h:15:0,
                 from addrman.h:11,
                 from addrman.cpp:5:
tinyformat.h: In static member function ‘static const char* tinyformat::detail::FormatIterator::streamStateFromFormat(std::ostream&, unsigned int&, const char*, int, int)’:
tinyformat.h:784:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
             out.setf(std::ios::uppercase);
             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:785:9: note: here
         case 'x': case 'p':
         ^~~~
tinyformat.h:790:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
             out.setf(std::ios::uppercase);
             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:791:9: note: here
         case 'e':
         ^~~~
tinyformat.h:796:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
             out.setf(std::ios::uppercase);
             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:797:9: note: here
         case 'f':
         ^~~~
tinyformat.h:801:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
             out.setf(std::ios::uppercase);
             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:802:9: note: here
         case 'g':
         ^~~~
Makefile:838: recipe for target 'addrman.o' failed
make[3]: *** [addrman.o] Error 1
make[3]: Leaving directory '/home/fu/Desktop/bitcoin/src'
Makefile:860: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/fu/Desktop/bitcoin/src'
Makefile:652: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/fu/Desktop/bitcoin/src'
Makefile:509: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

How can I solve this ? Thanks in advance !

While I am no expert, did you try to run it as "sudo"? The command "Sudo make" while you are in your bitcoin directory?

Are you sure that this is for Bitcoin Core? There is no class CBigNum in Bitcoin Core, nor is there a bignum.h file. The problem is not related to make, it is related to the code. Whoever added CBigNum did so incorrectly and that is what is causing all of the compiler errors.

@Rouse Making things with sudo isn't going to help. This isn't a file permissions issue, this is an issue with the code itself.

If you ever see
error: invalid use of incomplete type BIGNUM

in an error log, then it means you have OpenSSL 1.1, and the project is compatible only with OpenSSL 1.0.X. Downgrade your OpenSSL to make it work.

I'm not sure if this is the problem or not.  Apparently, there is a version of libssl-dev that causes some problems.  Although the steps listed on this site specify Raspbian (which is a derivative of Debian) it might be worth looking to see if this could be your problem.
The steps are found at https://en.wikibooks.org/wiki/Radium_Core/Raspberry_Pi.


text:
Is there a single point generator G for every elliptic curve?
I understand that G is a point on curve which holds true for y^2 = x^3 + ax + b.
But there can be several other points as well which holds true for above equation but how do we choose which one is our G?

There often are multiple points which could be generators. In fact, for prime order curves, every point on the curve is a generator.
For practical use, a specific point is picked based on some constraints.
May curves use rules such as lowest abs(x) value or use some deterministic generator with a random seed.
I can't seem to find the login behind the G selection for secp256k1, however, but the point itself is defined in the curve specification.

Thanks for the answer. I am actually trying to understand elliptic curve cryptography, specifically how the signature is verified, shared secret generation and  the math behind it. I have gone through lot of information on internet, i am still not able to connect dots to fully understand it. can you help me?

It's defined in the specification of the curve. In Bitcoin, the curve was SECP256k1 is chosen and the curve parameters are defined here: SEC 2: Recommended Elliptic Curve Domain Parameters, Version 1.0


text:
How do I get the value of a btc address transaction with pybitcoin tools?
Lets say that I execute the code below when the user accesses the deposit page.
my_private_key = random_key()
my_public_key = privtopub(my_private_key)
my_address = pubtoaddr(my_public_key)

And I let the user deposit into my_address.
How would I obtain the value of the users deposit into my_address?

Note that you seem to have asked the same question here, https://bitcoin.stackexchange.com/questions/78180/using-pybitcointools-to-get-the-value-for-a-certain-transaction
Please don't ask the same question multiple times or use multiple accounts

You can use the unspent command to find unspent outputs sent to that address, or history to see all outputs to that address whether they are spent or not. Note that it relies on public APIs to read the blockchain for transactions.


text:
(Bitcoin Core, recovering my wallet) problem finding the address I sent coins to in Bitcoin Core 0.11.2
Im trying to find my Address I sent my Bitcoins to but I do not know how to get into my wallet and since it is quite some time ago, I do not remember from where I sent it.
While trying to open Bitcoin Core on my Mac theres a popup saying that its unable to connect to port 8333 but the program closes afterwards.
Since there is a problem with opening the port I want to transfer the coins to an electrum address. For that I need my seed and the Bitcoin Address I sent my coins to. Is there a way to find it without opening port 8333 and synchronising the blockchain?
Will it be safe to deinstall it and try to boot it again?
Any ideas, suggestions are welcome!
Thanks

Assuming you used the bitcoin-core wallet, you should back up your wallet.dat usually stored on a mac in ~/Library/Application Support/Bitcoin/wallet.dat. This contains your private keys. Then see https://bitcoin.stackexchange.com/a/325/60443 for how to restore.

Hi, thanks for the answer. The problem is that I can not open my wallet. It says that the port 8333 is closed and I can not go to the folder with my receiving addresses nor to the Command Line for Bitcoin Core.

I want to get my private key to export it but I dont know how to find it

First you need to backup your wallet.dat file. Then, since your installation is from a while ago, I would recommend reinstalling bitcoin, and then importing your wallet.dat.
Backup wallet.dat
To copy your wallet.dat on a Mac:
Cmd+Space then type terminal
In terminal type:
cp ~/Library/Application Support/Bitcoin/wallet.dat ~/Desktop
I would recommend also backing up a copy to another computer or disk drive.
Install Bitcoin-core
Download and open .dmg file from bitcoin.org, and follow installation instructions.
Restore wallet.dat
To copy your wallet.dat back on a Mac:
Cmd+Space then type terminal
In terminal type:
cp ~/Desktop/wallet.dat ~/Library/Application Support/Bitcoin/
Then you can export your key to whatever wallet you want.

Hi, thanks again for your answer. This will surely help alot! But for now I only want to get into my wallet or to the help button. Even when I uninstall the previous version and run the new .dmg file .... the same issue as before. It tries to connect to 8333, cant find it and shuts down. No way to get my priv key through "help"--> "command". It simply wont let me into my wallet.

is port 8333 behind a firewall? Have you tried a different network?

I tried other ports but something blocks it. I have tried to put Bitcoin core on the whitelist of my firewall. Still doesnt change.

You could try a website like this to see if port 8333 blocked: https://www.lurkmore.com/mining/port8333/ . If so, you need to forward port 8333 on your router to the ip of the computer you're using.

I have tried setting up the port forwarding quite some times. Have set an static IP, Forwarded Ports to that IP and checked other ports as well. Seems not to work for me. In an other forum I heard that its possible to put the wallet.dat file from this computer to an other. There I can implement the old key to the bitcoin folder and would be able to handle my wallet without needing to synch my wallet. Maybe I will go for that option.

That's pretty much what the answer above describes.

Yes indeed! thanks a lot for that! Just was not sure whether there would be an other option. But this seems to work out fine for me. Going to check out the next days and will tell if it worked.


text:
I didnt received funds into my wallet
Funds were sent from another wallet to my wallet, but i didnt received the funds, please help

Which wallet sent, and which wallet received?

You must be more specific to indicate which wallet you use to receive the transaction you can also see in the block browser the address that you have used

There are many possible explanations and many possible ways to investigate
Possible causes

The sender mis-typed the receiving address. This is hard to do if the
sender scanned a QR code. There are usually checksums built in that
make it hard to get a mis-typed address accepted. Nevertheless it is
possible

You gave the sender a different address than the one you think you did.
This can happen as many wallets issue a different receiving address
for each transaction.

You accidentally gave the sender the address of a wallet that uses
a different crypto-currency than the crypto-currency the sender sent.
This is fairly common. It is arguably too easy to confuse Bitcoin cash
for Bitcoin.

The sender didn't pay a sufficient mining fee

Your wallet is no longer synchronising

You didn't wait long enough

Fraud

If you are using a web-wallet where you depend on a third party, there are also a lot of other ways in which things can go wrong. Especially if the
provider of the service aggregates transactions. (This is one reason I would prefer to use a standalone wallet).
Ways to investigate.

Go to a blockchain explorer website and enter the transaction-ID.
Do the same for the receiving address. Check that your transaction appears.
Check that everything is as you would expect it to be.

Re-check the address you used, letter by letter. re-check the currency.

If your wallet is hosted by a third party, raise the issue with their
customer support service.


text:
Why does this transaction results in more than 1 unspent output?
This transaction results in 6 outputs in total. Why did it end up with having 4 unspent outputs? I read this answer from another question, and wondering, could it be because the user actually chooses to distribute the spare change to 4 of the addresses he owns?

This is an exchange withdrawal, and presumably they are batching multiple user withdrawals into one transaction to reduce the overhead cost. In particular, 17A16QmavnUfCW11DAApiJxp7ARnxN5pGX belongs to Poloniex.
This is not uncommon, and many companies that must make frequent payments to multiple people will batch the payouts to reduce fees.
Most wallet software will not let you set multiple change addresses for a single transaction, but nothing prevents you from creating such a transaction manually at a protocol level.


text:
how does PACKAGE_NAME defined and used in bitcoin source code?
In bitcoin source, I found a variable named PACKAGE_NAME, how does it works?

PACKAGE_NAME is a metadata used to define the name of the project/package ("Bitcoin Core"). Then, we can use it and avoid to duplicate it along the codebase.
Note that with CMake, it can be found at CMakeLists.txt, see:
#=============================
# Project / Package metadata
#=============================
set(PACKAGE_NAME "Bitcoin Core")
set(CLIENT_VERSION_MAJOR 28)
set(CLIENT_VERSION_MINOR 99)
set(CLIENT_VERSION_BUILD 0)
set(CLIENT_VERSION_RC 0)
set(CLIENT_VERSION_IS_RELEASE "false")
set(COPYRIGHT_YEAR "2024")


text:
Stuck unconfirmed balance in multibitHD (stuck since 2015)
I recently started reusing bitcoin. Let's just say, I gave it a lay off when the value of bitcoin bombed in 2015. I sent my bitcoins from my MultiBit wallet to MultiBitHD on 13th november 2015. They are still sitting there in multibithd showing as 'receiving', although subsequent transactions from bitcoin mining are showing as 'received'. Multibit shows a green tick next to these transactions. When I fired multibit up, the transactions were showing with the empty pie chart on the left instead of the tick, bit after a little while, they filled and eventually became green ticks. Even stranger, I tried to import the HD wallet into two other wallet applications, using the wallet words, one on my mac and one on my mobile. Both of those show a zero balance, like as if it is not the same wallet. I'm not a bitcoin guru, I have little knowledge of the mechanics of the blockchain...
Is there a way I can get these transactions reversed back to the sending wallet ? I really don't want to lose 0.18... bitcoin that seem to be stuck.
Please can someone help with detailed instructions to get this bitcoin unstuck ?
I am posting a separate question, because it is so long since these transactions were sent and I have seen so many posts about this, but the things I have tried have not worked.

Things seem to have got worse. Now the confirmed balance I had has gone to 0 and the two transactions that were 'received' have changed to 'receiving'. Anybody know what is going on ?

Okay, after a 'repair'... the balance is back to including the three recent transactions. However the transactions for november 13 2015 are still showing as 'receiving'. I looked at the details of the transactions and after the txid, it says 'Unknown confidence level.'

Sorry, the transactions are 17 november 2015.  There is a transaction from november 18 which, in the transaction details has 'Unknown confidence level.' but it also has 'time locked until block 384170'. Any ideas ?

Do you still got your wallet words and password?
Have you tried Restoring MultibitHD from those words?


text:
bitcoins not arrived to the receiver
Please help me i don't know what do to.
My friend installed the app and i sent him a payment using the address given by the app without knowing the address is changeable. I sent the bitcoins to this address: 1LtVLn1iGrem6W7vVRz8H48HbJZrbWzFCK. The date was: March 7, 2017. The amount was 0.23985547.  The bitcoins was not transferred to him.
Please help me as soon as you can,
Thanks in advance.

Just to be clear, what app is your friend using? The tag "bitcoin-wallet-app" is referring to one specific piece of software, is it that one that he is using?

The transaction was already confirmed on Match 7th. Your friend is either lying or has a synchronization problem with their wallet software.

Get your friend to send a report: Options > Report issue. It would be helpful if he would include the above transaction ID (as shown in the screenshot) with the report.

authors: ލަބީދު އިބްރާހިމް


text:
How to correctly sign a transaction? Error: 64: scriptsig-not-pushonly
I sent a transaction with far too low fee and it's stuck in mempool.
I'm trying to do a double-spend with a higher fee without any luck.
My wallet: 15Zz2KP5iA7oVarmtmBvb9ZHUmQaSFL9M8
Unconfirmed transaction: 0b0177688485922027b336c24e765fdea8dc03d2ad79f87019705f2ca9fb970a
I'm using coinb.in to create, sign and broadcast transaction but I get Error: 64: scriptsig-not-pushonly.
The transaction seems to be valid when I verify it.
Can anyone point my in the right direction for this?

I've added an answer to the specific problem, however, I do not recommend to try to double spend the transaction, since I don't think it will work. If first transaction is already in most of the nodes mempool, the new one will be treated as a double spend and be rejected. The best you can do is either wait, or create a transaction spending from you first one (the one with low fees) and adding a higher fee that new transaction (using what is called Child pays for Parent).

You are building an incorrect scriptSig.
Notice that, if you check the scriptSig of every input from the transaction you provided, it looks like:
76a914321d6a0077ddadfcce3d68d302d866ce81405eba88ac

Which has the following structure:
OP_DUP OP_HASH160 <20-byte-hash> OP_EQUALVERIFY OP_CHECKSIG

However, this is not what is expected to be found in a scriptSig, but what will be expected in the scriptPubKey field.
What you have to do is provide the correct script in the scriptSig field of each input of the transaction, that would correspond to the signature of the transaction if you are creating a P2PKH transaction, or the script that matches with the script-hash from the UTXO you are spending, in case you are building a P2SH transaction.

I did wonder where the answer went :) . Thanks for the answer. Do you have any suggestions of site's that might be able do make this process easier? coinb.in doesn't seem to have the options I need.

I messed up a little with the first answer, since the scripts where like switched and something does not seems right. I preferred to refrase it :P. What are you trying to do?

I mean, what do you mean with "this process"?

The process of creating the correct transaction. I was using coinb.in because it seemed like it would simplify the process but it's "transaction" generator doesn't seem to do what it needs to do to correctly make this transaction.

Well, if you need to create a transaction you will need to manage the keys associated with the Bitcoin addresses where the bitcoins are "stored". In order to sign the transactions in P2PKH transactions or to create the proper scripts in P2SH. What I think is that when you used the coinb.in tools, you forgot to sign the transaction (I'm not used to the tool, so I can be wrong). In conclusion, you will need something more similar to a wallet.

Think it's coinb.in not doing what I wanted. I was trying to avoid a wallet but oh well. (Luckily, blockchain.info stopped broadcasting my transaction to allow me me to spend it again.) Thanks for your help.

Well, you can allways do it by yourself using one of the multiple libraries available (depending on the programing language you prefer), the fact is that if you need to sign transactions, you need to use your private key, and relaying in some website tool to do so, by importing the key is not the best choice when money comes into play (at least from my point of view).

can you give us a clear example of scriptSig, and scriptPubKey fields.
Because, I am getting the same error, although i am creating a raw transaction using python.

@ kaliu For a traditional P2PKH transaction, the structure will be: scriptSig = , and the scriptPubKey will be: OP_DUP OP_HASH160 <hash160_of_pubkey> <OP_EQUALVERIFY><OP_CHECKSIG>. Take into account that the data pushes and the hash_type are not included in this structure, but they are in the serialized representation of the script.  If you need an specific example, I think it's better to ask it as a question, since there is not much space in the comment section, nor correct format to correctly respond it.


text:
What are the script size limitations according to consensus rules and are they enforced on TestNet?
I'm trying to figure out the limitations that scripts have regarding their size, limits that would make a script invalid (ignoring standardness). According to this question and also these lines of code in bitcoin core's source code 1 2 3 it appears that the following rules are in place:
Maximum script size = 10,000
Maximum data size to be pushed to the stack = 520

To test these rules I made a bunch of transactions on TestNet, all of which breaking some rule and were included in blocks (all sent from n3eynMTEiGgPTuoKPApnRjE9pAuaAk3gkB)? Example:
Tx ID: 88bac1e84c235aa0418345bf430fb43b336875974b6e87dc958de196f9222c35
PubkeyScript length=0xfd1527=10,005 script=4d11275b2c...394e75orPush_10001_byte<5b2c...394e> OP_DROP
As you can see the length of the script is already 10,005 > 10,000 and the first data push is 10,001 > 520. In other words I broke both rules.
Also as far as I know the "consensus" rules are exactly the same on TestNet (with one exception: difficulty adjustment), is that correct? So how is this transactions valid?

Those consensus rules are indeed the same for testnet and mainnet.
However, they do only apply when scripts are executed. So you have to create an input trying to spend it to test this.

So practically this means the only limit on PubkeyScript is block size, right?

That is effectively the only consensus limit on outputs, I believe, indeed.

This is my understanding too.


text:
Why does witness use count instead of length?
In legacy transaction (without SegWit) the scriptSig is easily parsed by knowing the length of it (a CompactInt value) and without needing to read the script in place.
However in SegWit transaction the scriptSig that is moved to witness position is now identified by a "count" of the items inside of the script and that means script needs to be read (interpreted) in place.
Was size (saving 2 bytes in multi-sig scripts) the only reason for this difference?
Also is there any restrictions on OP codes that could be used in scripts inside witnesses because of this difference?

Note that witnesses are not scripts. They do not contain opcodes. They are stack elements. Witnesses do not have explicit opcodes (witnessScripts are scripts but are single witness stack elements so their opcodes don't count).
The count is used as it clearly delineates between the end of the stack items for an input and the beginning of the stack items for the next input. The use of a count follows the standard serialization methodology used elsewhere in Bitcoin for serializing arrays of items. In this case, the witness data for an input is an array of arrays of bytes (in code, that's std::vector<std::vector<unsigned char>>).
So, following the standard serialization method of std::vectors, at the top level we get the number of items in the next level down (i.e. the number of std::vector<unsigned char> elements) which happens to be the number of stack items. Then the next level of serialization we get another length for the number of items in the level below (i.e. the number of unsigned char in each vector). So now we have the length of each stack item. Then comes the stack item itself.
The reason this method was used for segwit is likely because stacks in Bitcoin Core are implemented as std::vector<std::vector<unsigned char>>. Furthermore the serialization of vectors in this manner is used everywhere in Bitcoin so the serialization code for this basically already existed in every existing wallet software.


text:
Does extra outbound connection when tip is stale disable feeler connection?
I run a Bitcoin node for about 1.5 months and I notice that there is no feeler connection is made in 25 days, hence the IPs in the tried table does not grow.
I also notice in the debug.log during the same period of time, many potential stale tips are detected:

2019-02-20T13:26:59Z Potential stale tip detected, will try using extra outbound peer (last tip update: 2737 seconds ago)

Does extra outbound connection when tip is stale disable feeler connection?
If yes, is it normal to have stale tip for 20+ days?

The problem is because the netgroup of the feeler connection was not properly handled.
Check further pull requests and fixes here: https://github.com/bitcoin/bitcoin/issues/15484


text:
Can an account prefix in a NXT clone blockchain be longer than three characters?
I'm getting errors setting up the account prefix after cloning NXT with the Nxt Blockchain Creation Kit. Are there restrictions on how many characters?

No, currently the account prefix (ACCOUNT_PREFIX constant) must be exactly 3 characters. This could be fixed in future.


text:
Can the coin symbol prefix in a cloned NXT blockchain start with a digit?
Creating a new blockchain with the Nxt Blockchain Creation Kit, is it possible to use a coin symbol prefix beginning with a digit in the wallet address?
I get an error that the address is malformed when I try this. Should I look for an error, or is this impossible?

I'm voting to close this question as off-topic because it is unrelated to Bitcoin.

Please provide the prefix you try and the error

Error: "The recipient address is malformed." The prefix would reveal the project prematurely...

No, adding a coin symbol prefix is not doable as it will impact other functions that might take it as a parameter. Your better off just doing it on the front end using a css :before class using the content: property.

We discovered that we could add the prefix by editing the Constants.java file.

It should be OK for the prefix to start with digit. Or at least this works for me in Constants.java:
public static final String COIN_SYMBOL = "5Coin";
public static final String ACCOUNT_PREFIX = "5CN";
public static final String PROJECT_NAME = "5Coin";

Now accounts look like 5CN-P6F5-J7VU-RWHZ-9LXN8 and the coin name as displayed in UI is 5Coin.

Thanks, we got it to appear in the UI, the error appeared when we tried to send funds. Error: "The recipient address is malformed."


text:
Why doesn't Alias register on IGNIS blockchain when using the setAlias API?
I am trying to create an Alias on the Ignis child chain of Ardor. Everything seems to work properly the using the setAlias API in the Ardor API Console. I see the transaction for a brief time in my dashboard and it disappears without registering my Alias.

I'm voting to close this question as off-topic because it is not about Bitcoin.

From the rules of this site: "Bitcoin and Cryptocurrencies is a question and answer site for cryptocurrency enthusiasts. It's built and run by you as part of the Stack Exchange network of Q&A sites. With your help, we're working together to build a library of detailed answers to every question about Cryptocurrencies such as Bitcoin, Namecoin, Litecoin, Ripple, ZCash, Dogecoin, and NXT."


text:
What API would I use to find the circulating supply of Ardor?
Is there a way to use API to find the circulating supply of Ardor or any of the child chain tokens?

Yes, getConstants returns the totalAmount of tokens in each chain - inside the chainProperties field.


text:
Is there any specific transaction fee?
Is there any specific percentage of transaction fee that is suppose to be paid by all the participants as per value of their BTC transaction?

no, trx fees are not calculated based on the value of a transfer.
TX fees incentivise miners, to include your trx in the block. Generally one can say, the higher you create your TX fee, the more probable it will be included in the next block. Or vice versa, the lower your TX fee, the longer it will have to wait, until it get's processed by a miner.

Your transaction fee goes to the miner who includes your transaction in a block. Miners are free to use any algorithm they want to decide which valid transactions to include in their block.
As you might expect, a very common policy is to pick transactions that yield the greatest possible total in transaction fees. Since miners only have a limited amount of space in a block, they tend to prefer transactions that have the highest ratio of transaction fee to number of bytes occupied. Thus it makes sense to measure transaction fees in units of satoshis per byte or bitcoins per kilobyte.
The number of bitcoins a transaction transfers is irrelevant to the fee calculation, except that some miners may refuse to accept absurdly small transfers. The key is the number of bytes the transaction takes. This tends to be determined largely by the number of inputs to the transaction.
For example, if your wallet received lots of payments of 0.01 btc each and you try to send 1 btc out, you need to "gather" 100 inputs. That will produce a transaction that occupies a large number of bytes and thus requires a high fee.

You can stay up to date on the recommended miner fees here:
https://bitcoinfees.21.co/


text:
Public key storage by full nodes
How many public keys on an average, do the full nodes store, in order to validate/authenticate the transactions they receive?

I assume bitcoin full node: the full node stores all pub keys, that were used to sign a trx (that found it's way in a block), in the data structure in the home dir. Why? Because all vlid trx are part of a block, and all blocks since the genesis block form the block chain. So there is even more than pub keys stored on your harddrive of a full node.

Chapter 5 of Andreas book "mastering bitcoin" explains tx handling, and developper info can also be found here; https://bitcoin.org/en/developer-guide#transactions


text:
Idioms of use/ bitcoin heuristic

I already know the answer of a) part which is Alice. Can anybody help me in finding answer of b) part.

What information are we to assumer 'the observer' has? Do they know the A/B/C tagged addresses are controlled by A/B/C? Do they know for certain which addresses are change addresses? In general, 'certainty' of blockchain analysis is a somewhat hopeless goal in the real world.

Just out of curiosity, where does this question come from ? It's, strangely, identical to one of the HWs in one of my classes.


text:
I am web developer, can i use my working pc to mine and work at same time?
Guyz, i am a web developer, i have single pc but i am thinking to add a good GPU in it, my question is that if i add good GPU, will i be able to mine crypto currencies like BTC/ETH and work on my pc at same time? will it be OK ? Kindly share your opinions experts. Thank you

That would be possible but probably not profitable.
If you use your GPU to mine BTC the costs for electricity are most likely higher than your gains from mining.
I don't know if GPU mining is profitable for ETH. That also depends on where you live and what you have to pay for electricity of course.


text:
Protection against malware attacks
Does bitcoin or Blockchain protect against malware attacks that install a trojan to steal data from a device, on which bitcoin application is installed? Cause a trojan can steal the user's private key, thus his bitcoins can be stolen.

I try to make it short (as this question spreads a wide range...): bitcoin or blockchain do not protect against malware. At the end, bitcoin can be considered as the software that runs a wallet on your computer/mobile. And blockchain is a public accessible data structure. We can forget about blockchain, cause this data structure doesn't help at all to protect against malware.
So for the wallet: this is a set of data on your harddrive, that contains (somehow) the priv key. As long as your operating system permits access to the storage area of your harddrive, it depends on the protection layer of the OS, how to secure this. Windows has a very long and very strong record of insecurities at all layers (any vulnerability you can think of), and the amount of "protection software" shows clearly, that this is not the optimal operating system for storing value(s). I am not strong enough an expert for mobile devices... When it comes to Unix type OS, the world looks far better, and there are less attack vectors, due to the segregation of duties in the system. Still there are possibilities to "steal" your data, e.g. when you install a (probably unverified) software as admin on your system.
Generally this OS protection topic should be further discussed in the information security area, not here. As long as you store only little value (like you would have Euros or Dollars or Pounds in your real wallet), any unix type OS would do, also mobile wallets. When you go above values of let's say 1000 Euros/Dollars/Pounds, start thinking about protecting your values (keywords: hardware wallet, cold storage). You find enough references here or in reddit.


text:
Transaction validation by full nodes
All the full nodes in Bitcoin network validate a new block as soon as it is mined and propagated on the network, by verifying the nonce and the resulting block hash.  Now the question is that, Do full nodes validate each transaction in the Block, based on its complete history of input and outputs to check for any error?

Yes, all transactions in every block are verified by full nodes. Nodes do not have to traverse the full history though, because they would have already validated the parent transactions before the child block is received usually. So they can just make sure the new transaction is valid in the ways it needs to be.


text:
Is there any synchronized software update mechanism in Bitcoin-Blockchain?
My question is regarding the update of Bitcoin software. Is there any mechanism for a synchronized software update in the Bitcoin network?

Assuming you're talking about the specific software project Bitcoin Core, there is not, and this is very intentional. Core's developers (disclaimer: that includes myself) shouldn't have the power to force new  software onto the network.

Then how does a change in consensus rules or any of the software module is updated on all the Bitcoin nodes?

There isn't. People must choose to run new software of they want new rules.

No there is not. Bitcoin is a protocol, and there are many different implementations of the protocol developed by many different people and groups. It would not make sense to distribute "new software" to all the different implementations.


text:
I invested in bitcoin mining. Is this legit?
I invested 250.00 I was told by a miner I could make 3200.00 in profit . Once my profits were shown on blockchain, it read non spendable. I asked what it meant and he said I'd have to invest 500.00 more to qualify for the minimum withdraw. Is this legit?

Such schemes are almost always scams (where almost = 99.99999%). You should cut your losses now and move on, absolutely do not send any more money to this entity/person.

Is this legit?

No, it's a scam. You gave money to a thief, don't give them any more.
Communicating to the thief is a waste of time, they are a confidence trickster who exploited your weaknesses once to trick you into giving them money. Don't let them trick you again. You have nothing to gain by communicating with them.
You will never get anything back, there is no way to undo this and get your money back. You can and should report this to the police but the scammer probably lives in a far-away country and the police will not be able to do anything for a 250 loss (even if that's BTC not USD or INR).
See Mining Scams

my profits were shown on blockchain

I guess you mean in a wallet managed by Blockchain Luxembourg S.A.R.L (LU) - a European business who run www.blockchain.com, www.blockchain.info etc. They are certainly innocent in this (though you could argue, to the government of Luxembourg, in which I guess you have no representation, that this business has a duty of care to its customers or to victims of its customers).
If the thief created this wallet or you created it and gave the thief the password, it is almost certainly a useless watch-only wallet. The thief can move money into it to make it look like you earned profits but those are illusory and not real. Changing passwords does not make the wallet safe, it does not lock-out the thief - they retain control over any Bitcoins sent to that wallet in past present or future.  It would be prudent to not touch that wallet ever again.


text:
Can bitcoin purchase be tracked?
Can a bitcoin transaction be tracked? I'm planning on buying bitcoin from coinmama.com and I'd like to ask if I can be tracked down for using my credit card? Will someone know my location or my bitcoin address if I buy it using a credit card.

Can a bitcoin transaction be tracked?

Mostly yes, all bitcoin transactions are recorded in the blockchain. There are techniques to try to cover up the trail -see Bitcoin mixers.

I can be tracked down for using my credit card?

Obviously the credit-card company (& some of their employees) know you bought something from a Bitcoin exchange, likely Bitcoin. They know exactly who you are.
Obviously the Bitcoin exchange (& some of their employees) you used also know your identity and that you purchased Bitcoin with a credit card.

Will someone know my location or my bitcoin address if I buy it using a credit card.

The credit card company will not know your Bitcoin address.
The Exchange (& some of their employees) know your Bitcoin-address.
They don't know your physical location unless you buy the Bitcoin in-person.
Many exchanges are required by Know Your Customer (KYC) laws to know who you are sufficiently for law-enforcement to track you down. Some of the employees of such exchanges will have access to this information.


text:
Can someone find out how much bitcoin do I have using my public key?
Im pretty new to bitcoins, so I may have a silly question.
Imagine that someone has my public key. Can he find out how much bitcoin do I have? only using my public key?

Can he find out how much bitcoin do I have?

Yes, Bitcoin addresses are derived from public keys.
If someone has your public key, they can obtain your BTC address and therefore search the blockchain for transactions involving your wallet address. On the other hand, if you use a separate private/public key pair (separate address) per transaction and someone only has one of your public keys, they will not have enough information to obtain the address from the other keys unless you are transacting between them and it is somehow obvious that they all belong to you (analysis).

By knowing your public key, someone can easily obtain your BTC address and enter it into any block explorer website like blockchain.info and see your entire transaction history and current balance.


text:
help problem to synchronize bitcoin wallet core
I have about 20 usd trapped in an old version, it is version 0.9.3 of the bitcoin kernel.
I urgently need them to pay a significant debt.
Every time I want to pass them to a stock exchange, the wallet freezes my PC and an error appears to synchronize first someone knows or someone who keeps his wallet synchronized. please, help or any other user that exists in this version, where I can get the bootstrap of utorrent
I try to synchronize it normally it stays stuck a week probe adding nodes and it does not work anymore I do not know what to do
Please help. Bitcoin is all I have left to pay my debts. I lost all my assets.
help I believe in the future with bitcoin I believe in satoshi nakamoto help please

Export your private key for that addresses using dumpprivkey, and import it into a light wallet such as Electrum

Install the latest version of Bitcoin Core, Bitcoin Core 0.17.0. The wallet format has not changed significantly and the software always maintains compatibility with older wallets, so your wallet should work in 0.17.0. You will still need to wait as there will be a database upgrade that takes place and it will need to finish syncing the blockchain.
0.17.0 can be installed on top of your existing installation. It will not delete any of your data. Your wallet does not need to be moved. However, as always, you should always have a backup of your wallet on hand.
If you cannot wait for that, then you can export the private keys for your addresses and import them into another wallet such as Electrum. You can do this by using the dumpprivkey <address> command in the Debug Console. <address> is the address that you want the private key for.


text:
Whether coldcoinbitcoin.com or some other, possible to save our private key?
I don't have wallet yet, so I do googling about it, and found that cold wallet is more secure than hot wallet, one of example of cold wallet I found is coldcoinbitcoin.com
And I think about how they can print our private keys, if they can print our private keys that means, they are possible to save them? is not that can be dangerous for our assets?

If you are looking for secure storage, then using a product that has a third party supply the private keys (like the product on the site you linked) is a very bad idea. Look into Bitcoin hardware wallets, read many independent reviews online, and then decide which one is best for your purposes.

They appear to simply be offering a physical coin stamped with the Bitcoin logo. Moreover, it appears that the private key is generated by them, which means that nothing prevents them from keeping a copy.
You are far better off sticking to trusted hardware wallets such as Ledgers and Trezors. Never trust any service that has the possibility of keeping your keys accessible to themselves (obvious exceptions like custodial accounts on exchanges apply).


text:
Connecting to a node and opening a channel
What is the difference between connecting to a node and opening a channel with a node in the lightning network? What are the events happen when I just connect to a node?

When you connect to a node in the lightning network, you are opening a network connection to that node. You begin exchanging messages about the lightning network and can gather information such as other open channels, other nodes that can be connected to, etc. This information can help you build a better channel graph and decide whether you want to open a channel with this node or with some other node.
Once you have connected to a node, you can open a channel with it. Opening a channel requires creating a Bitcoin transaction, broadcasting it to the Bitcoin network, and waiting for it to become confirmed. When you open a channel, you must also be connected to the other node as you need to send information about the channel, such as channel updates, to that node.

In Simple Terms:

Before opening a channel, you want to make sure that you can securely communicate with each other.

With the lnd implementation you do this with: lncli connect <PUBKEY>@<HOST>:<PORT>

This only tries to establish a stable connection with your peer.

Then you can open a channel with your peer. You can specify a local amount you want to commit to the channel.

With the lndimplementation you do this with: lncli openchannel --node_key=<ID_PUBKEY> --local_amt=<AMOUNT>

After opening a channel, you will have to wait for a number of confirmations. The reason for this is that by opening a channel you make a transaction on the bitcoin network.

With the lndimplementation you can set the number of blocks with the flag: --block

Hope this answers your question.


text:
When does bitcoin wallet subtracts the coins spent by that particular address?
After how many confirmations does the bitcoin wallet subtracts/updates the account balance in respect of respective wallet address.

Bitcoin Core does not have a concept of address balances.
It has a concept of a wallet balance. The wallet balance is the sum of the values of all the transaction outputs that are:

Not serving as input to any (confirmed or unconfirmed) transactions that are not abandoned.
Either:

Confirmed (at least one confirmation)
Unconfirmed, but produced by a transaction that we signed ourselves ("change").


text:
How do bitcoin nodes know their own external IP address?
I'm studying the bitcoin source code and I have a doubt about if: Bitcoin nodes still follow the methods explained at the "Satoshi Client Node Discovery" wiki page?
More specifically, if they follow the explained local client's external address discovery method using external websites.
I didn't find any references/evidence of web requests being made to the ip address 91.198.22.70 or the checkip.dyndns.org web address in the code.
Was it removed at some point in time?
The Bitcoin source code version in question is the master branch at 2018/05/04 (v0.16).
Thanks in advance.
GitHub Bitcoin
Satoshi Client Node Discovery

This is used currently: https://github.com/bitcoin/bitcoin/blob/master/src/net.cpp#L1499

@MCCCS Thks for your reply. Is it only done by UPnP? A lot of routers have the UPnP disabled.

Yes, only UPnP. You can see the implementation here: https://github.com/miniupnp/miniupnp/blob/a4af4a66b2ce7e35b51944192e1045b16c8b082c/miniupnpc/upnpcommands.c#L299


text:
What is the relation between a Hash Time Lock Contract(HTLC) and a Commitment transaction?
I want to know about what happens to the commitment transactions as the HTLC's are sent and cleared along to peers in a route.

When a HTLC is created, a new commitment transaction is created. The HTLC is an additional output (script) in this new commitment transaction, in addition to the RSMC and “regular” outputs, and represents the amount that is pending “routing confirmation”.
When the HTLC is cleared, another commitment transaction is created, absorbing the HTLC output amount into the RSMC/“regular” outputs.


text:
blockchain.info API response is coming with a big delay
I'm using blockchain.info API on my shop. Everything was fine until about 2 weeks ago. The whole procedure and the issue is:
- When a customer place an order, a btc address is created and customer must send a certain amount of funds to this address.
- When funds are received on this wallet, blockchain.info is sending a response to my site that funds are paid.
- Automatic confirmation emails are sent to the customer when I receive this confirmation from blockchain.info.
About 10 days ago, I noticed that the "paid" reply comes with a big delay from blockchain.info. Log shows that there is a difference of about 4 hours between creating the invoice and paid responce. At the same time, I see that customer paid his order (3 confirmations) in 25 minutes (for example) after invoice was created.
As to mention, there were no such issue before. Something changed and I cant understand where.

You will likely need to contact their support, no one here is able to help you with this kind of company-specific issues


text:
Restore BIP44 HD wallet
I'm newbie in bitcoin development, I'm working on a wallet and I generated addresses using BIP44. Now for restoring my wallet, I followed the example
RestoreFromSeed.java it uses Wallet.fromSeed(netParams, seed); but it seems to restore BIP32 addresses. Is there a way to restore BIP44 addresses instead? I'm using the 0.14.7 version of bitcoinj. Thanks

BIP44 is a convention about derivation paths. BIP32 gives you an extended master key which you can then combine with a derivation path to get a private key.
So after you get your master key you are probably looking for the key with derivation path m/44'/0'/0'/0/0. I am not familiar with bitcoinj or Java but from a quick search it seems that you can find what you need here


text:
bitcoin-qt and ubuntu 18.10
bitcoin-qt worked well on Ubuntu 18.04, after the upgrade to 18.10 it won't start anymore. Can't find any hints in log-files.
Help appreciated!
kr Heinz

I have the same problem, what happens when you run bitcoin-qt from the terminal?

Nothing happens, no error or any other message turns up.

This may be connected to the fact that Berkeley DB can't be built on Ubuntu 18.10:
Can’t build Berkley database on ubuntu 18.10. During call to make install getting error: definition of ‘int __atomic_compare_exchange(db_atomic_t*, atomic_value_t, atomic_value_t)’ ambiguates built-in declaration ‘bool __atomic_compare_exchange(long unsigned int, volatile void*, void*, void*, int, int)’

Some patches

http://lists.busybox.net/pipermail/buildroot/2018-May/220910.html
https://aur.archlinux.org/packages/libdb-4.8/
https://aur.archlinux.org/packages/db4.8/


text:
How to create bidirectional channels using LND?
I created a channel with following command.  But its not bidirectional by default.
lncli openchannel --node_key=02cdf83ef8e45908b1092125d25c68dcec7751ca8d39f557775cd842e5bc127469 --local_amt=390000
How can I make this channel bidirectional. And how can I create bidirectional channels?
Thank you so much for help and guidance.

It is bidirectional by default. In fact LND does not even allow for single-directional channels.
What you're experiencing though, is the drawback of having created a single-funded channel. That means, that all of the funds in your newly created channel are sitting on your side, which means that for now, you can only send money but not receive any money. Or in other words, you don't have any inbound capacity on that very channel. As soon as you do have both inbound and outbound capacity, you will be able to both send and receive money over that channel.
Note: For now the Lightning implementations do not allow for mutually funded channels, but this feature is in the works and soon to come.
So.. what are your possibilities now to circumvent this problem and get inbound capacity? Here are some options:

Wait until other nodes open channels to your node
Push money to the other side of the channel by buying something
Send money over Lightning to zigzag.io and receive it back on-chain.

Once you have inbound capacity and you are routing payments, your channels will get rebalanced in the process and you will hopefully get inbound capacity on all of your channels over time.


text:
Is there an approach to exchange Bitcoin with formal currency with keeping anonymity?
Apparently, Bitcoin preserves anonymity of users such that nobody is able to know who is behind of an account address. But If this user intends to exchange a bitcoin with a formal currency, eventually they need to reveal their personal information, isn't it? Or is there a way to keep anonymity even at time of exchanging with formal currency?

Related: https://bitcoin.stackexchange.com/q/37785/13866

You are possibly looking for a Bitcoin ATM or a private transaction with a cold wallet. There is no real anonymous way to exchange for fiat over the internet. Most exchanges have regulations from the government in place that require you to verify to fight money laundering. Also it would force you to verify a bank account that needs a name.


text:
I installed bitcoin core and it started synchronising, at 50 % it says that i dont have enough free disk space
How is it possible that i don't have enough free space? I checked beforehand and the client said i needed around 120GB but i have at least 290GB free space and now it says at 50% that my disk is full and so it quit.

a bit more information would help to support this type of question. Windows, Linux, MacOS, what version of Core client, how you come to say that 50% is full, where the 290 GB come from...

-1 The likely answer would be that your free space is not on the same partition as the bitcoin directory. If that's not the answer, please edit your question to rule that out.

Technically it is not an issue with bitcoin but the software implement.
I suggest check whether you choose data directory at proper disk partition.


text:
Possibility of fractions less than 1 satoshi in transaction fees
I know that I can't send even 1 satoshi due to dust transaction prevention, but the question is - might the transaction fee be not e.g. 160 satoshis, but 160.1 satoshis?

No, it's not possible. Transaction fees are not explicitly included in transactions: they are computed from the difference between the sum of the amounts of the outputs and the sum of the amount of the inputs [1]. Since the smallest value that can be represented in an output amount is a satoshi [2], it's not possible to generate fees less than that.
[1] http://chimera.labs.oreilly.com/books/1234000001802/ch05.html#tx_fees
[2] http://chimera.labs.oreilly.com/books/1234000001802/ch02.html#cup_of_coffee


text:
Convert bech32 Bitcoin address to legacy
I know that similar tools exist for BCH (e.g. https://cashaddr.bitcoincash.org/). Is there a way to convert a native segwit bech32 Bitcoin address to a legacy format?

As Anonymous says, you simply cannot.
I'll try to highlight the important part of MCCCS's answer:

In Bitcoin Cash, cashaddr ("bitcoincash:...", similar to, but not quite bech32) and legacy addresses ("1..." and "3...", base58) are two different ways of representing the same onchain output in a human-readable way. One can be converted into the other because the resulting transaction will be identical, and the recipient can't tell which address you used.
In Bitcoin, native segwit addresses ("bc1...", bech32) and legacy addresses ("1..." and "3...", base58) are addresses for distinct on-chain outputs. The first are used for BIP141 segwit outputs, while the second are not. The fact that one can be technically converted into the other is irrelevant. If the recipient gave you a native segwit address, it means he expects a transaction that pays to such an output, and he might not recognize a transaction that does anything else. In certain cases, he may be literally unable to access coins sent elsewhere (e.g. because he uses an HSM that can only sign certain transactions).

Short answer: if you're given a native segwit address, and are unable to send to that, there is only one course of action: ask the recipient for legacy address instead.

This answer is about the differences between address formats and what causes incompatibilities. If you don't code your wallet, don't trust your wallet about recognizing different addresses made from the same public key! Don't experiment with anything I've said with real money!
In Bitcoin Cash, CashAddr and 1 addresses are different ways to encode the public key hash for Pay-2-Public-Key-Hash. To spend P2PKH outputs, the public key is revealed, for which a signature is signed. How the public key hash is serialized doesn't change how the output is spent or created. Thus those addresses are convertible.
Here are the information Bech32 (P2WPKH), SegWit in P2SH (P2SH-P2WPKH) and 1 addresses keep:

P2PKH contains the <20-byte-key-hash>
P2WPKH contains the <20-byte-key-hash>
P2SH-P2WPKH contains the hash of the script 0 <20-byte-key-hash>

Does that mean P2PKH and P2WPKH are the same? No, sending money to  the P2PKH and the Bech32 of the same public key will yield different transactions. And how the payee's wallet will spend it with the corresponding private key will be different too. But it's the same private key, the wallet should be able to spend both! When a wallet generated a Bech32 address for example, there's nothing that requires the wallet to scan for the transactions spending to that public key as P2PKH or P2SH-P2WPKH. This will depend on the implementation. (BTW, in P2PKH a compressed or uncompressed public key can be used. P2WPKH or P2SH-P2WPKH can't be used with an uncompressed public key)
For P2WPKH and P2SH-P2WPKH, similar to the previous case, from P2WPKH you can craft a P2SH-P2WPKH, and use it if the payee's wallet is compatible (I don't know about Bitcoin Core but there's no reason a lightweight wallet to be compatible with this). On the other hand, if you see one's P2SH-P2WPKH, you can't derive the P2WPKH or P2PKH unless that address has spent. This is related to hashing once, appending a zero, hashing again. When spent, the public key (and it's hash) are exposed.
Summary: It's theoretically possible but no implementation will be compatible.

This is poor advice to even suggest that wallets are able to spend funds to addresses they didn’t generate. People have done this and lost money.

I agree, experienced developers whom I thought my answer could be helpful do not need my answer and users can be misdirected. I'll add warnings.

Have you tried this on the testnet?

Answer is still useful developers wanting a quick understanding of P2WPKH addresses

There’s no conversion of address formats in Bitcoin and attempting to do so will result in loss of funds.


text:
When mining, does one also include Merkle root data into block header when testing for hashes?
I am just a beginner trying to understand technical details of bitcoin. As far as I know, the Merkle root of a block works to provide summarizing hash of list of transactions. And according to my understanding, mining works by first hashing block header, appended with some bits and testing whether the resulting hash satisfies difficulty requirement.
My confusion is this: when hashing to perform mining, is Merkle root included? I am asking this as if Merkle root is included, then this would mean that mining depends on the transactions chosen to form a block. Thus it seems to me that if this is the case, then a miner can, by luck, choose some group of transactions that turns out to provide the hash that is under then target faster than other agents, assuming that other conditions are equal.

"some group of transactions that turns out to provide the hash that is under then target faster": why? if that is the case, the hash function would be considered completely broken

but then it's just enough for group of transactions that turn out to be faster very difficult to know beforehand. After all, doesn't most cryptography work this way?

Every hashing attempt has the same chance at being below the target, independent of any other related attempts. If that is not the case, the hash function is broken.

[…], mining works by first hashing block header, appended with some bits and testing whether the resulting hash satisfies difficulty requirement.

Yes, although it's actually just the block header that is being hashed. One part of the block header is the nonce that allows to try 232 different possible block headers for the same block template. Another part of the block header is the Merkle root of the transaction tree, which must be recalculated when the extra-nonce in the coinbase transaction or the transactions included in the block template are updated.
The Merkle root has to be included in the block header because that's what cryptographically ties the transactions to the block in the first place.
No miner can predict whether a particular set of transactions would give them an advantage to find a block quicker, because the only way of doing so would be to try out all the possible options, which is exactly what they are doing anyway when they are mining. This follows from the hashing algorithm being based on a cryptographic hash function. If it weren't true, the hash function would be broken.