How do I reduce the size of the block chain data on my machine? The block chain file is getting rather large, ~500MB.  Is there a way to trim it or clean up, or maybe configure it to be limited in the future?  I am using the stock Bitcoin client on Ubuntu.

For portable devices there are variants of the Bitcoin client often dubbed "selfish clients" in that they do not download any portion of the block chain other than what pertains to their own specific addresses and transactions. To my knowledge, none of these variants has been fully developed into a desktop client, but it is likely that such projects are underway. Unless your system is literally lacking the hardware to accommodate these files, however, it is recommended that you use a non-selfish client version. The lightweight versions are called "selfish" for a reason - by only holding block chain data which pertains to your own transactions, you cannot pass anything but that data to other nodes and as such your client is of minimal (if any) use to the network.


Transaction is talking very long I sent a transaction from blockchain wallet to localbitcoins.  Keeps saying it should be thirty minutes, and that has been going on 4 and half hours!

It needs 3 confirms and has 0!

Any help advice would be appreciated.

Perhaps it is the receiving wallets problem. Some wallets can take dozens of confirmations, which can take up to 24 hours.


Trouble deriving a BIP 32 Child Key I have a small Python program I'm writing to generate BIP32 keys, including child keys. I've gotten to the point where I can correctly generate a master extended key pair, but I'm not able to correctly derive a child private key and chain code. I've copied my code below:
import hmac
import struct
from hashlib import sha512

def CKDprv(chain, data):
  data = data.to_bytes(33, 'big') + struct.pack('>L', 0)
  return hmac.new(chain.to_bytes(32, 'big'), data, sha512).digest()

def split_key(key):
  length = len(key) // 2
  return key[:length], key[length:]

pub = 0x0339a36013301597daef41fbe593a02cc513d0b55527ec2df1050e2e8ff49c85c2
chain = 0x873dff81c02f525623fd1fe5167eac3a55a049de3d314bb42ee227ffed37d508

digest = CKDprv(chain, pub)
new_prv, new_chain = split_key(digest)
print(f'Chain code: {new_chain.hex()}')

I am using some BIP32 test vectors and trying to derive m/0' from m.
I am deriving a child key with index 0, so I am hashing the parent compressed public key appended with the index represented in 4 bytes.
According to the test vectors, the new chain code I should be deriving is:
47fdacbd0f1097043b78c63c20c34ef4ed9a111d980047ad16282c7ae6236141

but the chain code I receive from my function is:
d323f1be5af39a2d2f08f5e8f664633849653dbe329802e9847cfc85f8d7b52a

I've tried variations such as changing endianness, but nothing seems to get me the correct hash. I know I've probably made a small programming error that is throwing me off completely, and I've been staring at this problem with no progress for a few days now. If anyone can point out the flaw in my algorithm I would be greatly appreciated.

Ended up answering my own question! If anyone else runs into a situation like this, the problem is that the code is deriving a non-hardened child key but checking for the hash associated with a hardened child key. According to the BIP32 docs, to derive a child key you hash the private key prepended with a single zeroed out byte and appended with a hardened index (greater than or equal to 2^31). So in this case, I only needed to swap out the public key for the private key, prepend it with a single 0x00 byte, and use the first child hardened integer 0x80000000 instead of 0x00000000.


Transaction with a high fee keeps getting skipped... Reason why? I was sent a transaction that has been unconfirmed for 3 days now - but the feerate is relatively high (53.8 sat/vB). Blocks have been confirming transactions with lower feerates for days, but for some reason skip over mine. For example, last night there were whole blocks of transactions < 50sat/vB, but for some reason they skipped over mine (ex: https://mempool.space/block/00000000000000000006e91bfcee72653533739b834f56c550405862508883f1).
My Tx: ed45c837d26c25fb6a763708376a87f1875ff57efbb0f56d1b26d00a16c1899e
I also see other unconfirmed transactions with high fees (https://blockchair.com/bitcoin/mempool/transactions?q=fee_per_kb_usd(17..40)&s=time(asc)#) some that have been waiting for weeks.
Is there a technical reason as to why miners are skipping over transactions like these?
Thanks!

$ src/bitcoin-cli getmempoolentry ed45c837d26c25fb6a763708376a87f1875ff57efbb0f56d1b26d00a16c1899e
{
  "fees": {
    "base": 0.00012042,
    "modified": 0.00012042,
    "ancestor": 0.00125452,
    "descendant": 0.00012042
  },
  "vsize": 224,
  "weight": 896,
  "fee": 0.00012042,
  "modifiedfee": 0.00012042,
  "time": 1612178927,
  "height": 668604,
  "descendantcount": 1,
  "descendantsize": 224,
  "descendantfees": 12042,
  "ancestorcount": 2,
  "ancestorsize": 22989,
  "ancestorfees": 125452,
  "wtxid": "ed45c837d26c25fb6a763708376a87f1875ff57efbb0f56d1b26d00a16c1899e",
  "depends": [
    "fb1183fa83759c51bd33d2bad9007804ea44f8256a7ae77f36f4f35a885a05d6"
  ],
  "spentby": [
  ],
  "bip125-replaceable": false,
  "unbroadcast": false
}

Looks like your transaction depends on another unconfirmed transaction, and that transaction is large and has a low feerate.  The combined feerate of the two transactions is only around 5.45sat/vB, which presumably explains the long time to confirm.


Does support HD wallets multi networks? Due to bip 44 list

https://github.com/satoshilabs/slips/blob/master/slip-0044.md

HD wallets support multi coins.

does it mean HD wallets support multi networks? like omni for bitcoin, TRc20 for tron?
what is network role in the HD wallets? I think in the derivation of child for multi coin, nothing, yes? but what about in sign a transaction? is there any difference or all networks are same?

does it mean HD wallets support multi networks?

No.

A Bitcoin wallet can implement BIP-0044 without supporting any cryptocurrency other than Bitcoin.


Is the proposed "Miner Promise" method of accepting 0-confirmation transactions safe? This thread proposes a method for miners to promise "that their next block/s will contain a specific transaction", and/or that "they won't mine a conflicting transaction".

If adopted by a large percentage of miners, this method is supposed to enable "relatively safe" 0-confirmation transactions (well, safer than today at least).

If wildly adopted, could this work?

I don't think it helps much. The biggest real threat is the Finney attack, and the Finney attack is just as big a threat even with such a promise.


Bitcoin Core Network Configuration I am having difficulty loading the full node for my new Bitcoin Core wallet. I use a Mac and share a modem with my apartment complex. I believe a manual network configuration is out of the cards for me. My node stopped loading with 31 weeks to go and I am still waiting to receive my first payment.

Is there another electronic wallet that does not require so much configuration? Also, is it possible to take my key for the expected payment and use it in another electronic wallet?

in over my head.

Add some nodes to help speed it up if it freezes here are a few.

First open bitcoin.conf with notepad or notepad++

Type "addnode " and the ip

Example addnode=66.228.49.201

You can add as many as you feel you will need save it then restart your client and you should be good to go.


Ethereum: Cannot use master password on Ethereum wallet Ethereum. I love the ideas behind it and it's exciting and such... but damn if this isn't the most user unfriendly thing I've ever seen?!

So a while ago, with a view to begin mining ETH on my GPU, I installed Alethzero onto my Windows machine.

Why? Who the hell knows... I waded through a billion overly technical FAQs and got very confused over the twenty-something different versions of what appear to be the same software in different guises, and just went with what eventually worked.

So, when running Alethzero for the first time I was asked to create a master password. I did this, and am still able to access the software with the same password.

I did eventually get mining and all is well...

However, I'd really like some user friendly wallet software that I can actually understand, not dissimilar to the Bitcoin Core client.
Today I came across the (official?) Ethereum wallet Ðapp.

It looks beautiful... I installed, synched and there we are. Accounts, wallets (not certain of the distinction here, but sure, wallets are like... apps, that are a facade for your accounts? Or something?), all with a nice GUI.

Now, as far as I can tell, the wallet is using the same software behind the scenes as Alethzero... right?
If I look in the roaming folder I can see that it's created a file in the keystore folder, alongside one I assume was created by Alethzero.

My issue is this:
I can't send any transactions from the wallet Ðapp, as the password is not accepted.

Now, I never created a password for the wallet Ðapp... indeed the only time I've created a password, was the master password I used in Alethzero. This is not accepeted in the Ðapp, but still works in Alethzero.

I assumed they were using the same data... presumably if I create an account in Alethzero, I will see it in the Ðapp? Is that right?
So, why am I unable to do anything in the Ðapp without a password that is either not being accepted, or has never been created?

I never managed to solve this particular problem, however I'm now using Mist to great effect.

I found that it was possible to move keystore files from one installation to the new Mist installation and use the passwords I originally created with minimal fuss.

So, my suggestion to anyone having similar problems is:

Backup the keystores: %appdata%\Ethereum\Keystore
Uninstall Alethzero (seriously, I still don't understand what the hell that software even is!)
install the official Mist client, which is beautiful and slick, much easier to understand and can be found here:
https://github.com/ethereum/mist/releases

You should then be able to copy your keystore files back over - each seems to represent an account and will have a password attached. Mist will just pick them up when you start - and you'll need the password for each account when you attempt to use it.

Best of luck.


Are the huge transaction fees mostly mistakes or some other market indicator? I am trying to understand why there are numerous days in Bitcoin's history that show huge transaction spikes.  See this blockchain.info chart.

The Jan 10th, 2012 spike is due to a mistake by this guy.  I can't explain the other spikes.

Are these spikes mostly or all due to human error? Or are they some other indicator, possibly market value, global usage or popularity?  Maybe some think that paying a high fee is supporting the network.

The number of transactions can obfuscate the actual worldwide usage due to things like mixing services, automated transactions, spam.  Maybe the fees spent can rule those out and show the global adoption rate assuming those types of transactions would avoid fees as much as possible.

Bonus points if you happen to know what specifically caused any one of these individual spikes.  Having a list would benefit Bitcoin history story telling.

As mentioned, raw transactions are incredibly easy to screw up since you must explicitly pay yourself if you want change.

Here's a few scenarios besides unbalanced outputs which will produce huge transaction (Tx) fees:

forgetting to pay change
forgetting to convert to Satoshis in your code
misplacing the decimal (perhaps due to rounding errors)
swapping the fields using BCI or Bitcoin Core (this used to happen easily)
setting the Txfee variable in the core software on top of the built in Tx fee
a miner could spend time mining the current blockchain plus an additional non-broadcasted transaction with a high fee. If the miner succeeded, it would then broadcast and cause a spike in the graph. The miner wouldn't make any extra money, and it would be wasting time not contributing to a pool.


Why is it difficult to acquire bitcoin? All of the buying guides or suggestions here on bitcoin.stackexchange seem dated and old.

Does anyone have any new methods for buying Bitcoin with a disposable or personal debit card?

It's not illegal to have Bitcoin (I don't think) why is it so difficult to acquire Bitcoin?

It really depends from country to country and card companies:

Countries are enforcing regulations on financial institutions: KYC (Know Your Customer) and AML (Anti Money Laundering) - which when applied to disposable cards make them impossible to use in the same way you can't use them to transfer money to anyone's personal account

Second issue is fraud and chargebacks - as explained here: Why is Bitcoin so susceptible to credit card fraud?

Third issue is TAX. Taxman wants to know how much money you have on your bank accounts and that is impossible with bitcoin, unless they can track transaction when you bought it.

Dutch taxman is asking you to report if you have bitcoins, and in Holland you can buy them using Dutch money transfer system (IDEAL). If you live in England you can buy them from EU bitcoin exchanges/sellers but you need to execute SEPA transfer from your bank which may take few days to clear.


How does Proof of Burn work? I have been trying to make a comparison between PoW, PoS and Proof of Burn. While I understood the other two, I want to know how exactly Proof of Burn helps in attaining the consensus.

One burns coins by sending it to an address where it cannot be spent, is what I understood.

But why would one "burn" the coins? Isn't it a loss for the person burning or getting rid of some coins?
How is the consensus achieved for the next block in the chain?
How is it beneficial in comparison to PoW and PoS?

My apologies, I have read a lot about Proof Of Burn but I am still not able to comprehend.

Attention: Ambiguity!

Note that the term (or abbreviation) "PoB" can be used differently. For example, some cryptocurrencies allow users to get some of their coins for provably burning money in Bitcoin, essentially deriving their values from Bitcoin's value by deriving their scarcities from Bitcoin's scarcity.

Yeah, but what about my question?

The idea behind these consensus strategies should be pretty obvious: Find something that:

is hard to do.
is easy to verify.
enforces a linear history.

PoW is trivial, you know it of course: Find a hash that's smaller than a given value.

PoB can be done in such a way that you send out a transaction which burns some of your money. If you burn the most (possibly combined with other criteria, a lot of proposals factor age of the coins in; not necessarily much of your money), you win. Others will mine (I use the word "mine" because "burn" could lead to confusion.) on top of your block. You, yourself, can take transactions of other miners burning their coins and add them to your block, meaning that you burn their coins if you win. Of course, you need a way of others telling you your transactions. Sounds hard at first, I mean why would they give you transactions to put into your block, burning their money. However, it's pretty obvious why they would to this: It's necessary to tell others about the transactions burning their money in order to propagate their block. So you receive blocks burning other miner's money, try to burn your own money on top of that block's parent, burning that other miner's money, too. If your block burns the most money, you win and get the block reward.

PoS, on the other hand, tries a lottery approach. There is a certain amount of money at stake and the bigger your share of that money is, the higher your chances of winning. It's like lining the coins of everyone up, say, there are n coins in total, all numbered from 1 to n. Then, a random number r ∈ [1, n] is drawn. The owner of coin r wins and gets the block reward and possibly the money the others risked (or it's burned, or something else).

PoS can use PoW to draw that random number. For example, whoever gets the lowest hash h of the previous block + a nonce until a certain point in time gets a minor reward. Then, r := (h mod n) + 1.

Of course, these are just the basic concepts + examples. There are a lot of variations and everyone has an idea which according to them is better than the previous ones. The above should, however, make the differences clear. If it didn't work out to do this in so little text, feel free to ask or read it up in the Bitcoin wiki:

https://en.bitcoin.it/wiki/Proof_of_work
https://en.bitcoin.it/wiki/Proof_of_burn
https://en.bitcoin.it/wiki/Proof_of_Stake


Retrieving an addresses' public key from Pkscript/sigscript/witness Let's use this transaction as an example. In the transcation, address 3GGoy8NoCF62TCAPGidWMU3u1ZrgwmasFt has a pkscript, a sigscript and a witness. It is possible to use any one of these, or some combination of them to retrieve that address' public key?

The output script (typically referred to as the scriptPubKey, but for some reason blockchain.com is calling it pkscript) tells you where to find the public key(s). It depends on the output script used. The public key(s) could be found in any of the three places.
In your example, the output script is a Pay to Script Hash (P2SH) script. This tells us that the script that is actually being executed is found in the input script (typically referred to as the scriptSIg, but for some reason blockchain.com is calling it sigscript). P2SH stipulates that the first item in the scriptSig is another script. In this example, there is only one item in the scriptSig, and that item is a script. This script is a Pay to Witness Pubkey Hash script (P2WPKH). This tells us that in the witness for this input, we should find a signature, followed by the public key. If you look at the witness section, you will see two items, the first is the signature, the second is the public key.
So in your example, the public key is found in the witness. However this is not always the case. It all depends on the various script types. If the output script were a Pay to Pubkey (P2PK) script, then the public key would be found in the output script. If it were a Pay to Public Key Hash (P2PKH) script, it would be found scriptSig. The address could also refer to a more complicated script that has multiple public keys, or no public keys at all. It all depends on the scripts.


How to find BitStamp's Ripple address? I see on the wiki that they're the 2nd Gateway, but don't see anything about it on their site.

Under Withdrawal/Ripple there is a link named "trust this address".

(removed from here the address itself due to a good suggestion: don't trust what is written here, go there and have a look yourself)


How useful is a JavaScript miner? I don't have a great understanding of how bitcoin mining works, but how useful would a JavaScript miner be for collecting revenue from visitors? Stupid question, but if I put the user in as part of a mining pool, must their computer actually find a hash in order for me to make revenue? Is this at all practical?

Javascript has access to OpenGL ES, including shaders, so it has access to programmable parts of the GPU at nearly native speeds. I think that a smart kid might be able to build a fragment shader that does SHA256 hashing, which outputs to the stencil buffer, so that Javascript has a 2-way communication channel with the GPU.

So yeah, you could probably use javascript to mine at really nice speeds. Maybe 70% or 80% of what an OpenCL GPU miner does?

[Edit] oh look, someone already built a fragment shader that does that
[Edit 2] and an actual JS/WebGL application


If bitcoin value is going down do you lose anything or only when you sell like the stock market? If Bitcoin is going down, do I only lose if I sell my bitcoin?
So, if I hold them I won’t lose?

Well basically, think of it as if u had an apple. If you decide at any moment that you want to sell it, you get a specific price for it, which is the current price of an apple.
So if you bought 1 bitcoin when 1 bitcoin was worth 18K USD and sold it at 27K USD you have now a profit of 50% which means that you now have 27K USD as fiat in your hand instead of having 18K (which you had when you bought a single BTC worth 18K back then)
This works the same if you buy it at 27k and sell it at 18k, except, you then lose 33% of your money that you invested in it when you bought it. That means that if you buy 1 BTC at 27K and sell it at 18K because maybe you are scared to lose more, you end up losing 9K because you sold it.
If you don't sell it, you will remain with that 1 BTC the whole time when it's price fluctuates, but it is basically worth more (or less) depending on it's current market price.


How Bitcoin wallets and it's transfer process work? I am very new on cryptocurrencies, and like to understand it's transfer process. I think if I want to buy Bitcoin, I must download a Bitcoin wallet, then find a person who has Bitcoin. Then he/she must transfer that bitcoin from his/her wallet to my wallet. Then I will pay the price either in cash or with credit card to him/her bank account.

After that I can see this Bitcoin in my wallet. OK? But I have some questions:

How many wallets a person can download and use?
If I used a wallet in the above example, then I wanted to change my wallet, should I download a new one and do a transfer from my previous wallet to new one? I mean there is no unique ID for people that they can use it in different wallets to reach one unique account?(Like our stack account that we can reach to it by Chrome, Firefox, Edge, etc, considering the browsers are wallets)
How crypto exchange websites work? If I want to buy or sell 1 Bitcoin, should I pay the money/coin to their bank_account/Bitcoin wallet, and the other person should do that too, then the website will pay it to us? I mean is it a 2-step process or buyer/seller do a direct transfer?

First, a wallet is a software application that usually manages your keys, addresses, and transactions. When someone sends you Bitcoin, it is generally sent to one of the addresses that the wallet software manages. There really is no limit to how many wallet software applications you can run, and not really a limit on addresses either (except for disk space, but that's not really a concern etc.).

Your wallet software should allow you to create new addresses that you can use to receive Bitcoin.

Exchanges work by managing your Bitcoin in their internal wallet software, and you exchange anonymously with others by placing and filling orders on the global order book. The exchange manages the Fiat (dollars) currency exchange internally as sort of an escrow.


Are the transactions displayed on "BitListen" really accurate? Over the years, whenever there's unusual Bitcoin activity, I look at: https://www.bitlisten.com/
But can these transactions really be accurate? I just saw numerous 100+ BTC ones, and just now a gigantic one of 946.92 BTC (!!).
According to my exchange rate calculator, that is:
BTC 946.92 = $22,731,761.52 USD

Almost twenty-three million US dollars... at once?
I realize that a lot of money is being traded right now, but even if somebody has that many Bitcoin to trade, would they really do it all in one go? Isn't that very risk? Wouldn't you split it up into at least hundreds of different transactions?
I don't understand what kind of person or entity would make a single transaction of such a huge sum. Is this really accurate or faked somehow?

Yes it's real. If you don't believe it you can simply look at a block explorer and view many other transactions of similar sizes.


Could cryptocurrency "insurance" slow Bitcoin adoption? Does the concept of cryptocurrency "insurance" undermine the purpose of "being your own bank"? Recently I have seen more Bitcoin related companies offer some sort of insurance for Bitcoins stored in their custody and am concerned with its unintended effects.

Nobody likes the financial losses than result from hacking, but I always thought that the decentralization of control of our own money was one of the primary benefits of Bitcoin.

Education (of best security practices) and the rise of multisignature transactions and decentralized exchanges such as Bitsquare can greatly reduce the need to entrust 3rd parties with your Bitcoin.

Insurance adds cost to the system (negating part of the financial advantage Bitcoin has over Visa and Western union) and encourages trusting 3rd parties with Bitcoin safekeeping (increasing centralization of control) over learning how to safely secure it yourself (retaining full control).

Could cryptocurrency "insurance" slow Bitcoin adoption? If so how can we encourage educational efforts as a better solution. Are regulators or the free market the primary promoters of cryptocurrency insurance?

If anything, I believe the ability to buy insurance on cryptocurrency investments would speed up adoption by making it less risky to traditional investors.  Simply having insurance available doesn't mandate that everyone buy it; we'd all still have the choice whether we opt-in or not.

Traditional investments tend to have insurance policies on the insurance policiy of the insurance policy of the initial investment.  While it's a somewhat yucky business, it's also a standard practice in today's financial ecosystem.  Having these options available for bitcoin only strengthens bitcoin's value proposition and familiarity to traditional investors.


ripemd160(sha256(publickey)) - Where am I going wrong? (Note: I'm using http://www.royalforkblog.com/2014/08/11/graphical-address-generator/ (use "bitcoin" as the phrase for generating the private key)

I'm trying to take the first step in going from a publickey to an address.

For example, if this is my public key:

publickey = 02218AD6CDC632E7AE7D04472374311CEBBBBF0AB540D2D08C3400BB844C654231

This should be the result of the next step:

ripemd160(sha256(publickey)) = 5238C71458E464D9FF90299ABCA4A1D7B9CB76AB

However, when I try to do this in python, I fail to get the same result:

>>> hashlib.new('sha256', '02218AD6CDC632E7AE7D04472374311CEBBBBF0AB540D2D08C3400BB844C654231').hexdigest()
'6e28eefe40e5855ed8cdf0599ec12e52f73a5b222c84ba957b4dcdd2d8a9cf2a'

>>> hashlib.new('ripemd160', '6e28eefe40e5855ed8cdf0599ec12e52f73a5b222c84ba957b4dcdd2d8a9cf2a').hexdigest()
'e607ff4fa71ef33ca357415e3d2f781c4cedacc3'

Where am I going wrong when using sha256 and ripemd160 in my python code?

moshaholo has the right answer, but not quite the right code.

>>> publickey = '02218AD6CDC632E7AE7D04472374311CEBBBBF0AB540D2D08C3400BB844C654231'.decode('hex')
>>> s = hashlib.new('sha256',    publickey).digest()
>>> r = hashlib.new('ripemd160', s        ).digest()
>>> s.encode('hex')
'ea571f53cb3a9865d3dc74735e0c16643d319c6ad81e199b9c8408cecbcec7bb'
>>> r.encode('hex')
'5238c71458e464d9ff90299abca4a1d7b9cb76ab'

Notice that publickey, s, and r are all binary byte strings (because .digest() is being used instead of .hexdigest()). The only reason to convert them to hex-encoded strings is for display purposes. You can display them directly if you like, but it's not pretty....

>>> publickey
'\x02!\x8a\xd6\xcd\xc62\xe7\xae}\x04G#t1\x1c\xeb\xbb\xbf\n\xb5@\xd2\xd0\x8c4\x00\xbb\x84LeB1'


NBitCoin Analyzing Blockchain Maybe this question is utterly stupid, but I just don't get it:
I am doing some POC work to understand the BitCoin network a little better and chose C# and the NBitCoin library as my implementation for it. Now, I was trying to read through the blockchain (with a current version of BitCoinCore installed and running locally on my machine) when I hit an unexpected exception: A transaction hash seems to exist twice in the chain.
The Hash looks like this: d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599
I found it once at the Block 14.11.2010 17:59:48
and then again at 14.11.2010 21:04:51
In both cases the entry is the same, a new coin generation transaction.
Looking the hash up at blockexplorer.com I can find it at 14.11.2010 22:04:51 (they use a diffent date format there, I just converted it to match the others in this post.)

What am I doing wrong here? I mean... I guess that duplicate transaction IDs can happen throughout the chain, after all, they are just hashes, but how would I ever match the spending input to one of those if the Hash I am referencing it to is not unique?

I am really confused here right now and would appreciate good insights.

You aren't doing anything wrong. You just need to be able to handle those duplicate transaction ids. It actually happens a few times before BIP 30 went into effect making such duplicate txids invalid.

These duplicates happen because the coinbase transaction in two different blocks can be exactly the same, so they have exactly the same txid. This is because prior to BIP 34, there was not anything that makes each coinbase transaction unique; you could have a transaction which pays out to exactly the same address with exactly the same amount (the block subsidy) and if you don't set a coinbase string or use an extranonce in the coinbase, you will have two identical coinbase transactions.

To handle the two cases where transaction duplication happens, you should allow an exception to the BIP 30 rule for those blocks. The transaction that those duplicate txids reference when being spent can only be the most recent duplicate transaction. Any prior ones are completely unspendable.


Justification of usage of Blockchain by banks After learning a bit about Bitcoin and Blockchain Technology, I do not understand how any bank is going to use it.

My understanding is that the blockchain is useful in an environment of mistrust. In a closed system, like a bank, different nodes would be wasting computation if they used a blockchain with Proof-of-Work. If they just use the hash of previous blocks to verify the blockchain is never tempered with, without Proof-of-Work, can't any normal database do it much more time efficiently in a closed system (where all nodes belong to bank)?

What are the essential requirements for a problem to justify using the blockchain with and without Proof-of-Work?

Blockchains are best used when there are multiple entities that don't necessarily trust each other. So within one bank, a blockchain really isn't useful. However between bank transfers could use the blockchain. Right now, in order to send between banks, banks use centralized systems (ACH, SWIFT, etc) operated by a third party. With federated blockchains, they can remove most of that third party's involvement and thus save on fees and time. That's really the only good use case for banks using blockchains that I have heard of.


How to determine if transaction is going to propagate? So I am creating a transaction using TransactionBuilder like this:

var builder = new TransactionBuilder();
Transaction tx = builder
  .AddCoins(coins)
  .AddKeys(privateKeys)
  .Send(recipientAddress, Money.Coins(amount))
  .SetChange(changeAddress)
  .SendFees(Money.Coins(fee))
  .BuildTransaction(sign: true);

Boolean verified = builder.Verify(tx);

And then I propagate it to the network like so:

using (var node = Node.ConnectToLocal(network))
{
    node.VersionHandshake();

    node.SendMessage(new InvPayload(InventoryType.MSG_TX, tx.GetHash()));

    node.SendMessage(new TxPayload(tx));
    Thread.Sleep(500);
}

I have two questions:

What does the builder.Verify(tx) even tell us? It returns a boolean, but sometimes I can propagate transactions that returned false. What does verify mean/do?
Since Verify() doesn't really tell us if a transaction will successfully propagate, how do I determine when a transaction made using TransactionBuilder will or won't propagate to the network?

Verify() verifies if the transaction is properly signed.

  Since Verify() doesn't really tell us if a transaction will successfully propagate

It is either untrue or you found a bug.

node.SendMessage(new TxPayload(tx)); should be perfect. However Stratis is currently building a Bitcoin .NET fullnode, with the lead of Nicolas Dorier, NBitcoin's creator, so you should be sure the method they are using is up to date. In their tests, they are doing it a little differently:

node.VersionHandshake();
node.SendMessageAsync(new InvPayload(transaction));
node.SendMessageAsync(new TxPayload(transaction));
node.PingPong();

I cannot explain why two SendMessageAsync and PingPong is there. You might want to figure out.

To make sure you might want to ask some other nodes if they have the transaction in their mempool you are connected to, to check the propagation.
Like this:

bool broadcasted = false;
foreach(var txid in node.GetMempool())
{
    if(txid.Equals(tx.GetHash()))
    {
        broadcasted = true;
    }
}

Alternatively you can ask your node only. I strongly suspect the transaction would not get into your (Bitcoin Core) mempool if there is something wrong, but you should not rely on that. Theory not always mimics practice.

Privacy concerns: if you broadcast a transaction without Tor, interested parties can note it and come to conclusions.


How long do files stay on the Decentralized Data Storage blockchain when using NXT's Data Cloud Feature? NXT 1.7.4 just released a new Data Cloud feature:

How long do files last on the NXT blockchain?

Files and any other prunable data are maintained by all nodes for 90 days by default (controlled by nxt.maxPrunableLifetime in nxt-default.properties). The minimum value is 14 days on mainnet and 24 hours on testnet.

Note that pruning is performed at the same time as derived table trimming, which
by default is every 1000 blocks, so the actual removal of the prunable data
from the database will happen with some delay after their expiration time.

A node can choose to keep prunable data longer, by setting the
nxt.maxPrunableLifetime property to a larger value. Changing this value only affects transactions received after the change. Pruning can be disabled completely by setting this property to -1.


What is the cost of resolving a Lightning channel breach? If someone breaches a Lightning channel (aka tries to spend more than he is allowed to), the other party has to intervene and prove that the coins actually belong to them. This process happens on-chain. How large would such a transaction be? Is it proportional to the number of transactions that happened while the channel was open?

The cost is proportional to the number of committed HTLCs on the channel at the time of closure. Each HTLC has an output in the commitment transaction which pays into either a HTLC-success transaction script or a HTLC-timeout transaction script, depending on whether the HTLC was incoming our outgoing. The commitment also usually has an output to the spender (timelocked) and a regular P2WSH output to the other party of the channel.

Due to both parties needing to agree up-front about the transaction fees involved (in order to sign matching transactions), the protocol works on an "estimated weight", which assumes worst-case sizes for signatures etc.

The estimated weights are broken down in full in BOLT#3, but the key values are

Commitment weight:   724 + 172 * num-untrimmed-htlc-outputs
HTLC-timeout weight: 663
HTLC-success weight: 703

The transaction fee is then the agreed upon feerate in satoshi/kweight * expected_weight / 1000 (rounding down).

Clearly it is undesirable to have a large number of htlcs in flight in case of unilateral closure. There is a technical limit of 453 due to the 10k script limit in Bitcoin, but ideally you will want to use a much smaller number.

With other developments like Taproot, it should be possible to bring these costs down significantly for the most likely outcomes.


Would Bitcoin-Qt ever use an imported private key's public key as a future change address? Let's say I import a paper wallet's private key into my Bitcoin-Qt client.  I then manually sweep the entire balance from that private key to a different Bitcoin-Qt private key/address with a new transaction.

Will Bitcoin-Qt ever send change from a future transaction to the paper wallet's imported private key?

No, only new addresses are used for change.


How does Ripple's exchange work? In Advanced/Trade tab there is a "BTC/XRP" box, and a "change issuer" link.
I have no clue what should I do to post any buy or sell:

I can freely modify the exchange currencies, and only USD/XRP shows me an order form
it has a ripple address near "base currency" / "change issuer", so I guess this means that that address somehow takes care of the USD exchanges?

I'm still clueless about what am I supposed to do to either set up a Bitcoin exchange myself, or to fine an existing one, neither have any idea how this all works.

I am clueless as well but I think that it requires a consensus of people on the network for this to function properly through one accepted BTC address. When we create our own orders no one else can see it unless you are in their trust circle or ripple neighbourhood. So we would have to all use your posted address to trade in BTC. Maybe MtGox sets up a ripple wallet inside the ripple network then we would all flock to their address and use it as a trusted source for the exchange. I could be totally wrong but that is how I poorly understand it. Someone with more technical know how can explain it better I am sure.

Ripple FAQ - Limited Description of Distribute Exchange


How are transactions secured? I'm a programmer and want to get to know more about encryption and how Bitcoin works, but there is not much on the web describing how all this code works. It would help if there was some visual way to describe the concept of how and what its doing.

How can someone send the public key and private key to another computer without giving away the private key? If you didn't send the private key, how would the other computer know the transaction was from you and not someone else pretending to be you?

I have read up on key pairs and have managed to generate a key pair in java. Everyone's example of 'using' key pairs is very vague. How do you "use" the key pair to confirm a transaction. I know you have a private key that signs the transaction and the public key some how confirms the transaction but i don't understand the "how" it is "used" if you send a transaction with your secret key wouldn't that no longer be a secret key? How is the public key confirm the transaction was signed correctly? How can you send your secret key out with out some one using it once they get it? If Bob sends a transaction to Tim would Tim not now have Bobs security key?

I'm very sorry if this question sounds dumb. I'm just having a hard time understanding how you can send some one a transaction and be able to "sign" that transaction and how its confirmed. a lot of posts people are saying its Elliptic Curve Digital Signature Algorithm (ECDSA) but how is it doing all of this.

First of all, nothing is encrypted in Bitcoin, there is no "encryption" involved whatsoever. Cryptography: yes, but encryption: no.

The main aspect of private vs public key signing, is dat you can openly share your public key (that's what bitcoin balances are associated with), and then using your private key you can create a "digital signature" for a transaction spending coins from that public key. Other people can verify if this signature is correct, thus knowing that the transaction was signed by the one holding the private key. But here's the catch: this verification can be done without having the private key.

So essentially, the digital signature algorithm allows you to prove that you have the private key that corresponds to a certain public key, without sharing the actual private key.

And, obviously, neither is there a feasible way to reconstruct the private key from a given public key and a valid signature.

This is called ECDSA or "elliptic curve digital signature algorithm", because the inner workings are based on elliptic curves.

How this all works technically is somewhat complicated, there's some fancy maths involved. If you want to get into the dirty details, here's a good explanation: http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/


What if is there is no solution to a block? Please let me know if I understand something wrong.

Let's say I want to create a new block and verify previous transactions. To do this, I need to:

Choose which transactions I want to include in my block
Calculate the Merkle Root of these transactions
I choose (?) a timestamp where I expect to 'create' this block (Is this a general concensus?)
I start to calculate hashes by concatenating above values and starting at nonce 0, increasing up to 2^32-1
When I find a hash with enough zeros, I announce my proof to the network and collect my fee

There's one problem here: there is no way to guarantee a solution exists. Since I expect mining pool members to all agree what transactions to include and which timestamp to use, it can be possible that for the given block no solution exists.

Of course, other miners also experience this problem. What if all 'big' miners choose blocks which do not have any solution? Could the network stall?

Since I expect mining pool members to all agree what transactions to include and which timestamp to use, it can be possible that for the given block no solution exists.

That is usually not the case. With the stratum protocol which is most widely used, miners have no say as to what goes into a block except for the nonce and extranonce (extranonce is part of the coinbase transaction). So if a given block and all of its nonces result in no solution, the mining pool just constructs a new block with either new transactions, a different transaction ordering, or just a different timestamp and tells the miners to work on that.

As for the timestamp, it does not need to match real time at all. The timestamp just needs to be greater than the previous block's Median Time Past (median timestamp of the last 11 blocks), so the timestamp can be off of real time.

  What if all 'big' miners choose blocks which do not have any solution? Could the network stall?

A miner is not locked into only working on the block that they chose. They can construct another block and work on that. The network does not know nor does it care if a miner had to construct a different block to mine.


What happens to the overall value of Bitcoin when a huge amount of coin is lost? My question is 2 part:
1. How does somebody know that a set of bitcoins is lost? Merely declaring that I've lost my private key and hence bitcoin makes the coins lost?
2. What impact(and why?) would be on the price of bitcoin if I lose a huge amount of bitcoin today? Say 1 billion?

Yes, pretty much the only way to know coins are lost is through someone making the information public by declaring they no longer have access to the private key. Otherwise they would just look like someone who hasn't moved their coins if viewed on the blockchain.
There's actually a limit at the current moment of 21 million bitcoins. So technically losing 1 billion bitcoins is not possible since it's larger than the limit. But taking on the spirit of the question, If someone was to lose a large amount of bitcoin theoretically it should make the rest of the coins more valuable. In practice though I'm not sure it always works this way since in your first question we brought up the notion that confirming lost bitcoin is not easy.


Given a list of buy/sell orders and previous trades, compute a buy/sell price I'm using the Cryptsy API with a bot. So far, my bot's problem is that when it decides it needs to buy or sell a coin (not just bitcoin), I always seem to compute a price that is way too low or high. The data I have access to is:

The currently outstanding buy orders (though a few seconds old and without timestamps)
The currently outstanding sell orders
The previous 20 trades that were executed on the market

From all of this data, is there an existing algorithm to compute a price that will almost always buy or sell? My bot's priority is to have fast trades(like, less than a minute for execution), even if the price is not the best.

Cryptsy themselves compute a pretty good number in their web UI (the default ask/bid price), but I don't see that value exposed in their API. Where does this ask/bid price come from?

For reference, I've tried a few things with little success

Highest buy price/Lowest sell price -- This tends to catch outliers and results in me placing an overly optimistic bid that only one buyer/seller was willing to pay (and because my data is seconds old, apparently somone else picks it up)
An average of 3 lowest/highest -- This had the same problem with outliers
Lowest buy price/Highest sell price -- This is extremely pessimistic and results in me paying ridiculous prices that are unreasonable

How can I compute a good ask/bid price from this set of data I have?

I had been thinking about this lately and haven't explored this option at ALL but I'm thinking out loud here because nobody has replied in 8 days.

So what if you took the average of the top orders 1 - 5, then the average of the top orders 2 - 6, the average of 3 - 7, ect. Out of THOSE orders you then calculated the average again to arrive at your sell point? The process could be repeated as nessecary to find an average of averages that hover around the top of the buy points.

Thoughts?


Does the private key have special mathematical properties? [I read that there are private keys with lengths other than 256 bit. I only talk about 256 bit private keys here. Are other lengths even common and supported by popular wallets like Electrum?]

Let's say I generate a private key privateKey0 using a key generator. Then I choose some number n ∈ [1, 10^10]. Given that privateKey0+n < 2^256, will privateKey1 := privateKey0+n be a good private key?

A good private key of course needs to be valid and as strong as one generated by a private key generator. This does not take into account that one of them being made publicly available can lead to the other one being publicly available. However, using both productively must not weaken their secrecy for the second one to be considered a good private key. So let's assume that their corresponding public keys and the addresses for these are generated and both of them receive some amount of money.

I don't know anything about Bitcoin private keys (but am aware that an instance of the wallet import format is just the result of an easy-to-do operation on a big number as described here). Do they have to have special mathematical properties or can I just choose any number ∈ [2^255, 2^256 - 1] and use it as a private key?

Some websites say that you can just use a random number. Are there any disadvantages to this compared to using a key generator?

In Bitcoin, a private key is just a random number between 1 and 0xFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141. This number is derived from the order of the elliptic curve that Bitcoin uses, secp256k1.

Note that you don't have to have the most significant bit 2^255 set to be a valid Bitcoin private key, any number greater than or equal than 1 will work. Indeed, knowing that the most significant bit is set actually lessens the security of that private key, because it reveals some information about the key. You don't have to use some special key generator, in fact there are even tutorials on how to generate a private key with coin flips. The only requirement of a private key (other than being in the range outlined above), is that it be random (hard to guess).


I must have written my 24 seed words incorrectly, options? I have 24 seed words for a wallet (greenaddress), and also had access to that wallet with a simple passphrase on my machine. I wrote down two backups of the seed words which are identical, yet I must have made a mistake as it isn't working to restore the wallet. This is after my passphrase failed 3 times and was reset which was odd.

Anyway entering it into greenadress tells me nothing except "log in failed". So I downloaded electrum to try and restore there. Entering the words into their text box doesn't allow me to click on "next" with no error warning. There are in fact 24 words so I'm assuming I misspelled one or put one out of order.

What are my options here for most efficiently finding out which it is and regaining access to my funds?

If your old wallet supports the default BIP-0039, you could look up all the words and check them here: https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt

Maybe you wrote "odd" instead of "add" or smth. like this down.


Is reliance on a UTXO Set provided by other users dangerous? One of the largest hurdles in my mind to increasing the number of full nodes operating is the startup cost related to downloading the blockchain.  A similar but less important (in my mind) issue is the amount of disk space required by the full blockchain.

In Would moving a transaction from an old block to a new one allow more pruning? Murch suggested that some assumptions be checked, and I think one of them was my assumption that it would be safe to rely on a UTXO Set provided by other users.  Given the answers to another assumption Murch suggested I check, it seems that the answer is "Not usually," but if there were a standard proof, such as a signed UTXO set or a UTXO Committment in the header, then the answer seems to change to "Yes!"

In any case, Murch suggested that the assumptions be checked, so I've created this question to check that one.

First, you can validate the utxo set for the most part using SPV proofs. Essentially, that would mean you need the 80-byte block headers from every block (currently 410,000 or so, which means a 32MB worth of headers) and every transaction in the utxo set can carry a merkle proof for the block that it was published in, which can help you validate the set. So getting a UTXO set along with the merkle proofs for each transaction would at the very least have some decent promises of validity.

Second, it's possible the UTXO set that someone else gives you can be either missing certain UTXOs or otherwise be sending spent transaction outputs. In that way, it's possible for another user to fool you about the UTXO set being complete.

Third, the danger in getting a UTXO set from someone else is that you compromise your own privacy. This is fine for a lot of people (those who use SPV wallets, for example), but it may not be for you.


How can I brute force guess the passphrase for a Bitcoin Wallet (Andreas Schildbach) backup file? I have a 2013-2014 240-byte wallet backup file from Bitcoin Wallet (by )Andreas Schildbach). I generated the passphrase using a pattern of two English proper nouns and 1-2 numbers.
I cannot positively say I know the proper nouns, or the capitalization. I do not know the overall length. am not positive the numbers are adjacent in the passphrase.
I am aware of Hashcat generally, and have done basic attacks on this passphrase using my best guess wordlist and standard wordlists. What are some more advanced technique ideas I can apply to this?

the chance is very low. unless you have clues. brute force is not a way to get back your password. the time cost is very high. if you have many btc in the wallet. then you can try it. but the chance is too low.


settling timelocked contracts based on amount of time elapsed in Lightning network Suppose in a payment route A->B->C, A desires to pay 0.01 BTC to C. It locks in 0.01 BTC with B in the HTLC having timeout period of say 2 days and B locks 0.01 BTC with C in HTLC having timeout period of 1 day. Now can something like this be done that if C delays in revealing the preimage say takes 1/2 day, then it gets 0.005 BTC and 0.005 BTC is returned to B. Can the contract support such dynamic settlement of payment based on amount of time lost? In the worst case, if C doesn't respond then B gets back full 0.1 BTC.

Such a functionality is currently not implemented and as far as I understand not intended. You can look at Discreet Log Contracts which where intended to solve CFD (Call for difference) contracts for example with cross asset swaps and changing exchange rate within the timelock period. We have a proposal how they could be transfered to lightning. That being said this would mean severe protocol changes and also computation of many signatures. Yet I think a similar construction could be applied for your usecase.


Does synchronization takes such long time for first time or every time when syncing? My internet bandwidth is around 10 - 20 KB/s. If I could sync with it for the first time then no problem. If I should need to sync it every time when opening it then it's really a big problem for me.

The initial sync only needs to happen once, launches after a full synchronization will just catch up on the data that you've missed.


Is there a way to provide the walletpassphrase to bitcoind without exposing it on the cmdline? With bitcoin 0.4.0 I have encrypted my wallet. Now when I would want to use bitcoind, the only way to send money is to provide my wallet decryption key on the cmd line first. I do not want to do that as my password will show up in the shell history.

Is there a way to let bitcoind ask for the wallet passphrase?

Anything you can do from the command line you can also do from the JSON API which means that the same unlock command could be sent from within code just as easily. To my knowledge there is no pre-built utility capable of this, but the API is simple enough that I can't imagine it being terribly difficult to actually build such a tool.

Edit: It was much easier than expected to do this in Python. Assuming you have Python's JSON-RPC module installed just use this code:

from jsonrpc import ServiceProxy
from getpass import getpass
access = ServiceProxy("http://127.0.0.1:8332")
pwd = getpass("Enter wallet passphrase: ")
access.walletpassphrase(pwd, 60)

Similarly you could call access.walletlock() to lock the wallet on demand and walletpassphrasechange(old, new) to change the passphrase without ever having it see the command line.

Edit 2: I also submitted an issue to the devs on github on your behalf.

Edit 3: A pull request containing my python scripts has been accepted. Downloading the bitcoin source from github now includes scripts for this purpose in contrib/wallettools

Edit 4: A new bug report was filed to request that the builtin command behaves properly.


How can I make this PHP merkle root script recursive? I've been trying to write my own merkle root script in PHP to help with my own understanding, but I've always struggled with recursion.

I've managed to write the function that will hash pairs of TXIDs, but I don't know how to make it keep calling itself so that I end up with only one hash left in the array.

http://pastebin.com/1C6sSbeE

Your script was a good attempt at this! I modified made it recursive with some very small changes.

Typically when designing a recursive function, it checks whether the state represents a complete computation, otherwise it runs some code and calls itself again. Your function was missing this part.

It also seemed to be computing the hashes incorrectly - the hashing operation is SHA256(SHA256($pair)). I refactored out the function binFlipByteOrder(), which only works on binary, so we can flip the hash before rendering it as hex.

<?php

function binFlipByteOrder($string) {
    return implode('', array_reverse(str_split($string, 1)));
}

function merkleroot($txids) {

    // Check for when the result is ready, otherwise recursion
    if (count($txids) === 1) {
        return $txids[0];
    }

    // Calculate the next row of hashes
    $pairhashes = [];
    while (count($txids) > 0) {
        if (count($txids) >= 2) {
            // Get first two
            $pair_first = $txids[0];
            $pair_second = $txids[1];

            // Hash them
            $pair = $pair_first.$pair_second;
            $pairhashes[] = hash('sha256', hash('sha256', $pair, true), true);

            // Remove those two from the array
            unset($txids[0]);
            unset($txids[1]);

            // Re-set the indexes (the above just nullifies the values) and make a new array without the original first two slots.
            $txids = array_values($txids);
        }

        if (count($txids) == 1) {
            // Get the first one twice
            $pair_first = $txids[0];
            $pair_second = $txids[0];

            // Hash it with itself
            $pair = $pair_first.$pair_second;
            $pairhashes[] = hash('sha256', hash('sha256', $pair, true), true);

            // Remove it from the array
            unset($txids[0]);

            // Re-set the indexes (the above just nullifies the values) and make a new array without the original first two slots.
            $txids = array_values($txids);
        }
    }

    return merkleroot($pairhashes);
}

$txids = array(
    'AB7ED423933FE5413DC51B1041A58FD8AF0CD70491B1CE607CB41DDDCE74A92B',
    'C763E59A79C9F1E626DDF1C3E9F20F234959C457FF82918F7B24E9D18A12DB99',
    '80EA3E647AEEF92973F5414E0CAA1721C7B42345B99ED161DD505ACC41F5516B',
    '1B72EEFD70CE0A362EC0CB48E2213274DF3C55F9DABD5806CDC087A335498CD3',
    '23E13370F6D59E2D7C7A9CA604B872312DE34A387BD7DECA2C8F4486F7E66173',
    '149A098D6261B7F9359A572D797C4A41B62378836A14093912618B15644BA402',
);

$txidsBEbinary = [];
foreach ($txids as $txidBE) {
    // covert to binary, then flip
    $txidsBEbinary[] = binFlipByteOrder(hex2bin($txidBE));
}
$root = merkleroot($txidsBEbinary);

echo bin2hex(binFlipByteOrder($root)) . PHP_EOL;


Electrum issue restoring via seeds I have an electrum wallet on a server

I use 'electrum getseed' and the 12 word seed is returned.

Then on a separate local machine I restore the wallet with the seed.

No funds available.

Any thoughts on what might be causing this.

Edit:
It looks like the local electrum wallet is not loading addresses that the server created outside the gap limit with --force. Any ideas on how to make local machine load these

Note: Wallet has under 2$. Could this be a 'too little btc issue'

Note: Tried seed on Exodus, says 'Invalid Key'

It looks like the local electrum wallet is not loading addresses that the server created outside the gap limit with --force. Any ideas on how to make local machine load these

Increase the gap limit. Go to view menu > show console, switch to console tab and enter this command:

wallet.change_gap_limit(100)

Then wait for the balance to update in the bottom left corner. If that doesn't do it try a slightly larger number.

Also note that you have to be using a recent version of electrum. Old versions don't sync anymore so make sure you are using the latest version from electrum.org. A version that doesn't sync will not reflect an accurate view of your wallet.


What do these memory configurations in debug.log of BitCoin Core represent? In the debug.log file of BitCoin Core, the cache configuration is described as follows.
Cache configuration:
  Using 2.0 MiB for block index database
  Using 8.0 MiB for chain state database
  Using 441.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)

What is the 8MB cache space allocated for chainstate database here used for? What is the difference and connection between it and the in-memory UTXO set?

The block index and chain state databases are LevelDB databases. LevelDB has its own caching and cache management. So 2 MiB is being allocated for the block index's LevelDB database cache, and 8 MiB is being allocated for the chain state's LevelDB database cache.
However Bitcoin Core does additional caching by itself, particularly for the UTXO set, which is stored in the chain state database. So Bitcoin Core is also allocating 441 MiB for itself to manage a cache of UTXO set entries.
The difference is that LevelDB will organize its cache differently from Bitcoin Core's in-memory UTXO set because LevelDB is a database system. So it is optimized for data handling and has a strategy that is generalized to all kinds of database uses. However Bitcoin Core knows what data it is putting into the database and so it can cache that more effectively. It caches the data before it needs to be serialized and written to the database. Because Bitcoin Core knows how the data will be used, it's caching through the in-memory UTXO set can be optimized for the actual use cases.


Can I use Ripple to keep track of loans to friends? Say I already lent EUR 100.00 to a friend, in cash, quite informally. Can I use Ripple to keep track of it? If so, how?

I guess I need to get him sign up at ripple.com (or get another Ripple client).

Then I grant him > EUR 100.00 trust.

Then he can just "send me" EUR 100.00.

Is that all? Or is there anything more to it? Does my friend need trust from anybody else in Ripple in order to be able to do that?

Yes, Ripple is created precisely for such purposes. Both you and your friends need some small balance in ripple first to "activate" your accounts. After that, you need to grant your friend trust for at least the amount he will owe you, and then he needs to send you money. After that, you will see a net positive amount on your account, and they will see a net negative amount.

If you don't trust your friend with the money but you are connected through a web of trust, there is still a possibility of them sending you money. The transaction will appear from them, but your balance will show some other friend owes you money, and in part your borrower will owe them money.


How to use `scantxoutset` Looking to fetch the UTXOs for a given address and can't seem to find the correct command syntax.

Here is an implementation in bitcoin-core via javascript, but I also experience the same on bitcoin-cli

const descriptorAttempts = [
    '{ desc: addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo) }',
    '{ "desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" }',
    '"desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"',
    "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)",
    "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)",
    "addr=34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
    "34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo",
    "{ addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo) }",
    "{ addr: 34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo }",
    "{\"desc\": \"addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)\"}",
    '\"{\"desc": \"addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)\"}\"',
    '"{"desc": "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"}"',
    '"{"desc": "addr("34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo")"}"',
    '\"{\"desc": \"addr(\"34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo\")\"}\"',
    '"desc" => "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)"',
    '[ "desc" => "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" ]',
    { "desc" : "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" },
    { desc : "addr(34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo)" }
]

descriptorAttempts.forEach(attempt => {
    client.command('scantxoutset', 'start', [ attempt ])
    .then((res) => {
        console.log("Success! ")
        console.log(res)
    })
    .catch((error) => {
        console.log("Failed attempt of -> " + attempt)
        // console.log(error)
    })
})

All result in RpcError: Invalid descriptor

You are trying to use a mainnet encoded address on testnet. That is not valid. You need to use a testnet encoded address.

The testnet form of the address you are trying to use is 2MvX28fMpoipKxqaxo6pN1CH4QjB5t9qpr8.


What are all the small transactions in Satoshi's address? I read that Satoshi never moved or spent his coins, so I expected to see his address stay unchanged since mined. But it looks like there are lots of small transactions: e.g. in the first address there are more than 1000 txs, and in the second address, there are about 65. What are those for? Who made them and why?

Of course, because Bitcoin is (mostly) anonymous, we can't know for sure who has been sending these, let alone their reasons.  But some guesses:

People donating money to Satoshi, since it's known to be his address.
Mistakes.  Satoshi's address is commonly used as an example in guides for creating transactions, etc, and it could be that some people copied the example and forgot to change the destination address.
Attention.  I saw some transactions with attached OP_RETURN messages, e.g. this one (see under "Output Scripts" near the bottom).  By sending to a well-known address, there is a better chance that curious people like you will stumble upon the transaction and read the message.
Just for lols.
There are altcoins and other protocols that rely on "burning" bitcoins by sending them to a well-known address with no known private key.  A variant on this would be to send the coins to Satoshi.  Either he eventually spends them (so it becomes a donation) or he doesn't (so it's a burn), but either way the parties involved probably aren't getting the coins back.  I haven't seen this variant in practice but it's conceivable that someone has tried it.


can there be a normal wallet that is equivalent to a multisig wallet? for a normal wallet : if you own the private key you own the money
can we say that the multisig wallet is just a normal wallet which the private key was derived from others wallets ?

the multisig wallet is just a normal wallet which the private key was derived from others wallets

That's pretty much exactly what it is. A multisig address lists the public keys that are allowed to spend the coins, and how many members of the group must sign (for instance, you can require 2 of 3 signatures). As long as enough private keys are accessible, the funds can be moved.


Is there a fixed total amount of Bitcoin cash? As I understood from Nakamoto's original bitcoin proposal, the bitcoin algorithm was designed in such a way that there would be a fixed total number of bitcoins and that bitcoin is designed for microtransactions. Therefore, once all of the mine-able bitcoin has been mined, no new bitcoins will appear in the system. As the value of bitcoin increases, people will simply trade smaller and smaller fractions of the original fixed number of bitcoins.

Is this true with Bitcoin Cash? Is the only difference between Bitcoin Cash and the original bitcoin a larger block size?

Is this true with Bitcoin Cash?

Yes, the same.

  Is the only difference between Bitcoin Cash and the original bitcoin a larger block size?

There's one more difference: Bitcoin Cash uses BIP-143 to solve the quadratic hashing and to add replay protection. (BIP-143 is also enabled by SegWit on main chain.) (the formula is hashType | SIGHASH_FORKID (0x40) while it's hashType | SIGHASH_FORKID (0x40) | 79 << 8 (20,024) on Bitcoin Gold)

As @jnewbery said, transactions are now being signed differently, and there's an emergency difficulty adjustment algorithm that makes difficulty lower by 20%, if the blocks come too slow. (More info about it here)

UPDATE November 13 A hardfork has occured. EDA was disabled and a new difficulty adjustment algorithm (cw-144) came. Also the 3rd person malleability (a.k.a. transaction malleability) is fixed. More info: https://www.bitcoinabc.org/november or https://github.com/bitcoincashorg/spec/blob/master/nov-13-hardfork-spec.md


Is RSK going to be implemented on bitcoin only? Is RSK going to be implemented on bitcoin only ? The other hard forked bitcoins, i.e. bitcoin cash, bitcoin gold, B2X, bitcoin diamond will not have RSK implemented on them, am I correct ?

That would depend on the devs of said fork. (And the devs of RSK aswell probably)

I for one have not really looked into who supports what, but a quick google search hinted me that Bitcoin Cash for example, (https://twitter.com/viabtc/status/896016235816562688) might have interest in implementing RSK aswell.

I wouldn't be so quick to argue that this couldn't / won't be implemented in other bitcoin forks.


Are HD wallets, with multiple hierarchies, supported across all crypto-currencies? Suppose I want to create an arbitrary tree deriving from one master secret, with an arbitrary structure, with some branches being arbitrary different crypto-currencies (e.g. BTC/ETH/XRP/...).

Is this always possible? Are there any currencies that won't be supported by such a private key generation scheme?

As long as they utilize a form of public key cryptography, I think the answer is yes. My understanding is that BIP32 was meant to be a standard for Bitcoin, but not the only possible implementation of a hierarchy structure for deterministic key pair generation. The examples given in the standard are, however, specific to elliptic curve used by Bitcoin:

  we will assume the public key cryptography used in Bitcoin, namely
  elliptic curve cryptography using the field and curve parameters
  defined by secp256k1

This means that it would work for other types of public key cryptography, though you may have to tweak the generation functions for different size keys (other than 32 bit private keys and 33 bit compressed public keys). Of course the security of the arbitrary scheme depends on the design, but that wasn't what this question was asking.


how to get unspents of an address using bitcoind? I am using bitcoind. I have gone through the json-rpc api's.

listunspent [minconf=1] [maxconf=999999]    version 0.7 Returns array of unspent transaction inputs in the wallet.

listunspent method gives an unspent transaction inputs of the addresses in the wallet.

I want to get an unspent transaction inputs of one particular bitcoin address which are currently not part of our wallet. Could anyone tell me how to get that?

You should send your addresses as following:

bitcoin-cli listunspent 0 9999999 '["1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg","1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP"]'


Are there any altcoins that have tried a contentious hardfork? I've been trying to find out whether any altcoin community has attempted a hardfork without consensus before.

What happened?
Can you point me towards an account or analysis of such an attempt?

Only example that comes to mind is Elacoin. Steve Sokolowski covered the fork in his forum post on the block size increase debate:

Everyone can veto the change
A common misconception about this block size increase is that miners will make a decision about whether the change is accepted or not. Miners only have the power to prevent a hard fork, but they cannot force its acceptance even if they mine new fork blocks.
To see why, consider the story of Elacoins. Elacoins were a proof-of-work altcoin created several years ago. After some initial interest, activity declined until there were no more development updates, and difficulty plummeted. However, after about six months, a new developer came onto the scene and decided to fork Elacoin to be proof-of-stake. He released a new version with great fanfare and many future stakers arrived to use the new coin. He set a date in late 2014, at which the chains would diverge. In anticipation of the upcoming change, volatility increased and trading volume rose dramatically.
Exchange Cryptsy, seeing the trading volume, had no reason to make any change to its market, and CEO Paul Vernon ignored customer support tickets from the new Elacoin developers. As price rose in anticipation of the fork, difficulty also rose. The date of the fork came and went, and price continued to rise - but Cryptsy did not upgrade its daemon. As a result, mining continued on the old fork. Huge buy orders of 5+ bitcoins appeared. A large group of people continued to stake the new fork, but the only people who actually mattered - Crypsty, ignored their tickets. Eventually, the hard fork was declared a failure and Elacoins continued to be traded and mined using the old fork, despite almost every user, developer, and staker wanting to use the new fork.
This story demonstrates that exchanges, not miners, will also decide whether to accept any proposed changes. In fact, almost anyone can veto a hard fork. Just 20% of miners can decide not to mine the new blocks, and the fork fails. Just one massive exchange (Coinbase, or the Bitcoin Investment Trust) can continue trading the old fork, and the fork fails. A few of the richest coin owners, like Tim Draper, can decide that they will continue to make their bitcoin investments on the old fork, and the fork fails. Big merchants like Overstock and Microsoft announce that they will only accept the old fork, and the fork fails.
Miners do not have the final word, or even a significant choice, in whether the fork succeeds. There are several lessons to be taken from the Elacoin story: first, miners like Slush and Luke Jr. do not have the power to cause this fork to happen, only to block it. Second, exchanges are more important than miners in whether the fork succeeds or not. Third, a bare majority of people accepting the fork is not sufficient for it to happen, since the default decision is to fall back if it looks like there is even the slightest chance of failure.


Deleted wallet and missing coins Sequence of event:

a) backup of wallet created
b) created new receiving address
c) coins tranferred to new address
d) wallet deleted

I've restored the wallet from (a) - but it does not have the address (created in b) I'd transferred the coins to. Can I assume the coins are now gone?

Thanks!

Coins are gone when you can't recover your private key.

If you have used a non hd wallet (and i think you did), you can check if your bitcoin wallet supports keypools. Keypools are a set of pre-generated keyprairs (pub/privkey) which can be used when a new key is required. Because generating a key (non HD) in a encrypted environment needs to unencrypted (you would need to enter your password), keypools make sense in non-hd wallets.

With keypools (and i think you used a non-keypool wallet) there is a chance that your receiving address's private key – which you used after you created your backup – is still on the disk.

Last chance you have is to try to recover your deleted wallet file. Therefore best you could do, stop using/writing on the disk where your wallet was stored. Filesystems mostly don't really delete files (write the bits to 0), they mostly just allow other data to be written in that space. Because of that, you can use undelete software to try to extract deleted data from your disk. You should try to tell your undelete software, how your lost wallet file does look like (files magic, file structure) and this could be hard and probably requires a professional.

There are always chances to recover data and i hear of people successfully recovering data from physical damaged hard drives (fire, etc.). It always depends on how valuable the lost data is/was. A data-recovering in the laboratory can cost around 1000USD.

Next time it's maybe worth to use a HD wallet. During the creation process you can write down the master seed (sometimes a hex string, sometimes a wordlist, depending on the wallet).
If using HD, this master seed technically allows you to recover all your possible private keys.


Do all private keys that are resolved to the same address give access to the bitcoins on this address? The algorithm to get the public key and the address from a private key consists of a few steps.

Which of the intermediate keys is used to sign transactions with?

Ultimately, there can exist two different private keys that resolve to the same address or public key. Can both be used for signing transactions spending outputs assigned to that address?

Yes. And it's pretty easy to understand why, without even mentioning anything about the underlying technologies.

A bitcoin: URL only contains the address of the recipient. The address does not need any previous transactions in the blockchain to resolve to a public key, so we can deduct that a bitcoin URL has the full public key.

When you spend bitcoins from an address, all that is publicly known is the public key for that address. And since we just established that the address is basically the public key, we can conclude that any private key that resolves to a certain public key will have access to that address.

In other words: when you send BTC to an address, all the client knows is the address where it's going, which means that it cannot store anything else about the recipient (since it doesn't know anything else). Since only the address is stored, any private key that resolves to that address will have access to the bitcoins.

It should be pointed out that not all transactions are sent directly to an address, and there are exceptions to my logic here. But for 99% of all transactions the above applies


Why aren't balances appended to transactions? As far as I know, you need to travel back through the entire blockchain to verify your balance. Surely adding the balances of the sender and receiver to each transaction would be easier? If balances are included, and after 6 blocks a transaction is considered 'final', why then can we not just go back 6 blocks and look at the balance there for verification, instead of travelling all the way back to the genesis block?

First, blockchain space is at a premium, since every node has to store the whole thing forever.  So in general it is better not to store redundant information in the block chain, and to let each node compute it instead.

Second, the "balance" in an address can be affected by multiple transactions which are not necessarily ordered with respect to one another.  Suppose that address 123abc initially has no incoming transactions, so its balance is 0.  Now suppose that Alice decides to send 1 BTC to that address.  So by your logic, her transaction should show the "final balance" of the address as 1 BTC.  Simultaneously, and with no knowledge of what Alice is doing, Bob sends 2 BTC to that address, and so naturally his transaction shows the final balance as 2 BTC.  But the "true" final balance is 3 BTC, so both of their statements as to the final balance are wrong.  So anyone who wants to know the true final balance has to calculate it themselves anyway, and can't rely on the numbers in the transaction.

To make this work at all, you would need some sort of rule that you can't send more coins to an address until the previous transaction has some number of confirmations.  This would be completely impractical for addresses which are supposed to receive lots of incoming transactions (think of a donation address on a popular website).   It would also mean that an attacker who knows your address could prevent you from receiving an important transaction by sending you lots of tiny transactions which would have to confirm one by one.


Bitcoin wallets- question about control and centralization Community,

Just a quick simple question very important for me to understand about the security of wallet types.

Are there bitcoin wallets which can shut down and block/freeze/control your bitcoin transactions in any way shape or form?  I know that direct stealing of coins is not possible (at least not with any "decent" wallet). But what I like to know is if there are wallets or an entire "category" of wallet types, which could "interfer" or "block" transfers/transactions. Not stealing  but just blocking.  Could you please for example name one or two so that I can do more research on such wallets?
Can you reference some wallets which, from technical standpoint, have guaranteed not any (given any circumstances) way to "block" your btc transactions?

Basically I want to know what wallet (types) to use so that the wallet provider can never block my transactions.  I know that the bitcoin core wallet/main btc software would solve my question. But please disregard this, I like to ignore the option of running own btc node/btc software.

Thank you

Largely, this question boils down to one thing: does the wallet software let you control the private keys for your coins? Or not?

If the wallet does not let you control your own keys (ie a custodial wallet), then it is up to the custodian to craft and publish your transactions. Obviously, this gives the custodian ability to censor your transactions at will.

If the wallet does let you control your private keys, then you have the material needed to craft a transaction (the key itself). Perhaps a developer could code a wallet that refuses to broadcast some certain type of transaction, but if you own your own keys, then you are free to import those keys to some other wallet software, and create the transaction as per normal. Only by withholding your keys, could a wallet truly censor your ability to publish a transaction to the network.

The only way to 100% verify that a developer has not created a malicious wallet is to review the source code yourself, and then build the wallet from it. This is obviously very intensive, and so perhaps the next best thing to do is to use well-known and well-reviewed open source software.

If some software was found to be censoring transactions, then I would expect that the Bitcoin community would make this known, and that software would no longer be recommended for use.


Multibit HD shows confirmed transactions as unconfirmed My entire balance in MultiBit HD appears as "unconfirmed". MultiBit HD does not allow me to send them to another address, so they are "stuck". When I click on the individual transactions under "Payments", the pop-up window says "Unknown transaction status". These transactions are more than a year old, and they seem to exist and be completely valid on blockchain.info (see for example this transaction.

I have already tried the "Repair wallet" option, but it has no effect. I have also tried using accelerators as described in this question but also without effect. Likewise this question is not helpful since it is about the generel speed of confirmations - my problem is related to MultiBit HD where my balance is unconfirmed even though the transations are confirmed on blockchain.info.

How can I get my bitcoins back?

Multibit HD is end of life software so you should migrate to Electrum. The MultibitHD developers themselves advised users to do that. Here's a detailed guide.


Can Circulating supply decrease? Looking at the historical data of Loopring, I noticed something strange.

On Jan 4, Market cap was $163,805,000 and closed price was $0.65. That means, circulating supply was around 252M.

On Jan 5, closed price increased to $1.03 BUT market cap decreased to $41,138,000. And this means, circulating supply went down to around 39M.

Shouldn't Market Cap increase when price increases?

Can circulating supply decrease? or is there something that I am missing?

Shouldn't Market Cap increase when price increases?

It depends. MarketCap = circulating supply x unit price

Giving : MC=10, CS=10, UP=1

Example of an increase in MC : MC=20, CS=10, UP=2

Example of steady MC : MC=10, CS=20, UP=0.5

Example of a decrease in MC : MC=5, CS=10, UP=0.5

  Can circulating supply decrease?

Yes circulating supply decrease, especially in centralized coins(controlled by individuals or corporations)

Example : Ripple decided to lock a huge number for XRP in mid 2017 which lead to unit price increase


How to find wallet details with bitcoin address? I have send my bitcoins thinking that it's the address of which I am currently using the wallet after the transaction was confirmed and I didn't receive the credit then I realized that I've sent my credits to a wallets I don't remember anything about. I forgot the name of the wallet  and I don't remember any others details about it.Now I only have is address.If there any way to find the details or another piece of information about my problem that u know about please let me know

The only way to access bitcoins on a given address is by remembering the private key of that address. There are several ways of encoding those (WIF, Base 58, etc).

Also, maybe you have access to the seed of a wallet from which you can regenerate the private address, that could be in the form of a mnemonic phrase (12, 24 words or such)


Bitcoin core RPC FEE I want to use BitcoinCore for the RPC requests from the site. But I could not find anywhere else how to ask a commission for withdrawal.
 In the instruction there is only:
 sendtoaddress: bitcoinaddress amount comment comment-to - there is nowhere to cover the commision.
 settxfee: amount - it is assigned to the entire account, not to a specific transaction.
How to implement the conclusion with a manual commission?

If you want to set the transaction fee manually, then you will need to use the *rawtransaction commands. Those commands give you full control over the inputs and outputs so you can set the fee accordingly (since the fee is the difference between the inputs and outputs).

You can create a raw transaction with no inputs and no change output using createrawtransaction. You do so like this:

bitcoin-cli createrawtransaction '[]' '[{"<address>":<amount}]'

where <address> is the address you want to send to and <amount> is the amount you want to send. You can then take the resulting raw transaction and use fundrawtransaction with it to get inputs and a change output if necessary. fundrawtransaction allows you to set the fee rate. So if you wanted a transaction with a fee rate of 0.0001 BTC/kB (10 satoshis per byte):

bitcoin-cli fundrawtransaction <raw tx> '{"feeRate":0.0001}'

The funded transaction is the one in the hex field of the output of that command. You sign this with signrawtransaction and then broadcast it with sendrawtransaction.


How do I see what version of bitcoin core my wallet uses I use the multibit wallet which I understand doesn't download the whole bitcoin core i.e. the entire block chain, but it must use the bitcoin core protocol right? So how do I see which version of the protocol my wallet is using?

In the Multibit data directory, there is a file called log/multibit.log. When you connect to a peer, it will write something like this to the log:

20:01:26.124 [bitcoinj user thread] DEBUG o.m.c.b.BitcoinPeerEventListener - Connected to peer:
client version: 70002
local services: 1
time:           1424228484
my addr:        [xx.xx.xx.xx]:51127
their addr:     [xx.xx.xx.xx]:8333
sub version:    /Satoshi:0.10.0/
best height:    343977
delay tx relay: true

The 'sub version' field contains the version in a human readable format. The 'client version' field contains a machine-readable protocol version.


CGMiner Problems (low kh rate) I have a Nvidia GTX 765 GPU, over clocked with a core KH rate of 850 (give or take a few).

When I run CGMiner, everything works fine except I have an extremely low KH rate (8 or 9 KH).

My configuration is standard, besides adding --scrypt because I'm mining LTC.

This isn't the first time I've had problems with CGMiner (gave up entirely on LTC before because of such problems) and I can't find any fix to this. The only problem I could think of is that it is using my integrated GPU, considering it claims to be using "GPU/Thread 0"

Does anyone know what the problem is? Thank you.

Read this:
https://github.com/ckolivas/cgminer/blob/3.7/SCRYPT-README
In particular:

--intensity XX (-I XX)
Just like in bitcoin mining, scrypt mining takes an intensity, however the
scale goes from 0 to 20 to mimic the "Aggression" used in mtrlt's reaper. The
reason this is crucial is that too high an intensity can actually be
disastrous with scrypt because it CAN run out of ram. High intensities
start writing over the same ram and it is highly dependent on the GPU, but they
can start actually DECREASING your hashrate, or even worse, start producing
garbage with HW errors skyrocketing. Note that if you do NOT specify an
intensity, cgminer uses dynamic mode which is designed to minimise the harm
to a running desktop and performance WILL be poor. The lower limit to intensity
with scrypt is usually 8 and cgminer will prevent it going too low.
SUMMARY: Setting this for reasonable hashrates is mandatory.

The author of the above is also the author of cgminer, so it is worth reading.  My results immediately improved with this:

./cgminer --scrypt --intensity 20 --auto-fan --gpu-powertune -10
-u hnaparst.1 -p password -o stratum+tcp://pool1.us.multipool.us:7777


Do physical bitcoins or altcoins actually carry value? This question establishes that there are physical bitcoins that can be bought and I recently just bought a physical Dogecoin as a trinket but I can't help but wonder if there's a solid value related to these coins.

Bitcoins can be found for 1, 10, and 25 BTC and I just bought my Dogecoin coin for 10 USD (18947 Doge after shipping and handling). If someone were to hold onto these coins for years and attempt to sell later on, what would they be worth? Is a 1 BTC coin always worth 1 BTC or, like a collectible, is it only guaranteed to be worth what somebody will pay for it?

I know it's not officially backed or anything, but is it reasonable to think that if I bought it for 1 BTC that somebody else would pay me 1 BTC for it later even if the value of BTC changes?

The place you bought from, ShibeMint.com, sells nothing more than keepsake tokens.  They are made of copper or silver and are worth only what someone else is willing to pay for them.  They will not include a private key that allows you to then spend Dogecoin somewhere else. These are simply mementos and not a crypto currency.

Quote ShibeMint.com, these physical dogecoins are for

  displaying additional shibe pride, starting an exciting conversation, more accurate decision making, extra inspiration, a lovely gift for a dogecoin enthusiast, attracting quality shibemates

There is nothing to stop another website from creating and selling their own version of Dogecoins.  In fact, here's another that does.

You can purchase physical bitcoins or altcoins with or without a private key that would allow you to spend that currency.  Here is a full list of physical crypto coins.  Without the private key, the crypto coin is worth the metal/plastic/material from which it is minted.

That said, it will still carry the value that someone else is willing to purchase it for.


Is the RAM or the computing power more important for the hashrate? I have done my research on the internet and failed to come up with any suitable answer. I asked on a few forums as well, but no results. So my question is, if I have two separate computers, one with 8GB dedicated RAM with a 1.7GHz processor, and another with 2GB RAM and a 3.2GHz processor, which one has the greater hashrate?

The 3.2 gigahertz machine. Ram is necessary but the hash rate is determined by processing speed.


Of the many, many crypto address out there, how many are really being used? I am not asking how many Bitcoin addresses there are. I am asking how many ARE being USED.

I mean, Im sure there is alot of empty Bitcoin adresses out there, but, how many of are people just creating a account and just saying: "Hm, I think I will buy it in a month or so." and then go onto never buy it, or perhaps some who create it but have no intent of using it?

Im asking if there is a way to know a rough estimate of how many people are holding Bitcoin?

One way to know, would be to check 'active' wallets, the ones that have a recent transaction - you define the meaning of recent (1year? 2years? more?).

The problem is that old wallets may still be owned (people just hodling) and accessible, and bunch of wallets are also owned by the same people.

You can use this site : https://bitinfocharts.com/bitcoin/explorer/ to check some interesting data about existing wallets.


Where can I find the bitcoind bundled with bitcoin-qt in Ubuntu? I read that bitcoind comes bundled with bitcoin-qt, but I can't find it anywhere on my system after installing bitcoin-qt. I'm using Ubuntu.

If you start bitcoin-qt with the -server option, it also runs an RPC server, making it functionally equivalent to bitcoind.


What are the consequences if I spoof an IP address in the node_announcment message? According to BOLT 07 the node accountment message looks like this:

  type: 257 (node_announcement)
  data:

  [64:signature]
  [2:flen]
  [flen:features]
  [4:timestamp]
  [33:node_id]
  [3:rgb_color]
  [32:alias]
  [2:addrlen]
  [addrlen:addresses]

where the addresses are of the following form:

  The following address descriptor types are defined:

  1: ipv4; data = [4:ipv4_addr][2:port] (length 6)
  2: ipv6; data = [16:ipv6_addr][2:port] (length 18)
  3: Tor v2 onion service; data = [10:onion_addr][2:port] (length 12)

  version 2 onion service addresses; Encodes an 80-bit, truncated SHA-1
  hash of a 1024-bit RSA public key for the onion service (a.k.a. Tor
  hidden service).

  4: Tor v3 onion service; data = [35:onion_addr][2:port] (length 37)

  version 3 (prop224)
  onion service addresses; Encodes:
  [32:32_byte_ed25519_pubkey] || [2:checksum] || [1:version], where
  checksum = sha3(".onion checksum" | pubkey || version)[:2].

taking this into consideration I could announce my node to have the IP address of another existing lightning node or even some arbitrary IP address. While it is clear that no one could connect to me as I don't control the IP address I wonder how the implementations would cope with such a behavior.

Even if implementations do not struggle with such spoofing an attacker could probably use this for fishing to trick a user into paying an invoice as it comes from a node_id that is connected to an IP-address from a well known service where the attacked person might even be a customer.

Is there anything else that could go wrong with such a spoofing behavior? Maybe there would even be benefits from it?

I don't see the attack here. You cannot claim you are a different node, because you cannot sign for that. All you can do is give a false IP address FOR YOUR OWN NODE. Which probably just leads to people not being able to reach you.

I guess the only interesting case is where the IP you give is already known as another node. Maybe the spec should spell out what an implementation should do then. But I guess not doing anything is probably fine, since you could still reach the known node under its IP adress (node lookup being per ID, I guess), and whenever you try to reach the spoofing node under the fake address, it just won't respond.


Will I save on miner and network fees for sending btc if I import my bitpay wallet to another wallet like electrum or blockchain? I have a bitpay wallet that has received many small transactions. I want to send all of the funds to my trading platform, but the fees are too high after the first send each day which is as low as 1%. Will it help to import that wallet to another client like electrum or blockchain?

Will it help to import that wallet to another client like electrum or blockchain?

It should help. Electrum is better than Bitpay wallet. You can import wallet using seed phrase in Electrum.
Mempool looks clear right now so low fee rate transactions should get confirmed soon.

Ensure that you select BIP 39 option while importing:

Select "legacy" if you had addresses starting with "1" in Bitpay wallet:

I confirmed the first address after importing which is same in both wallets:

In future you can create a new wallet in electrum, move all funds to this wallet. Select "segwit" this time instead of legacy and use RBF for all transactions.


Manually banning nodes through CLI I cant find this info: How can I ban through CLI a peer connected to my full node?

I like how can I do it in the 0.12.0 GUI just with right-click and choosing for how much time I want to ban the peer.

tia

As correctly answered here https://bitcointalk.org/index.php?topic=1390192.msg14122567#msg14122567

setban "ip(/netmask)" "add|remove" (bantime) (absolute)

Attempts add or remove a IP/Subnet from the banned list.

Arguments:
1. "ip(/netmask)" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)
2. "command"      (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list
3. "bantime"      (numeric, optional) time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
4. "absolute"     (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)

Examples:
> bitcoin-cli setban "192.168.0.6" "add" 86400
> bitcoin-cli setban "192.168.0.0/24" "add"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setban", "params": ["192.168.0.6", "add" 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/


Why does pay to pubkey hash contain OP_CHECKSIG at the end instead of beginning? According to the bitcoin wiki, the most common form of transaction (pay-to-pubkey-hash) looks like this:

scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>

I am curious why OP_CHECKSIG comes at the end. Couldn't we check the signature even before doing the hash?

More precisely, couldn't it instead do:

scriptPubKey: OP_CHECKSIGVERIFY OP_DUP OP_HASH160 <pubKeyHash> OP_EQUAL
scriptSig: <pubKey> <sig>

This way you don't have to go through all the hashing if the pubkey and sig don't match to begin with.

I'm sure there's a good reason for this or i'm completely misunderstanding something, please enlighten me. Thank you!

Couldn't we check the signature even before doing the hash?

We certainly could, but that would be silly. The hash is about 1000x faster than checking a signature. Doing the signature check when the hash fails would be a waste of time

  More precisely, couldn't it instead do:

  scriptPubKey: OP_CHECKSIGVERIFY OP_DUP OP_HASH160  OP_EQUAL

No, that certainly wouldn't work. The OP_CHECKSIGVERIFY would remove the public key from the stack, so there is nothing to compare it with. The OP_DUP would always fail, as there is nothing to duplicate anymore.


Miners, did Catalyst version 11.9 fix CPU usage issue for you? Miners, did the new Catalyst version 11.9 fix 100% CPU usage issue for you? what's the best version of Catalyst to use for mining?

Catalyst 11.9 resolved the issue for those mining on single GPUs but not multiple GPUs (including single cards which contain multiple GPUs like the 6990 and 5970). You can try setting the -f flag to higher numbers until CPU usage is reduced or try setting -aggression to 10 or lower. Note that these settings might reduce your hashrate significantly depending on how aggressively you change them from defaults.

The bug in question was introduced in Catalyst version 11.5 and at the time affected only multi-GPU setups. It remained in place for version 11.6 and in 11.7 actually began affecting single-GPU systems as well. In 11.9 the single-GPU bug was fixed, but the multi-GPU bug is still in place. There is a beta release of 11.10 available but I've not heard anything about whether it fixes the 100% bug or not.

A quick search shows that the 11.4 drivers are still available for 32 and 64 bit systems. Assuming you don't need anything that the newer drivers offer for non-mining purposes, 11.4 is probably your best bet. If you're running dedicated rigs it's definitely your best bet.

Edit: It appears that 11.10 did not fix the multi-GPU bug so 11.4 is still your best bet.