text:
What does the Lightning Network UX look like?
I think understand the basics of how Lightning Network works. But what I'm failing to understand is how users will use this in a practical, day to day basis.
Say I want to pay for my Starbucks coffee in store.
I know that in theory, I'll make a deposit into a multi-sig wallet with Starbucks on the main chain. However, this will take at least 10 minutes to be confirmed, and you would have to do it with every party you wanted to transact with for the first time.
So ideally, wouldn't there be some sort of single, intermediary service or protocol that I could enter this multi-sig wallet with instead? And Starbucks would use this service as well, and we wouldn't need that whole dance?

However, this will take at least 10 minutes to be confirmed, and you would have to do it with every party you wanted to transact with for the first time.

Not necessarily. The way that some of the LN clients currently work is that they will automatically establish several channels with other nodes for you when you first start the client. So when you want to pay for something at a merchant that you do not have a channel with, you can simply route your payment through one of your open payment channels. There is no need to create a new channel with each individual person you wish to transact with; that's the whole point of being able to route payments.

So ideally, wouldn't there be some sort of single, intermediary service or protocol that I could enter this multi-sig wallet with instead?

Ideally, no. That would mean that there is centralization. What would actually happen is that both you and Starbucks have open payment channels with other people, and you simply route your payment through another person.

While I assume there is some other answer to this, here is my understanding of it:
One of the key features of LN is that Channels can stay open indefinitely:

as long as the two parties in the channel continue to cooperate with
  each other, the channel can stay open indefinitely -- there is no
  mandatory timeout period.

This means that you can open a channel with Starbucks and reuse this channel for all your future transactions. Of course the opening of the channel (the funding transaction) and closing it has to be on-chain but as with many things in life you have to look at this as an investment - you pay/wait now and over time you get your investment back and even profit from this.

Routing payments is a very important concept that is not mentioned in this answer. The answer gives the impression that a lightning user would indeed open a channel with every shop they'd buy from which is not really the case


text:
Can't make 1 hop lightning payment, no route
I'm trying to send a payment on the Lightning testnet. I'm running 3 nodes on 3 computers on my network. So far I've setup two channels, and sending sats between the channeled nodes has been fine.
A <-> B <-> C
However I'm now trying to send sats from A to C, which requires hopping through B, as A to C does not have a channel. I'm getting an error:
Payment status: FAILED, reason: FAILURE_REASON_NO_ROUTE

Sync to graph appears to be true on all nodes:
"synced_to_graph": true

Balances are also fine, I'm only trying to send 1 sat at a time.
Here's the output log:
 Payment c0a4ae3b1ee3235b217e4d64f4c85140bc73543f7f0e109f2759bcb296dc474c in state terminate=false, active_shards=0, rem_value=1000 mSAT, fee_limit=1000 mSAT
 [DBG] CRTR: PaymentSession(c0a4ae3b1ee3235b217e4d64f4c85140bc73543f7f0e109f2759bcb296dc474c): pathfinding for amt=1000 mSAT
 [DBG] CRTR: Pathfinding perf metrics: nodes=0, edges=0, time=257.708µs
 [WRN] CRTR: Failed to find route for payment c0a4ae3b1ee3235b217e4d64f4c85140bc73543f7f0e109f2759bcb296dc474c: destination hop doesn't understand new TLV payloads
 [DBG] CRTR: Marking payment c0a4ae3b1ee3235b217e4d64f4c85140bc73543f7f0e109f2759bcb296dc474c permanently failed with no route: no_route

Any ideas? Thanks

When you open a channel, the balance initially sits completely on the channel opener's side. Did both A and C open the channels to B, so that now all the balance is on A's side in the A-B channel, and all the balance is on C's side in the B-C channel? I.e. are you sure that there is balance available in the right direction?

@Murch For A B, the balance sits at A. For B C, the balance sits on B. So I think A should be able to send to B, and B should be able to send to C in this instance.

Is 1 sat perhaps below the minimum HTLC size?

Not sure what the min HTLC is or where its set, but I tried higher values, and no luck. Running the queryroutes command is also a fail.

source: Stack Exchange

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

sort: votes


text:
Blockchain.info API: How to cancel callback notifications
Regarding Blockchain.info's Receive Payments API V2:
The 'Generating a Receiving Address' feature requires a callback_url, to which they send a notification of EVERY confirmation. For every transaction, potentially thousands of notifications will be sent to the callback_url.

When I use the 'Generating a Receiving Address' feature, can I receive a new address WITHOUT specifying a callback_url?
If I must specify a callback_url:
a. Is there any way to cancel the callbacks?
b. Can I limit the number of notifications that are sent?

1) No
2) your callback url must respond with the text "*ok*" without quotes and nothing else, just text. This will stop Blockchain.info from sending further notifications.

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

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


text:
Is there a chart available for the historical relationship between Bitcoin price vs difficulty?
All I've seen is this, from 2011-would like something more updated, if available.
Is there empirical data about a relationship between bitcoin price and difficulty?

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


text:
What is the difference between 51% attack fork, hard fork and soft fork?
I am confused between the forking that can be created because of the 51% attack and the soft fork and hard fork.
Does forks because of 51% attack can also lead to new crypto currency creation?

I came across the link https://www.nasdaq.com/articles/bitcoin-fork-undergoes-51-attack-settlement-assurances-matter-2021-08-05 where bitcoin fork undergo 51% attack.

The Nasdaq article is about a 51% attack on BSV, not on Bitcoin (BTC). I personally would be careful not to assume that what happened to BSV could happen to BTC or that if it did happen, the results would be similar.

Any forking that results from a 51% attack is a fork of the blockchain. It is a fork in the data, not in the rules.
The phrases "hard fork" and "soft fork" usually refer to a fork in the Bitcoin rules. So that is a fork due to software changes that implement either a change in the so-called consensus rules or a change in the network protocol.
So they are different in that way.
So far as I know, there has never been a successful 51% attack in Bitcoin, so I don't think we can say for certain what a long term outcome might look like. I guess that all blockchain forks are eventually resolved one way or another.

See What is a soft fork? What is a hard fork? What are their differences?

Arguably, every softfork is technically indistinguishable from a 51% attack of the upgraded miners on the non-upgraded miners. The distinction between calling it an attack or a soft-fork change is social (but relevant!) - and depends on whether nodes (and ultimately the community) go along with the change (and help enforce it).


text:
sent btc to bcc address. what can i do to stop swearing?
Both are my accounts. Two hours ago i sent 0.2 btc from breadwallet to wirex in orden to add funds to my debit card. But I mixed up addresses and they went to a bcc one. I wrote to both supports, with no answer yet. I did not know a thing about replay protection. Is it by default or should I do something to get my transaction rejected. I don't even know if it's anything I could do, in fact.

nope, you don't control your private keys with wirex :/
it would be so much easier
i got an answer from breadwallet explaining it's not lost, it's just on the btc chain, same address. I should provide the transaction ID and wait for wirex to kindly recognize my btc, breadwallet said
I share this if somebody else do the same stupid thing, because there is nothing online yet
If somebody else have a better idea or know about another debit card with a 2000 limit with no verification...

Check out this answer to know what happens if you send BTC to BCC.
As of your case, if you were holding the private keys of both the wallets, then you could simply retrieve it except the transaction fees.
But in your case, you have send the BTC to an unknown BCC address. You cannot tell who owns that address. The person who owns the private key of that address gets the BTC.
If by any chance, that address is of Wirex, then you have a good chance to get that in your account, as if they hold the private key of that address, they have access to both BTC and BCC in that address.

hey guess what? it took 22 hours to get an answer from wirex. i received one mail saying something like "hi! eugene was assigned to help on this. please be patient while he analizes it". One minute later, the fastest support agent bring the brightest answer "we do not have any information regarding BCC support as of now. we will keep you update through our blog"

great, so i should just let you alone with my money. why didn't you ask for it earlier hon?

so i provided him all sort of forum threads and a rush class about what i learnt today. your private keys, my tuition fees.


text:
How to generate a block header?
good afternoon
I set myself a task to understand the work of the miner, but as you understand it is difficult for a beginner. Constantly there are questions.
Without conditionally, I turn to Google search and find the answers but not always.
Guys help sort out a few points
How to compose a block header?
I appeal to the instructions on such sites as:

I understand the headline is formed by the principle:
Version + prevhash + merkle_root + ntime + nbits + '00000000' +
'000000800000000000000000000000000000000000000000000000000000000000000000000080020000'
Where merkle_root should be in the reverse order of the byte and only it.
But other sources and sources give different examples of header formation. Someone does not translate merkle_root in the reverse order of a byte, but translates ntime and nbits
The question is how to properly form the header of the block and what incoming data should be specified in the reverse order of the byte. Most likely something I do not understand until the end and I hope for help.
And can someone tell me a good manual

The best documentation, and the only one that's truly authoritative, is the Bitcoin Core source code.

possible duplicate of https://bitcoin.stackexchange.com/questions/46021/bitcoin-mining-block-structure/46024#46024

check this:
https://en.bitcoin.it/wiki/Block_hashing_algorithm
How is a block header hash compared to the target (bits)?
[EDIT]
Also this Calculate hash of block header


text:
How does cloakcoin determine valid transactions?
I recently read the enigma white paper but I'm having a hard time figuring out how the network reaches consensus of valid transactions if the inputs and outputs are scrambled. How does the blockchain reflect who's account gets incremented and deincremented with these scrambled transactions. And how does the blockchain record account balances without giving away transaction histories.


text:
How to realistically mitigate miner heat
Does anyone have a system for flushing the heat generated by their miner out of their house/office w/o letting in outside temp. I'm worried about the cost of cooling a miner in the south in August. I previously heard that antminer s7/s9 miners can operate in the ~135 degree f range. Also, if this is off topic for the forum let me know.

It's called an air conditioner!  That's precisely what an air conditioner does.

When people speak of electricity costs of mining, they are not just referring to the miner, itself.  They are also talking about the cost of cooling the miners.
Anyone who has worked in a datacenter knows that cooling is a major cost, if not the main cost.  This is why large scale datacenters are often built next to water sources; to cool the servers.  If you are running a miner, you need to keep the ambient temperature cool (air conditioning), and perhaps have heatsinks and water cooling systems on the miner, itself.
The cost of cooling a mining rig may make mining unprofitable, depending on the issue ambient temperature.

I am mining from Africa, where temperature is a bit high. The daily average temperatures are around 30 degrees celcius.
This is what I did to control the heat.
I have ducts for the exhaust fans which directly takes the heat out.
But that wasn't enough, the outside temperature in my opinion was a bit too high, and if you factor in dust accumulation, I could see why the miners were showing higher temperature.
So I installed an air condition.
The air condition does two thing's,

Ensures filtered air is supplied
Ensures that the intake is actually cold air.

This had a huge impact on the stability of the machine's.
I attempted taking out the duct tubes which takes the heat out, but I realised, it meant my AC unit was overworking to cool the room.


text:
Rounding in BTC exchanges
Does anyone know whether exchanges usually round values or truncate them instead?
Different exchanges support different resolutions for prices and amounts. For instance, BTC China supports 2 decimals for prices and fiat amounts (in CNY) and 4 decimals for BTC amounts.
Now, if I buy, say, 0.625 BTC at price 1621.37, I would get 1013.35625 CNY, but since fiat amounts are allowed to have only 2 decimals, that number will lose the extra digits. But will it become 1013.36 or 1013.35 (that is, rounded or truncated?).
This can be verified empirically for any given exchange, but I was hoping someone already knew the answer, either for specific exchanges or a general rule that most exchanges follow (if that were the case).

Based on greediness of banks, I would say they would floor the number, so just cut off the extra decimals :P

Cointrader rounds it:

All calculations are performed to 16 decimal places. The final fee for dollars is then rounded up or down to two decimal places, and final fee for BTC is rounded to 8 decimal places. For example: a fee of $0.114 is rounded down to $0.11, and a fee of $0.116 is rounded up to $0.12.

Coinfloor uses something called "weighted stochastic rounding", whatever that may be:

In order to ensure fairness, Coinfloor uses an approach called "weighted stochastic rounding" to calculate the fees charged to our users when trading. Weighted stochastic rounding over time minimises the effects of rounding errors. To understand why this rounding method is preferable to traditional "round-to-nearest" rounding methods, consider the case of one hundred occurrences of a 4.71 fee, each rounded according to the nearest whole number. Using the weighted stochastic rounding method, the expected value of the sum of these rounded figures is 471, which is exactly equal to the ideal sum of the unrounded figures. Using the traditional method, the expected value of the sum of the rounded figures would be 500, which is far from ideal as it results in a much higher fee charged.

I didn't find the information on any other sites, but I think they will use round

Thanks for the info. I wasn't referring to the treatment of excess decimals in fees, though, but those in the amounts themselves. But maybe the same policies apply to both.


text:
Buying BTC with PayPal, preferably automatic, mid 2015
Does anyone know if the Virwox method (buying "linden dollars" with USD from PayPal, and then exchanging linden for BTC) still works, and what are the limits, and cost? (in late 2013, if I recall correctly, there was a $300~$400 USD monthly limit, and the effective cost was really high, around ~16%).
Also, does anybody know of any other reliable method, preferably automatic (hence, not localbitcoins) of buying BTC with PayPal? (by automatic I mean not depending on direct interaction with some other user).
I know similar questions have already been asked, but they're old and some methods no longer work.

Can you give some explanation of why you want to do this?  It seems like just the sort of thing that someone would want who had unauthorized access to a bunch of Paypal accounts and wanted to steal their balances and convert them to Bitcoins (for untraceability).  So for that reason, I'd have some reservations about answering this question, and likewise I'd expect that Paypal would take steps to make this difficult.

Your comment surprises me. Your argument could also be applied to credit cards, cash, and possibly other means of funding. I'd rather avoid LocalBitcoins (or whatever other "manual" services out there) for privacy and speed, that's all. I just want privacy; that should not be considered suspicious. You could as well suspect all bitcoin users are criminals.

@Juan It was a simple question. Which you didn't answer. You don't have to answer it of course, but you should know that SE frequently requires clarification on questions. If you want an answer, then consider clarifying the question, or wait for a response. No need for offence.

@WizardOfOzzie Regarding "No need for offence": I don't know in what direction you meant that, but I didn't mean to offend anyone, and didn't take offense myself either. Regarding Nate's question, it didn seem like a request for clarification in the usual sense (since it's irrelevant for the purpose of finding an answer). Anyway, I did answer part of the question, which could be stated as two questions: a) "Why do you want to buy BTC with PayPal?" And b) "why without interacting with users?".

I already answered b): for privacy. The answer for a) is not very useful: "Cause I want to buy BTC, and the funds I plan to use are in PayPal". Want more details? I'm working on a trading algorithm, I want to add some funds to test it in the real world, and I have some money in a PayPal account (of mine, not stolen) with which I hope to buy some BTC. Now, come on, you must admit people are not normally asked to give this much detail. Check previous "Buy BTC with PayPal" questions.

@Juan The underlying issue with this is that it's difficult to see the rationale behind using PayPal and then wanting complete privacy; my response below pretty much covers the options. PayPal trades died out in early 2013 to the best of my knowledge: eBay has inflated Bitcoin auctions items, but it's rife with scams on both sides

@WizardOfOzzie I see. Well, as I said in a comment to your answer, I don't want "complete privacy". I'm ok with using PayPal with some service, but not so much with providing lots of info to a individual stranger.

Ok, I tried the Virwox method and it still works perfectly, although the effective fee was around ~11.3% (plus a fixed $0.5~$0.6 + 0.005 BTC). I could buy 1.184 BTC with USD $330.
In case anyone's interested, the details follow:
Using PayPal, there is a deposit fee of $0.3 + 3.4%, and variable daily/monthly limits (330/3000 in my case). They also accept credit cards, and several other online payment systems. Exchanging USD for SLL has a fee of 2.9% + 50 SLL. Then, exchanging SLL for BTC has a fee of 2.9% + 50 SLL again. They don't allow USD amounts with cents, and something similar happens with SLL, so you end up with some tiny unusable balance (which likely ends up being like a hidden fee). And finally, a 0.005 BTC fee is charged for BTC withdrawal.
All in all, despite being quite costly, it is the only reliable automatic solution I know of, and luckily it's still working as of June 2015.

I use Paxful,  they have many different payment options including paypal.  It is P2P though, but there is escrow and you can see if the seller is online and if they are it takes about 5 minutes to complete the entire process.  Users have feedback and reviews etc.  You never have to really even talk to the seller, just leave them a message and send the funds through Paypal and they deposit coins in your wallet right away.   Really easy, quick, simple to use.
Also, as far as I know Virwox works, just lots of fees and limits etc as you mentioned.  The limits are through second life, you should go to their website to find out more info.
UPDATE
I did Virowox or w/e its called. (sry for late response) .. First transaction is delayed by 2 days. ( I actually did a chargeback and got the BTC for free and they never said anything, I still use them). The rate is crap, but so are p2p sites. Once you do your first tx tho, it's pretty much instant. So fastest would be USD->SLL->BTC on Virowox, but margin is kinda high.  Also the limits are pretty low.   Like 100 bucks until you do stuff to raise the limit I guess.
I also have been using localbitcoins (.com) to do trades, it seems to have more activity than paxful and you can create advertisements even if your a brand new seller with no established reputation on other sites, (unlike paxful).
Other things I have done...
Buy Walmart Gift Cards on my Walmart Credit Card then exchange for BTC on paxful or probably cheaper LBC.   High margin but who cares its credit! :P
Use Google Wallet (after loading it with my paypal debit card) to buy BTC on LBC.
Buy Vanilla Visa Card with Walmart Credit Card,  Paypal Request Payment from myself (with dummy email) then buy BTC on Virowox with Paypal.
FYI - Don't ever tell the seller you bought it with a credit card, they will run like you have the plague.   And if they notice it somehow, just play dumb and usually they will be cool and do it "just this one time".
Found some BTC ATM's near me.   Didn't end up using as the fees were too high, but good to know its there in a pinch.  google bitcoin atm locations and you can use your paypal debit card to buy BTC there.
Fun Stuff to do with BTC
Buy into Seals with Clubs BTC Poker site,  Win lots of BTC,  cash out only takes a few hours,  entirely anonymous, no documentation or information collected ever.
Go on coinarch (or similar site, but i like coin arch) and daytrade BTC using elliot wave indicators to guide your longs and shorts.  Make lots of BTC,   play more poker,  make more BTC!  haha :P
BTW, BTC about to spike or drop in the toilet, might be worth it to take a long position on it and see where it goes.
Future Plans
Hack the blockchain.  ( haha yeah right )
But actually, scan the blockchain for weak keys in order to calculate private keys.   Is that illegal or anything?  It's just like monopoly money right?  Do you get in trouble if you find out someones private key and jack them for all their BTC?  Maybe I should post that as a question.  I seem to recall something about people getting arrested for similar activity.
Start trader accounts on LBC and Paxful and start trading BTC in my spare time.  Those guys charge quite a lot to sell and buy for cost basically, sometimes a lot less.   And if you accept alternative payment methods that are high risk (like paypal) you get to charge a lot more.  With Paypal you can accept Credit/Debit Cards, Vanilla Visa Gift Cards,  Paypal My Cash,  and probably some other ones.  So it's really kind of a good deal and I just know sooner or later some big company like Paypal or Ebay is going to see the common man making a buck and take it away from us so gotta get while the gettin is good.
I might even code my own BTC Trading site as the two best options I found are kinda janky and I'm a programmer so why not.  :)
I'll post more if I can think of it.  I've been a busy little bitcoiner.  :)

Sounds like it's not automatic, but not "too manual" either. Thanks for the info!

@Juan Updated answer with some new info after trying out virowox and other sites.

I don't know of any services, especially automatic, which accept PayPal. LocalBitcoins will rarely have vendors accepting PayPal, and even then, it's going to be very much a reputation based judgement call. A vendor accepting PayPal has everything to lose (the Bitcoins and the PayPal money), so I'd be highly doubtful any service would even accept PayPal, let alone without identification or oversight. (Which begs the question, if you want privacy why are you using PayPal?)
Maybe try Bitcoin-OTC or BTCJam if you don't like LocalBitcoins

Thanks for answering. I'm ok with the level of privacy achieved by using PayPal with some automated service (like Virwox) where my email address may end up in some log file or database; I'd rather avoid having to show my face, utility bill, personal info, or whatever over Skype with some other user, some stranger. I understand why users request that (they don't want to get scammed), but I'd rather go the automatic route. I don't see why all this looks so shady to you guys.

Also, I don't have an international bank account, and the balance in my PayPal account is sort of stuck there, since I can't use it for too many things (I pay Netflix, donate to some NGOs, buy some stuff from Walmart when a relative travels to the US, and not much more). I don't have a suitable bank account to send the funds to, and cannot send them to another account either (I'm from Argentina).

authors: ธนกฤตเอ พรมรักษ์


text:
Error - Electrum wallet RPC method not supported
I install Electrum in Ubuntu.
sudo apt-get install python-qt4 python-pip
sudo pip install https://download.electrum.org/2.6.4/Electrum-2.6.4.tar.gz

Then I start RPC on port 7777 and run daemon:
electrum setconfig rpcport 7777
electrum daemon start

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

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

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

There are two problems with your command.
First, any method you call should not be prefixed by wallet. or suffixed by ().
Also, there is no RPC method create_new_address. If you have a look at lib/commands.py you will see that the internal python method create_new_address() is called by the RPC method getunusedaddress, and only when the parameter force=true is given.
With the above in mind, try this:
curl --data-binary '{"id":"curltext","method":"getunusedaddress","params":{"force":true}}' http://127.0.0.1:7777

The equivalent shell command would be
electrum getunusedaddress --force

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


text:
Intermittent error "min relay fee not met" even with decent fee and custom Electrumx+Bitcoind
I have an automated system that sends BTC payments via Electrum for a client.
Now, it happens again and again that payments keep failing with "min relay fee not met" (RPC call failed: {"code":-32603,"message":"Server error: File \"/home/ubuntu/.local/lib/python3.6/site-packages/electrum/network.py\", line 871, in broadcast_transaction | electrum.network.TxBroadcastServerReturnedError: min relay fee not met\n"}) for minutes or hours, and later it will work again.
A few facts:

The fee is taken from Electrum's getfeerate with fee_method: 'eta' and fee_level: 1 (this is already increased from the previous value), and it's actually afterwards inflated by another 20% by my code.
At first I thought it's an issue with Electrum servers. Now I'm using my own ElectrumX instance, and it happens there as well (I didn't find any way to set a fee limit). I then read that it is related to custom settings of Bitcoin nodes, but I'm now using my own Bitcoin node with default settings.
An example of a failing transaction would be this one: https://www.blockchain.com/btc/tx/d45a03bade61a2306994afa52cfd0f7cac18ec6965ec0425ae2010937f3afbad << this is when the transaction was successfully sent a few hours ago, but previously, around 12 hours ago, it kept failing - with the same fee: 45.853 sat/B - 11.463 sat/WU - 225 bytes

If I look at bitcoinfees.earn.com I see the "normal" fees around 20 sat/B, yet the 45 sat/B TX didn't go through. Even if the fees had jumped a bit, it's not logical that I see transactions like this one being successfully broadcasted at a similar time at which mine continued to fail, with only 3 sat/B...
Do you have any ideas what I could do about this problem? Of course I could react on this error by increasing the fees incrementally but this would cause trouble with my calculations and also it doesn't seem logical that I would have to pay a fee of 100+ sat/B when there are TXs with <10 sat/B at the same time...

What is the total amount of the fee you get in the end? like you said the min relay fee policy is defined by each node and according to this the minimum fee amount  out of the box in Bitcoin Core, since 0.9, is 1000 sats.

0.00010317 BTC. As shown above, this is an example that worked https://www.blockchain.com/btc/tx/d45a03bade61a2306994afa52cfd0f7cac18ec6965ec0425ae2010937f3afbad but the same TX was sent 12 hours prior and got the error. Also, this other example https://www.blockchain.com/btc/tx/3d6cf1ab3bc8228110f4491a0fa8c7cd1652da3f912df29fe0011cebee774417 is a TX that succeeded with just 0.00000678 BTC fee...

Mempool being full can cause low fee paying transactions to be rejected, or even dropped if they were accepted previously.
If you pay min-relay-fee, and there's a spike in mempool size, you become the first to be affected by this problem :) Also, it means your size estimation code needs to be perfect - as if it underestimates the fee, being 1 satoshi off can be the difference in accepted/rejected!
Most likely? maybe electrumx isn't giving you fresh information, or your code doesn't treat min-relay-fee as dynamic :)


text:
Can I send bitcoin to other address in my wallet to provide anonymity?
I want to buy service Z.
I have 2 addresses in my bitcoin wallet: aaa and bbb.
I buy 1 bitcoin from coinbase and tell coinbase to send them to aaa.
Now I send them from aaa to bbb. No one else knows that bbb is also in my wallet.
I buy service Z by sending my bitcoin from bbb to Zwallet.
I'm safe. Yes? Safe ish? Not safe at all? Dead already?
I couldn't find this question asked in such stupid terms. I'm an idiot and need simple questions and answers.
Thanks for your understanding.

Nobody knows... but they can certainly suspect, and it would be obvious to them that you might try this.  So to some extent it depends on your requirements: is it necessary that nobody even suspect that you sent funds to Z, or just necessary that nobody can prove it?

Is there a way of preventing people from even suspecting? Am I right in thinking that coin tumblers just do the same thing, but a bit more?

Let's assume you're the outside observer. You see 1 BTC go from aaa to bbb, then from bbb to ccc, then from ccc to ddd, and them from ddd to zzz (zzz being associated with service Z). Can you see how easy it is to figure out that addresses aaa, bbb, ccc, and ddd belong to the same person?

It doesn't even get much better if you split the money to different addresses and then reunite it. How often do you think some money flow like

happens without aaa and ddd belonging to the same person?
That's why people use so-called mixing services. A mixing service collects money from several people, as well as addresses to pay the money out to.

As an outside observer, even if you know who the respective owners of addresses 111, aaa, ααα, and 字字字 are, you cannot determine who paid money to zzz, whereas in the first 2 examples, it's pretty obvious what probably happened.
This, of course, is simplified. Similar to how a criminals hiding the origin of their fiat money wouldn't move it to a single bank account in a different country and then back to where they live, mixing services don't give the users their money back after a single iteration. Instead, the money is mixed several times. A graphic showing many iterations and funds of many people, however, wouldn't get the point across very well.
This doesn't help, of course, if an outside observer can match which addresses belong to whom based on how much money went from aaa through the mixer to ΨΨΨ. To prevent such a mapping, the mixer may send money of equal amounts to many addresses. Of course it's a bad idea to reunite the funds afterwards because this makes the owner trackable by amount again.
Note that using a mixing service might be illegal under money laundering laws where you live, especially if it's done with a large amount of money.
Furthermore, a mixing service may just be a scam and the owner will run off with the money given to them.

one notice to your graphic: wouldn't a mixer also use various (onetime) addresses (instead of one like suggested in the graphic)?

@DJCrashdummy This wasn't intended to be implied but I can see how one would take this from it and will clarify it.


text:
How can I verify my wallet.dat file against an older version?
I recently ran into an issue with an unsafe shutdown corruption on an NTFS partition in such a way that the files all existed, but chkdsk had to be run to verify some non-essential files.
My peers.dat file was the only file chkdsk complained about, but I verified my blockchain to be sure. How can I ensure my private keys in my current wallet.dat match the ones in my backup? I don't believe it is corrupt (At least Bitcoin-QT hasn't complained yet), but I'd rather be safe.

You can use the dumpwallet command and export the private keys to a text file. Do this for both wallets and then compare the text files. You should see the same addresses and private keys. If you do not, then something has gotten corrupted.

I wouldn't take any chances and just move my funds to a new wallet. Starting bitcoin core without a wallet.dat file in the data directory should force it to generate a new wallet. Then you just send from the old wallet to an address in the new one.

If you can sign and verify a message with every address, you're 100% sure as signing requires knowledge of the correct private key.
https://i.sstatic.net/ttegX.jpg
You can do the verification with another client not holding your keys if that makes you feel more certain.

This raises the question of how to tell which addresses you should check.

@NateEldredge listunspent in the debug console will tell you which addresses have utxos sent to them.


text:
Why are blocks serialized? and Is there any alternative way?
Am I right that blocks are serialized because they're supposed to be sent to the network?
If yes, then all the data (regardless whether they are blocks or not) should be serialized. Then why do we mention that explicitly (e.g. in this post)?

Everything that is sent to the network is serialized. This includes blocks and transactions. Serialization is explicitly mentioned in the developer guide so that it is explicitly clear about what is sent and in what format.


text:
Specifying fee amount using bitcoinjs
I'm currently playing with bitcoinjs (https://bitcoinjs.org/) and I'm creating offline transactions that I broadcast over the network after.
I've successfully create my first transaction using this : https://medium.com/@orweinberger/how-to-create-a-raw-transaction-using-bitcoinjs-lib-1347a502a3a
But it seems my transaction is stuck since I haven't put enough fee on it to get it mined.
How using a var tx = new bitcoin.TransactionBuilder(); can I set the fee to a certain amount ? Is this calculated using a default value ?
Thank you for your help !


text:
Where to find my bitcoin cash (BCH)
Prior to the split I moved my bitcoins offline from Coinbase to my local Electrum wallet (Original wallet) since at the time Coinbase said they were not going to support bitcoin cash..
After the split I then created a new wallet with a new seed and moved my bitcoins to that new wallet (BTC wallet). I then created a new wallet with the original seed and moved my bitcoins from my Original Wallet to this new wallet (BCH Wallet.) Each of these new wallets showed the correct amount of bitcoins. Presumably one was the old bitcoins and the other was bitcoin cash, although the only way to tell was by how I named the wallets.)
My understanding from all the online procedures was that I should have ended up with my bitcoins in the BTC wallet and bitcoin cash in the BCH Wallet.
I later moved the coins from my Electrum BTC wallet back up to Coinbase. Since Coinbase doesn’t yet support BCH I then tried sending my BCH to Kraken, but I get an insufficient funds message. All my offline wallets show a zero balance. Did I in fact never have two separate bitcoin amounts, original as well as cash? Have I in fact lost my bitcoin cash, or did I ever really even have it?
If my bitcoin cash does in fact exist, where would I go to find it?
Any help appreciated.

Can you explain how you created the "BCH wallet"? In particular, it sounds like you created it using the same Electrum software you had been using, which would be BTC only, so in that case you've been using BTC all along.  You can still recover BCH, but you'll need to install a BCH wallet to do so.

Thanks for your reply.
For the BTC wallet I did a File/New/Standard Wallet/Create a New Seed
For the BCH wallet I did a File/New/Standard Wallet/I Already Have a Seed and then used the seed from my original wallet.
Unless I looked at stuff wrong, I thought that each wallet then showed the same number of bitcoins.  They looked identical.  I thought that the BCH wallet was just appearing that way since it didn't have a way to visually show BCH.  That is was, so to speak, BCH in BTC clothing, which when transferred to a wallet that did recognize BCH would represent as such.

Ok, but did you create the two wallets with the same program (i.e. both with Electrum), or with different programs?  The BCH version of Electrum is called Electron.  If you use Electrum to create a new wallet with the same seed, you'll just have two BTC wallets that are both looking at the same BTC coins, and all BTC transactions would show up in both of them. But post-split nothing you do in Electrum will have any effect on BCH.

I was following a YouTube video which only used Electrum wallets.  Of course, maybe the video wasn't right.  How would you suggest I proceed?  I am not planning do to anything with the BCH, I just wanted to make sure I had it and that it was recognizable as such. I was trying to create a separate entry somewhere that was labeled as BCH so I could track its value.  Should I just leave things and hope that Coinbase will be able to recognize it sometime?

I haven't tried it myself, but I think that if you do exactly the same thing using Electron instead of Electrum (using your original seed), you should see your BCH and be able to send it wherever you want.

To see if I understand correctly, I should download my bitcoins into my current desktop wallet.  Create a new wallet (Electrum) with a new seed and move my bitcoins into it to represent bitcoins (BTC).  Then using Electrum create a new wallet with the same seed as the wallet into which the bitcoins were downloaded and again move the bitcoins from the original wallet to this Electrum wallet (BTC). (assuming that the original wallet still has anything after the first move.)

No.  Do not do anything with your current desktop wallet or with BTC or with Electrum or with Coinbase, none of this will have any effect on BCH.  Instead, get Electron (not the same as Electrum!!) or another BCH wallet client, take the seed you were using before the split (the one you mention in the third sentence of your original question) and create a new BCH wallet with that seed.  It does not matter that you already sent the BTC from that seed to a different wallet; that transaction was after the split and did not affect the BCH.

Ok, think I am there.  I found Electron for Linux and was afraid I would have to compile it, but it had the ability to just execute.  When I executed it and it came up, it came up showing my bitcoin cash amount.  I didn't do ANYTHING with keys.  Odd.  Must have taken it from the older Electrum application.  Anyway, I am in the process of transferring the cash to Kraken, currently awaiting confirmation of the transaction.
Thanks for your help and patience.  Not sure if there is a way to reward someone for an answer. If so let me know.  Thanks again!

You can post an answer to your question explaining how you resolved it, so that future readers can benefit.  That would be the best reward!

I downloaded Electron for Linux which I then executed.  It picked up my keys from the original Electrum that was on my desktop.  It automatically showed the correct number of Bitcoin cash tokens, presumably having taken this data from the Bitcoins that I had originally downloaded from Coinbase into Electrum before the fork.  I then uploaded this Bitcoin cash into a Kraken online wallet so that it would be available for trading.

The following was copied from the Electrum website today:
Recommendation on how to redeem Bitcoin Cash
July 31st, 2017.
Electrum is a Bitcoin wallet created by Thomas Voegtlin in 2011.
Electrum is distributed by Electrum Technologies GmbH, a company
registered in Germany, using the website https://electrum.org
Electrum users who are not interested in Bitcoin Cash do not need to
worry nor to take any particular action. The following note is only
for users who want to access their Bitcoin Cash (BCC).
"Electron Cash" is a fork of Electrum for Bitcoin Cash. Electron Cash
is not endorsed by Electrum. It is open source, and binaries
(executables files) are available for Windows, OSX and
Android. However, when you run binaries instead of source code, you
have no guarantee that they match the source code. This is why wallet
binaries are usually signed by developers. A digital signature engages
the responsability of the person who signs.
The person who distributes the Electron Cash binaries has decided to
remain anonymous, and uses the fake name "Jonald Fyookball" in order
to sign Electron Cash binaries. Thus, if these binaries contain code
that is designed to steal your bitcoins, the author of the theft will
be anonymous and walk away safely with your funds.
This danger is exacerbated by the fact that the default behaviour of
Electron Cash is to silently copy all your Electrum wallets into its
own directory. Thus, if you run Electron Cash on a machine where you
previously used Electrum, all your pre-existing wallets will be
available in Electron Cash, and you will only need to enter your
password in order to expose your bitcoins to potential theft.
Therefore, users who want to run the Electron Cash binaries should do
it on a separate machine, that does not have their Bitcoin wallet. We
recommend to proceed as follows:

Install Electron Cash on a machine that does not have your
Electrum wallets.
Wait until the BCC hard fork has taken place, and a few BCC blocks
have been mined.
Move all your Electrum funds to a new Electrum wallet. This will
move only your BTC, and not your BCC, because the BCC blockchain has
replay protection. Wait until the transaction is confirmed.
Enter the seed of your (now empty) old wallet or private keys in
Electron Cash. Since the BTC have been moved to a new wallet,
entering your old seed in Electron Cash will not put your BTC funds
at risk.

Following these 4 easy steps you will be able to access your BCC
without compromising your BTC.

I would add "move your BCC to cold storage then wipe and restore the machine you used to run Electron Cash since you consider it possibly infected.


text:
Electrum seed words safety dumb question
I am starting with bitcoin and even though I understand pretty well how the blockchain works, the seed words used by some wallets (MultiBit and Electrum) give me creeps and doubts.
The main question is: Why they are safe?
The base for the question: Humans are not good source from random data so we use seed words from a random-pc-time-based source. This seed words are a representation of a binary number and the phrase with 12 words makes a 128bit hash. Those words are drawn from a 4096 words dictionary. The dictionary from Electrum is saved in a python script, for example. So, we can say we know those 4096 words. I have a seed phrase (12 words) from my wallet. What protects all the network of someone who changes the last word of his own phrase 4096 times, to open 4096 bitcoin wallets?
I know with Electrum, again for example, that 128 of those 4096 generate valid addresses. What protect the network then of someone opening the bitcoin wallets of 128 mates and stealing all the money?
The last part is more simple, the validation is made online, how an wallet check of the words open the private key if they can work offline?

For extra safety, one can change and also add a few words using words that are not in the dictionary.

It is secure in the same way that private keys themselves are secure; the search space is just so massive that the probability of someone generating a private key or seed which someone else is using is extremely small so as to be basically impossible.
Nothing protects someone from generating hundreds of thousands of keys and hundreds of thousands of seed phrases and seeing if any of them have Bitcoin associated with them. But since the search space is so massive, that person would have an almost 0 probability of finding a key that someone has used. Even if they generated a million keys per second (either randomly or through seed phrases), that person would have a basically 0 probability of finding someone else's private key even if they searched until the heat death of the universe.

The last part is more simple, the validation is made online, how an wallet check of the words open the private key if they can work offline?

That's not how Bitcoin works. There isn't any validation of any sort with private keys. There is no need to "validate" private keys or register them anywhere or the like.

I was asking about the process where I type the words in the wallet to import and then my wallet app retrieve my bitcoin. The wallet cannot do that offline. But doing it only, who fast is this process? The process is type a phrase -> show bitcoin. If this process is SO FAST it can be done in micro-seconds then someone can test around a thousand combination per second. How possible is this?

Key derivation is fast for humans. But, as I said, the number of possible private keys (which is what matters here; the phrases are essentially the same as private keys) is so massive that even if you generated thousands per second, the probability of you finding a key by the time of the heat death of the universe that someone has or is using is basically 0. Looking up whether a key has been used can also be done quickly, but it is much slower than key generation as it requires database lookups.

For the vast majority of possible 12-word combinations, the corresponding wallets were empty and never generated. The total number of the combinations is pretty huge so trying to brute-force them will not work out. In fact, words are just another (mnemonic) way to encode the entropy contained in the private key.

I know that the words are just a representation of the various 2^12 bits sets. But, then the answer is YES. It would "decode" the wallets. I understand that the vast majority will be virgem or empty. But, those 128 valid words for the replacement of the last word in a valid phrase are quite easily to test. How much time it would cost to do that?

@SasukePikaloko I don't quite understand where the number 128 comes from... And what is the reasoning behind trying to replace the last word?

The 128 is from the CRC. Only 128 words gave valid addresses. The reason is simple: If I start trying to change one word I will get access to the wallet eventually and will see someone money. I was trying to understand the timing for that. Around 1,5x10^24 years if trying one phrase per second. Is it right?

Please note that the order of these words must also be right so this 35 decimal digits of possibilities will increase to 44 decimal digits.
Even if you could check 1000.000.000 possibilities per second the time of the universe will not be enough.


text:
What is 'ScriptCode'?
I don't understand what the 'ScriptCode' thing is. Is it a part of transaction format? The wiki https://en.bitcoin.it/wiki/Transaction describes scriptPubKey and scriptSig, mentioning nothing about 'ScriptCode'.
When viewing an example P2WPKH transaction here http://n.bitcoin.ninja/checktx?txid=d869f854e1f8788bcff294cc83b280942a8c728de71eb709a2c29d10bfe21b7c
The "Script Code" field is displayed as "OP_DUP OP_HASH160 1d7cd6c75c2e86f4cbf98eaed221b30bd9a0b928 OP_EQUALVERIFY OP_CHECKSIG"(so the standard script used by ordinary P2PKH transactions), but these are not given by scriptSig or scriptPubKey(obviously, since those two have a very specific form required for SegWit transactions). Can someone explain where this stuff comes from?

The ScriptCode is the script that is evaluated for a witness program type. Each witness program type has a specific template for the ScriptCode. That is simply part of its definition.
For a Pay-to-Witness-Pubkey-Hash output the ScriptCode is
OP_DUP OP_HASH160 <pubkey hash> OP_EQUALVERIFY OP_CHECKSIG

The <pubkey hash> for the ScriptCode is taken from the witness program.

Where are the ScriptCodes defined?

The scriptCodes are defined in BIP 143: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#specification

@AndrewChow Are P2SH and P2PH defined similarly? Didn't see definitions for them in BIP 143 though.

For P2PKH, the scriptCode is the scriptPubKey. For P2SH, it's typically the redeemScript. They aren't defined in BIP 143 because they are not segwit output types; BIP 143 defines segwit stuff. AFAIK, there is no "official" documentation or specification which lays out what actually the scriptCode is. You will need to look in the code for that.


text:
(Reference request) Is there a better (but also fully technical) source to read how exactly SegWit works other than the official BIP141 document?
I'm slowly making my way through https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki and while it seems that with more time I should be able to understand it properly, it's going rather slowly and I feel like it'd be much more efficient to have a source that would explain this somewhat better, perhaps by elaborating more on why it's done exactly this way, with more examples etc.
But also everything else that I've found is just far from technical enough. Any good references you could recommend?

Do you mean something like https://bitcoincore.org/en/segwit_wallet_dev/ ?

Not really, it seems to be a rather short, dry description of how to craft segwit-compatible transactions without explaining very much about how segwit works. A good example of what I'm looking for would be something like BIP141, just much longer with more wordy explanations of what's happening.


text:
Recover Electron wallet with bad seed phrase
I once created a bitcoin wallet with Electron using a hand crafted seed phrase (using the words of the valid word list that time).
I now figured it was a bad idea, while it is possible to create wallets for abitrary seeds, a version number is encoded inside the seed, and thus it has some kind of format.
Now I just recovered the wallet from my seed phrase just to found it empty, no transactions inside.
I guess changes to the Electron code base broke the decoding of this hand crafted invalid seed so it now points to some other private key not matching my old wallet.
Is there any condensed documentation, how the usage of the seed phrase changed over time? How can I convert the old seed phrase to a working wallet?

Is there any condensed documentation, how the usage of the seed phrase changed over time?

Either the release notes or you can download older versions of the software and either use them or examine the code.

Source code for older versions
You mentioned "Electron" so it isn't clear whether you mean "Electron Cash" or "Electrum"

https://electroncash.org/downloads/
https://download.electrum.org/

Release notes
You can also check the release-notes for comments about seed-phrases:
For example, https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES contains

Release 2.0

New seed derivation method (not compatible with BIP39). The seed
phrase includes a version number, that refers to the wallet
structure. The version number also serves as a checksum, and it
will prevent the import of seeds from incompatible wallets. Old
Electrum seeds are still supported.

Electrum used BIP 39 seeds for some time. So your seed may be a BIP 39 seed, in which case you will need to tell Electrum that you are importing a BIP 39 seed. When you are importing the seed, click the Options button and then check the checkbox for BIP 39 seed.

electrum never used bip39


text:
Where can I find my 12 Recovery Passphrase
Have just lost my blockchain wallet password have tried all kind of password I know now I need to know my recovery passphrase kindly help

You can find it wherever you wrote it down when you first created the wallet... otherwise you're unfortunately SOL.

Is it a secret question..? Cause that is the only thing I remember I wrote down

Yeah, no. What wallet are you using?


text:
Problem with NEON wallet
I just started using the neon wallet and everything was going fine. But after I closed it and tried to open it and login again with my key and passphrase it will go on to decrypt my key forever. What should I do?

authors: Петр Демченко


text:
Where in a bitcoin transaction can I store some data?
I need to store some data in a transaction to the data can be stored in the blockchain.
In which field of the transaction I can store it?

createrawtransaction can be used to store data:

createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) ( replaceable )

Create a transaction spending the given inputs and creating new outputs.
Outputs can be addresses or data.
Returns hex-encoded raw transaction.
Note that the transaction's inputs are not signed, and
it is not stored in the wallet or transmitted to the network.

Arguments:
1. "inputs"                (array, required) A json array of json objects
     [
       {
         "txid":"id",    (string, required) The transaction id
         "vout":n,         (numeric, required) The output number
         "sequence":n      (numeric, optional) The sequence number
       }
       ,...
     ]
2. "outputs"               (object, required) a json object with outputs
    {
      "address": x.xxx,    (numeric or string, required) The key is the bitcoin address, the numeric value (can be string) is the BTC amount
      "data": "hex"      (string, required) The key is "data", the value is hex encoded data
      ,...
    }
3. locktime                  (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs
4. replaceable               (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.
                             Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.

Result:
"transaction"              (string) hex string of the transaction

Examples:
> bitcoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "{\"address\":0.01}"
> bitcoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "{\"data\":\"00010203\"}"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "{\"address\":0.01}"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "{\"data\":\"00010203\"}"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


text:
How to read a block nonce in command line?
I need to know how to read a block header in particular its nonce.
How can I read a block nonce? what command line is used?

The getblock RPC command includes the nonce in its JSON output:
{
    "result": {
        "hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",
        "confirmations": 543325,
        "strippedsize": 216,
        "size": 216,
        "weight": 864,
        "height": 1000,
        "version": 1,
        "versionHex": "00000001",
        "merkleroot": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",
        "tx": [
            "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"
        ],
        "time": 1232346882,
        "mediantime": 1232344831,
        "nonce": 2595206198,
        "bits": "1d00ffff",
        "difficulty": 1,
        "chainwork": "000000000000000000000000000000000000000000000000000003e903e903e9",
        "previousblockhash": "0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d",
        "nextblockhash": "00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6"
    },
    "error": null,
    "id": null
}

You could even pull it out of the raw hex, but bitcoind will do the heavy lifting for you here.


text:
How to use bitcoinjs-lib with Regtest?
I was trying to use the bitcoinjs-lib (1) with my regtest network. More specifically I was trying to build a tx with TransactionBuilder but it gave me a 'transaction has no matching Script' exception.
In a closed github issue (2) I find out that it's possible to specify the network (network.testnet), but I can't find any documentation related to regtest. I just want to create and broadcast a raw tx created with bitcoinjs to my regtest network.
So, has anyone talked to a regtest network with bitcoinjs-lib successfully? If not, what other libs would you recommend for the satoshi client? Thanks.
(1) https://github.com/bitcoinjs/bitcoinjs-lib
(2) https://github.com/bitcoinjs/bitcoinjs-lib/issues/500

Oops! Noob mistake.
I thought that testnet and regtest had different version prefixes (not compatible) but they are (the bitcoin wiki and bitcoin developers page doesn't clarify this, though). So I went into a npm package that added dogecoin and litecoin testnets compatibility with bitcoinjs-lib (it's called bitcoinjs-testnets).
But the solution in the second Github link that I posted works.
Here I repost the text:

Just want to give some feedback that may help new users in the future.
  I lost a lot of time debugging an issue that is probably extremely
  obvious to some, but it was not directly obvious to me.

var bitcoin = require("bitcoinjs-lib");
var keyPair = bitcoin.ECPair.fromWIF("mywif", bitcoin.networks.testnet);
var txb = new bitcoin.TransactionBuilder(); txb.addOutput("myaddress", satoshis);  // <---- this will fail with "has no matching Script"

Because of the error message I came to the conclusion that I was doing
  something fundamentally wrong creating the transaction. In the end, it
  turns out I just needed

var txb = new bitcoin.TransactionBuilder(bitcoin.networks.testnet);

Feel free to close this, just wanted to share my experience

I wish my noob experience has helped you! (pardon for my english).


text:
Payment Channels - Securing the private key that locks client funds
Do I need to secure an automatic generated private key used for locking an anchor transaction (the one that opens the channel, locking the client funds), since it only serves that locking purpose (not holding money)?
Can I just drop it? Any further advice? Thanks.

If by "anchor transaction" you mean the transaction that locks some amount of bitcoins to a multisignature address from both yours and your partners private key, then you must keep your private key safe because you will have to sign transactions in both the cases when you will pay, or if you need to refund all the bitcoins back to yourself after some time has passed.
After reading you answer again it seems as if you are looking from the perspective of the receiver. In that case you will still need the private key to be able to sign the (last) transaction that sends you bitcoins from the multisignature address.


text:
What computers are those in the picture?
I'm totally new to crypto currency mining and I have a picture where there is a rack of computers mining cryptocurrencies (supposedly). I'd like to know what computers are those and maybe availability and pricing.
I tried to ask on meta about whether this question is suitable to Bitcoin SE, but I got a message saying that I need at least 5 points of reputation :(
This is the picture I'm talking about:

I can't see any cabling that would power these or connect them to a network, so I'm left wondering if they are really operating.

These are Application Specific Integrated Circuit(s), a computer that is designed for Bitcoin mining. PCs used to mine too, but when FPGAs released (later ASICs released), mining with a PC wouldn't be efficient because of competing ASICs (and electricity fees).
Currently Bitmain (shop.bitmain.com) is the most preferred ASIC manufacturer, but it looks like it may not stay so, in a 6-12 months. (The most popular ASIC is Antminer S9, $1500, currently.)


text:
How to retrieve unspent outputs on mSigna
Due to an upgrade, I had to recreate my wallet (vault) file from scratch - a process that took over a week. During this time, I was able to spend one coin (sending it to blockchain.info) because I somehow managed to find an old copy of the software and it worked for one transaction only and then fell over. That appeared to work fine. When looking at the 'watch only' address imported into my blockchain.info wallet, it showed the spend plus the remainder at that address being sent to another address starting with '3'. I was comfortable with this because mSigna wallet addresses start with '3' because they can be multi-sig wallets. However, when mSigna finally completed syncing my new vault file, the unspent coin actually shows up in my list of wallet transactions as 'spent'. Obviously this is a shock to the system - it's quite a bit of coin.
However, I think what happened is that the address of the unspent output is somehow not in sync with my wallet and that's why I'm showing a balance below that which I should truly have.
I can think of two possible paths forward:

If I can get the private key from mSigna, I can move the funds manually through a site like blockchain.info, or
I try to re-sync the entire wallet again - and wait a week or more

Are there any other ideas worth considering? Thanks in advance for your help.
Jim

Can you please send the sharedacct file to support@ciphrex.com? Thank you!

It looks like a comment, but it's not, and don't downvote this: The one who submitted this answer is working at the company who made mSigna, so it's valid answer.

Hi Eric. Yes. I can send it. I'll put your name in the subject line so you can pick it out more easily. Thanks you for your help.

There is a bug in the previous to 10.6 code that sends the change to a change address created by someone else. A lot of us have lost coins this way.
Do you know how to do the above in order to spend Bitcoin Gold coins that are on their blockchain?
Thanks

I'm not sure if that was really a 'bug'.  There was a huge push to get everyone 10.6 after a flaw was found in 10.2 that would cause 'coin loss'.  Things are getting really shady around msigna now.  Be safe and transfer your coins to another wallet using the method listed above.  Also, be sure to use transactions that won't generate a change address.
I used the 'sign & broadcast raw' trick for Bitcoin and Bitcoin Cash, not sure if it will work with Bitcoin Gold.  I believe Ciphrex will need to release version that is compatible with Bitcoin Gold.

I had a similar issue and was unable to sync properly or send transaction from mSigma.  Transaction failed to confirm in mSigna despite having thousands of confirmations on the blockchain.  Every time I would try to send a transaction mSigna would crash.  I spent 3 weeks upgrading schemas, rebuilding vaults, and syncing transactions.  Version 0.10.6 specifically stated that it would fix the situation yet still failed.
After 3 weeks of dealing with mSigna's bugs I tried to get the private keys out so I could sweep the keys.  It's extremely difficult to get the private keys for each address without knowing the derivation path.  In the end I generated a transaction with mSigna and had to broadcast it to the blockchain manually.  This method worked perfectly for me and I safely got all my bitcoins and Bitcoin Cash out of my corrupted mSigna wallet.
I highly suggest finding a new wallet option ASAP and NEVER use mSigna again.  mSigna is unstable, poorly supported, bug-ridden, and a danger to your Bitcoins!

Create backup of vault file
Disconnect from node/localhost
Determine appropriate fee to ensure transaction is approved by blockchain.
Example site:  https://estimatefee.com/
Create 'Send' transaction using different wallet address
Enable 'Coin Control' option and select coin
Send full amount of specified coin minus the fee, make sure 0 funds remain to prevent bitcoin being sent to 'Change Address'
Sign transaction
Export 'Raw' transaction to clipboard
Broadcast 'Raw' transaction to blockchain with online tool or node CLI. Example site:  https://blockchain.info/pushtx
Monitor new wallet for transaction to be confirmed
Repeat with all coins
Once all transactions are confirmed destroy your mSigna vaults and don't ever use mSigna again.


text:
Any privacy considerations regarding allowing inbound connections for a Tor full node?
I wanted to know if there's any privacy considerations to take into account when opening the bitcoin ports on the router for a bitcoin node.
I'm using -onlynet=onion in the bitcoin.conf file and I did not modify any tor config file.
I also wonder if a remote port scan can detect I have a bitcoin port open in the router and whether changing to a random port would help privacy. thanks.

If you are running -onlynet=onion, there is no need to open any router ports. Perhaps I misunderstand your question.
If your chain state is caught up, and bitcoind+Tor is properly configured, you should be serving data to other nodes, even behind an otherwise locked-down home router.
What result do you get when running
$ bitcoin-cli getpeerinfo | grep true

I can connect to peers but I have no inbound connections. so it seems I need to open router ports hence my question.

You definitely do not need open any router ports--that would defeat the purpose of Tor routing. I run my full node over Tor only, behind a locked down router with no external ports exposed. These are the steps I used for Tor config: https://medium.com/@lopp/how-to-run-bitcoin-as-a-tor-hidden-service-on-ubuntu-cff52d543756

@bg thank you. following that guide I am now able to have inbound connections without having to open any router ports with my tor full node.


text:
How do I tranfer bitcoins from my Zebpay wallet to my blockchain wallet?
I have some bitcoins in my zebpay wallet. How do I tranfer these bitcoins to my blockchain wallet. Is there any transaction fee for this?

Click "Request" tab on blockchain wallet, it will give you a bitcoin address where your bitcoins will be transferred from your zebpay wallet.
Then find "send" or similar button on your zebpay wallet and copy&paste the bitcoin address you previously acquired from blockchain wallet to here.
Zebpay probably cut a commission fee for this transaction. You can find info on their website how much they will charge for the transaction.


text:
Confusion on chains
I have a question about unspent transactions. Recently I sent a request for some Bitcoin Cash from my exchange and inadvertently (my error) used a Bitcoin address (3CSR1qizsea1iRE7GA9XWWUyKkSYYTWqAV) from my Ledger wallet(First time nubbin Ledger). The exchange sent the Bitcoin Cash along to the Bitcoin address and it now shows the amount on the chain as Unspent. I was told that this is now lost and unrecoverable, Is this true?
I wondered how this could have been done since I thought the amount in Bicoin Cash could not be transacted on the wrong chain???

Is this SegWit bitcoin address?

It looks like you have a segwit p2sh address there. Ledger recommends that you use btc.com's service to get it back. However note that you would be trusting btc.com to not steal your funds because, in the case of p2sh segwit addresses on the bitcoin cash chain, the information you reveal to btc.com as part of the recovery process is enough for them to take all the BCH you sent to that address. If you're interested in the technical explanation for that see here.
Regarding your question about why BCH funds can be sent to bitcoin addresses it's because BCH is crap. The should have created their own address version like most altcoins do but instead they reused bitcoin's. So you get situations like these.

It sounds like this didn't get transacted on the "wrong" chain, you simply sent it to an address on the Bitcoin Cash chain that you don't have access to.

If this is so - Is there any way to get access to it? (Would be monetarily grateful!!)

You ask the owner of the address to refund it.


text:
Google's Sycamore processor has parallel-processed 2^53 states. Is this a threat to Bitcoin?
Today, Google's Sycamore quantum computer has been confirmed to process 53 qubits in parallel.
In practical terms, for non-quantum experts, how relevant is this breakthrough in terms of secp256k1 and SHA256?
Does this new development come earlier than expected or is it within Bitcoin's predicted quantum safety margin, by which we'd have a couple of decades before quantum computing threatens the cryptocurrency's "mathematical shields"?
Reference: Quantum computing takes flight

Related: Assuming a 1024 qubit quantum computer, how long to brute force RSA, AES, ECC and SHA512?

First of all, it's important to note that Google's Sycamore has not (yet) processed any quantum algorithm, but instead has just proved that the quantum processor is capable of maintain quantum effects on all 53 qubits during operations. This is important because there's still controversy on if all quantum computers built to date exhibit real quantum advantages.
In order for this processor to become a "practical" quantum computer, also measurement physical errors must be lowered.
Also, to make computations that can actually break current cryptography algorithms, the number of qubits must probably be raised, to around 1000 or more, all depending on how low the error rate will be.
And answering the second question, no, this result is in line with prospections on quantum computing, so the (optimistic) estimations of around as early as 2027-2040 to break ECDS still maintain. But all depends on current trends that nobody knows if can be maintained or not, as this is all based on cutting-edge engineering and mathematical advances.
Also note the link indicated by @ugam-kamat regarding practical mathematical implementation of cryptography breaking algorithms that also points to a minimum of around a thousand usable qubits to break nowadays signatures. This would also raise the real number of needed qubits by some factor n>1 (n>>1?), as the previous noted increment was due to measurements errors which would still apply as the number of qubits raises.


text:
What amount of hashrate can we estimate Google's 53 qubit Sycamore quantum computer could yield?
Could Sycamore be programmed to perform massively parallel SHA256 searching?
If so, how much hashrate do you estimate this 53 qubit machine could yield?
Is there enough public information to be able to estimate this or do other factors such as the computer's memory and QPU architecture come into play?

Related https://bitcoin.stackexchange.com/a/10942/5406


text:
Is there an on the fly service to exchange physical currency for BTC for payment processing?
I want, as a merchant, to receive money from my customers in the form of
bitcoins, to avoid the 2~4% fees. But many of my customers don't have
BitCoins. I was wondering if there is a service that would allow for a customer to
spend X amount of USD (or any other currency) to buy the corresponding
amount of BTC "on the fly", without requiring customers to have BitCoins or
even a BTC wallet.
Is there such a service?

related: Can I store bitcoins as fiat currency anonymously?

No, there isn't such a service right now because the trust problem hasn't been adequately solved. As a result, you can choose speed or a (relatively) low transaction cost when purchasing bitcoins, but not both.
I too have high hopes for Ripple, which is explicitly designed to solve the trust issue by linking two parties that don't trust each other through a chain of parties that do trust each other, but there is substantial delay when transferring funds from the regular financial system into the ripple system.


text:
Bitcoin blockchain full data
Where is stored a full data set of bitcoin blockchain?
Is ../blocks/ dir contains a full data for blockchain work?
I know that ../chainstate/ and other files truly contains service information, include hashes, UTXO data set and others. But is it true that the full information already is in ../blocks/ dir?

you may want to give a bit more detail about bitcoin client (wallet), operating system, versions etc, so we can follow, what you are asking here...

I get a link to Bitcoin Forum > Local > Русский (Russian) - you will end up hoping for someone with cyrillic capabilities to answer your question.

I will add an answer to this post

chainstate: Container the information about the UTXO and this is by default indexed in a level db.
blocks: Contains all the data related to the blockchain, so you can build your own chain state with just scan this file (blkXXXX.dat) one by one


text:
need to xfer from bitcoin-qt to core
Last used in 2015. When I went into qt to update now, update took 5 days then crashed due to a "windows error" (Did this twice) - so I downloaded Core, and of course, it doesn't have my bitcoins in it.  There is no  .dat file that I can see in the bitcoin directory (and I can't even find the core directory) - Sorry to seem so confused. There's a daemon folder, a doc folder , the bitcoin-qt app, a copying file and a readme file. - and an uninstall. I'm on windows 7, computer states is 64-bit.

I'm not sure what you mean by moving from QT to core. Bitcoin QT is part of Bitcoin Core. Also, were there bitcoins present when you used Bitcoin in 2015?

The blockchain and your wallet file are stored in the Bitcoin Core data directory. This directory is different from the install directory where all of the binaries are. When you start Bitcoin Core, go to Help > Debug Window and see what folder it is using as its datadir. Make sure that that is what you expect it to be; if you have changed the datadir (by choosing a different one when you first started the client), then make sure that that is what Bitcoin Core is using. Otherwise it will use the default datadir of C:\Users\<your username>\AppData\Roaming\Bitcoin.


text:
My Bitcoin Cash is stuck unconfirmed when sending to Bittrex from Electron Cash. Please help!
I have an unconfirmed transaction with a non-trivial amount.
I had my BCH in Breadwallet, and I created a new wallet in Electron Cash and imported the private keys, which then reflected the balance of BCH in my new wallet. I was connected to the server: electrum-abc-criptolayer, but when I tried to send my coins to Bittrex, it asked for Trusted-coin's 2FA. I then changed the server to electroncash.cascharia.com, and I SOMEHOW had Trusted-Coin's 2FA code in my Google Authenticator app (not sure how I got it?), and it said the balance was sent. I accidentally sent an incredibly low fee. Now, my BCH is unconfirmed for a day, and it's not showing up in block explorer. I'm not sure what to do, no-one knows how to help me.
Txid of address that had BCH: f9425d67d6707842d45e255003a3147531767f557ab9d17912b87d76a6d69b49
Txid of address I tried sending it to:
20a0f1ab48bbf91b06ab3ca2c332c52cc11e250df82123cbe272913f3dd551f8
Please help, I am willing to PAY someone a generous amount to help me get this shit out.

The 2nd Txid does not exist. Where did you get it from? The BCC (3.2662989) is still at the address 3GiMkxLWtriRPBL1mH4R29eZvBT1vj3f4r

I did the same thing. The unconfirmed amount took about a week to be refunded back to my electron cash wallet.

Did you do anything for it to get refunded or did it happen automatically?

I got it from sending it from my electron cash wallet to bittrex.

I have same question: one and a half day earlier i send BCC to Bittrex, but till now the TX still unconfirmed.
Also can't find TX by ID in http://blockdozer.com/ и blockchair.com, there are no any records.
UPD: Hey! I solved my case.
1. Use Windows runs on virtual machine crate new wallet, input seed, switch server to electroncash.bitcoinplug.com. A lot of servers doesn't work correctly and transaction cant send (error: The transaction was rejected by network rules.
16: mandatory-script-verity-flag-failed (Signature must use SIGHASH_FORKID)) or still unconfirmed for uncountable time.
Before i find an answer i have a lot wallets, and delete ElectronCash folder on c: roaming folder. And one more thing, looks like it need to disable 2FA.
Good Luck!

Your funds are on this address? 3GiMkxLWtriRPBL1mH4R29eZvBT1vj3f4r
You need to disable 2FA on electrum cash first.
1.Open up ElectrumCash 2.9.2 (Make sure you have latest version)
2.Click on New/Restore
3.Select wallet with two-factor authentication and click Next
4.Select I already have a seed and click "Next"
5.Enter your Electrum wallet seed and click Next
6.Select disable and click next
7.Enter password and click next and check if it's showing balance and try to spend it.


text:
Wallet: how to generate public extended key?
As far as I understand, when I want to create an HD Wallet, do I need a private key that is derived into an extended public key?
So, my question is, if I am coding a portfolio of bitcoin in java, how can I generate this public extended key from a private key (I assume that the private key is like a private password right?)?
Thanks for your help,

maybe this helps to get it sorted: http://chimera.labs.oreilly.com/books/1234000001802/ch04.html#hd_wallets and you may want to check https://bitcoin.stackexchange.com/questions/tagged/bip32 and https://bitcoin.stackexchange.com/questions/tagged/bip32+hd-wallet. Let us know, if you are still missing something :-)

Generally the private key and chain code (these 2 parts make up the extended private key) are generated at the same time from a seed. The seed can be either a randomly generated number, or derived from a 12 word mnemonic like BIP 39 details. Once you have a seed, BIP 32 explains:

Calculate I = HMAC-SHA512(Key = "Bitcoin seed", Data = yourSeed)
  Split I into two 32-byte sequences, IL and IR.
  Use parse256(IL) as master secret key, and IR as master chain code.

So basically you take the 512 bit hash of the seed, and split it into two 256 bit halves, one of which is the private key and the other is the chain code. And from the private key, you can obtain the public key.


text:
Isn't timestamp server overkill?
I'm trying to fully grasp the third section of the whitepaper. Quoting (emphasis mine):

The solution we propose begins with a timestamp server. A timestamp server works by taking a
hash of a block of items to be timestamped and widely publishing the hash, such as in a
newspaper or Usenet post [2-5]. The timestamp proves that the data must have existed at the
time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in
its hash, forming a chain, with each additional timestamp reinforcing the ones before it.

I understand the double spending problem described in the previous section and how a timestamp server as described in this section solves it. I don't understand why timestamps are needed.
Let's presume that the timestamp server itself doesn't check for double spending[1]. In this case, in order for the payee to validate the transaction, they have to confirm that the coin hasn't been spent in any previous blocks[2]. Timestamps are irrelevant since the order is defined by the chain of hashes.
I considered the possibility that the author uses the word "timestamp" liberally to refer to a block, but the bold sentence in the quote suggests that it indeed refers to real-world time.
[1] If it does, then the payee doesn't have to care about the order of transactions.
[2] The term "block" hasn't been introduced at this point, but it does appear in the subsequent diagram.

The bitcoin blockchain itself works as the 'timestamp server'. Each new block is like the next step forward in time, and the order of transactions within the block is explicit as well.
So it isn't that each block is timestamped to a real-world clock-time, instead the blocks themselves represent the progression of the clock.
Note that each block header does include a timestamp that references a real-world clock, but this timestamp is just used as a rough sanity check, and to help regulate the network difficulty. See this question for more info.

from my understanding, the idea is to have an order of things, and it has nothing to do with the real-world clock. Like chytrik mentioned - the block itself is time - the block is the measure of time in bitcoin world - the order of things.
I wouldn't pretend that I understand it completely yet (after reading up a few versions of it) but the crux of it is that proof-of-work requires energy & time and we do not need to trust anything external (like a real world clock) and blocks represent a measure, a sequence in order - which is what time is.
Bitcoin is loosely connected to the real world time through its difficulty adjustment - that happens every 2016 blocks and readjusts the hashing difficulty based on  previous blocks' real-world time. And that is to keep sanity with ever increasing computation efficiency.


text:
Question about extracting BCC from a paper wallet
I have some pre-split BTC in a paper wallet. Now, I found an article that describes how I can extract BCC from it using Electrum and Electron Cash. Basically the steps are:

Install Electrum wallet, import your paper wallet into it
From Electrum wallet, send your BTC elsewhere (possibly a new paper wallet)
Install Electron Cash, import the same private key and you should see your BCC balance there and be able to use it

Question: do we really need step #1 - can I just import BTC from my paper wallet into an exchange for example, without first using Electrum wallet?

The steps you posted avoid having to share your private key with an exchange. If you're willing to trust somebody else with your private key, and trust that they will process it correctly for any forked tokens, then that's a valid option.
Because the private key is valid for both Bitcoin and Bitcoin Cash, once you expose it both currencies are at risk. The advantage of step 1 is that without sharing it with anyone else (assuming your environment is secure) it sends the BTC away from the pre-fork wallet to an alternative BTC-only destination, meaning you can then use the same key to claim Bitcoin Cash without risk of the corresponding Bitcoin being stolen or spent in error.

Not every exchange or wallet supports import from private key, for example, coinbase explicitly says they don't support it. But if you find an exchange that supports it, then yes you can directly import to it instead of going to Electrum first.

authors: Виктор Сорокон


text:
Why would Nicehash payout not change while BTC doubled
I am new to mining and about a month and a half ago I picked up a 1080Ti GPU and started mining with NicheHash. At that time Bitcoin was around 5800 and my daily payout was around $3.80. Now Bitcoin more than doubled and other coins followed the suit and my daily payout is still around $3.80
I am failing to understand why - any ideas?

It really isn't a good idea to be using Nicehash right now. The hack hasn't been confirmed but their system's been down for a few hours now.

As most anyone that was using them at the time now should know, is that despite the theft of many or most of the miner's existing balances that were unpaid at that time, they are TRYING to "make good" on past balances.  NiceHash VOLUNTARILY is in the long process of repaying the ~50 million stolen:  In late March, 2018 or April, they repaid 30% of the "Old Balances" that were due to your BTC address you were using at the time of the theft.  To check your balances: https://www.nicehash.com/miner/YOUR-BITCOIN-ADDRESS and then look down, for "OLD balances", and their payback plan.

When your mining pool finds a block, each miner is paid out according to the share of work they contributed to the pool's total work. The amount of hashrate you 'own' on Nicehash is unchanging, so if other people add more hashpower to the pool over time, you will own a smaller share of the total. Historically, the network hashrate has consistently increased over time, meaning btc returns are almost guaranteed to decrease over time for any miner.
A smaller share will pay out a smaller amount of bitcoin. So over time, you should expect to see a diminishing return (measured in btc).
At the same time, the price has increased, so a smaller amount of btc is now worth more. In your case it is just a coincidence that your payout has remained steady at $3.80.


text:
How do I generate a paper wallet for Bitcoin Cash
I can't find any tools to generate Bitcoin cash paper wallet - any ideas?

Use the same tool as for Bitcoin

Can I use the same private key to store both BTC and BCC?

You can technically do it, but I do not recommend it

So, you want a paper-wallet generator that utilizes CashAddr? (In order of my preference)

CashAddress.org
WalletGenerator.net/?currency=BitcoinCash
PaperWallet.cash (Manually https)
BCCAddress.org (Manually https)
tools.bitcoin.com/paper-wallet/
www.paperwalletgenerator.com/BitcoinCash/
bitcoincashpaperwallet.de (German)


text:
Is there a public repository/api of coin/token logos
I am developing an cryptocoins related app and I would like to display cryptocoin logos there for all coins available for trade. Is there an API out just a publicly accessible repository that would give me those logos?

I was looking for the same thing and I found - https://www.cryptocompare.com/api

That URL has changed, can you point to the current URL of the logos API?

All cryptocurrency logos from Coinmarketcap.com and two solutions how to fetch them: https://github.com/dziungles/cryptocurrency-logos

My reply from another thread :
I just found Crypto Icons API : https://cryptoicons.org/
It is customizable and easy to use. Free also.


text:
How to detect a rejected transaction?
If the nodes I connect to don't support the BIP 61 reject message, how do I know that my transaction was eventually rejected by the network (e.g. due to my bugs)? Is there any timeout or whatever after which it's reasonable to assume that my peers will never relay the transaction?

There are no timeouts, and a valid transaction can be mined at any time.
The only thing that can ensure a particular transaction won't get mined in the current block chain is to make it invalid.  The only practical way to do that is to create a confirmed double spend---another transaction that spends one of the same inputs as the transaction you don't want mined.  Once that double spend is confirmed, your original transaction can't be added to a block in the same block chain as the confirmed double spend.

It's straightforward because you're making the assumption that the peer did receive the transaction, whereas after you publish a transaction you may get no answer at all from the peer. All scenarios are feasible: 1) the peer added the tx to the mempool, 2) the peer rejected the tx as invalid, 3) the peer didn't receive any data due to a networking problem. How am I supposed to find out?

Barring an omniscient view of the network, you can't know what happened to your transaction.  If you still want the transaction to be valid, rebroadcast it.  If you don't want it to be valid, double spend it.  Any other action introduces security risks, because your original transaction is still valid even if peers don't seem to have received it or claimed it was invalid.

What I'm saying here is that many network protocols (say HTTP) work in a way that the sender has some ACK telling that its message has been at least delivered. After all, if I connect to multiple peers I expect to receive the relayed 'TX' from the other peers, so why wouldn't the relaying peer answer with an ACK message in the first place? Basically I wonder what's the reason behind this choice.

The Bitcoin P2P protocol uses TCP, which will generate an error if delivery of a packet was unsuccessful.  Satoshi did evidentially realize that the TCP checksum was a bit insufficient at preventing packet mangling because he added checksums to Bitcoin packet headers in protocol version 209.  Gavin realized that it might be nice to tell peers that their packets were mangled in transit, so  for this reason (and other reasons) he added the reject message in protocol version 70002.

I really appreciate the insight, still it doesn't answer my question. Why "notify rejection" but "silently accept validity"? What's the point of forcing a client to connect to another peer (seems the only way) to learn that its transaction was added to the mempool? AFAIK, "no answer" may mean "transaction is valid" as well as "transaction was never received".

TCP isn't silent.  Read the Wikipedia article: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Reliable_transmission


text:
Get transaction fees per transaction via gettransaction
For a research project I need to analyse all transactions that happened in 2015. All I care about are volumes transacted, fees paid and a timestamp per transaction or corresponding block.
Getting this data via APIs over the net creates lots of overhead and lets me run into rate limits (I cannot just run 50 million+ queries against blockchain.info or the coinbase-API).
So I would like to get the data out of my local instance of bitcoin-core.
Unfortunately running gettransaction  fails both programatically and via the commandline, despite the fact that I'm running bitcoind with the -reindex flag enabled:
{ [Error: Invalid or non-wallet transaction id] code: -5 }

I resorted to using getrawtransaction  1 which, unfortunately, only returns the transacted volumes per output. I take the txid of inputs and query the local instance again. A tedious-error prone process, I would like to know whether there is an easier way.
So, can somebody please help me with getting gettransaction working?

If you want to get the gettransaction command running, you would need to enable the txindex via bitcoind -reindex -txindex. Note this takes a few hours.
Alternatively, you can do the following:

run bitcoin-cli getblockhash <block number>
run bitcoin-cli getblock <result from 1>

This will give you the block time and all the transactions within the block in a nice JSON format. Iterate through all the txid's via:
bitcoin-cli getrawtransaction
Unfortunately, you'll have to look up all the inputs and see how much is in them in order to calculate the transaction fee using this method.

Thanks, I was unaware of the -txindex flag, I'm now letting my client reindex. The second method you describe is the one I've tried before. Unfortunately, tx.vin does not list the transaction volume with this method.

Yea, looking up the original tx's can be a huge pain. It's not too hard if you write a script to do it for you, though.

So, now I did rerun bitcoin-core with the flags you've mentioned but the problem persists, e.g. same error message. Do you have any more tips?

authors: Игорь Марков


text:
blockchain - strange problem
I have Windows 7 and i’m using the bitcoin-qt client v0.8.6-beta.
Last night i tried to open up the client – but there was a message that said i had some issues with the blockchain. Which is weird, i never had any problem before so i closed it and reopened the client.
Then suddenly the blockchain started to download it self from the very beginning (!) backlog of like 260 weeks! But the old (and already downloaded) blockchain is still on my pc – so why dosen’t the client recognise it?
The bitcoins are still inside the wallet – or at least it shows them.

Perhabs your bitcoin datadir has moved. Try to start you client with the path to you folder containing the blockchain:
bitcoin-qt.exe -datadir=

Another posibility, the client is just reindexing the blockchain, not downloading. You can check this if you hover over the progressbar and look at the text.

Thank u! The second one it was, the "reindexing". Don't know why it did that. But i also updated now to a newer client version. Thank you sir!


text:
Confirmation limit
When seeing transactions I see that the number of confirmations keeps increasing without any limit.
I wanted to know if there is any time limit on including a already confirmed transaction in a block by a miner.  Like transactions not older than a year, etc.


text:
Block exploring services
What sites for block exploring besides blockchain.info exist?
I try to find some qualities of API for my needs, and ask you to help me to find the list of such services as full as possible.
Thank you!

Try this, they have a very simple API:
https://blockexplorer.com/api-ref

Try this, Blockchain API, Market API, Payment API, Wallet API https://developer.bitaps.com


text:
What is crypto-proof UTXO set?
There are many opinions about getting the actual UTXO set of blockchain.
Do you think that this important database must be based on data which saved on disk and never modified after, only appended?
I mean that only in this case of history based calculations, provide high level of node security.
Is it true that UTXO set which has the full node for to verifying transactions calculates only from recorded on disk information? Or it is a compressed data received from the network?

In bitcoin, the UTXO set is derived independently by every full node by processing and verifying transactions in blocks. It is then stored on disk until it is spent. When a UTXO gets spent, it gets removed from the UTXO set so the UTXO set is definitely modifiable. When full nodes verify transactions, they also use the UTXO set on disk to check the validity of each transaction. Full nodes have to make sure that UTXOs consumed as inputs in a transaction actually do exist in the UTXO set, otherwise a transaction will be invalid.


text:
Bitcoind sync process
I accidentally deleted all the files that the standard bitcoin client stores to disk, except blk*.dat files. When I run bitcoind, he write that he doing sync. This sync is very very slow. What does bitcoind doing with this blk*.dat files while sync? And why there is need to connect to the internet during sync (it did not work without internet)?

The block files are indexed (the blocks/index subdirectory), and if you just delete the index, bitcoind will assume you have no blocks and start over downloading from the network.
You could instead have used the -reindex option to scan for blocks on disk and rebuild the index. This may still work, but likely won't as you've already started downloading again, and overwriting the existing block files.

but why bitcoind download again all raw data from the network?

Because it does not know you already have it.

the blockchain is linking each new block to a previous block (with the transactions). Hence the chain. When the client doesn't know the structure, it will reload the blockchain. And it verifies not only the blocks, it verifies also the transactions inside the blocks, to be sure your local copy of the block chain has valid data. This requires a connection to the network. More on this in Andreas Antonopolus book "Mastering Bitcoin", or on the bitcoin.org webpages, in the developper section.


text:
Connected Nodes List
List of nodes blockchain.info is connected to...
Total Connected: 0
Link on blockchain.info
This service is temporarily unavailable?

Yep, for a week.

is it somehow connected with the release of version 0.15?

Maybe, I don't know / I don't think so.