text:
running bitcoind for the first time - can't interact. keep getting command not found
running ps yields:
31793 pts/0     11:04:46 bitcoind

but commands like bitcoind getblocktemplate
yields:
bash: bitcoind: command not found...

I've attempted to add the src folder to my global path through the following command:
echo " export PATH=$PATH:/home/jpc/Code/WorkingCopies/bitcoin/src" >> ~/.profile

Thanks for any help.

It sounds like this is more about basic Unix usage than anything specific to bitcoin.  I would change into the directory where bitcoin-cli is located and run ./bitcoin-cli.  Changing PATH like you did is probably not really a good idea, but that's a question for http://unix.stackexchange.com instead of here.

bitcoind is the server, you can interact with it using the command-line utility bitcoin-cli. For example:
bitcoin-cli getblocktemplate
See this question for more info.

using "bitcoin-cli getblocktemplate" still yields "bash: bitcoin-cli: command not found.

How did you start bitcoind ?

I'm running Fedora. I was following various online guides (most of which were based on Ubuntu). I believe that the command that got it going after compiling was: "bitcoind -daemon" but later in my history I also see "src/bitcoind &"

I think you should recompile from source.  Visit the bitcoin github repository for Fedora dependencies, you'll find them in doc/build-unix.  Scroll down to Fedora.  Decide whether you want bitcoin-qt or just the command line bitcoin-cli, and whether you really need wallet functionality.
Beware you will need a specific version of Berkeley DB for wallet compatibility.  You can use the latest Berkeley DB though if you don't need or want that compatibility.
Download the source package from https://bitcoincore.org/en/download/. Go into your new src folder, then run
./autogen.sh
./configure --without-gui    # see doc/build-unix.md, also for deps
make check

sudo make install    # goes into /usr/local/bin, /usr/local/lib, by default

This will likely resolve any issues you have now. You can take the lib paths out of /etc/ld.so.conf and undo changes to your path in ~/.profile.
HTH, let us know how it goes :)

Wow. Thanks for the detailed response. I am trying to put src/.libs path which is "/home/jpc/Code/WorkingCopies/bitcoin/src/.libs" in /etc/ld.so.conf using emacs (file was read only) and also the command: "echo "/home/jpc/Code/WorkingCopies/bitcoin/src/.libs" > /etc/ld.so.conf.d/local.conf (get "bash: /etc/ld.so.conf.d/local.conf: permission denied" I realize this is probably linux 101 type stuff. Trying to get up to speed...

You're welcome.  It should be readable and writable by root only, and readable by anyone.  Depends on the distribution.  So you would need root privileges, or sudo vim or e.g. sudo nano /etc/ld.so.conf and add your /home/jpc/Code/WorkingCopies/bitcoin/src/.libs to it.  Save and exit.  Run sudo ldconfig.  Now assuming your binaries are on your PATH, give it another shot and let us know?  It's a bit of a shot in the dark, but it's worth a go.  Good luck!

That worked, /etc/ld.so.conf now reads: include ld.so.conf.d/*.conf (newline) /home/jpc/Code/WorkingCopies/bitcoin/src/.libs (then ran sudo ldconfig) still getting: bitcoin-cli: command not found...

Still sounds like a PATH issue.   Are you using /bin/bash?  Try putting PATH="/home/jpc/Code/WorkingCopies/bitcoin/src:$PATH" in your ~/.profile at the end, then run source .profile.  Stop any bitcoind you might have running, and try running bitcoind -daemon.  Then bitcoin-cli getblockchaininfo and we'll see...  Are you sure that's the absolute path to where bitcoind and bitcoin-cli binaries are?  Good luck again!

I wasn't able to trouble shoot my original binary build, but I used the suggestion James Young made: Reinstall from the bitcoincore.org website tar image. I used the linux build instructions at:
https://bitcoin.org/en/full-node#other-linux-distributions
I just needed to update the release version in the commands.
Thank you for all the suggestions. I learned a few good things.

Note: if you download binary files instead of compiling yourself, be sure to check the developer signatures on the .tar files.

commands like bitcoind getblocktemplate

See chytrik's answer - you should use the command-line client bitcoin-cli not the server bitcoind.

I've attempted to add the src folder to my global path

That is generally the wrong thing to do.

a src directory should contain source code. It isn't appropriate to have that on your $PATH.
start by using the full absolute path, e.g. /home/jpc/Code/WorkingCopies/bitcoin/src/bitcoin-cli getblocktemplate - if that works see below
binaries should be installed to somewhere like /usr/local/bin (or your distro's equivalent - see Linux Standard Base). Usually this is done using sudo make install but check instructions for bitcoin. That folder will already be on your $PATH.
Unless there's a lot of other binaries in a new folder, it is probably better to add an alias rather than make the shell search through a large folder for every command you type.

Using the full absolute path might have provided a clue. When I do that with 'getblocktemplate' or 'getblockchaininfo' Fedora my prompt doesn't come back. Have to use ctrl c to exit. I'm happy to start with a fresh install if necessary or keep trouble shooting? Maybe that clue helps? Thank you!


text:
How do exchanges send transactions efficiently?
This site says that " (exchanges do not attach bitcoin miner fees)...Bitcoin exchanges often try to send their transactions as efficiently as possible. This can mean that the fee is not large enough or doesn’t arrive quickly enough for a miner to include your transaction in the next block."
What does it mean by "send their transactions as efficiently"? Do they just send transactions without attaching fees?  Somehow the latter statements, which imply that exchanges do attach bitcoin miner fee, contradict with the content in the earlier bracket.

This can mean that the fee is not large enough...

This is saying that exchanges try not to overpay on fees, which might cause a delay in case the fee market situation changes abruptly – for example if the next block doesn't get mined for long enough that the transactions arriving afterwards push the exchange's transaction away from the top of the mempool. And as far as I know, exchanges generally don't bump fees using RBF.

...or doesn’t arrive quickly enough for a miner to include your
transaction in the next block.

Exchanges usually batch multiple payments together into one larger transaction. Since a single-recipient transaction usually has one input and two outputs (one for the recipient and one change output), adding more recipients saves 66% in blockchain space (and therefore fees) in the limit. However, this also means the exchange won't send you your bitcoin right away, as they need to wait for other people to batch all your withdrawals together, and during this time they might miss a new mined block.

source: Stack Exchange

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

sort: votes


text:
Bitcoins did not arrive
A few days ago I transferred bitcoins from www.blockchain.info to the Bitcoin Core - Wallet, but the bitcoin did never arrive, I made a Request and the address was: 15Yw9RpFY28cN1fjwQPQfqvxjGg9TXRLmB then I send the bitcoin to that address from blockchain but they never arrived.
My Bitcoin Core - Wallet is still synchronising with the network, it is 3 years and 21 weeks behind, is this the problem they didn't arrive?
Thanks,

The stated address has received one transaction.

dont worry
your 0.30811325 btc sent by this transaction are waiting for you
you have to synchronize your client to see and use your funds

Thank you! That's a relieve,
What is the average time of the synchronising?

Depending on your hardware, somewhere between hours and weeks.

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


text:
Do payment trial and error attempts in LND use valid preimages?
In mastering the lightning network, the following paragraph describes a facet of pathfinding

The pathfinding mechanism implemented in Lightning nodes is to first create a list of candidate paths, filtered and sorted by some function. Then, the node or wallet will probe paths (by attempting to deliver a payment) in a trial-and-error loop until a path is found that successfully delivers the payment.

Can we describe this version of probing in the context of LND and a classic mpp (base amp) payment?
For a classic mpp (no adulterations) are we using a real preimage hash (real described as one that has a preimage to be released upon successful htlc route established) for each of these trial-and-error attempts, or is the preimage used during the loop total junk (as one might expect during typical probing methods.
In the case that real attempts are made in a trial and loop fashion, how is the error to be returned determined in LND?

LND uses real preimages for each trial-and-error payment attempt in the context of pathfinding.

If a payment attempt fails, the real preimage is not revealed, and the funds are not claimed.

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


text:
What are the major reasons for various Bitcoin-related projects' downfall?
The Bitcoin community is a very dynamic place, especially when the USD/BTC exchange rates are high. Many Bitcoin-related projects have sprung up in the past, but a lot of them failed for various reasons.
What are the major reasons for such projects failing? What things should an aspiring developer keep in mind to avoid such mishaps with their project?

Which projects? This is too vague, as it stands.

Notable Bitcoin-related projects, such as Bitomat.pl, alternative cryptocurrencies, etc.

One factor is that people's enthusiasm for Bitcoin drives them to step well outside their comfort zones and do projects they wouldn't otherwise. Bitcoin is a new startup economy and the plethora of opportunities is tempting. But the lack of experience or skill can lead them to mistakes which bring about the end of the project. Bitomat.pl is a great example - the owner tried to make use of AWS without having a clear idea how they work.
Another factor - especially with business ventures - is overestimation of the Bitcoin market size. The market is very small, and I have the feeling that people's general excitement about Bitcoin isn't matched by their willingness to actually use it. If it's a niche service the target market is the intersection of people in this niche with people who are using Bitcoin, which is tiny, and for more mainstream services, those that are founded just to offer the service in Bitcoin are often inferior to established mainstream offerings (see above point). It comes down to the revenue not justifying the overhead costs, so the project is abandoned.
Creating a successful alt currency is an immense undertaking, and so far has mostly been tried by people who seem to think that changing a few parameters is all it takes.
I don't have any specific suggestions how to avoid this, other than trying to be realistic about the viability of the project and the personal ability to carry it through. This shouldn't, of course, come at the expense of being a bit bold and daring.

You have already received good answers about businesses, I'd like to add something about alternate currencies.
Bitcoin alternate currencies are usually born because some kind of kid was upset he didn't join Bitcoin early enough, and wanted to be able to "play with it" with the instruments he had at home.
So abominations like "GPU-resistant / CPU-friendly" currencies were born. Think about it: they are completely and utterly wrong, i.e. they chose a specifically bad algorithm when there was a better one, just because they didn't want to be outclassed by people with better hardware. They didn't care at all about the health of the currency itself, they just wanted to be able to mine successfully themselves.
And that's why they obviously failed.

What are some famous examples of «"GPU-resistant / CPU-friendly" currencies»?

@Geremia Litecoin and its hundred silly clones.

How is Litecoin is "GPU-resistant"?

@Geremia litecoin fanatics thought it was many things…

Bitcoin projects have been very experimental with little precedent in the business models they've used, and consequently only small investments of time and money backing many of them, so for both of these reasons, a high percentage of them have failed. This is inherent to Bitcoin-related projects at the moment, as they involve a new technology. The flip side is a greater potential of Bitcoin businesses seeing rapid growth, due to the novelty of bitcoin-related business models.

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


text:
How can I run Bitcoin-QT client behind a restrictive firewall using a putty tunnel?
I am on Windows machine on a network that is closed for all incoming packets and outgoing packets only work for port 80.
In the network I have access to a Linux via SSH that is open for in and out access.
I want to run the wallet client Bitcoin-QT on the restricted Windows machine, I setup a tunnel using D9050 to the open Linux and then I told Bitcoin-QT that there is socks proxy on localhost port 9050.
The client runs and starts to show connections (which is doesn't show without the tunnel) but it doesn't start downloading the block chain :(
Help ?

i think i should have some process listening on 8332 on the linux so that when other nodes try to contact me they will reach something ... but i am not sure

The easiest way to make this work would be to install cygwin on your windows machine, specifically ssh client package.
Then from a cygwin shell, run ssh -D 8080 user@linuxHost.
Now you can point the qt client to localhost:8080 as the socks proxy.

is this different from setting up a tunnel using putty like i mentioned above ?

It seems like it works if one changes socks protocol to 4 in Bitcoin-QT.

You can use Putty to create a socks proxy too:
http://www.virtualroadside.com/blog/index.php/2007/04/12/dynamic-socks-proxy-using-putty/


text:
How would one inject a blockchain fork to the Bitcoin network?
For theoretical purposes, how would one inject a blockchain fork in to the Bitcoin network? For example, lets say we have a small chain of blocks prepared in a program that is not a standard client / standard client with modified code. Can one force a client to accept those blocks through getmemorypool RPC command, or will the client not accept any block that would not go at the tip of the current blockchain?
What are the ways of getting a blockchain fork into the Bitcoin network?
EDIT:
I'm not talking about alternative blockchain forks, like SolidCoin, etc., but rather about a fork in the standard Bitcoin chain/testnet chain that would cause some blocks to be orphaned.

I'm not sure what is the problem? Clients will reorg to the longest chain they are aware of, as long as it is consistent with the hardcoded checkpoint, which are pretty far in the past.

@MeniRosenfeld I'm not sure if the standard client would accept such a chain one by one through GetMemoryPool JSON command (in which case it would be easier to program for), or only through a getblocks or other message from a peer.

Just pass the blocks one at a time to your official bitcoind program, and it will broadcast them to the network.  You don't need to do anything tricky, except for somehow manage to hash faster than everyone else combined.

If you modify your client in such a way that it is not compatible with other clients, you will split the block chain for you and anyone else that uses your version of the client. If you can get more than 50% of the Bitcoin Network to adapt to your client, then it will become the official fork. There probably will be a hard fork made to the official core someday if consensus is reached on desired Bitcoin attributes.

There are several alternate block chains. They each have different schemes for block rewards, fee structures, scripting, etc.

Just as a side note, I'm not really talking about changing the protocol and causing a fork like this, but rather making blocks that are valid in the standard client, but would replace some of the already existing blocks.

@ThePiachu - Thank you for clearing that up. This is hypothetically possible, but due to variance it is mathematically pointless conjecture. If attempted in reality, it would most likely be recognized as an attack.


text:
Does Bitcoin prefer broadcasting transactions crediting it?
I'm currently doing some double-spend testing, and it appears that the standard client prefers broadcasting transactions that credit its wallet. That is to say, a client that receives such a transaction broadcasts it more, than it would broadcast other transactions in hopes of getting it into a block sooner. Is this truly the case, or are my observations incorrect?

According to the Satoshi client transaction exchange behavior, this does not seem to be the case. However, that page isn't written well.  Looking at the actual source code, I cannot see any special behavior for transactions to an address in your wallet, but I do see special behavior for transactions from such an address.
Thus, I do not think the behavior you observed is actually valid, and is more likely a pattern you noticed because human beings are too good at noticing patterns for our own good.


text:
Historical number of full nodes in Bitcoin
Is there anybody keeping historical data regarding the number of full nodes on the Bitcoin network?
There is :
https://getaddr.bitnodes.io/dashboard/?days=90
but it only shows data up to 90 days.
Additional sources also here :
http://www.coindesk.com/bitcoin-nodes-need/

There is no measure of the number of full nodes. The number published by many websites is the number of listening nodes, instances of software which is advertising itself as available for connections on the Bitcoin network. The term "full" refers to "fully validating", as distinct from non-validating or BIP37 SPV. To be listening you do not need to be validating, or even a Bitcoin node at all (a proxy connection is indistinguishable from a real node).
If you want to know about the number of listening nodes, bitnodes.io does track numbers for these though they appear to be easily manipulated at times (see the spike around September 2015).

You can check the user agent field ( https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki ) to see what type of node it its, although there's no gurantee that the node is what it advertises itself to be.

Why does this data now only go back two years despite records for far longer than that?

Here is a best effort crawler to get the "accurate" number of bitcoin nodes: https://luke.dashjr.org/programs/bitcoin/files/charts/software.html

Yes, LukeJr. But you have to work for it:
"If you want some gigabytes of data, clone my git repo here. It goes back to 2012 June."
Source.

The best source I've found is coin.dance's chart that goes back to 2015:
https://coin.dance/nodes/all


text:
Cryptocurrency with small block size limit or large block time
So there are a lot of cryptocurrencies that tries to improve on Bitcoin's  1 Mb block size limit and 10 minute block time (6MB per hour) by using faster block times or larger block size limits. For example litecoin has 1 Mb block size limit and block time is 2.5 minutes (24MB per hour). Dogecoin has 500kb block size limit and block time is 1 minutes (30 MB per hour).
Is there any cryptocurrency that does the opposite and uses either a longer block time or a smaller block size, with the intention of limiting blockchain growth?

It seems like a better approach to preventing the blockchain from getting bigger would be to have unspent transaction output commitments on a regular basis. I know that NXT does this.

can you expand on this? are you talking about "checkpoints"

I am not aware of any cryptocurrency that has block times of greater than 10 minutes, but I am very familiar with the desire to limit growth of the block chain.
Monero recently increased its block time from 1 to 2 minutes in part for the reason you mentioned (but also in part to reduce the # of orphan blocks which occur more frequently when block times are very short)
Monero uses an adaptive blocksize that automatically scales based on blockchain usage.
https://www.reddit.com/r/Monero/comments/45b8qn/my_journey_to_finding_monero_and_some_questions/czwlcdb
A quadratic penalty is imposed such that block subsidy = base subsidy * ((block size / median size of last 400 blocks) - 1)², with the penalty being applied after you build a block larger than the median size. The maximum block size is 2*median size. Because subsidy is based around the number of coins in existence, the 'burned' subsidy is deferred to be paid out to future blocks.


text:
Multi-signature and "pay to script hash" vs "pay to pub key hash"
If I understand correctly, there are two methods to perform a multi-signature transactions in Bitcoin. One is "pay to pub key hash", which is a method commonly used to send standard single signature transactions. The other is "pay to script hash", as specified in BIP 16.
If you use "Pay to pub key hash" , any senders to the multisig address need to specify all the public keys involved in the multisig address, which can be cumbersome. If you use "pay to script hash" , the sender only needs to know the hash of the script , which is equivalent to the length of a single bitcoin address.  Obviously, "pay to script hash" fits better with the various infrastructure already setup around the standard transaction.
Are there any other advantages or disadvantages between the two methods?

Sorry, my English is poor, I'll try to explain. Feel free to comment and ask.
First, terminology. There are no "pay to pub key hash msig txs". There are

bare multisig outputs
p2sh outputs

In bare multisig output i create a list on [N] pubkeys and choose [M]. The output script will look like [push M] [push key1] [push key2]... [push keyN] [push N] [checkmultisig]
Every person can check this set. If he has [M] keys he will be able to redeem this output. If he has less than [M] keys he will be able to partially sign the redeem transaction and pass it to another person (this passing step can not be done within bitcoin network, because nodes do not relay partially signed transactions). When the transaction gains at least [M] signatures it can be mined. Have a look to https://gist.github.com/gavinandresen/3966071
p2sh gives more functionality. I can write my own redeem script and calculate its checksum. To redeem p2sh output you should know the script itself (blockchain contains only the hash of it) and you should create scriptSig for it. Usually p2sh outputs used for multisig transactions, but there are exceptions. https://bitcointalk.org/index.php?topic=293382.0
Update:
One more useful link: What are multi-signature transactions?


text:
Maintain a wallet on 2 devices
Is it possible 2 maintain a single HD wallet on two devices? Assume a laptop and phone. My first thought is to install a HD wallet on the second device and create a new wallet using the original wallet words.

Yes with an HD wallet you can use as many devices as you like.
However you may want to ask yourself why you are doing this. More devices = more possible attack surfaces.
Using different HD wallets has the benefit of the losing one (to a keylogger, etc) not causing loss to your Bitcoin in the others.
Why not keep a small amount of BTC in your mobile HD wallet for everyday use and have a little more in a seperate laptop HD wallet and the majority in a seperate cold storage HD wallet?

Yes, I have considered and understand your concerns. The wallet(s) would only hold a small amount. I am looking into other storage methods, such as paper wallets, but am concerned about the seemingly difficulties of importing them into software wallets.


text:
What to do when you bought in BTC and the product hasn't been delivered
I bought a supplement not available in my country (not drugs mind you) in bitcoin.
The company has given me all the proof that they had received my money but failed to send me my product and no longer answer my mails.
Is there any way I can get my bitcoins back ?
I tried to fill a claim but, for my country, bitcoins are not money - so the police told me that for them there is no transaction.
If not how can I help the bitcoin community by informing them to beware of this seller so they will not be stolen either (and for the FUD they are doing to the coin) ?
Thanks

Bitcoin is non refundable. What you can do is use sites such as Trustpilot to register your complaint. Also leave a review on Google.

Additionally, you may contact a lawyer/solicitor as you made a transfer of value and have suffered a loss.


text:
Bitcoins transaction is completed but I don't get the coins
I got the bitcoins but it's not getting added to my wallet, I even got the email etc. and it shows up but see this

Transaction is not available at this time

Can you share the error message in English? If you check the address on an explorer, so you see your coins?

The error message says something like "Transaction could not be found." @Yuma can you share a txid (Transaction ID)?

The transaction ID would be helpful to further diagnose what went wrong, however without that information, you can try the following:
Refresh the transaction cache.

Go to "Settings" (gear icon)
Choose the BCH wallet
Go to "More Options"
Choose "Transaction History"
Choose "Clear Cache" to reset your transaction list.

Note that it will say 'Updating Wallet' until the list has been retrieved.
Refresh the server's cache.

Go to "Settings" (gear icon)
Choose the BCH wallet
Go to "More Options"
Go to "Wallet Addresses"
Choose Scan addresses for funds

Note that it will say 'Scanning Funds' until the addresses have been scanned.

check the Bitcoin Block Explorer on the transaction and/or your wallet to see what the status of the transaction is.


text:
How can I accept Bitcoin donations on my blog or site?
If I sell things, there are many services that allow me to accept bitcoins as payment.  But for those who simply want to accept bitcoins on their blog or other site ... as donations.
A simple bitcoin address can be listed but what other options are available, such as an icon that can be clicked on, like what Flattr offers, perhaps?

Although bloggers could turn to an external service to manage this for them, it might be more beneficial to simply offer a simple QR code with a description alongside. This would mean that all of the income from the BTCs would go direct to the blogger.
My personal blog has an article describing in detail how to do this. I'm not trying to plug anything honestly, just sharing knowledge.
This can be imaged with a Bitcoin wallet, or dragged like a Bitcoin swatch onto the Multibit client. A simple click will trigger a protocol handler within the browser (if installed) that would activate an wallet plugin.

qr codes and bitcoin URIs are cute and all... but you're on a computer... reading a blog... so all you really need is a bitcoin address that you can copy and paste into your client. :)

Why copy and paste (big faff on an iPad) when you can just click? What if you are reading a blog off a friend's phone and think, "You know, I'd like to support that? I'll just use that QR code to activate my mobile phone's Bitcoin wallet..."

well you see, you're talking to someone who doesn't have a fancy phone or an ipad :) but i suppose if you're using devices that make it hard to copy and paste, this would make a lot more sense. ;)

When you click on a Bitcoin URI using Multibit it copies not just the address but also the label and amount. It also adds the new address + label into your list of previous addresses. It also starts up Multibit if it is not running. That is all done with a single click in the browser.

While simple, this is just a simple link. A modal would focus the user on the donation (see the Coinbase example), and a few other features from open-source project Cointipper make the experience more modern

And Blockchain.info has added Facebook "pay a friend" feature.

http://www.Blockchain.info

Another method -- for requesting funds is:

http://www.bitcoinchipin.com

Another thread on this topic:

http://www.reddit.com/r/Bitcoin/comments/v51nz/newb_here_i_have_a_couple_of_websites_and_want_to/

Hey Stephen, in this last edit bit-pay.com was removed as a dead link. Was that the same service today found at bitpay.com?

More methods:

http://leo.bogert.de/2012/02/22/simple-bitcoin-donate-button
http://ecdsa.org:8080/widgets
http://bitcoinate.org

The first two links are dead, and the last just displays a JavaScript prompt with the Bitcoin address.

Please, change dead links to http://wayback.archive.org/web/20130621033546/http://leo.bogert.de/2012/02/22/simple-bitcoin-donate-button/ and http://wayback.archive.org/web/20111210172451/http://ecdsa.org:8080/widgets . I can not offer my editing due to technical limitations. Thanks.

As others have pointed out, the easiest way (if you do not care about staying anonymous, which you probably don't wont in the case of donations anyway), is to just display a Bitcoin receiving address with a nice icon next to it (and maybe link it to a page with instructions, QR codes and stuff).
As for icons, there is a collection at https://en.bitcoin.it/wiki/Promotional_graphics, be sure to also follow the links at the bottom.

There is also the possibility that Favicons could be used as a shorthand in browse address


text:
A different question about a kind of use
Imagine I want to change the formula of transactions between a group of people who want to use this money in this way:
 "Everyone will have a maximun quantity of money to waste in the month, and whoever received an amount from other would waste that amount over the maximum."
That is a credit that avoid Bitcoin could be seen like something material. So I am asking about a Bitcredit. If it is possible in your implementation and what could be the cost of use.
The project I have is more or less more specific that a simple phrase, so I could give more explanations. But the concept itself is so easy like I exposed.
So the question is: is it possible with bitcoins? What could be the cost?

I think something got lost in translation.

Bitcoin would be a poor choice for such a system because it doesn't really have a concept of account balances that are present in the blocks. You'll likely also need some central authority to decide who is part of "everyone". Otherwise, someone can create a million accounts and then pool all the money.
Also, Bitcoin is fundamentally secured against double spends by mining, and that makes it a poor choice for any currency that can't pay sizable enough rewards to produce real security.
You'd probably find it much easier using some scheme based around accounts with balances rather than unspent transaction outputs.

If you want to implement crediting with Bitcoin, you'd need to create your own implementation of a bank. You would probably create it on a basis of an eWallet with some additional accounting code thrown in. It shouldn't be too costly to create, but it could get a bit expensive when you'll be trying to secure it against abuse. Recently there have been too many cases of Bitcoin thefts.
However, you could get pretty much the functionality you describe (letting people spend up to X amount of Bitcoins a month plus whatever they get), by giving people Bitcoin addresses to use and just topping them up with a pre-set amount of Bitcoins. This way they could spend precisely the amount of Bitcoins you gave them plus whatever else they receive, and you could check their balance at the end of the month through a Block Explorer. It would be like a pre-paid debit card in this regard. This solution might not be precisely what you have in mind, but it appears to be close. This solution would be quite cheap, as you'd only need to have some accounting program running once a month on top of bitcoind more or less. This would mean a lot less potential chances of your Bitcoins getting stolen.
All in all, it's not too expensive to create financial Bitcoin applications, but a lot of your cost could go into securing your users finances.

I really had my answer. Thanks: obviously my error was to try asking here.


text:
Merkle Tree hashing
I'm trying to implement my own Markle Tree, currently I'm working on getting the hashing done correctly.
I've used some hashes from http://blockexplorer.com/rawblock/000000000000a85d42610b292d2baebe54ff0c854847fe3d2ca37ac7d6e46b99
Example inputs (first two hashes from blockexplorer):
Ina: 3a459eab5f0cf8394a21e04d2ed3b2beeaa59795912e20b9c680e9db74dfb18c
Inb: be38f46f0eccba72416aed715851fd07b881ffb7928b7622847314588e06a6b7
Concatenated string (H1+H2): 3a459eab5f0cf8394a21e04d2ed3b2beeaa59795912e20b9c680e9db74dfb18cbe38f46f0eccba72416aed715851fd07b881ffb7928b7622847314588e06a6b7
Hash of concatenated string:
Ans v1: b5916d6bc34bd4157aa73c3d799a6cfcef85e0659465734362d0cebb8901e93d
Final hash of concatenated string:
Ans v2: 215f8397a3090a0bc8f4a2e98609a10d55fc7b939fa1ecf9803df20b1ee089a2
Result I got:
215f8397a3090a0bc8f4a2e98609a10d55fc7b939fa1ecf9803df20b1ee089a2
Expected result:
13a3595f2610c8e4d727130daade66c772fdec4bd2463d773fd0f85c20ced32d
Checked my calculations "manually" using http://www.fileformat.info/tool/hash.htm?hex=b5916d6bc34bd4157aa73c3d799a6cfcef85e0659465734362d0cebb8901e93d
and got the same results.
Am I doing someting wrong following this example: https://en.bitcoin.it/wiki/Protocol_specification#Merkle_Trees .
I take my input hashes, concatenate them together, and double SHA256 that string. I also tried treating the input strings as a and b, that is, first double SHA256 them, and only then join them together, but the result was also wrong. Does anyone have a step-by-step example of proper hashing of the Merkle Tree?

As it was pointed out to me by ArtForz in this post: https://bitcointalk.org/index.php?topic=44707.msg534605#msg534605 the hashes are stored in little endian notation, so I first need to reverse them before double-hashing them, and then reverse the output back to get the proper result.

Added two cents. In excel VBA
Private Function Sha256String(ByVal a)
b = a
While Len(b) > 0
c = c + Right(b, 2)
b = Left(b, Len(b) - 2)
Wend
Sha256String = c
End Function

Run that on a and b hashes, concatenate them, double hash as hex bytes:
http://www.fileformat.info/tool
Then run the function on the sha-256 answer.


text:
Monitor all transactions on bitcoin network - API
I am searching for a solution to monitor all bitcoin transactions (or for first ties at least for addresses inside my bitcoin client).
I found http://blockchain.info/api_websocket is this really reliable? What happens if my client is offline?
Is perhaps the better way to run a bc-client an use a poll - every second?

This can be done with some degree of effort using the Bitcoin API.
v0.7 even has support for this for addresses that are not in your own wallet:

http://en.bitcoin.it/wiki/Raw_Transactions

There are other tools that you can use to build this capability as well.

libBitcoin
Armory (see Extras)
Bitcoin ABE


text:
Why Reward Size 50 (21 Million Coins)?
I have already read the following answer which is not really meaningful:
21 Million Calculation

Here's a mathematical explanation:
  Calculate the number of blocks per 4 year cycle:
  6 blocks per hour
  * 24 hours per day
  * 365 days per year
  * 4 years per cycle
  = 210,240
  ~= 210,000
  Sum all the block reward sizes:
  50 + 25 + 12.5 + 6.25 + 3.125 + ... = 100
  Multiply the two:
  210,000 * 100 = 21 million.

The total number is thus derived from the reward size and in either case does not provide much insight. I am a bitcoin fan but I am concerned about the deflationary risks in the distant future.
Since it is open source, if there are deflationary problems in the future can adjustments be accepted by the network to adapt? If so what might the possible solution entail?

The following post answers my concerns very well: http://bitcoin.stackexchange.com/questions/66/will-deflation-destroy-bitcoin

The figure of 21 Million is completely arbitrary. It could have been any other number and it would make absolutely no difference, as long as the inflation schedule remains the same.
However, the inflation schedule is universally agreed to be one thing that can never be changed with Bitcoin. Any new code that extends the inflation will no longer be "Bitcoin" and will not be accepted by users of Bitcoin.
To make any change, it is not enough for the majority of nodes to modify, all nodes must eventually change. Usually it is enough for the economic majority to accept the change to trigger this, but with a change like this the worst that could happen is a fork to two different networks.

Bitcoins are created through the block rewards.  The transactions fees don't create coins, they just redistribute them.  So, once the block reward goes to 0, there will be no more bitcoins created.
As for deflationary problems, the code can always be changed to re-implement the block rewards.  You just need to get the majority of the nodes to run the new code so the new blocks will be accepted.

What deflationary problems?
Banksters have successfully convinced us that deflation is bad it seems. Don't believe it because that little and supposedly good inflation has destroyed the value of the dollar very effectively.
Deflation is not bad and quite normal with sound money. With technological innovation occurring everywhere sound money will buy you more and more as time passes.
Deflation can be a practical problem. Think for instance about gold. It can become too expensive for people to buy, hold and handle. Gold is divisible but compared to Bitcoin the divisibility is very poor. The picture below shows how the divisibility can be improved. It shows 50g of gold that is created in such a way you can break it up into smaller pieces. Very low tech.

Bitcoin is very divisible, down to eight decimal places. So there are actually 2,099,999,997,690,000 (just over 2 quadrillion) maximum possible atomic units in the Bitcoin system.
So the system can support a lot of deflation before Bitcoin or units of Bitcoin become too valuable to be practical.
Note however that if it the Bitcoin system achieves widespread adoption, becomes for example the world reserve currency replace the dollar and so forth, we are talking about nothing more than a revolution. The main economic force in our current system is debt. (Maybe debt and death) No debt, no growth. In a system with sound money savings are the driving force. So capitalism.

You make a good argument. Since there really is no magic formula to date that can tell us how to adjust the money flow, I can see the merit in fixing the bitcoin amount in favour of a deflationary model against an inflationary model. I have not really sat down and done the math on this yet, but I am interested evaluating the risks of "Lost Wallets" which may move the systems towards deflation quicker than what the creators may have anticipated. I am hoping you are correct that there is a sufficient amount of bitcoins and thus time before we realize any negative effects.

Answer to my question:http://bitcoin.stackexchange.com/questions/66/will-deflation-destroy-bitcoin


text:
How to make a block explorer?
I need to make a block explorer for some alternative cryptocurrencies. I'm using Litecoin for testing, but JSON-RPC requests through PHP are very slow. Maybe JSON-RPC isn't the right thing for such purposes? What other tools you can recommend?

Index the blockchain in a database and keep the database that has the blockchain updated as blocks come in, you would be essentially running a modified node that's really good at keeping data.


text:
Atomic cross-chain trading
Atomic cross-chain trading describes a method where two parties, owning different crypto currencies, can safely exchange the crypto currencies without an intermediary. The method is described in the link below:
https://en.bitcoin.it/wiki/Atomic_cross-chain_trading
Are these method of exchange already possible with Bitcoin and popular alt-coins like Litecoin/Dogecoin? Or is it still a work in progress that requires changes to the core code? If atmoic cross chain trading is possible, are there any transactions in the blockchain where atomic cross chain trading has been used?

Are you asking about the first one or the second?

Both, I have further clarified the question in response.

First method

Is this method of exchange already possible with Bitcoin and popular alt-coins like Litecoin/Dogecoin?

Yes.
Is it advisable, though? No. There are a lot of problems with this:

How do buyers and sellers match their trades up?
How do traders know what the current price is?
If it's decentralized, most of the participants won't have DDoS protection. I can knock my competitors off of the Internet.
If I want to jam things up, I can offer to trade, but abandon the trade after step 1. The other party's coins will be stuck for 2 days.
I can go through with the protocol, then perform a Finney attack and pull my coins back.
Both parties need to run clients for both chains.

P.S. There's an updated version of that here.
Second method

Is this method of exchange already possible with Bitcoin and popular alt-coins like Litecoin/Dogecoin?

I don't know of any altchain that implements this. I will note the following problems:

the altchain client needs to run a copy of Bitcoin to verify transactions
if the transaction on Bitcoin's blockchain becomes invalid, every block that included that transaction will be invalid.

If atmoic cross chain trading is possible, are there any transactions in the blockchain where atomic cross chain trading has been used?

Probably not.

Re your point about Finney attack: The whole point of atomic trading is that you can't double-spend and get the coins of both parties. At best you can reverse the whole trade if the price moves against you. I don't remember all the details ATM but if this attack works then the whole method is broken.

@MeniRosenfeld Well, you could wait for some number of confirmations on both chains after step 2.

'How do traders know what the current price is?' Doesn't really sound like much of a problem? It's whatever buyer and seller agree upon. Like in any other market. Not really a problem inherent to cross chain transactions.

@Jannes Sure, for an individual transaction. But if you're trying to distort the market, there are a lot of things you can do. For example, you can advertise a price, but back out whenever someone tries to trade with you.

@NickODell Other markets would have this problem, but they haven't all failed yet. What makes this special?

To exchange between Bitcoin and popular alt-coins like Litecoin/Dogecoin you will need to use the first solution ('using revealing secrets of contract').
The second solution is designed around a hypothetical custom altcoin which is designed specifically to support the described exchange algorithm. I don't think that such an altcoin actually exists, but there definitely isn't support for this in Litecoin or Dogecoin.
There is a problem with the refund transactions in the first solution, however, with the current Bitcoin version, due to transaction malleability.
The problem is that refund transactions need to be signed before submitting base transactions to the blockchain, but the base transactions can potentially be mutated before they get to the blockchain, which would invalidate the refund transactions and prevent coin being reclaimed in the event of aborted exchange.
I discuss this issue in some more detail in this blog post, where I also look at a generalised form of the 'pay on reveal secret' transaction semantics in this exchange algorithm, and discuss other ways in which this can be implemented.
Note that it's possible to make this work in an embedded protocol, and then perform trustless exchange between blockchains with the embedded value tokens as intermediary steps. I've made a working version of this setup in the form of SwapBill, and this is set up and can be used, currently, for trustless exchange between testnet Bitcoin and testnet Litcoin.

If atmoic cross chain trading is possible, are there any transactions in the blockchain where atomic cross chain trading has been used?

There are definitely SwapBill atomic exchange transactions on the Bitcoin and Litecoin testnet blockchains, but this is not really what you are asking. ;)


text:
Is a website legitimate that offers to double your deposit within 7 days?
Anybody familiar with this website?
https://www.investyourbitcoin.net
I really want to work with them but I can't seem to find any review about it online?
It seems legit.. but is it legit?

Any website or service that promises to 'double your coins' is almost certainly a scam. Do not send them any bitcoin, or any other form of money.
Think about it this way:

Any sort of trading is a zero-sum game, there is not an infinite amount of BTC out there, to continuously double everyone's coins to infinity. Any trading strategy / whatever this website claims to do in order to double your coins, will involve a counterparty to the trade. Where else would they get the bitcoins from?
With that in mind, if you were the website operator, and you actually had a fool-proof method to double up bitcoin, would you use it to double your money, or offer your service to others, to double their money? Your method cannot work infinitely, since it is a zero-sum game. So why let someone else take advantage of your method, instead of using it yourself?

The answer to this should be obvious: there is no 'foolproof way to double bitcoins'. Anyone claiming to have one is just trying to scam you.

Darn... Just too late.. After 10 minutes I left this site to go check it out some more and I did put in a small investment just now.. But I really understand your explination that's what's bothering me right now..

On the other hand.. I did just get a confirmation e-mail that looks legit !

Scam sites will often look legit, until they run away with your money. In some cases they will even work to build up trust, giving you returns on small deposits, and then later stealing a large deposit. My sincere advice is to never again send them money, and in the meantime hope that you have your deposit returned.

@Bivakboy, the investyourbitcoin.net domain ("making money for you since 2016"!)  was registered only yesterday. Its a clone of https://coin2x.me - another suspected ponzi fraud.


text:
How to create multi-user wallet or wallets supporting off-chain transactions
I want to implement the wallet to create bitcoin and altcoins exchange and store system.

Somehow create random or HD wallet that holds and store upto 50 user public keys.But users will not have access to private keys so the user cannot sell coins directly. User A should be able to transfer coins to user B without paying transaction fee using our system.
(Thinking of some kind of HD wallet on which I control all the private keys and only provide users with public address within this wallet for receiving the coins)
Users hold the private keys themselves on mobile/pc using our system. User A should be able to transfer coins to user B without paying transaction fee using our system.(I think its not possible without private key in this case)

How to create wallet for case 1 and different wallet for case 2 ?

The case 1 is easy from a technical perspective: you create a single hierarchical deterministic wallet and take full custody of your users' balances. To do so, you provide distinct addresses to each user whenever they want to deposits or receive coins. You keep track which addresses are associated with which account, but only show them their balance aggregated from what they received and sent. When they send to another user on your service, you only update your database and do not move any coins. To create withdrawals or send transactions, you use whatever coins are convenient to do so. Note that this is simple only from a technical perspective, it is difficult from a legal and regulatory perspective.
Case 2 is impossible: The two requirements of the users holding their own private keys and being able to transfer coins without paying transaction fees are not compatible.
If you want users to hold their own keys, to sign over bitcoins, they need to be transferred to the control of another key. This requires an on-chain transaction and thus requires fees. On the other hand, to transfer balances without a fee, the coins must be under your service's control so that you can unilaterally amend the balances in your database.


text:
Are Bitcoin wallet apps on iOS truly decentralised
The only offering for p2p support on iOS that I’m aware of is the MultipeerConnectivity framework. Based on its documentation, it only seems to support nearby devices (ref: https://developer.apple.com/documentation/multipeerconnectivity).
Now, by “truly decentralised”, I mean no use of a backend whatsoever.
Perhaps there’s something I might be missing. If wallet apps are indeed, truly decentralised, how do they achieve this?

From what I can tell, BRD or "Bread" wallet on iOS uses the P2P network directly to connect to bitcoin nodes. This makes it as decentralized as any other bitcoin node. To achieve that, they use walletkit (https://github.com/blockset-corp/walletkit/), an SPV client in C/Swift.

This is cool to know, however overall iOS I think is the non-decentralized common denominator regardless of the application.

An iOS app does not need to use any multiple connection framework provided by the iOS SDK at all. Apple does not need to have any API to support this since it can be done with threading and the normal network connection API.
An iOS app developer can use the standard Network connection framework in order to open a TCP connection to whatever nodes they want to. They can connect to multiple nodes by creating a thread for each node and each thread uses the Network connection framework to establish the connection. In this way, there is no need for anything like MultiPeerConnectivity or any special framework for connecting to multiple network targets.

If that makes it “decentralized” or not is another matter though.

@AndrewChow Thanks for that. Could you point me to a sample code snippet that makes use of the network connection API to send data to an IP/Port? I tried looking but couldn’t find any, only found the API reference.


text:
How to recover my funds from electrum wallet with privatekey and redeem script?
Hey I think I know the answer already and I kinda screwed up I think I just want to verify. so I send BTC to my electrum wallet and I forgot the seed. I could not find it. but I have the private key and redeem script. is there any chance to restore or gain access to the funds or do I have to say goodbye for ever? thanks in advance if anyone has an idea otherwise I will have to accept my faith and add a learning experience to my repertoire. thanks in advance.

what type of wallet was it? electrum doesn't let you input the redeem script when importing or sweeping private keys. however it may be able to generate the redeem script itself depending on the wallet type.

well thats the thing its a two factor auth. but i never remebered to actually set two fact. up so it confused my right away and now i cant acces my funds because it needs the 2fa when sending which i dont have so thats it right? its just a watch adress now for me and i cant do anything if im correct. if there is another possibility please let me know :)

2fa means it's a multisig 2 of 3 wallet with 3 private keys behind each address and you need any 2 of those to spend. one private key will not be enough. if you have the wallet installed on your device you can try number 3 here.


text:
BIP39 security: 24 words vs. 12 words + 12 word passphrase
Does using a 12 word BIP39 mnemonic phrase in combination with another 12 word BIP39 mnemonic phrase used as an additional passphrase provide the same security as a 24 word mnemonic phrase without passphrase?

Short answer: Yes it’s the same since there are 2048^24 mnemonic + passphrase combinations in both cases.
Slightly longer answer: Technically the second case is a bit better because the 12 words in the mnemonic have a checksum so they only contain 128 bits of entropy vs 132 bits in the 12 words in the passphrase. Any 12 words is a valid passphrase but any 12 words are not a valid mnemonic.

Yes you can put anything in the passphrase but my understanding of OPs question is he wants to use the same wordlist to pick 12 words for a passphrase

@RedGrittyBrick I explicitly asked for "another 12 word seed used as an additional passphrase". The question was about a comparison of the security of a 24 word seed without passphrase vs. a 12 word seed with another 12 word seed used as passphrase.

@wieland.gmeiner Thanks for the clarification. My comment was motivated to help authors clarify their contributions, I misunderstood your question so I'll edit it for you to make it clearer for anyone in future who has the same question and is searching for answers.


text:
Blockchain.info customer service
Anyone know the the blockchain.com direct/ live customer service? I had submit several request with same problem , what i get is only the standard answer from blockchain.com which i feel is total nonsense.
Long story short , there is a transaction d69c2c14897a516917932f0ed0c2e04ed0380c63709d103d66541e6c77e34406 which shall be already confirmed, but blockchain.info shows unconfirmed transaction and the BTC cant be credit which the wallet also belong to blockchain.com. Therefore need help on the live/ real customer service.
Below are the standard template i get as reply.

Friday at 12:28
  Please check transaction d69c2c14897a516917932f0ed0c2e04ed0380c63709d103d66541e6c77e34406.
  By using other platform ( at least 3 ) this transaction had been confirmed but not on blockchain.info. Unfortunately the 0.2 yet to debit in to 18hBv8j15E4iDJ7V7pKKiJN4hGvyRZCvkb wallet, it was suppose to as the transaction had been confirmed.
confirmation 2.JPG (60 KB)
   confirmation 1.JPG (70 KB)
  Avatar
  Tanya
Saturday at 07:10
  Hello,
I'm sorry to hear about this trouble you're having. I can give you a little more information on how transaction confirmations work. An unconfirmed transaction will eventually either be accepted into a block by a mining pool and confirmed. Or it will be rejected by the network, if not rebroadcast, usually within 7 days. If it eventually is rejected, don't worry, the funds will remain on the address they were sent from. At this point, we can only recommend that you wait to see if your transaction is accepted into a block.
Like all wallet providers, Blockchain has no control over the speed of confirmation, and unfortunately cannot expedite transactions. This is always dependent upon the network of miners.
We do everything we can to lessen the number of pending transactions. For this reason, your Blockchain wallet utilizes dynamic bitcoin fees that are dependent upon current network conditions. To learn more about how this works read our blog here: https://blog.blockchain.com/2016/03/16/introducing-dynamic-fees/.

I realize this question was asked a few years ago, but for anyone else with a similar issue: If your wallet isn't working the way you want it to, just create another wallet using a different service. There's no reason you need to get them to fix anything unless you want them to. They aren't stopping you from transferring your funds because they have no control over your funds.
Always make sure you have your private keys or seed saved securely somewhere in case your wallet disappears or breaks in some way. That way, you can set up a new wallet to access the very same funds any time that becomes necessary.

I've tried reaching out to the Blockchain support on Twitter about this: https://twitter.com/murchandamus/status/1059594999476547585
I hope they'll get back to you.

Thanks! But unfortunately, not replying at all. Any other idea? By the way, the link you post on twitter seems not linking .

They've replied about thirty minutes ago about having gotten the message and following up with you.

Thousand thanks Murch!! Let see will they reply your tweet. Till now I still get nothing.

Dear Murch ,could you please help me a favour. Blockchain is not replying me and the status is still the same. Could you help me to tweet them again, I tried but there is no reply from them. I would need help for publicity as I think this is sort of scam which blockchain is ignoring everything for their mistake . Really much appreciated and thousand thanks!

I've posted it here again: https://twitter.com/murchandamus/status/1060647801464414208


text:
How happens the serealization the data in the file blkxxxx.dat in the bitcoin
I'm writing a blockchain parser for bitcoin core with C++ and now I want to enrich the data I read with the raw transaction and the previous and next block hashes.
I used this library to convert the hexadecimal to a double sha256 but now my problem is to bring the data I read into the correct format, for example, the VarInt is serialized as corresponding hexadecimal (for example 77 -> 4d).
But on some things, I don't find myself, for example in the conversion of integers of the type uint32 and int32.
I'll give you an example
The version number of the genesis block is 1 and the serialization to the correct hash is 01000000
or the conversion of the nonce of the genesis block which is 2083236893 but the correct form for the serialization is 7c2bac1d
Similarly for
NBits = 486604799 -> serialization = 1d00ffff
timestamp = 1231469665 -> serialization = 495fab29
Sorry for my terrible English but I'm learning.
______ Solution ______
Bitcoin core to use the method for serializing block, into file blk and sending data into the network, to create the hash.
Then, the hash block do create with all data into little endian form.

You are being confused three ways.
First, you need to be careful that some of your numbers in decimal, others are in hexadecimal: 77 decimal -> 4d hexadecimal (so: 77d -> 0x4d)
Second, you need to be careful that most numbers are stored in little endian notation, so 0x00000001 -> 0x01000000. Theymos' discussion why little endian is used.
Third, you have mixed up numbers from the Genesis Block and those from block 125552:
The Genesis block nonce 2083236893d converts to 0x7c2bac1d as hexadecimal not 0x42a14695.
0x42a14695 is the nonce mentioned at https://en.bitcoin.it/wiki/Block_hashing_algorithm for Block 125552, not for the Genesis block.
Similarly, Nbits 486604799d is for the Genesis block, 0xf2b9441a is for block 125552. Timestamp 1231469665d is for the Genesis block, 0xc7f5d74d is for block 125552.

And what the extreme programming advocates say is true, programming in pairs greatly reduces errors, fortunately I had the test battery well designed and I only had to change the asserts, thank you so much for taking me on the right track.
For the hexadecimal convention, I apologize for my mistake.
Now I would like to ask you a question, why is the nonce stored as endian bih and the versions as endian lite? there is some reference of the protocol where we talk about this to understand how to correctly convert the fields

Nonce and versions are both stored as little-endian. So, the Genesis block nonce 2083236893d is 0x7c2bac1d, which is changed to its little-endian form 0x1dac2b7c before being stored.

Thanks so much, bitcoin create the hash whit  all type little endian :) If you would not have helped me I could not solve the problem


text:
Where does the litecoin wallet store coins?
I recently installed the official LiteCoin wallet on Ubuntu. I accidentally deleted it about 80% of the way through the synch, and reinstalled it, expecting it to resynch. It resumed. My address didn't change either.
So it seems that the wallet data is stored somewhere in the system. Is this safe? I reasonably expect my system to eventually implode, so I will need to backup/export my data somehow.
Where is the data stored, and how do I back it up?

On Linux, the default data directory is ~/.litecoin/. This is where the wallet, blockchain, configuration, etc. files are stored.
You can backup your wallet from File > Backup Wallet. This is the part that contains your private keys. See the pic:

You should encrypt with a secure passphrase (in Settings > Encrypt Wallet) before exporting your wallet. If you don't, the private keys in your backup will be unencrypted. As long as your wallet has been encrypted, your backup will be encrypted and you can safely* put it on Dropbox, Google Drive, email it to family/friends, etc. for safe-keeping.
*As safe as your passphrase is, so make it very high quality.


text:
Balance still not available?
I just sent bitcoins from one wallet to another to make my life easier. This was the goal, anyway. My balance in my new wallet went up, but it's still not available after 3 hours. Why might this be? I'm using MultiBit on Mac OS X.

When you create a Bitcoin transaction, your client will broadcast that information to peer nodes and generally within seconds every node that is connected will know of that transaction.
That's likely why the recipient wallet's balance rose.
That transaction though must be included in a mined block before the client you are using will allow those funds to be spent.  Though technically the client could let you spend the funds before the transaction gets even one confirmation, that introduces more confusion and problems so the client has this restriction for these "unconfirmed" transaction.
So, the question remaining is why hasn't the transaction confirmed?  Whether or not to include a transaction is at the discretion of Bitcoin miners (solo miners) and mining pools.  If your transaction did not include a fee that is paid to the miners then sometimes it gets ignored for a while.  This delay can range from an hour or two to more than a day.
Knowing the appropriate fee to pay will depend on how much data the transaction consumes.  If you are a miner getting tiny payouts from your pool, your fee to send payment will be more expensive than most because each of those tiny payouts consumes data.  Another egregious violator are the tiny payouts from the losing transactions on SatoshiDICE.   Most everyone else can get by paying the minimum 0.0005 fee in scenarios where a fee is required or no fee at all when none needs to be paid.
So, the reason you can't spend the funds is likely because either no fee was paid or the fee that was paid wasn't large enough.  In the future, if there is the need to spend the funds from a payment quickly, consider including a fee payment that will help ensure it is included in block in a timely manner.

Hmm... Multibut takes a .0003 fee, which I assume goes to miners. It did finally go through, but it took 7 hours. I've made transactions like this before, and it always takes less than a minute for the available balance to update.

All the fee goes to the miner. I find now that a milli (0.001 BTC) fee is needed now to get into the next block. Any lower than that and you start getting crowded out by other transactions.

You can also see more info on the transaction if you go to the Transactions tab, right click on it and choose 'View transaction details'.
On the screen that appears you can click the 'View in blockchain.info' button. This opens a browser with the transaction details in blockchain.info.
Blockchain.info will probably tell you the transaction is unconfirmed for the reasons Stephen described.


text:
Simple bitcoin mining algorithm
I'm trying to figure out how does simple Bitcoin mining algorithm works in plain simple c or c#  or some pseudo language. I've found an example at http://pastebin.com/EXDsRbYH, but unfortunately It isn't clear what it does. I was unable to run it.
Suppose I have only one input: a Bitcoin wallet "abc..." which I would like to be used for the Bitcoins to be mined. I need simple to understand algorithm that will do the bitcoin mining on one machine with one thread on one cpu [I know it will take ages to complete :)]

The simplest miner would work like this:

Request a new Getwork from a given pool/bitcoind with specified credentials
For nonce=0;nonce<0xFFFFFFFF;nonce++

Set Getwork Data nonce
SHA-256 hash the Getwork Data (block header)
Check if hash result is smaller than Getwork Target, if so, submit a share
If more than 1 second passed since you received Getwork, stop the loop

GOTO: 1

Now, if you want something that could rise up to par with currently used miners, you need to consider:

OpenCL calculations, without this you will never get the high hashrates of graphic cards.
Midstate, or in other words hashing optimization. First half of Getwork Data doesn't change, so no point in calculating midstate for each hash.
Longpolling, makes you calculate less stale blocks.
Rollntime, minimizes communication with the pool.

Could you please explain why we need to stop the loop if it took more than 1 second?

@Rasoul The basic getwork requests (in bitcoind) time out after 1 second as far as I remember. This is why we have to stop the loop and get new work every second.

Read the answers to this question and if you have any specific questions about the mining algorithm perhaps you can edit your question to ask them.
If all you want to do is run a mining program, there are lots available.  You can study the source and see what they're doing.
The official bitcoin client itself has a basic CPU miner built in.  You can examine the code to get an idea of how mining works.


text:
Calculate tx fees before sending with sendtoaddress
I see this question time and time again, but I only find answers for calculating the fees in creating raw transactions.
I am using sendtoaddress and would like to be able to calculate the tx fee needed prior to calling the api. I would like to avoid creating a raw transaction if reasonably possible.
how might i do this using the json-rpc api? (i'm using bitcoind)

If you call
bitcoin-cli settxfee <fee>

just before call
bitcoin-cli sendtoaddress "1LipeR1AjHL6gwE7WQECW4a2H4tuqm768N" <value>

Then the fee will be <fee>.
Important note: make sure in the graphic mode (when you start with bitcoin-qt command) the "custom" is selected, otherwise your command settxfee will be ignored (see image bellow).
Also, I'm not sure if this option is selected by default, and I am not sure as well if it you can set "custom" via API. If someone knows that, please edit this answer and fix it.
Note 2: I'm not sure if this is strictly necessary, maybe not. I didn't make many tests. The test I made was starting bitcoin with bitcoin-qt -txindex -server & and then letting the interface open. If "recommended" is selected the command settxfee will be ignored. I didn't tested e.g. what if let the "recommended" option selected, close the interface and then start with bitcoind -txindex for example.

But what if you want to use the floating recommend fee and simply get a rough approximation of it before sending the coins? The question is about calculating the fee, not setting it. I can't believe using raw transactions is the only way to solve it.

A bit late but you might take a look at https://github.com/bitcoin/bitcoin/pull/5503
It's not merged (yet) but it would give you the opportunity to get the fee before sending the transaction (with 4 steps: createrawtransaction, fundrawtransaction [get fee], signrawtransaction, sendrawtransaction)


text:
bitcond and bitcoin-Qt system configuration and bandwidth requirements
What is the best operating system configuration for a computer to run (bitcoind or bitcoin-Qt) and (BFGminer or CGMiner) under Linux, assuming that it will be connected to a 3 Terrahash mining rig on one side and the internet on the other side?
What packages, at minimum, must be installed?
How much bandwidth will I need using the Stratum protocol and how much using the GetBlockTemplate protocol?
EDIT TO ADD:
What I mean by "best configuration" is the minimum configuration that provides the necessary functionality.
I'm willing to bet that 90 percent of what's in a desktop Linux distribution is not needed in this application.
Obviously, a kernel and a shell will be needed.  What else?

"Best" all depends on how you're measuring. Are you looking for smallest? cheapest? lowest power consumption? fastest? coolest? quietest?

Would you be mining by yourself, or in a pool? If you are mining in a pool, you won't need bitcoind or bitcoin-QT running, and you can use a Raspberry PI to run CGMiner. Raspberry PI is very easy to set up, fast and requires much less oversight/administration as compared to a consumer grade laptop/computer.

For dependenices the minumum i was able to get away with was
libdb4.8-dev
libdb4.8++-dev
libminiupnpc-dev
libqt4-dev
libprotobuf-dev
protobuf-compiler
apt-get install libqrencode-dev

and make sure you have enough room for validation i had the many errors coming up for not dedicating enough. Personally when it comes to bandwidth I needed way more than 14 Mbps.

Your forgetting dependencies like build-essential


text:
How to fully decode a coinbase transaction?
After reading this What is the format of the coinbase transaction? I was wondering about a few things.
decoderawtransaction of a random Litecoin coinbase transaction:
"coinbase" : "038abd07062f503253482f048725ee5208083865a409000000092f7374726174756d2f",
...
    "scriptPubKey" : {
    "asm" : "OP_DUP OP_HASH160 975efcba1e058667594dc57146022ec46560a63c OP_EQUALVERIFY OP_CHECKSIG",
    "hex" : "76a914975efcba1e058667594dc57146022ec46560a63c88ac",
..
    "addresses" : [
    "LZ2L61M8rCoZmK7SemTBqfxuFZv5Uj4peR"

Is the asm field the outgoing address? If yes how is it encoded and what is the hex field for? Same question goes for scriptSig asm field in a normal transaction. It contains the public key and the signature but how is it structured/encoded. Because I have a Tx with to vins from the same address and I don't see the same public key in the asm field.
How do I read the coinbase? Hex2asic  gives me "?????/P2SH/??%?R??8e??????/stratum/". Is that all I can do if I don't know how the pool operator has structured the coinbase?

I believe the OP_HASH160 975efcba1e058667594dc57146022ec46560a63c is the RIPEMD hash of the address. Check out step 3. http://bitcoin.stackexchange.com/questions/5021/how-do-you-get-the-op-hash160-value-from-a-bitcoin-address

OP_HASH160 is sha256 and then ripemd applied to public key

coinbase, scriptPubKey, scriptSig - they are all scripts. You can read in wiki about how to decode script https://en.bitcoin.it/wiki/Script.
Coinbase can contain any data, even invalid script. But typically, it contains valid scripts. Examples of decoding:
coinbase: 038abd07062f503253482f048725ee5208083865a409000000092f7374726174756d2f
03 - length opcode
8abd07 - data with length 03
06 - length opcode
2f503253482f - data with length 06
04 - length opcode
8725ee52 - data with length 04
08 - length opcode
083865a409000000 - data with length 08
09 - length opcode
2f7374726174756d2f - data with length 09

scriptPubKey: 76a914975efcba1e058667594dc57146022ec46560a63c88ac
76 - OP_DUP opcode
a9 - HASH160 opcode
14 - length opcode
975efcba1e058667594dc57146022ec46560a63c - data with length 14 (20 in dec)
88 - OP_EQUALVERIFY opcode
ac - OP_CHECKSIG opcode


text:
Bitcoin initial communication diagram
I'm trying to understand how exactly does the Bitcoin client communicate initially with another client, as I'm making my own client and learning new things about TCP protocol. As I understand, the Bitcoin client uses the standard port (8333) as a server port that is listening to other clients' communication, and the client opens up new ports as it is trying to communicate with other clients. As I'm not sure if I understand the communication correctly, I made this chart:

My question is: is this diagram and my assumptions correct, or did I make some mistake in understanding how the protocol works?

Since this is TCP, it's probably clearer to simply state that A opens a TCP connection to B's port 8333 and that this connection is used for subsequent communication between them.

You're pretty close, with the deviations being I think primarily in terminology.
Client A listens for connections on port 8333. Listening is a server activity.
Client A chooses an ephemeral port and opens a connection to the address of Client B on port 8333, on which Client B is listening. At the TCP level, there is a three-way handshake to establish the connection. Imagine this connection as a bi-directional pipe to and from which both clients can read and write.
Once established, Client A sends Version and Client B receives it. Client B sends Version and Client A receives it. Client A sends Verack and I think Client B also sends Verack, which is an acknowledgement of the version compatibility or receipt.
This is my understanding.


text:
How hard it is to destroy BitCoin system if the government leaders decide to do this?
Just wondering, since the government controls the physical internet. The Bitcoin system could be somehow destroyed by the governments.
I'm just wondering if they want to do this, is it technically hard?

since the government controls the physical internet

They do not (at least in North America or Europe). The internet is a network of communication. An Internet Service Provider (ISP) can be private or public, but either way it's function is to direct addressed transmissions to those addresses (IP addresses).
This network is a kind of base layer. The early days of Bitcoin/crypto found heavy usage in illicit online activities, meaning not allowed by the government. How were these activities carried out in a controlled network? By taking advantage of networks built on top of this base layer internet. TOR, I2P are some examples of these.
If Bitcoin/crypto were to be heavily prosecuted, nodes could (and have) take refuge in these hidden networks.

As long as one person is operating a node, Bitcoin is functional. For the government to remove Bitcoin, they would need to remove every single operating node and delete the files required to set one up from existence. However, the Bitcoin network needs access to the internet or similar network to be able to broadcast blocks and transactions.In this scenario, people could set up nodes to work with another network that replaces internet.


text:
What happens when a fork/network split occurs on the Stellar network?
Say some country decides to somehow block all outgoing Stellar connections for 30 minutes. With a voting based consensus that Stellar has chains in both networks progress with a similar speed. After the network split is over there will be two Stellar networks with a diverged history.
How would such an outcome be resolved/avoided with the new consensus changes? Is there some way to determine which network state is correct after the split? Can the smaller split network know that it's split and pause accepting transactions?

I'm not sure whether the consensus algorithm has been significantly changed from Ripple to Stellar, but if it hasn't, your question is answered here: What is the exact consensus protocol Ripple uses?

@Murch I think it did. I recall hearing about how Stellar has a proof of how their network won't fork. edit, here: https://www.stellar.org/papers/stellar-consensus-protocol.pdf

Assuming people chose adequate quorum slices and the system has quorum intersection (which is how the system is intended to be used), then with Stellar's new consensus protocol, at least one of the two partitions would be unable to settle transactions for the duration of the network outage.
Stellar does allow for redundancy, in that validators can have multiple slices.  For example, a slice might consist of any 5 out of 7 validators spread across countries.  In that case, if the partitioned country has only 1 or 2 validators, the rest of the world can continue to make progress.
This kind of scenario is actually unavoidable.  You have to chose at most two out of Consistency, Availability, and Partition tolerance.  This is sometimes known as "Brewer's theorem" because Eric Brewer conjectured it and Seth Gilbert and Nancy Lynch subsequently proved it.  See: http://www.cs.luc.edu/~pld/353/gilbert_lynch_brewer_proof.pdf

This does seem avoidable though. You could allow both sides to make forward progress during the split, as Ripple does, and resolve which side was "authentic" afterwards. By not making forward progress during the split, you accumulate a massive backlog of valid transactions during the split. This seems to be more disruptive than needed.

Well Brewer's theorem is unavoidable.  You are advocating availability and partition tolerance over consistency, vs. stellar prioritizing consistency and partition tolerance over availability.  Sounds like ripple and stellar just make different trade-offs.

Not exactly. I am saying that Stellar sacrifices availability here for no apparent reason. There is no apparent corresponding benefit in either consistency or partition tolerance. The consequences might be significant, depending on what fraction of transactions are voluntarily abandoned if delayed. If that's high, it doesn't matter. If that's low, a partition could lead to a persistent backlog. (My gut instinct is that it probably is fairly high. Most transactions, if they take too long, will likely just be abandoned. So it may not make much difference.)

Not sure I see your point.  Do you disbelieve Brewer's conjecture?  Assuming quorum intersection of good nodes, Stellar's algorithm has been mathematically proven to offer consistency (or "safety"), regardless of any network partitions.  So it's consistency and partition tolerance are as good as one could hope for.  These guarantees come at the cost of availability, in the sense that at least one of the partitions cannot settle transactions without agreement from the rest of the world, but by Brewer this is inevitable, not for no apparent reason.

I think I see where you're misunderstanding me. You have two choices when you are partitioned. You can make forward progress on neither side. Or you can make forward progress on both sides but only later know which side you're going to keep (and throw the other side away). True, you can't settle transactions on both sides, but that doesn't mean you have to make no forward progress at all. Sellar chooses to make forward progress on neither side just because it can't settle on either side. This is not required by Brewer, it's just a choice.

Indeed, that must be the misunderstanding.  I don't understand what "forward progress" is in a consensus system.  I think maybe you are talking about an optimization where some of the data structures have been precomputed before the ledger heals, but this is an optimization that should occur at a different level of abstraction from the consensus protocol.  Stellar would probably heal things with one single ledger containing a lot of transactions.  That doesn't necessarily seem any better or worse than how I think you are describing Ripple, unless it complicates the correctness proof.

Certainly there's going to be some upper limit to the number of transactions per second you can make forward progress on. If you make no forward progress on either side while split, a split means lost capacity. If you make forward progress on both sides of a split, all you have to do is decide which one "wins" when you rejoin and you can settle thousands of transactions. That way, the time spent split is not lost settlement capacity. This is just a choice -- it's not required by Bewer.

(By "forward progress" I mean determining the possible results of transactions. By "settle" I mean determining the results that people can rely on.)

Well, in Stellar the consensus protocol can be amortized over an arbitrary number of transactions, so consensus itself is not on the critical path for transaction throughput, just settlement latency.  After a partition heals, the other half will have to verify all the transactions anyway, so it's unclear how much precomputation can help things.  But this is really a separate issue from the consensus protocol--I suspect either Ripple or Stellar's consensus protocol could be used with or without precomputation.

I think your question is based on the flawed premise that this is a problem. While the network is split, at most one side has sufficient validators to fully-validated ledgers, even though both sides are making forward progress. It's also possible that neither side will have a super-majority, and thus while both sides will make forward progress, neither side will fully-validated any ledgers.
Once the two sides rejoin, one chain or the other will acquire a super-majority due to avalanche of the validators as the network rejoins. This is better than not making forward progress during the split because network transaction capacity isn't lost.
During rejoin, a large number of otherwise-expensive checks are not needed. There's no need to execute transactions twice (once to decide how to vote on them and then again to determine their actual results). There's no need to retry transactions (since you know the order they executed in). And so on. All you have to do is build each ledger in the final accept process, which you need to do anyway because you need to update your databases, push transaction results to clients, and so on.


text:
How does using DNS seeds to find initial peers compare to using seednode?
How does using DNS seeds to find initial peers compare to using -seednode?
This was asked by prayank on IRC and has been paraphrased.
A related question is here.

This was answered by dhruv and sipa on IRC.

-seednode: a peer node that is only asked to respond to GETADDR.

(This is the bootstrapping mechanism used for Tor nodes.)
DNS seeds are names that resolve to the IP addresses of good full nodes. The set of IP addresses you get back changes all the time.

Unproxied Internet access + DNS seeds => One domain name resolves to many IPs that go into addrman
Proxied internet access + DNS seeds => One domain name resolves to one IP that acts like a -seednode.

The related Bitcoin Core code is here. git grep for CConnman::ThreadDNSAddressSeed()


text:
Bitcoin dns seed flags
I'm working on some lite client of bitcoin, and at the moment I'm trying to make a seed resolution by services supported by the nodes expose over a DNS seed.
I found this post on bitcointalk, but I think that not all the flag features are documented. In particular, I'm interested to know that is the flag feature of the BIP 158 service, but I also want to know where I can see all these flags on bitcoin core. It looks like they are no longer hardcoded in the code, or better not longer in clear hardcoded in the code.
Thanks.

The format is simply xN.[seedname], where N is the required service flags, ORed together, encoded in hex.
From Bitcoin Core's src/protocol.h:
    NODE_NONE = 0,
    // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
    // set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients.
    NODE_NETWORK = (1 << 0),
    // NODE_BLOOM means the node is capable and willing to handle bloom-filtered connections.
    // Bitcoin Core nodes used to support this by default, without advertising this bit,
    // but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION)
    NODE_BLOOM = (1 << 2),
    // NODE_WITNESS indicates that a node can be asked for blocks and transactions including
    // witness data.
    NODE_WITNESS = (1 << 3),
    // NODE_COMPACT_FILTERS means the node will service basic block filter requests.
    // See BIP157 and BIP158 for details on how this is implemented.
    NODE_COMPACT_FILTERS = (1 << 6),
    // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
    // serving the last 288 (2 day) blocks
    // See BIP159 for details on how this is implemented.
    NODE_NETWORK_LIMITED = (1 << 10),

So as a hypothetical example, say you want NODE_WITNESS, NODE_COMPACT_FILTERS, and NODE_NETWORK_LIMITED, you'd need N = (1 << 3) + (1 << 6) + (1 << 10) = 1096, which is 448 in hexadecimal. Thus, you'd query x448.[seedname].
Note that not all combinations are supported, and which ones are may depend on the seed. My Bitcoin seeder software by default supports the following combinations currently:
NODE_NETWORK
NODE_NETWORK | NODE_BLOOM
NODE_NETWORK | NODE_WITNESS
NODE_NETWORK | NODE_WITNESS | NODE_COMPACT_FILTERS
NODE_NETWORK | NODE_WITNESS | NODE_BLOOM
NODE_NETWORK_LIMITED
NODE_NETWORK_LIMITED | NODE_BLOOM
NODE_NETWORK_LIMITED | NODE_WITNESS
NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_COMPACT_FILTERS
NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_BLOOM


text:
p2wpkh spending problem
I use unsynced bitcoin core wallet because data is too costly and I do not trust anything other than bitcoin core, people told me to do so.
Playing around I originated this transaction id: e11bdbf2ecaa4309ba7664fe53876d04c47b2faf6aa428c7fd7c1bd574c0c85e
I want to spend them to another address.
So I constructed a new transaction and wanted to sign it, I believe I have to redeem a P2wpkh script to unlock the funds :
signrawtransactionwithkey "02000000015ec8c074d51b7cfdc728a46aaf2f7bc4046d8753fe6476ba0943aaecf2db1be10000000000ffffffff01e485010000000000160014a6d3b75abe310aaa1dbcfe6a78d1d96307cd11c400000000" '''["Myprivatekey"]''' '''[{"txid": "e11bdbf2ecaa4309ba7664fe53876d04c47b2faf6aa428c7fd7c1bd574c0c85e","vout": 0,"scriptPubKey": "001491a4d1774ba4d8d19c2a880ab42460589ed6c98f", "amount": 0.00099812}]'''

But bitcoin core tells me that there is witness program hash mismatch.
Can someone please help me.
Cordially

Ok, I lost a full day on it. But the solution was annoyingly simple, the hash is invalid, just provide the proper private key. I just messed up in my mind, I was pursuaded my arguments were correct.


text:
Bitcoin core shutdown after running for about 1 day
I have my bitcoin core daemon up and running on Ubuntu. However it always stops after running for serveral hours or 1 day. Here's the debug.log before it stopped.
2023-11-23T18:04:42Z [net] Saw new cmpctblock header hash=000000000000000000019f034b4fed9b31aa4b5aad47c70cee86d784b5932216 peer=227
2023-11-23T18:04:43Z UpdateTip: new best=000000000000000000019f034b4fed9b31aa4b5aad47c70cee86d784b5932216 height=818134 version=0x21dcc000 log2_work=94.557484 tx=924729575 date='2023-11-23T18:04:24Z' progress=1.000000 cache=109.0MiB(751559txo)
2023-11-23T18:15:43Z New outbound peer connected: version: 70016, blocks=818134, peer=720 (block-relay-only)
2023-11-23T18:18:12Z New outbound peer connected: version: 70016, blocks=818134, peer=725 (block-relay-only)
2023-11-23T18:33:21Z Saw new header hash=00000000000000000000cc3699401d8fe6893369744fc8fcbc1913032e67242a height=818135
2023-11-23T18:33:21Z [net] Saw new cmpctblock header hash=00000000000000000000cc3699401d8fe6893369744fc8fcbc1913032e67242a peer=5
2023-11-23T18:33:22Z UpdateTip: new best=00000000000000000000cc3699401d8fe6893369744fc8fcbc1913032e67242a height=818135 version=0x20c00000 log2_work=94.557497 tx=924733362 date='2023-11-23T18:33:12Z' progress=1.000000 cache=109.6MiB(755110txo)
2023-11-23T18:33:22Z BlockUntilSyncedToCurrentChain: txindex is catching up on block notifications
2023-11-23T18:36:45Z New outbound peer connected: version: 70016, blocks=818135, peer=763 (block-relay-only)
2023-11-23T18:43:31Z New outbound peer connected: version: 70016, blocks=818135, peer=779 (block-relay-only)
2023-11-23T18:46:38Z Flushed fee estimates to fee_estimates.dat.
2023-11-23T18:48:57Z New outbound peer connected: version: 70016, blocks=818135, peer=791 (block-relay-only)
2023-11-23T18:49:35Z tor: Thread interrupt
2023-11-23T18:49:35Z Shutdown: In progress...
2023-11-23T18:49:35Z torcontrol thread exit
2023-11-23T18:49:35Z opencon thread exit
2023-11-23T18:49:35Z addcon thread exit
2023-11-23T18:49:35Z msghand thread exit
2023-11-23T18:49:35Z net thread exit
2023-11-23T18:49:35Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat started
2023-11-23T18:49:35Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat completed (0.01s)
2023-11-23T18:49:35Z scheduler thread exit
2023-11-23T18:49:36Z Writing 0 unbroadcast transactions to disk.
2023-11-23T18:49:36Z Dumped mempool: 0.27696s to copy, 0.66744s to dump
2023-11-23T18:49:37Z Flushed fee estimates to fee_estimates.dat.
2023-11-23T18:49:40Z Shutdown: done

I see it shutting down correctly, but I didn't do anything to interrupt or stop the process.
I start the daemon with: nohup bitcoin-core.daemon &
Is there anything I can do to this?
Thanks a lot!


text:
Why do wallets of Bitcoin exchanges have tens or hundreds of thousands of addresses?
I am looking to track the wallet of Kraken and see how the balance changes at each block.
For that purpose, I use www.walletexplorer.com (https://www.walletexplorer.com/wallet/Kraken.com/addresses) and I can have access to all the addresses of Kraken's Wallet. For now we can see that there are 114 458 addresses.
My questions are:

Is that number fix ? (I doubt so)
What those addresses represent exactly ?
Why do we find so many addresses but only around 20 of them are rich? (others are very close to 0)

I imagine it like every customer of Kraken is associated to one address (so that's why we find so many addresses) and all these addresses are managed/held by Kraken. But I am note sure.
Thank you for enlightening me.

Is that number fix ?

It isn't. New addresses are generated by exchanges all the time.

What those addresses represent exactly?

They are simply multiple addresses controlled by them. They can represent addresses the users deposit coins too (often one per currency, so BTC and USDT may have separate addresses), or intermediary addresses used for consolidation, or hot wallets, or cold wallets, or temporary addresses used as change addresses.

Why do we find so many addresses but only around 20 of them are rich?

In general, exchanges tend to have thousands of user addresses, into which users send crypto. Exchanges will then move all that crypto to a handful of hot and cold wallet addresses, which they will then use to process use withdrawals. The majority of addresses will be empty most of the time, unless you happen to check one between the user depositing coins and the exchange sweeping it to a consolidation wallet.


text:
Obtain raw hex transaction data from Transaction-Id (in Rust)
Trying to find some way to make that serialization but I do not know if it is possible. I try bdk or bitcoin crates and I am not able to get anything right. I would like that my function would do the following one:
Add as input the txId (8bb6c7d11f1d67c2e5d8163acdf3367a773d8e31eea94e48090a6ceae5986426) and get back the HEX format of the transaction:
02000000000101727aa4315b4008f5507965ca55bd4a9f5a443b18b5961103ff8f5fabfb15d6ba000000001716001472cdc8f1b9f4e7b957a3dad9031611ab5139d143ffffffff03630000000000000017a914b55fa91d62df13a59988a5e6b939e9bb19d2a58187010000000000000017a9146f30d4172b17685939e0c3c1f51129e5535be35d875a2f0f000000000017a914c9a656017460c2b1a9445c62d8b8b816d843a9ff8702483045022100879c613ccdd7d12476b6a50a4afec76268532e0e707db616b1345bdfb2c1ba18022055c90abe522f4a09a8d935bed145a44afa83146c923cd3e3fe562cb6a4cfda500121029d41c6fef894258983254c6b35700b2f0e3254d25f0544535634ee7a66b0c04000000000

The problem isn't the serializing, that's easy, but where would the library you're using get the transaction data?

Ok, I think I see the problem now! (Im still learning the tx creation theory). I cannot go back to the HEX format because the txId that I have, previously it was applied twice sha256 function and now I cannot go back. So, in that case to get the hex string, first I would need to make a query against some node or some API endpoint?


text:
Password recovery
I have an classic Multibit wallet, but I don't remember the password. I do have 12 words that I wrote down. Is there any way I can open my wallet?

Classic multibit didn't give out 12 words. Multibit hd did though. do you have multibit hd or classic multibit? If you have multibit HD you can restore your wallet in electrum as per this guide.
If you have multibit classic then you need to export the wallet's private keys which requires that you have the password. Since you don't have that you can attempt to brute force it using this script.

You are all right so I'm going to do my best helping you with stop simple steps taken from various sites.
Download the html tool from this site:
https://github.com/iancoleman/bip39
Its not a crime to be extra carefull with such things so On your offline machine access/open/load the 'bip39-standalone.html' file you downloaded from github.

Enter your MultiBit recovery phrase/seed in the webpage next to 'BIP39 Mnemonic'
Choose number of words = '12' (or set the number of words for how many were in your recovery phrase)
Leave all the rest of the entries set to their default
Scroll down to the 'Derived Addresses' section and you should now see a list of addresses that will match the list of addresses in Multibit for your wallet.
Find the address in question and copy its private key.

From here you should open an account in any choosen wallet and import the private key into that wallet - I offer you a good wallet I always used and it is blockchain.info - which is a nice and secure wallet - but that's only my opinion!


text:
Sent Bitcoin to wrong email address on Coinbase.com
I sent some BTC on coinbase to another one of my own email addresses. But I later realized I don't have a coinbase account with this email. The status of the transaction says complete.
Are they gone? Probably.
Or can I create a coinbase account with that email?

I would suggest trying to create an account with that email and see what happens


text:
What will happen when the time field wraps around
I was rather surprised when I read about the bitcoin's block header time field is only 32 bit. Even if it is unsigned (it is) it only get us 68 more years than the Y2K38 problem. What will happen then, will we need to change the protocol? Can we? What would it imply then?
Why at first Satoshi did not put a 64 bit timestamp at first was that intended?

Could the client detect that it's wrapped somehow and just start again from 0, making use of some other data (eg block number) to figure out whether it's a wrapped number or not?

There is no such thing as the block number in the block's header. And at 0 time we are at 1970-01-01 00:00 and computer have no other way to determine the actual date. 0 being lower than the last date no node will accept the block.

2^32 seconds is 136 years. So, this will become a problem in the year 2106. However, even at that point, there are things that we can do to fix the problem.
While it is technically correct that the block number is not encoded in each block header, the block number can easily be inferred. Each block header has the hash of the previous block header. If you follow this back far enough, you'll get to the genesis block. You don't even need to download the entire transaction history, just the block headers.
Okay, so we've got the block number, and the date field. Now, we make a rule that on block 4786000 and all later blocks (which will land at about 2100) the date field will be interpreted to be 100 years later. Block 4786000 will state a date of 2000, but because we made this rule well in advance (we did make it well in advance, right?) all of the clients will know that the date actually means 2100.
Thus, we have bought ourselves another 100 years. On block 9572000, we can do exactly the same thing.

You would then change the version number to make sure anyone will follow that change of date reference...seems nice.

You could, but you don't really need to. The fact that they didn't object to the "earlier" date proves that they are running the new client. And plus, the version field is only 4 bytes, so you'd have the same problem in 100*2^32 years. ;)

First we would change the version only once, as the rule would be fixed at a certain number of block afterwards.

We will need to change the protocol, because if we let things go node will never accept any block past the wrap around.
The protocol can be changed because of the version field but we need a consensus of the most part of the network.
What will happen then? Anything application specific that cannot change the way it works; i.e. all those ASICS (not yet released), will become obsolete because they are made to calculate hash with a 80 bytes header.
But it all is far in the future we will have time to prepare our self.


text:
Where can I store a Bitcoin Wallet Safely?
I am a newbie and I would like to know where can I create/store my Bitcoin Wallet safely. I have downloaded the Bitcoin software but storing it in my local computer seem like a high risk, but also is trusting a third-party.
How do you guys do it?

Here is an in-depth article that explains the steps you should take to secure your wallet. https://en.bitcoin.it/wiki/Securing_your_wallet.


text:
Has anyone ported the Bitcoin software to plain C or Objective C?
I'm not a big proponent of either C++ or Boost. Has there been any attempt to rewrite Bitcoin in plain ANSI C, or maybe Objective C? Thanks.

There is a pure C99 bitcoin implementation called cbitcoin by MatthewLM, forum threads:

cbitcoin - Bitcoin implementation in C. Currently in development.
[ANN] cbitcoin 1.0 Alpha 3 Released.

but it is currently in alpha stage. One of its features is weak library dependency, e.g. it possible to implement cryptography using something other than OpenSSL. As far as I know there is no Objective C Bitcoin implementation.

Objective-C library is CoreBitcoin: http://github.com/oleganza/CoreBitcoin

Please give additional information about the stage the library is in.

picocoin / libccoin available at https://github.com/jgarzik/picocoin