How does Lightning transaction revocation work? I've been reading about the Lightning Network, and I feel like I alllllmost understand it, but I can't quite figure out how the revocation transactions are designed so user A can claim the channel's bitcoins if user B tries to post an out-of-date commitment transaction.

From what I understand, revocation transactions (aka anti-cheat transactions) can be posted that will give the poster their bitcoins after 1 week, but will give the other party their bitcoins immediately. What I don't understand is, when an out-of-date revocation transaction is posted by user B, how user A can also claim user B's bitcoins.

Here are some of the best sources I've read for this:

https://rusty.ozlabs.org/?p=450
https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791/

I'd very much appreciate an explanation that helps this part of the protocol make sense.

When you open a lightning channel, you will receive from the other person their revocation_basepoint, and for each commitment transaction, you will send to the other person a per_commitment_point. The revocation_basepoint has a revocation_basepoint_secret which is a secret key that the other person keeps to themselves. The per_commitment_point has a per_commitment_secret which you keep to yourself (for now)

When you create a commitment, you use the the other person's revocation_basepoint and your per_commitment_point to generate a public key, the revocation_key. This key is then used in a witness script which looks like this:

OP_IF
  <revocation_key>
OP_ELSE
 `to_self_delay`
  OP_CSV
  OP_DROP
  <local_delayedkey>
OP_ENDIF
OP_CHECKSIG

This script is used in the to_local output - the the output that will pay you (after the delay) if you have to broadcast this commitment transaction. The other person has a similar to_local output in their commitment transaction.

When you go to make another commitment, you will want to revoke this previous commitment. To do so, you will send to the other person the per_commitment_secret that you used for this commitment. They can use that per_commitment_secret and their own revocation_basepoint_secret to derive the private key for the revocation_key.

If you were to broadcast this now-revoked commitment, the other person now has the information necessary to derive the private key for the revocation_key. They can then use that private key to sign a transaction which spends your to_local output thereby taking your coins and penalizing you for broadcasting a revoked commitment. Since you do not have their revocation_basepoint_secret, you cannot derive the revocation private key and thus must wait for the delay before you can spend the funds.

The details for the lightning specification are available here: https://github.com/lightningnetwork/lightning-rfc/. They are a little hard to read though but do explain in detail how everything in lightning is supposed to work. The spec is still being worked on so some of the things there may change.


When does Ardor smart contracts come into effect and how does it work compared to Ethereum, EOS, and Lisk? Ardor announced they are launching smart contracts on their system and how does it work compared to the other platforms like Ethereum, EOS, and Lisk?

First off, Lisk doesn't have full turing-complete smart contracts so there isn't much of a comparison on that front.

Key shortcomings of existing frameworks like Ethereum can be summarized by five challenges:

Contract life cycle management – Find a security bug? Good luck re-deploying.
Transaction fees – Want to use my service? First, you’ll have to buy some “gas,” in the form of cryptocurrency, to use to sponsor your transaction fees – no matter what service you are trying to use. This means there will be some crypto-tax implications for your end users.
Integration with External Services – Want to leverage an existing database? Contracts are part of the blockchain consensus, which means they cannot interact with external systems like a cloud service or game engine.
New coding languages – Solidity on Ethereum and RIDE on Waves are complex and relatively unknown to most experienced software developers, creating a substantial barrier to entry. There are also fewer reliable libraries and tools to leverage in the development process.
Privacy – Looking to create verifiably replicable random numbers and store secret information? It’s either not possible, or incredibly complex.

This combination of factors has already led to numerous instances of user funds being locked up because of vulnerable smart contracts such as in the instance of the DAO and the Paritytech Wallet Freeze.

Lightweight Contracts on the Ardor platform offer a comprehensive solution to these issues. These new “stateless” contracts are written in Java, allowing developers to automate business processes on the blockchain in a comfortable coding language, while leveraging 250+ APIs to launch digital assets, marketplaces, voting systems, cloud storage solutions, messaging applications, and more. Reflecting on the issues of first-generation smart contracts, lightweight contracts address those issues of contract lifecycle management, transaction fees, integration with external systems, and random number generation as follows:

Two Step Deployment – Contract code is deployed to child chains, such as Ignis, as a cloud data item, which stores a signed and time-stamped copy of the executable code on the blockchain, and a contract reference, which serves as a pointer from a specific contract runner account to the contract code, while defining setup parameters for the contract. This level of indirection simplifies contract upgrades- all developers need to do is deploy a new version of the contract and then gradually update existing references to it.
External Integrations – Interfacing with external systems, like cloud services and game engines, is enabled and encouraged.
Privacy – Random numbers can be generated in a reproducible method and secret information can be saved privately.

Lightweight Contracts are deployed on individual nodes, with optional verification and approval nodes reproducing results to ensure transparency and fairness. This provides a significant level of confidence in the output transactions of Lightweight Contracts, but what happens if a user sends a transaction to the node running a “contract runner” – and the node fails to execute the contract?

The trust problem lies at the core of all systems looking to deploy smart contracts on individual nodes. After several months of research, the developers at Jelurida finally found their solution by repurposing a lesser-known feature deployed on NXT back in 2015, known as phased transactions by hashed secrets. The basic idea is that funds sent by the user are not credited to the contract runner account. Instead, funds are held in a temporary escrow by the blockchain itself until the contract runner executes the contract and the user, after validating the resulting transaction, reveals the secret. As a result, the user transaction and the contract reply transactions are either both approved or both ignored and funds are unable to be permanently locked or stolen.

Documentation for the Ardor platform and its lightweight contracts can be found on the Ardor Learning Hub at ardordocs.jelurida.com. This response was modified from an article on CCN: https://www.ccn.com/ardor-lightweight-contracts-since-existing-smart-contracts-are-not-so-smart/


Are specific private keys weaker than others? I've heard some discussion about how certain private keys can be considered weaker because they were generated using a weak randomness algorithm. I have very little experience in this subject and currently most of my bitcoins are tied to a private key that I generated a while ago, using MultiBit V0.5.14.

I'm wondering whether anybody with more experience about this can explain this subject more in detail.

They are weaker in the sense that they are easier to guess because the attacker has a more limited set of private keys to guess from. All private keys are equal in terms of just taking a public key and trying to guess the corresponding private keys, because, without extra information, one has to check every possible private key (until the correct one is found). But when one knows the private keys weren't truly random, by implication one knows that there is a certain pattern to the possible private keys. This means that the attacker can guess private keys from this pattern which is smaller/quicker than guessing all possible private keys. I can't speak to the specific weak generator in question, as I haven't heard of it, but with a general understanding of cryptography, I can say this is what people mean when they speak of weaknesses in the key generator.


Is Bitcoin truly scarce? I'm a newbie to crypto/blockchain, but I'm very excited about the possibilities.  Given how passionate folks can be about the subject, I want to be very clear that I'm not trying to indict Bitcoin or cryptocurrencies in general. I'm trying to understand how the whole thing works.
My understanding is that there is a limit on the number of Bitcoin that can ever exist;  21 million bitcoin.  Therefore, one of the merits of Bitcoin as a store of value is that more Bitcoin can't be "printed" like the Fed "prints" dollars.
I have also learned that one can exchange Bitcoin for other cryptocurrencies with limited issuance like Litecoin.  And, presumably, nothing prevents another cryptocurrency from being created with similar rules...etc.
So, is Bitcoin - as a store of value - really limited?  If all the currencies like Bitcoin are interchangeable, what is the effective difference between them?  In 10 years, why do I need to have value stored in Bitcoin vs. Litecoin vs. any other similarly constructed asset?  In theory, shouldn't all the capital flow evenly into all these currencies?  Again, assuming they are interchangeable.

Yes Bitcoin is deliberately limited in that there can never be more than about 21 million BTC.
No the existence of other forms of money does not affect this characteristic of this particular form of money. It is an intrinsic characteristic.
Yes the potential for new forms of money means that money in general is unlimited in terms of the sum of the numbers printed on the front of banknotes etc - but this number isn't especially meaningful. The actual collective value of all available forms of money is determined by external factors.
None of this affects that there can never be more than about 21 million BTC. Bitcoin is truly scarce in that sense. This is true whether it takes 10,000 BTC to buy a pizza or a nanosatoshi to buy a Ferrari.
There's little point in indulging in philosophical wrangling over this. The only significant effect of this form of scarcity is a deflationary influence on the value of Bitcoin. Or at least the lack of an inflationary influence at a large scale or in the longer term. There are other things that have inflationary or deflationary influences on Bitcoin. That is, external factors that influence its value either way.


Bought a bitcoin, sender said it was sent, not showing in blockchain or wallet. Where is it? So I bought a full btc off of localbitcoin with amazon giftcard code.
I sent the code and clicked that payment was completed.
It's been about 2 hours. About 1 hour since he said that he sent the btc. I'm wondering if I got ripped off?
I'm not showing any transaction in the block chain and it's definitely not in my wallet.
Please help? What's going on?

LocalBitcoins uses escrow. If you've released payment and not received the Bitcoin all you need to raise a dispute. If you've already finalised the purchase and the Bitcoin isn't in your LocalBitcoins wallet then there's very little that can be done.

To clarify: did the Bitcoin ever get credited to your LocalBitcoins wallet? If not, raise a dispute ASAP.

I've never had issues with LocalBitcoins but I've never ventured outside of escrow or used gift cards.


Minimum funds required in a channel in Lightning? I have noticed that, I cannot exhaust the funds in my channel to one side in lnd. I understand this makes sense so as to have some punishment in case of fraud, but I cannot find the reason for the particular value in lnd (or BOLT).

These are the steps I followed (to reproduce):

$>lncli-alice listchannels
{
"channels": [
    {
        "active": true,
        "remote_pubkey": <bob_pubkey>,
        "channel_point": <channel_point>,
        "chan_id": <chan_id>,
        "capacity": "16777215",
        "local_balance": "370557",
        "remote_balance": "16406475",
        "commit_fee": "183",
        "commit_weight": "724",
        "fee_per_kw": "253",
        "unsettled_balance": "0",
        "total_satoshis_sent": "16506475",
        "total_satoshis_received": "100000",
        "num_updates": "300",
        "pending_htlcs": [
        ],
        "csv_delay": 2016,
        "private": false
    }
 ]
}

After adding an invoice from lncli-bob, and calling queryroutes to create the route to bob from lncli-alice with the amt values 202742 and 202743:

$>cat route_channel_alice_to_bob_amt_202742.txt | lncli-alice sendtoroute --pay_hash=pay)hash -
{
"payment_error": "unable to route payment to destination: TemporaryChannelFailure[...]",
"payment_preimage": "",
"payment_route": null
}

$>cat route_channel_alice_to_bob_amt_202743.txt | lncli-alice sendtoroute --pay_hash=<pay_hash> -
{
"payment_error": "",
"payment_preimage": <payment_preimage>,
"payment_route": {
[...]
 }
}

Given that I have 370557, I do not understand why a payment of 202743 results in insuficcient funds, while 202742 does not. I would like to get to know more about the nature and exact calculation of this minimum value.

Testing further this, I found an answer for it: with current settings for lnd, one cannot transfer an amount such that leaves one of the sides with less that 1% of the channel capacity. This is most likely to prevent that one side to try to commit to an old state, since the punishment would be low.

For example, in the above case, if the channel capacity is 16777215, and the local_balance is 370557, then the maximum amount possible to transfer is 202742 because 370557-202742 ≃ 0.01*16777215 (it is not exactly 1%, probably due to fees that need to be accounted for).

I double tested this using a channel of capacity 7310000, and having as local_balance 4294965, and again my maximum possible value to transfer is 73143 ≃ 0.01*7310000 (again, not exactly 1% due to fees not accounted for in --amt).

As for the extra value, one would think it is fee_per_weight*172 + feerate*amt (fee per millionths transferred) in the case of the last hop, while they add up in previous hops. But this would mean a higher difference than 143 mSat, or 42mSat, as calculated in the examples above. I am not entirely sure how this difference not to be exactly 1% derives.

It has to do with the overflow bandwidth (the bandwidth of the channel that is currently being used for other unfinished routes). But still this does not match the numbers exactly. However, just a difference of a hundred satoshis is nothing but a fraction of a cent, so it is not a huge value. Nevertheless, I can't put my finger on the exact calculation...


What bitcoin data should I back up? I have an Electrum bitcoin wallet on my PC. If my house burns and my PC is destroyed and the seed (written on paper) is destroyed, my bitcoins are lost. I want to prevent this situation.
What is the best I can do?

Storing the wallet file on another server (not possible with Electrum)
Export the private keys - address combinations and storing them AES256-encrypted on another server.
Storing the seed AES256-encrypted on another server.
something else?

Since Electrum is a deterministic wallet having a copy of the seed is sufficient to get access to the coins. However if you also want to be able to restore the meta data in the wallet file such as the transaction and address labels and your contacts you need to periodically backup the wallet file too.

You can save a backup copy of your wallet file via file menu > save copy. Alternatively you can have your backup program grab the wallet file from the wallets directory.

If you're worried about your house burning down then do as @willtech says and keep a backup of your seed and/or wallet file in an off-site location. Cloud backups of your password protected wallet file are another option.

Note: Electrum doesn't store your wallet file, seed or private keys on any server.


How scalable is the current routing implementation for lightning? What are the weaknesses we face with lightning routing currently?

How many nodes do we expect it can handle now?

What is being done to make it scale in the future?

I am not sure if scale is the term you are looking for when discussing potential problems with routing. But I will try to focus on scaling when giving the answer. That being said my answer would probably differ quite a lot if the question was asked differently.

The current routing algorithm is onion routing. The onions contain a path from sender to the receiver (decided by the sender - see below for more discussion on that) and are constructed to support as many as 20 hops. This means that we actually can scale to networks with a diameter of 20. (the diameter is the longest shortest path on the friendship network and is a topological property). Already with 21 nodes I could create a lightning network with the topology of a list and be unable to route a payment from the heads of the list to the tail with the current onion format.
This problem can easily be mitigated though by creating a new payment channel - changing the topology in a a way to decrease the diameter. My autopilot implementation suggests channels that decrease the diameter of the network.

So the problem boils down to how big can a network be to have a diameter less than 20? When looking at the strongly connected component of large networks like the web or the Facebook graph they all seem to have lower diameters which is indicative that the 20 hop limit should not hinder scale. However there is a correlation: the more edges we allow on a network with a fixed set of nodes the lower the diameter. Take a fully connected graph which has diameter 1 by definition in contrast to the "list graph" from above which has diameter n.

That being said the web graph and friendship graph on Facebook are believed too have on average about 150  edges per node (the so called Dunbar number). We already know that without channel factories and with current blocksize limits we would need decades to allow every person in the world to open one payment channel which would most likely result in a graph with a larger Diameter. Allowing people to open 150 channels takes 150 times that much time.

With respect to scale of routing there is not only the 20hops limit of onions. There is also pathfinding and related to that discovery of the network topology (aka the gossip protocol). Path finding boils down to breadth first search or Dijkstra algorithm which is a weighted BFS. Both algorithms have a runtime that makes part finding possible on graphs with billions of nodes on modern hardware in particular when using graph databases like neo4j (currently everything is stored in memory). If the network would grow beyond nodes for humans (e.g with IoT nodes) we might reach the limits of modern hardware to compue those paths.

As for the gossip protocol. Each channel needs to be announced to the peer2peer network. Since channels need to be veryfied / linked to a blockchain tx this should not be a problem. However the gossip protocol seems to be quite noisy. There is currently the million node Challenge run by rusty Russell that tries to stimulate what happens if the network grows.

Also there are potential other issues like the htlc limit of 483 concurrent htlcs per payment channel that might produce traffic jams (though it seems very unlikely and is actually a reason why to avoid these so called centralized hubs and why nodes should work on decreasing the diameter). Also the exact topology of the network is never known (only capacity of channels)

Regarding your second part  (how are the issues mitigated)
1. The biggest issue seems quick opening of channels. There was research by Christian decker proposing the concept of channel factories showing that we can increase the amount of channels we can open per block by a factor of 10 to 100.
2. As for pathfinding: I currently suggested JIT-routing which is a low level backward compatible improvement for path discovery. This path decovery mechanism mitigates the problem of not knowing the balance of channels when selecting a path. My proposal also included the suggestion to have nodes only store a local view of the network and create an overlay addressing scheme which could be used for routing tables (like it is on the internet) this would also mitigate the problem of storing the entire network.
3. The problems with the gossip protocol currently seem to have the highest focus by developers - look at rustys million channel challenge.

There might be more issues which I am currently not aware of.


What is the incentive behind using platforms such as XDP/Dogeparty? ELI5: What can one do with XDP that s/he cannot do with DOGE? Is Dogeparty similar to projects such as Ethereum/Ripple?

If I understand correctly one receives 1 XDP/1000 DOGE "burned". How are these DOGE 'destroyed'? And where does one go from there in using their newly acquired XDP?

The DOGE are "destroyed" by sending to them to an address for which no one knows the private key.  The address is DDogepartyxxxxxx... which is clearly human-generated.  Calculating the corresponding private key is equivalent to breaking Elliptic Curve encryption (and if someone can do that, the whole bitcoin ecosystem comes crashing down in flames -- because they could compromise any and all accounts, not just this one).

Once XDP is created, there will be an XDP/DOGE market on DogeParty, just as there is an XCP/BTC market on Counterparty.  Using this decentralized exchange, you will be able to trade your XDP back for DOGE if you desire.  (This feature is currently disabled in DogeParty but will be re-enabled soon)

DogeParty/CounterParty is considerably more powerful than the underlying currency.  It has an internal, decentralized market for tokens.  You can issue dividends.  You can place bets and broadcast information.  For more, read about CounterParty.  (The DogeParty code is identical, save for renaming BTC -> DOGE and changing the burn formula slightly)


Should I use a full node as my main wallet? A few days ago I decided to download Bitcoin Core so I can use it as full node, to help the network and also as my main wallet.

Since then I keep reading a lot of people saying that you shouldn't use a full node as your wallet but I can't figure out why.

Is there any good reason not to do this?

The only reasons are the syncing time and storage requirement (which can be lowered from about 200GB to 1GB by pruning). A week or so to sync first, then depending on how often you use it, it'll take a some minutes sync. These are major pain in the ass and because of these I would put it into the category of "good reason to not use as a personal wallet". I would definitely not suggest this to my grandma. However I can live with it, and indeed I use it as my main wallet.


How can I get address's balance that doesn't belong to my Bitcoin core wallet? I have been looking for a way to see the address's balance that doesn't belong to my own Bitcoin core wallet.
I don't like to use an external API, I have this full node and I really wonder if this is possible.
I saw this Pieter Wuille's answer: How to get an address's balance with the bitcoin client?
But it is an old answer when Bitcoin core even didn't support addresses as watch-only.
What I can understand from his answer is I can't see this information on my Bitcoin core, but right now with Bitcoin core v0.20.1, is that still not possible?

Import addresses in bitcoin core and use listunspent or scantxoutset (scantxoutset doesn't require importing addresses as mentioned by sipa in the comments)

OR

Setup open source block explorers that use bitcoin core and use their API to get the required results:

https://github.com/dgarage/NBXplorer
https://github.com/Blockstream/esplora


How much Bitcoin volume is for purchasing stuff versus trading/speculation/investment? What percentage of Bitcoin transaction volume is due to people actually buying stuff ("goods") versus between traders, investors and speculators?

Of the "goods" volume, what percentage is for illicit purposes (drugs, etc.)?

Are these percentages relevant to the future success of Bitcoin?

It's been estimated (with many assumptions) to be somewhere around 1-4% of the total trade volume. This seems bad until you learn that the speculation market for USD is $5 trillion a day.


Why grow the Bitcoin miner network? Complete Bitcoin noob here. What are the advantages of having a large network of miners on the Bitcoin network? Why not have a limited number of super-peers that comprise the network? Isn't that the direction that things are heading anyway, given that only a select few will have access to the dedicated hardware?

Edit: Edited my question to indicate I'm referring specifically to the number of miners on the network.

If there were fewer miners, Bitcoin would be less reliable and you'd have to wait much longer to get the same level of security against a double-spending attack. We need as much mining as possible because mining secures the blockchain.

If I have 10 Bitcoins, I must be able to send them to Jeff. Otherwise, I don't have 10 Bitcoins. If I have 10 Bitcoins, I must be able to set them to Mary. Otherwise, I don't have 10 Bitcoins. But if I could send them to both Jeff and Mary, the system would break. So somehow, sending them to Jeff must prevent me from sending them to Mary too.

Bitcoin does this by having miners pick one of those transactions and heap a massive amount of computations on top of it. Among valid blockchains, Bitcoin prefers the one that likely took the most calculations to do. Miners pile calculations on top of the legitimate block chain to distinguish it from alternate chains. To "undo" a Bitcoin transaction, you must pile more computations on top of it than the rest of the miners combined piled on top of the legitimate chain that includes that transaction. The more mining, the faster you can accumulate sufficient calculations that undoing a transaction is impractical.


The shortest ECDSA signature I want to create ECDSA signature {r,s} where r is very low (for example 1) and can be encoded in DER-format in one byte.

How to calculate k value? Seems to me that it does not depend of anything. What is the value of k which produces r=1 ?

Note: I do not worry for the safety of my private key while publishing this signature.

What is the value of k which produces r=1 ?

It's impossible to know that. If you could derive r for arbitrary values then ECDSA would be fundamentally broken. The best you can do is grind k until you get an r that happens to have a short encoding.
For the sake of the exercise:
k: 55573144136627188774517374788342221967869962622835886499477787746883063622036
r: 771676860789419846973923839003663416737624455477806040640071960112246091

This nonce will be slightly smaller than most when encoded, but of course if you attempt to use it in a signature you have exposed your private key. If you generate this secretly you can only use the k value once and the result might be at best a couple of bytes difference in the encoded transaction.
It hardly seems worth it to be honest.


What is the fastest way to research Bitcoin block chain? I would like to do some research of the Bitcoin blockchain. Because i would like to do massive amounts of processing and lookups, I need a fast way to search the blockchain.

Http requests to insight.io just won't cut it...

I know of ABE but it seems no longer maintained and I don't know if it is up to par with the current implementation of the blockchain.

The environment I'm programming in is python.

Any ideas?

I held a research period on bitcoin (thanks to this project I became fond of Bitcoin) with the release of the alpha software at December, I had to extract information for the construction of an information graph.
I believe in my opinion that there are really many ways to index information but I believe that the fastest ones are to use the same technique that uses bitcoins.

Parser blk files
Deserialize the information in a format of your choice and index it in DB
query the DB and make a read in the appropriate file.

There are two very difficult things

the construction of this indexing system
if you want to access the id wallet you need to build a script decompiler or use the bitcoin node

ps: this is my experience, there can be other ways to build this information, which I don't know (mine is just a three-year thesis, my path has just begun)
This is a good parser for blk, one of the few compatible with Segregated Witness.
The abe project still works but his work times seem unacceptable with the current bitcoin dimension
If you have a big pc, this project is very fast (at least they say so)
Update 2021
The blockchain of Bitcoin grows over time and I think that the result of my work is SpyCBlock can be an efficient solution in terms of memory RAM, I don't know in terms of space.
SpyCBlock offers different deserialization methods like JSON, transactions graph, and a deprecated address graph that use Bitcoin Core to make some work. In addition, a method to deserialize in an efficient way the Bitcoin mempool is under development.
Please note that the software is an academics software, developed by only me, maybe can have some mistake and can be difficult to install all the dependencies, but if it will compile, it should be work fine with the integral bitcoin data.
P.S: The development of BlockSci is stopped in 2020, I don't know why, but I think because it is difficult to scale with the actual dimension of Bitcoin blockchain.


Is a P2WPKH address synonymous with a Bech32 address? BIP142 when encoding a segwit P2WPKH address is using a base58 address format (address p2xtZoXeX5X8BP8JfFhQK2nD3emtjch7UeFm in the example).

I understand that BIP142 predates BIP173 but are P2WPKH and Bech32 synonyms now? Is there such a thing as Base58 P2WPKH address?

are P2WPKH and Bech32 synonyms now?

No. Bech32 is also used for P2WSH addresses. Native segwit and Bech32 are synonyms.

  Is there such a thing as Base58 P2WPKH address?

No.


Is an attack on a local bitcoind via an img or embedded flash viable? In this thread on the Bitcoin forums it was suggested that a local attack on bitcoind might be possible through malformed img tags or (more likely in my opinion) through embedded flash. This also brings up the possibility of exploitation via Java et al.

Unfortunately I don't know enough about flash to determine whether it's prevented from connecting to a listening client on localhost. I would assume it's sandboxed away from anything else on the local network, but I honestly don't know if they've bothered to restrict access to localhost.

This page says that a Flash applet can only access the port and hostname of the URL from which it was downloaded:

  Adobe Flash, a plugin believed to be installed on about 99% of all
  desktops, incorporates a security model generally inspired by browser
  same-origin checks. Flash applets have their security context derived
  from the URL they are loaded from (as opposed to the site that embeds
  them with  or  tags), and within this realm, permission
  control follows the same basic principle as applied by browsers to DOM
  access: protocol, host name, and port of the requested resource is
  compared with that of the requestor, with universal access privileges
  granted to content stored on local disk. That said, there are
  important differences - and some interesting extensions - that make
  Flash capable of initiating cross-domain interactions to a degree
  greater than typically permitted for native browser content.

But apparently that applies to the result of a request not the request itself, so it's possible a Flash applet could send a request to your bitcoind to transfer coins, but not check to see whether it worked or not.  Using wallet encryption would help mitigate this.

I've been able to find balances using simple HTTP 'POST' requests:

$ echo '{"method":"getbalance","params":[""]}' | POST http://$user:$pass@localhost:8332/
{"result":-6203.99412537,"error":null,"id":null}

I don't know if it's possible using just a regular 'GET' request.

Edit: I just tried 'guessing' the wrong password 100 times in a row, and then getting it right.  bitcoind didn't stop accepting guesses or slow down at all, and accepted the final correct guess:

$ i=100; while ((i>0)); do ((i--)); echo $(echo $i; date;
  echo '{"method":"getbalance","params":[""]}' |
  POST http://$user:guess$i@localhost:8332/ 2>&1 | grep -i body);
  done; echo '{"method":"getbalance","params":[""]}' |
  POST http://$user:$pass@localhost:8332/
99 Tue Apr 24 09:10:10 PDT 2012
401 Unauthorized.

98 Tue Apr 24 09:10:10 PDT 2012
401 Unauthorized.

[...]
1 Tue Apr 24 09:10:53 PDT 2012
401 Unauthorized.

0 Tue Apr 24 09:10:53 PDT 2012
401 Unauthorized.

{"result":-6203.99412537,"error":null,"id":null}


BTC transaction is slow now. How come when buying at Exchange, it's immediate? On Exchange, when buy or sell, it's immediate.
Isn't transaction is supposed to be ledger by Blockchain?
Does that mean my BTC account at Exchange are all not ledger yet. How legitimate is my BTC at Exchange then?
My understanding is when I withdraw BTC to my cold storage, that's the time it is ledger by Blockchain and it usually take some time. Am I correct?

When you purchase bitcoin from an exchange, it does not require an "on-chain" transaction.  They have a ledger, but it is not a blockchain.  It's a simple database, like the one that banks use.

Remember that when using an exchange, there is always someone on the other side of your buy or sell.  When you buy, that bitcoin comes from someone who transferred bitcoin to the exchange with the intention to sell it.  That transaction did require an on-chain transaction, but it occurred before you showed up to buy.  If you were to withdraw your bitcoin, that also requires an on-chain transaction from addresses the exchange controls, to addresses you control.

You are correct to question how "legitimate" bitcoin stored on an exchange is.  Firstly, because bitcoin you leave on an exchange is not your bitcoin.  It is the exchange's bitcoin that they are holding on your behalf.  Think of any bitcoin you keep on an exchange as an IOU from the exchange to you.  Secondly, exchanges have become insolvent in the past, meaning that they have more IOUs issued than they have either bitcoin or fiat to back up.  As a best practice, only keep as much fiat or bitcoin on an exchange as you require for your trading.  All else should be stored elsewhere.


Needing a Private Key in order to receive profits in Blockchain Wallet I recently made an investment with Forexbitoptions and have made some profits. They have supposedly sent these profits to my Blockchain wallet but say it's not going through as I need a Private key for this. Question I have is do I need a private key for this and if so why would I have to pay for this private key in order to access my profits?

This is a variation of a fairly well-known scam. You never owned any bitcoins, there was never any profit, it is all fake. A watch-only address looks like there is money there, and profits accumulating but it's just a window onto someone elses money, not yours.

There are several similar stories on this website from other victims.

How to unlock private key of bitcoin
How can I get a private key for this address
Reg: Watch only Address
Bitcoin Mining as a Newbie (link wallet to another person's miner)

The Forexbitoptions.com website gives their address as 586 Mcardle Road Kinsey, Alabama 36303, USA. If you put that address into Google maps and check streetview, it looks like some random small rural home (2000 sqft, 3 beds, single storey).

That address is also used by 247bitminer.com so I guess these scammers just copy each others websites.


Bitcoin is not connected in regtest mode I am having trouble using regtest mode on Linux.  Using pre-compiled version 0.9.2.1 for linux and starting regtest mode as instructed on bitcoin.org:

<bitcoin-ver>-linux/bin/64>> ./bitcoind -regtest -daemon

The server starts but doing a getinfo returns 'connections' : 0.  Tried experimenting with various rpc* settings in the .conf file.  What exactly do I need to set in order to use regtest mode?  Do I need to add real nodes via addnode for regtest?  It doesn't seem like I should need to.  I was able to get a few connections by adding several real nodes one time but after a few minutes 'connections' dropped back to 0.  Let me know if any additional info would help.

Although I believe Fred Tingey's answer is complete, it has the following attributes:

it depends on a config file.
it provides examples for bitcoin-qt on the windows platform, and the OP was asking about bitcoind on the linux platform.

Thus, I wanted to share the following concise bash script which does what the OP wants. As others have partially noted the key to getting this to work is:

specify a unique port (if listening) and rpcport (if using rpc) for each node
specify a unique data directory for each node
if using -connect to restrict to own nodes, remember to use -listen to accept connections from own nodes.

That said, here's my start-regtest-network.sh script:

#!/bin/bash
bitcoind -server -listen -port=17591 -rpcuser=bitcoinrpc -rpcpassword=P$SECONDS -rpcport=16591 -datadir=$HOME/regtest/A/ -connect=localhost:17592 -regtest -pid=$HOME/regtest/A/.pid -daemon -debug
bitcoind -server -listen -port=17592 -rpcuser=bitcoinrpc -rpcpassword=P$SECONDS -rpcport=16592 -datadir=$HOME/regtest/B/ -connect=localhost:17593 -regtest -pid=$HOME/regtest/B/.pid -daemon -debug
bitcoind -server -listen -port=17593 -rpcuser=bitcoinrpc -rpcpassword=P$SECONDS -rpcport=16593 -datadir=$HOME/regtest/C/ -connect=localhost:17594 -regtest -pid=$HOME/regtest/C/.pid -daemon -debug
bitcoind -server -listen -port=17594 -rpcuser=bitcoinrpc -rpcpassword=P$SECONDS -rpcport=16594 -datadir=$HOME/regtest/D/ -connect=localhost:17595 -regtest -pid=$HOME/regtest/D/.pid -daemon -debug
bitcoind -server -listen -port=17595 -rpcuser=bitcoinrpc -rpcpassword=P$SECONDS -rpcport=16595 -datadir=$HOME/regtest/E/ -connect=localhost:17591 -regtest -pid=$HOME/regtest/E/.pid -daemon -debug

Additionally, here's my stop-regtest-network.sh:

#!/bin/bash
sudo killall --regex bitcoin.*

I realize my stop script is sloppy, and will kill all bitcoin processes.. if you're so inclined you could modify this to pull the individual pids out of each data directory.

Lastly, You will probably need to precreate some data directors for bitcoind if you don't edit the script at all.

mkdir $HOME/regtest/A/
mkdir $HOME/regtest/B/
mkdir $HOME/regtest/C/
mkdir $HOME/regtest/D/
mkdir $HOME/regtest/E/

You should have regtest bitcoind nodes connecting round-robin on ports 17591, 17592, 17593, 17594 and 17595. Likewise, you should be able to connect to rpc ports 16591, 16592, 16593, 16594 and 16595. If you need to know the RPC password you can check ps aux, or set an explicit rpcpassword in the script.

HTH


How many bitcoin clones are out there? How many bitcoin clones are out there?

I mean people changing the name, the hashing algorithm and a few more parameters and creating a new coin that just keeps on copying bitcoin's source code in eternity?

Is there a list of those somewhere?

My favourite today is mapofcoins.com

You can browse alt-coins list here: coinwik.org

You can compare coins here: coinplorer.com/Hardware/CurrenciesComparison

There is forum, cryptocointalk

See, here coingen.bluematt.me and +10 hidden market places with constructors.

You can't find full list of all alt-coins. It doesn't exist.

Number of alt-coins grows so fast. Probably, every day there are appear 10-20 alt-coins. This is unstoppable trend. In the Jan of 2015 there will be more than 1000 alt-coins in one hundred percent.

Edit:

See, another one constructor COIN NUKE | COIN CREATION SERVICE | +EVERYTHING FOR YOU COIN +ESCROW +TOOLS


How do miners decode the input transaction? When a transaction is broadcasted to the network, the transaction string contains the little-endian of SHA256(SHA256(X)) where X is the transaction string of input transaction.

Now, since SHA is irreversible, miners will not be able to get the full transaction string (X). So, how do miners verify the authencity of the input? How do they know that the mentioned input transaction actually had 'n' outputs? I am looking to understand the alogirthm behind this.

No, that is not how transactions work.

First of all, transactions are not strings but rather blobs of binary data.

Secondly, the transaction hash that is included in the inputs of a transaction is not an encoding of the previous transaction but rather an identifier. Since sha256d is a secure hash (meaning that there will be a unique hash for basically all inputs), each sha256d hash uniquely identifies the transaction which it is the hash of. This is why transaction hashes are referred to as transaction ids (txids). A node, when it indexes the blockchain, can store in its database the transaction id as a key and the transaction itself as the value. This means that once the node needs the previous transaction for an input, it can easily use the given txid to lookup the transaction in its database and pull the necessary data.


What’s the opcode sequence for doing the reverse of Multisig? With a multisig wallet, several public keys are needed to spend an amount. But how to perform the reverse with time ?

I’m talking about this case where Alice performs a transaction where the output is sent to both Bob and Victor. With one point : Bob will be able to spend the transaction output immediately while Victor will only be able to do it after waiting some time if Bob didn’t spend it before Victor is allowed to do so.
It doesn’t matter if Bob is still able to spend the output after Victor can. However Alice can’t get the public keys from Bob and Victor but only their address.

I’m thinking about something using OP_CHECKLOCKTIMEVERIFY or CHECKSEQUENCEVERIFY or nLockTime but I definitely fail to think about what the whole Opcode sequence might looks like.

The following scriptPubKey describes the desired contract:

OP_IF
    OP_DUP OP_HASH160 <Bob's pubKeyHash>
OP_ELSE
    <now+30 days> OP_CHECKLOCKTIMEVERIFY OP_DROP
    OP_DUP OP_HASH160 <Victor's pubKeyHash>
OP_ENDIF
OP_EQUALVERIFY OP_CHECKSIG

Bob can spend the output using the scriptSig <Bob's signature> <Bob's pubKey> OP_TRUE
Victor can spend the output after 30 days using the scriptSig <Victor's signature> <Victor's pubKey> OP_FALSE.


Slushpool Miner Hashrate always Lower than Local Hashrate A Short Story

There is an Antminer server farm I provide support for with over 100 BC servers—mainly S9 and T9 models. There are three specific S9 miners that are side by side right next to each other on the rack which continually show lower than normal hash rate in Slushpool.

When I check these servers in Slushpool they all three fluctuate often ranging from 11-13 TH/s but the web interface and command line RT and AVG hash rates are always normal with no fluctuation. Every time I check Slushpool though, it's almost always lower than normal and I've checked up to nearly a hundred times in one day just to ensure I was being thorough.

Question

Is there anything common or something someone else determined that could cause a miner hash rate to always show lower in Slushpool than what it shows from the local server?

  Notes

  I've checked both command line and web interface on all these and see the same thing; normal realtime and normal average always
  every time I check but with Slushpool, it almost always shows it is
  hashing lower by 1 or 2 TH/s.
  Typically when other miners in this farm have a lower than normal Slushpool  hash rate, the local servers have a value that correlates much closer to that hash rate so I'm
  trying to understand if there's something I don't understand here
  which may explain this.

I believe that whatever is showing up on your dashboard is probably the most accurate picture of hashrate that you're contributing. Because you're mining to a pool, there will inherently be some, slight mismatch.

I wouldn't consider fluctuations a major issue unless it says you're producing far below the advertised hashrate.

I do know that Slushpool uses a "scoring hash rate," and if you want to know how that works in some more depth, here's a link to an article that Slushpool released. Hope this helps!

https://blog.slushpool.com/effective-hash-rate-af9c90529f6d


bitcoind systemd service: forking or simple? When creating a systemd service file for bitcoind (for example https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service), does it matter if Type=forking or Type=simple? What is the implication of one or the other in the light of how bitcoind starts and runs?

All other coins based on bitcoin share the same behaviour on this matter, or is this something that is likely to be modified by coin devs?

What is the implication of one or the other in the light of how bitcoind starts and runs?

Forking mode means that the program is going to call fork() and the process runs in the background while the main process exits. Simple mode means that the process stays running and doesn't exit unless the service is closed.

Since the .service file runs Bitcoin Core with -daemon, this means that it will call fork() and run in the background with the main process exiting. This is why it uses Forking mode.

  All other coins based on bitcoin share the same behaviour on this matter, or is this something that is likely to be modified by coin devs?

They share the same behavior because they are all based on Bitcoin Core. They all have the -daemon option.


electrum increase fee from command line is it possible to increase fee from command line in electrum? I walked through all electrum commands but can't find such command.


Why iota coin do not support smart-contracts? I thought that Iota-coin have a lot of common with Ethereum, but I hae found that it do not have support of smart-contracts. I googled about what was there reason of do not implement it (I really thought that smart contracts is future) but I found only one mention about it:

"Iota itself cannot implement smart contracts cause there is no consensus on state finality and each node has its own personal view of the state, rendering unusable for distributed general purpose computation."

Does smart-contracts have any issues? Or What?

IOTA is very different from Bitcoin. Consensus formation and transactions are not separate. In Bitcoin you have miners that realize consensus on the order of transactions, that are separate from the transactions done. In IOTA every transaction has to validate two earlier transactions. This leads to another data structure than a blockchain, they call the Tangle:

A "blockchainless blockchain".

Now, to implement a virtual machine that can execute a smart contract it needs to have consensus on order of transactions (let's say, the order of "0"s and "0"s). With the Tangle every node has a different view of when transactions happened. This makes it impossible to have consensus on smart contracts.

Facilitating smart contracts is on the roadmap of IOTA. The idea is to do this with timestamp oracles that provide a mechanism for order of transactions. See [http://iota.org/timestamps.pdf](On the timestamps in the tangle).


Zcash - where are treestates stored? Where are the treestates stored?
In other words, when a JoinSplit transaction is being validated, where is the anchor being checked?
A look at https://github.com/zcash/zcash/blob/master/src/primitives/block.h brings me to conclude that the commitments (i.e., notes) merkle-tree is not stored in the block-header.
Is it in a LevelDB database?
What is the data-structure it uses for storing the mapping of trees roots for blocks?

Any answer with a specific reference to code will be very appreciated.

You are correct that the Sprout commitment tree root / anchor is not stored in the block header. It is calculated by each node when a block arrives, and is stored in the block index.

The Sapling commitment tree root is stored in the block header (in what was the hashReserved field); nodes check this against the block contents and reject blocks with an invalid root in the header. This will make shielded address support significantly easier to implement for light clients.

The mappings from Sprout and Sapling tree roots to the IncrementalMerkleTrees themselves are stored in the coins database, and can be accessed wherever you have a CCoinsView.


What's the difference between bitcoind and bitcoin-qt? Different commands? This is a multi-part question, mainly do to contradictory information from different articles. It's got me all confused.

From my understanding, bitcoin-qt is just a GUI version of bitcoind - which was the original 'client' or 'node'. Is it true that bitcoind is actually built within bitcoin-qt, and runs in the background as a daemon (when the app is open)?

When I first started bitcoin-qt, it started downloading the block-chain. After that, I was curious about setting up a pool server, so I sought out information about that. I ended up going through a tutorial on installing Eloipool - they informed me that I had to have bitcoind setup and running as a daemon. That was interesting, because I thought that it was already running through bitcoin-qt?

This is where my confusion started. I even tried using the bitcoin-qt debug console; but it didn't have the same commands as bitcoind - specifically the rpc ones.

Where does this leave me? Am I doing something wrong? If I shutdown bitcoin-qt and start bitcoind -daemon, then it starts downloading another block-chain.

Do I really need both of these to make this work, or does the bitcoin-qt have access (somehow) to all the bitcoind commands?

Does bitcoin-qt use bitcoin.conf, the same as bitcoind? The reason I ask this, is for setting up the rpcuser and rpcpassword, amongst other things.

* UPDATE *

I did some more reading, and found out that most people just use bitcoind for more serious stuff. Is there not a way to configure bitcoin-qt to use a currently running instance of bitcoind, instead of spawning it's own daemon (when GUI is open).

You can either run bitcoin-qt or bitcoind, not both at the same time (the Qt part is not just a frontend on top of the RPC code, it uses the core directly).

You can however run Bitcoin-Qt with the -server command-line switch, in which case it will also expose an RPC service (essentially functioning like bitcoind in addition to the GUI interface). The RPC console inside the GUI has the exact same functionality as the bitcoind RPC client.

PS: bitcoind is both an RPC server (when started without RPC command on the command-line) and an RPC client (when started with RPC command on the command-line), while Bitcoin-Qt only optionally runs an RPC server (when started with -server).

Update: In version 0.9, bitcoin-cli was added with just the RPC client functionality from bitcoind. In version 0.10, this functionality will be removed from bitcoind. This means that the following ways of interacting will be possible:

bitcoin-cli or an external RPC client talking to bitcoind.
bitcoin-cli or an external RPC client talking to bitcoin-qt -server.
Using the RPC console in bitcoin-qt.


How to confirm that given bitcoin address is generated by given public key? I have 10s of private and public keys associated with 10s of different addresses.

Now I have a test-net btc address "mfoxBS2TpoiUWrEV3sZopoEB6Pi2d7TE9N".

What operations can I perform to find the appropriate Public Key associated with given address?

UPDATE
I am not trying to find out reverse scenario of fetching a public key from address.

As I already have bunch of public keys. One of them have created the given address. And I just want to figure out which one is it from the whole bunch?

There is a step-by-step guide here and you can also test it on this site.

You can also use this python library.

import os
os.environ['CRYPTOTOOLS_NETWORK'] = 'test'

from btctools import PublicKey

>>> pub = Publickey.from_hex('yourpubkeyhere')
>>> pub.to_address('P2PKH')
'mp9CpH3h25m7FZqsPBf2UfU9Gm4u41j9Eg'


Exodus exported private key I'm trying to understand why I'm having a hard time at importing exodus private keys in other wallets like jaxx o scatter.
I can't understand why I don't get the public address from the private key with this script:
var bitcore = require("bitcore-lib")
var privateKey = bitcore.PrivateKey.fromString("**** exodus private key ****")
console.log(privateKey.toAddress().toString())

I'm not able either to get the address from the seed phrase by using https://iancoleman.io/bip39/ indicating bip32 derivation path to m/0/0.
Could anyone tell me what I'm doing wrong?

You are probably deriving a legacy P2PKH address (addresses that start with 1) versus the bech32 P2WPKH address (addresses that start with bc1) that Exodus uses.
A single WIF private key can generate multiple address types, other wallets and software are likely defaulting to a different type which is probably why you are having trouble. This is the same for seed phrases as well.
Also just FYI Bitcore-lib is an old outdated library and is not compatible with modern address types. The code example you provide would create a legacy P2PKH address (start with 1).


Trezor Simple recovery vs advanced recovery Are there any security risks or advantages/disadvantages to using the simple recovery process vs the advanced on a trezor? Is one better than the other?

The simple recovery leaks the seed words to a keylogger but not their order.  The advanced recovery is completely safe against keyloggers (as long as there is no camera pointing to the Trezor screen).

The simple recovery asks for the words in random order.  Since the words need to be entered on the computer, a keylogger can see them.  An attacker could then try the words in all orders to recover the seed.  For the usual seed length of 24 words this is still too computation intensive to be profitable, but for seeds with only 12 words it is possible to find the right order in a day on a normal computer.

The advanced recovery uses a similar method to the PIN matrix entry.  It asks for each word (in correct order) by giving nine choices where it is in the alphabet, see this blog post with screenshots.  The computer displays nine unlabelled buttons and the Trezor screen shows the meaning of the button.  When the user presses a button, the position of the button is sent to the Trezor.  A keylogger can only know which button was pressed but since the randomization is done completely inside the Trezor, the keylogger can't know which choice the button corresponds to.  Since every word is chosen by exactly the same four questions (three times a 3x3 matrix and then a 2x3 matrix with the remaining candidate words), there is no information about the seed leaked to the computer.  The only disadvantage is that it takes more time and is more difficult to use.


Can the outputs of transactions with duplicate hashes be spent? I've noticed that there are two transaction hashes that appear more than once in the blockchain. The reason for this is understandable: they sent mining rewards to the same address. These transactions had the same inputs (none) and the same outputs (one 50 BTC output to the specified address). However, this does cause a problem when you're trying to work with transaction data, as the transaction hashes cannot be considered unique identifiers of a transaction.

This was briefly discussed here, but the discussion was based more on block validity.

This actually led to a bug that caused an overwrite of the older transaction, which was fixed in the 0.6.0 release.

There were a few BitcoinTalk threads about one of these occurrences:
BitcoinTalk
Other BitcoinTalk

In the first of these threads, Gavin Andresen seems to suggest that the newer transaction's output can't be spent by saying "Ooh!  Ooh!  50 more bitcoins for the 'Bitcoins Lost Forever' thread!".

The two transaction hashes that have appeared more than once in the blockchain are:
d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599
e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468

So, can these transaction outputs be spent? Why, or why not?

EDIT: I should mention that I checked, and as of July 5, 2013, none of the transactions' outputs have been spent.

Updated as my earlier answer was wrong

Quoting from BIP 0030:

  Blocks are not allowed to contain a transaction whose identifier matches that of an earlier, not-fully-spent transaction in the same chain.

  This rule is to be applied to all blocks whose timestamp is after a point in time

This means that a transaction can have the same hash multiple times as long as it's always spent first before the new transaction is created.

As for the older transactions: they are valid but the network won't let you spend them because the implementation in the reference client won't let you.


Why was this transaction allowed on testnet? I'm a bit confused on how testing stuff for Bitcoin on the testnet currently works.

For example, bitcoin core 0.10 enables only 40 bytes in OP_RETURN, but I'm not sure if 0.10 is the latest version allowed on the testnet.

I know that there are OP_RETURN transactions in the testnet block chain that are up to 64 bytes, as seen in this transaction:

{
  "transaction_hash": "91615716a4d3c42cafc240b594d79782709c2c359bd0d5a1d30fa2ee8294bcd3",
  "hex": "37356365626362356462366363636537383565633837646134353564373332646162653661313462636362623235393338643465663163373539346232303934",
  "text": "75cebcb5db6ccce785ec87da455d732dabe6a14bccbb25938d4ef1c7594b2094",
  "receiver_addresses": [

  ],
  "sender_addresses": [
    "mmHWy49WWGFQgmeZt7wYKvWSh7Szi9XQAm"
  ]
}

source

Is the code for the testnet differences within the most recent bitcoin github repo, or is it a separate repo I must download, compile, and point towards the testnet?

Some clarification on how this works would be great.

For example, bitcoin core 0.10 enables only 40 bytes in OP_RETURN, but I'm not sure if 0.10 is the latest version allowed on the testnet.

40 bytes in OP_RETURN has always been legal. It was just non-standard, meaning that the standard client wouldn't mine or relay those transactions, but would allow them if they were already in a block.

However, testnet disables all standardness rules.

  Is the code for the testnet differences within the most recent bitcoin github repo, or is it a separate repo I must download, compile, and point towards the testnet?

It's the same program with the -testnet switch passed at the command line. (Or in your bitcoin.conf. Either works.)


How much does it cost to buy and sell bitcoins? I'm a newbie.

Lets say I see the btc usd exchange graphs and see that it has tripled in the last month and I decide to put $5k in hoping it will grow.

What is the least amount of USD I could spend to buy $5k and sell $5k on a moment's notice whenever I feel like it?

Mt. Gox takes a 0.6% fee.

Bitstamp a 0.5% fee.

You also have to consider the time it would take you to get your account approved, and your cash to reach the exchange from your bank, plus any bank fees (both sides).


Could Bitcoin Core leave the lockinontimeout parameter choice entirely to Bitcoin Core users and not set a default? There doesn't appear to be overwhelming consensus on the lockinontimeout (LOT) parameter for the Taproot BIP 8 activation mechanism. I know some would strongly argue against doing this but could Bitcoin Core release a version where users are forced to choose between setting LOT to true or false before running the software? Is this technically viable?

Matt Corallo and ZmnSCPxj answered this on the Bitcoin dev mailing list.
Matt Corallo stated:

Bitcoin Core does not have infrastructure to handle switching
consensus rules with the same datadir - after running with  uasf=true
for some time, valid blocks will be marked as invalid, and additional
development would need to occur to  enable switching back to
uasf=false. This is complex, critical code to get right, and the
review and testing cycles  needed seem to be not worth it.
Instead, the only practical way to ship such an option would be to
treat it as a separate chain (the same way regtest,  testnet, and
signet are treated), including its own separate datadir and the like.

ZmnSCPxj added:

Without implying anything else, this can be worked around by a user maintaining two datadirs and running two clients.
This would have an "external" client running an LOT=X (where X is whatever the user prefers) and an "internal" client that is at most 0.21.0, which will not impose any LOT rules.
The internal client then uses connect= directive to connect locally to the external client and connects only to that client, using it as a firewall.
The external client can be run pruned in order to reduce diskspace resource usage (the internal client can remain unpruned if that is needed by the user, e.g. for LN implementation sthat need to look up arbitrary short-channel-ids).
Bandwidth usage should be same since the internal client only connects to the external client and the OS should optimize that case.
CPU usage is doubled, though. (the general idea came from gmax, just to be clear, though the below use is from me)
Then the user can select LOT=C or LOT=!C (where C is whatever Bitcoin
Core ultimately ships with) on the external client based on the user
preferences.
If Taproot is not MASF-activated and LOT=!U is what dominates later
(where U is whatever the user decided on), the user can decide to just
destroy the external node and connect the internal node directly to
the network (optionally upgrading the internal node to LOT=!U) as a
way to "change their mind in view of the economy". The internal node
will then follow the dominant chain.


Do private people mining or exchanging Bitcoin with Fiat fall under FINCEN's definition of "user"? Fincen's March 2013 report defines:

A user is a person that obtains virtual currency to purchase goods or services.
An exchanger is a person engaged as a business in the exchange of virtual currency for real currency, funds, or other virtual currency.
An administrator is a person engaged as a business in issuing (putting into circulation) a virtual currency, and who has the authority to redeem (to withdraw from circulation) such virtual currency.

Note that to in order be considered an exchanger or administrator by the above definition, a person must be "engaged as a business".

So, is it true that a private person who mines at home, or a private person that sells Bitcoins in exchange for fiat, isn't in fact considered an exchanger or administrator, but rather a user (and is therefore not a Money Service Business and is exempt from regulation)?

The short answer is, it is complicated.  Below are some resources that may helpful.

As a disclaimer none of the below statements constitute legal advice and they should not be relied on.

I recently co-authored an article that contains some background information to your question. William B. Fleming and Joseph Evans, Bitcoiners in the Courtroom Part I: Government Oversight, Ford. Corp. L. Forum (Aug. 20, 2013).

TXT

PDF

The relevant portion is below.  Though, admittedly, it may not answer your question in full.  An argument can be made that the Guidance may have left room for a distinction between a miner who uses his Bitcoin for goods and services, and a miner who sells his Bitcoin for fiat.

"Notably, according to the Guidance, “users” are not subject to these registration requirements.   “A ‘user’ is a person that obtains virtual currency to purchase goods or services.”  Miners, too, are not subject to these registration requirements since “a person that creates units of this convertible virtual currency and uses it to purchase real or virtual goods and services is a user of the convertible virtual currency and not subject to regulation as a money transmitter.”

The most interesting part of your question really raises the issue of the scope of the definition for a "money transmitter."  Specifically: "are miners who sell their Bitcoin for fiat money transmitters?"

Page 5 of the Guidance offers an explanation that you may find helpful:

"A person that creates units of this convertible virtual currency and uses it to purchase real or virtual goods and services is a user of the convertible virtual currency and not subject to regulation as a money transmitter.  By contrast, a person that creates units of convertible virtual currency and sells those units to another person for real currency or its equivalent is engaged in transmission to another location and is a money transmitter."

Another helpful piece of information is located in footnote 10: "whether a person is a money transmitter is a matter of facts and circumstances.  The regulations identify six circumstances under which a person is not a money transmitter, despite accepting and transmitting currency, funds, or value that substitutes for currency."  31 CFR § 1010.100(ff)(5)(ii)(A)-(F).

This is the relevant portion of that statute:

(5) Money transmitter —(i) In general.

(A) A person that provides money transmission services. The term “money transmission services” means the acceptance of currency, funds, or other value that substitutes for currency from one person and the transmission of currency, funds, or other value that substitutes for currency to another location or person by any means. “Any means” includes, but is not limited to, through a financial agency or institution; a Federal Reserve Bank or other facility of one or more Federal Reserve Banks, the Board of Governors of the Federal Reserve System, or both; an electronic funds transfer network; or an informal value transfer system; or

(B) Any other person engaged in the transfer of funds.

(ii) Facts and circumstances; Limitations. Whether a person is a money transmitter as described in this section is a matter of facts and circumstances. The term “money transmitter” shall not include a person that only:

(A) Provides the delivery, communication, or network access services used by a money transmitter to support money transmission services;
(B) Acts as a payment processor to facilitate the purchase of, or payment of a bill for, a good or service through a clearance and settlement system by agreement with the creditor or seller;
(C) Operates a clearance and settlement system or otherwise acts as an intermediary solely between BSA regulated institutions. This includes but is not limited to the Fedwire system, electronic funds transfer networks, certain registered clearing agencies regulated by the Securities and Exchange Commission (“SEC”), and derivatives clearing organizations, or other clearinghouse arrangements established by a financial agency or institution;
(D) Physically transports currency, other monetary instruments, other commercial paper, or other value that substitutes for currency as a person primarily engaged in such business, such as an armored car, from one person to the same person at another location or to an account belonging to the same person at a financial institution, provided that the person engaged in physical transportation has no more than a custodial interest in the currency, other monetary instruments, other commercial paper, or other value at any point during the transportation;
(E) Provides prepaid access; or
(F) Accepts and transmits funds only integral to the sale of goods or the provision of services, other than money transmission services, by the person who is accepting and transmitting the funds.

These definitions can be found here: 31 CFR § 10.10.100

I hope that you find these resources helpful.

Joe


Is there a Bitcoin Cash explorer that supports Xpub addresses? As the title says... I've been unable to find a block explorer that supports Xpub for Bitcoin Cash.  Anyone know of any?  In particular and preferably, one that will allow for fetching via GET (so I can import the data into a Google Spreadsheet).

Blockonomics supports lookup of xpubs and multiple addresses. They recently announced support for BCH


Using BTCPay To Accept Undefined Payment Amounts Following advice from users on this site, I have implemented a BTCPay Server and got it set up to receive payments.  I am comfortable using the API.
My need is to set up receive addresses for many clients (1000+) but the clients pay indeterminate amounts.  That is, I cannot generate fixed-amount invoices for the clients because they pay whichever amount they wish to.
I need to generate a receive address for each client, and then credit their account balance (in USD) on my site with however much they sent to the address in BTC once it has been received and settled.
Does anyone know how I can achieve this in BTCPay Server?  I have listed my ideas below but am looking for the 'correct' solution as opposed to what feels like a hack.
Current Ideas

Generate an invoice for a tiny amount, and then handle the over-payment that the client makes when they send the BTC.  The over-payment must not be refunded.

Ask the client how much they are expecting to pay on the website and generate an invoice for about this amount.  I would love to avoid this method as the use case is for them to send however much they want to.

I separately sought help on this issue from the BTCPay Server support channel, and with their help have devised a 'work-around' for this problem.
The initial response from their support is paraphrased below:

BTCPay Server does not currently support API access to the wallet, and
it is not [currently] possible to generate ad-hoc receive addresses
programmatically.

After a discussion, the method that I suggested in point 1 above seemed the most suitable:

Generate a very low value invoice in BTCPay Server (for example, for 0.000001BTC).  In my case I set the invoice expiry to be 24 hours as my clients will not necessarily pay immediately.
Send the payment address\QR code to the client for payment.
The client makes a payment of whatever amount they have decided.
The invoice is marked as 'over-paid'.  That is, the client paid more than the invoice amount.
In my software, I credit their account with the actual amount they paid.
Generate the next invoice for the client (which will need to be done each 24 hours as the invoices expire).

Unlike BitPay, BTCPay Server does not automatically refund overpayments.  This is critical to the solution working - as I am expecting clients to pay an indeterminate amount but it will definitely be more than the very low invoice amount.
References
The following references are from my conversation with BTCPay Server support on their Mattermost support channel.
Ref 1 (Receive addresses and wallet API):

So we don't have a wallet API yet. BTCPay is compatible for the most
part with BitPay's API. However, that API is not allowing the full
potential of the software, so we're working on crafting a way better
API. It's still in infancy you can preview docs here and in case you
have some feedback you can join the discussion on GitHub. We don't
have ETA when the new API will be fully ready, probably by the end of
the year.

Ref 2 (My proposed solution)

Thank you for the response. Can I ask if this that I am about to
describe is a viable work-around for now?
Create an invoice for each client for a low amount (such as
0.00001BTC) and then an address is available for a client to send payment to.  They send their payment (which will be higher than the
invoice amount) and then the invoice is flagged as over-paid.
This presumes that the over-paid amount will not be automatically
refunded to the client.
Once received I can then generate a brand new invoice for that client
so that they receive a new address.

Ref 2a (Their response)

sure that would work

Ref 3 (Invoice over-payments)

refunds are done by the merchant, not automatically


What happens to a spent Bitcoin that was earned from a chain replaced by a longer chain? Let's say miner Moe mines a block taht is accepted by the network.  Moe presumably receives some Bitcoins in his wallet for this.  So let's say Moe "spends" that Bitcoin by buying some anti-poking goggles from Curly, even though his newly mined block is at the top of the chain and has no blocks on top of it.  Curly sends the goggles to Moe via FedEx.  Then another miner Larry mines a longer block and that replaces the original one Moe mined.  So now Larry has some Bitcoins.  So does the transaction between Moe and Curly disappear and Curly is left without a pair of goggles and with no Bitcoin?

Yes, Moe's transactions (both the coin creation one and the payment transaction) become invalid if Larry mines a conflicting blockchain that has more work (almost the same as longest, but not quite) than Moe's blockchain. So Curly would be without payment and Moe would have gotten himself a free pair of goggles.

Now if Moe and Larry were the same person this would be a Finney attack where Moe/Larry are intentionally defrauding Curly.

Of course there are built in safeguards to protect against this. Firstly, Moe cannot spend newly mined Bitcoins until 100 blocks have been mined on top of his block. But even if he did wait 100 blocks before transacting, Curly could still be defrauded.

The solution to this is for Curly to wait for the payment transaction to get a few confirmations. By waiting for confirmations, the amount of hashrate that Larry would need in order to change the blockchain to not include Moe's transaction greatly increases. After a few blocks, it is basically infeasible and thus it can be said that the transaction is permanent and cannot disappear.


Is it possible to use Electrum to create a multisig wallet with a trezor and an airgapped coldcard? I set up a 2-of-3 multisig using Electrum, a Trezor, and a Coldcard. During testing, I ran into issues using the Coldcard to sign.

My approach:

(On Electrum) File -> New/Restore -> Multi-signature wallet -> Use a hardware device
Plug in Trezor, unlock, and set up as p2wsh.
Repeat steps 1 and 2 for second Trezor.
Plug MicroSD card into Coldcard.
(On Coldcard) Settings -> Multisig Wallets -> Export XPUB
Plug MicroSD card into computer running Electrum.
(On Electrum) Enter cosigner key
Paste p2wsh xpub from MicroSD card into text box.

This worked and my wallet was set up. I sent a small amount of bitcoin into it to test that I could sign transactions with Electrum. I was expecting the UX to be similar to that of a singlesig airgapped Coldcard used with Electrum, meaning I would create a transaction and click the "Export PSBT" button. Bring that to my Coldcard and sign the transaction. However, the transaction popup only has an "Export" button and no "Export PSBT" button. The "Export" button gives me a .txn file that is json containing the tx hex. Coldcard does not recognize this file and therefore cannot sign it. I was able to find these docs, specifically the section titled "Air-Gapped Creation of a Multisig Wallet". However, those docs seem specific to Coldcard-only multisig setups.

Is it possible to export multisig PSBTs from Electrum for signing on an airgapped Coldcard or is this something that is simply not currently supported? If it's supported, what do I need to do?

I am having the same issue and would prefer to comment but don't have enough reputation.

It seems like this pull request is being reviewed and will add CC multisig integration into electrum.

However, there is currently a coldcard hardware multisig fork of electrum that is available here though several commit behind the main electrum branch.

I haven't been able to build this fork successfully so hope there is additional work on Cold Card integreation in the near future.


Why this alternative method to mining will fail? From what I understand, we need mining to validate the block, we need the proof of work to limit the number of miners can add a block, and we need the block interval to give time to the new block to spread across the chain.
And usually it's said mining is like a lottery, and hence the alternative idea:

Instead of proof of work, we choose randomly some of the miners registered on the network, only that miner can validate and add the next block, and it has let's say 2min to do it, if not another miner is chosen randomly.
In this way we don't need to waste a lot of energy to solve the hash problem.

What is the problem with this solution?
(I know it has a problem, but I can't see it and I think knowing this will help me to understand better why we need the proof of work)

This is actually a good idea in principle. The reason why this method will not work in the Bitcoin setting is that it is not Sybil-resilient. In particular, Bitcoin solves the problem in the anonymous setting, meaning that the parties participating do not know who else is on the network and more specifically do not know how many others are on the network.

If we imagined this idea implemented naively in Bitcoin, one could create a construction as follows: First, somehow maintain a list of all the nodes in the network (while from a network engineering point of view this is difficult, I will argue that, even if it were easy, the method remains insufficient), perhaps by IP. When nodes exit and enter the network, update that list. Every desired interval of time, say every 10 minutes, elect one peer from the network as "leader" in a globally consistent manner such that every node agrees on who is leader. The leader is allowed to produce a block within 10 minutes; regardless of whether they manage to produce a block within this timeframe, a new leader is elected for the next block generation afterwards.

Now let's think what the problem with this construction is: Because IPs are not authenticated and their allocation is somewhat centralized, you could imagine an adversary allocating multiple IP addresses and using one computer to connect to the network from multiple addresses. This increases their probability of being elected leader. An adversary who controls more than 51% of the IPs on the network would then be able to perform 51% attacks. While this might seem implausible, we actually know ways of doing it using, for example, BGP attacks. The critical observation is that such a mechanism would require an assumption of honest majority by IP address, not honest majority by computational power. This is a much stronger assumption than the honest majority by computational power assumption that Bitcoin makes today. Bitcoin's assumption makes it resilient to Sybil attacks because computational power cannot be faked in the same manner that IP address can be.

Lastly, let me say that there exist protocols which use your idea. However, they do not pick a network participant at random by IP address, but use other means for selection. One such example is the Ouroboros BFT protocol in which participants are chosen sequentially to produce blocks -- in this case the population is fixed and does not evolve. Another example is the Ouroboros protocol in which participants are chosen exactly as you describe, but with a weight which is proportional to the amount of money they own in the system -- here the population is evolving as money is changing hands (note that other flavours of Ouroboros, such as Ouroboros Praos or Ouroboros Genesis, do not work in this manner). Another line of work in similar directions is Algorand.

There are many subtle details on how to implement such protocols which are covered in these papers: How to do the random selection efficiently; how to do the random selection in an unbiased manner (or mostly unbiased manner); how to make sure all participants agree about who is elected leader; how to deal with people entering and leaving the network; how to deal with prediction of this randomness to harm the network; and so on.


How does Ripple decide which offer to fulfil if they offer the same rate? If two offers have the same exchange rate, how does Ripple decide which one to fulfil first?

If they're in the same order book (same currency/issuer pairs), it's the one that was placed first.

If they're in different order books (say because the source holds balances from more than one issuer) it's a bit more complex. Even if the offer rates are the same, the effective rate might not be the same. For example, if one issuer has a higher transfer fee, that can make the effective rate higher even if the offer rate is the same.

If the effective rate is the same, then it's the one specified first in the transaction's path set. Currently, the server sorts the path set when the transaction is formed based on an attempt to provide the most liquidity and any benefits that can be achieved. So, for example, if one path reduces a balance that's over its limit, that will be preferred.


Bitcoind When sending a payment how can I know how many inputs and outputs there are? We're using bitcoind on our server.

When people withdraw from our system we want to have the correct miner fee.

I understand that we can get the good miner fee from txconfirmtarget or the API from: https://bitcoinfees.21.co/api

But when we send a transaction how do we know which miner fee to put if we want to enter it into the database?

EDIT:
I do notice this: bitcoin-cli estimatefee 2 but then how do we find out how many bytes are being sent?

When you use bitcoind's internal wallet and its related RPCs, it will automatically calculate the transaction fee for you and include that in the transaction. You can then retrieve the transaction fee used by using the gettransaction command. If you want the fee rate that was used, you can use the fee from gettransaction and divide that by the size returned by gettransaction.

Edit: To get the fee before you send, you can create the transaction with only the outputs you want (i.e. no inputs) with createrawtransaction. Then you can use fundrawtransaction to fill out the transaction with inputs. That will also give you the fee that the transaction is paying. Then you sign it with signrawtransaction and send it with sendrawtransaction. There is no other way as the other send* RPCs create the transaction, select coins, sign, and send all in one command.


How to run BitcoinCash node? How to install and Launch Bitcoin Cash daemon on machine?

I have already synchronized full BitCoin node, Here is the link bitcoin.org from here i learn how to setup BTC node

I also want to run BitcoinCash node but i do't have any idea about BCH node

If you go to BitcoinCash's site, you can see there are multiple implementations of the bitcoincash protocol.
You can select any one, say BitcoinABC.
On their page you can find source code as well as binaries for your type of system which you can download and run.


How do mining pools work? I understand the following

  Pooled mining is a mining approach where multiple generating clients
  contribute to the generation of a block, and then split the block
  reward according the contributed processing power. Pooled mining
  effectively reduces the granularity of the block generation reward,
  spreading it out more smoothly over time.

How does it work under the hood? What does the mining pool server do in terms of computation?

What do the mining workers do differently then if they would be mining solo?

What do the mining workers do differently then if they would be mining
  solo?

A miner that is mining within a third-party pool doesn't need the entire block chain. In fact it doesn't need to be connected to any peers of the Bitcoin network. These miners work entirely outside of the network and could technically just need to communicate to the administrator of the pool in order to mine.

The admin of the pool, on the other hand, needs to be exposed to the Bitcoin network and needs to listen for new blocks and validate transactions. The admin of a pool is a full Bitcoin node as described in Satoshi's paper.

  How does it work under the hood? What does the mining pool server do
  in terms of computation?

What happens behind the hood is that the pool admin uses the combination of the miners computation, within her pool, as sort of an extension to her computational power. To do this there's specific software installed on the admin's server that takes care of making sure each miner is doing the work requested.

During a 10 minute block cycle, since most miners within a pool won't actually solve the block (only 1 miner on average will), the admin needs to make sure that miners are actually working on the problem.

To do this the miners solve a reduced difficulty hash, but one that could have also solved the actual hash, so it proves to the administrator they're actually working on the problem.


Bitcoin core multisig signing order I have a technical question regarding the signrawtransaction function in Bitcoin core when signing a partially-signed transaction.

I have tested different scenarios and signrawtransaction will always sort the signatures in the correct way in the scriptSig, regardless of the order the transaction is signed one-by-one.

Is this achieved by analyzing the scriptSig of the partially-signed transaction when signing, and then verifying each signature in the partially-signed transactions scriptSig against all public keys in the redeemscript and finally ordering them correctly? Or is there a better way of doing this?

Unfortunately I don't understand how this is done by reading the C-code of bitcoin core.

The signatures must be ordered the same way as public keys. Otherwize transaction is invalid. This is how OP_CHECKMULTISIG(VERIFY) works.

Of course, you may use the private keys for signing in any order, because signatures are independent.


how to recover funds from blockchain I forgot my password of Blockchain Wallet and i tried to recover from (12 word backup phrase key but it has generated a new wallet) on the same 12 word backup key and it has different (wallet ID) but my funds couldn't recovered, so i need guidance to recover my funds from Old wallet into new Wallet any idea what should i do?

Use https://login.blockchain.com/#/recover and note that it says

Recovering your funds will create a new wallet ID.

OR

Read https://support.blockchain.com/hc/en-us/articles/115001298143-Your-Secret-Private-Key-Recovery-Phrase-The-Failsafe where it says

The recovery phrase generated in your Blockchain wallet is compatible with other bitcoin wallets that implement BIP44/BIP39.

So you can go to https://bitcoin.org/en/choose-your-wallet and select any other wallet that supports BIP44/BIP39. Then use that wallet to recover control over your money by selecting wallet recovery at startup and entering your recovery phrase.


Import bitaddress.org wallet into Bitcoin-Qt client? I've received some bitcoins in a wallet created by bitaddress.org, and I've saved a screenshot of the webpage that has the public/private keys and the QR codes:

I've now downloaded the Bitcoin-Qt client, how do I import what I have into it as a wallet?

Use console. Then "importprivkey yourprivatekey"


What is the most lightweight proof-of-work algorithm? I know litecoin was created back in the day using Scrypt as to make it more lightweight but also harder to build ASIC hardware from - so everyday computers could mine. Are there other algorithms one should be aware of nowadays? Possibly ones that require little resources and make it impractical to build ASICs.

Contrary to the name the proof of work used in Litecoin is significantly more difficult than SHA256 to verify (it slows sync times noticeably), while simultaneously not achieving it's goals of being only able to be mined on a CPU, or a GPU depending when you read the pitch on their website. It offers very little resistance to being mined on a GPU or ASIC, in fact its design is extremely well tailored to linear time-memory tradeoffs, which make the hardware cost even cheaper. Being harder to make an ASIC for isn't an asset either, it just means that they become less commodity hardware and more likely a monopoly of one or two players.

SHA256 is about as lightweight and as simple as you can get, avoiding hardware acceleration is not an achievable goal and probably not even desirable even if it were.


Which source code to make "checksum bits appended" Can anyone tell me the specified source code to make "checksum bits appended", before doing Base58 conversion? Thanks very much!!!!

See src/base58.cpp Line 124:

std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn)
{
    // add 4-byte hash check to the end
    std::vector<unsigned char> vch(vchIn);
    uint256 hash = Hash(vch.begin(), vch.end());
    vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
    return EncodeBase58(vch);
}

As you can see, the data vch is hashed, then the first 4 bytes of the hash are appended to the end of vch before base58 encoding.


How can I benefit by running a full Bitcoin node? I noticed that I can run a node with Bitcoin Core.

If I open my computer always and make the full node run on my device, what benefits can I get? Is there any reward for serving this?

No, full node operators are not compensated in any way. If you run a full node, you will receive no monetary benefit.

However running a full node does benefit you. It means that you are contributing to the network's security. Your full node is verifying and relaying valid blocks and transactions so you are contributing to the transmission of blocks and transactions and ensuring their validity. This then corresponds to your node contributing to the health of the network and helping the network stay alive.

Furthermore, a full node allows you to have privacy and security in your transactions. Because a full node fully verifies every block and transaction, when you use it as a wallet (or have a wallet that is connected to it), your transactions are guaranteed to be valid and there is almost no possibility that you can be defrauded (assuming that your node is well connected). It also gives you more privacy as there is not one server or node that is giving you data as with SPV wallets.


When and who coined the term "mining"? When was the term "mining" (the process of hashing, processing the transactions, adding blocks to the blockchain etc.) first used?

Was it there right from the beginning of bitcoin?

Who was the first to call it mining?

Are the other examples pre-bitcoin of the word "mining" being used in a similar manner (i.e. to mean some sort of computational/cryptographic work)?

From Satoshi's paper (my emphasis):

  By convention, the first transaction in a block is a special
  transaction that starts a new coin owned by the creator of the block.
  This adds an incentive for nodes to support the network, and provides
  a way to initially distribute coins into circulation, since there is
  no central authority to issue them. The steady addition of a constant
  of amount of new coins is analogous to gold miners expending resources
  to add gold to circulation.  In our case, it is CPU time and
  electricity that is expended.

I don't know of any other examples where the word has been used in a similar manner.


What is the economic value of Litecoin? Is it simply a subdivision of BTC? The main differentiator between Litecoin and Bitcoin appears to be the quantity of coins available, the frequency in which the blocks are mined, and the mining technology is different.

The first benefit "Quantity" appears to be a subdivision of another arbitrary fixed value.  Since BTC is easily divisible, I don't see the the benefit of having more units that can also be subdivided.

The second benefit "Frequency" appears to create more blocks for the sake of creating blocks, and the safety zone of one 1 hour double spend attack has changed from 6 blocks BTC to 150 blocks Litecoin.  (no benefit)

So what economic value does litecoin provide

During the high value mining period?  (high block reward)
During the low value mining period? (low block reward)

In other words, it seems that the initial differences between BTC and Lightcoin deal with the block reward, but once that is used up (or too low of a value) there isn't much more that makes Lightcoin more exceptional than BTC.

The major difference between litecoin and bitcoin is the hashing function. Bitcoin uses SHA-256 while litecoin uses scrypt. scrypt "is designed to be far more secure against hardware brute-force attacks than alternative functions" [1]. By hardware brute-force attacks they basically mean ASICs such as the ones coming out of butterfly labs. For instance the advantage that GPUs have above CPUs when mining litecoins is much much smaller than the advantage they have for mining bitcoins. It may well be that at some point ASICs will be made for litecoin, but the creators of litecoin specifically chose the hash function to make that happen as far in the future as possible.

The other differences are trivial, but it may be nicer to have confirmations come in faster. The only real difference to having blocks made faster will mean that transactions will sit at 0 confirmations for less time. However still the absolute number of confirmations a transaction is not what makes it safe, but rather the amount of computation that has gone into making those confirmations.


How to get number of transaction confirmation from bitcoind? I have a question,
How can I get the number of transaction confirmation by using bitcoind?

for example:
https://live.blockcypher.com/btc-testnet/tx/9fd745521000d1aadb1f4857e44817c3342d02585af93c83d19dc3f3f4425594/

you can see the number of CONFIRMATIONS on that page

thank you in advance!

Use bitcoin-cli getrawtransaction "txID" 1

The output will include a "confirmations" field, telling you how many confirmations the transaction currently has.

Note that to get this information for transactions not related to your wallet, you will need to set txindex=1 when syncing your your node, or provide bitcoin-cli with the blockhash of the block the transaction was included in. Here is some more info about this, copied from the output of bitcoin-cli help getrawtransaction, running v0.17.0.1:

NOTE: By default this function only works for mempool transactions. If the -txindex option is
enabled, it also works for blockchain transactions. If the block which contains the transaction
is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is
provided, only that block will be searched and if the transaction is in the mempool or other
blocks, or if this node does not have the given block available, the transaction will not be found.


where can I buy a whole bitcoin? I want to buy a full bitcoin at the current price. But coinbase only allows me to buy in $250 increments. Where can I go to purchase an entire bitcoin?

I would go to Localbitcoins.com but their fees are usually too high.

So what I need is a low fee way of buying an entire bitcoin.

Thanks

If you are in the US, you can buy it on coinbase.com or https://exchange.gemini.com/

You need to buy some Bitcoins on coinbase, they will automatically increase your limit. I can buy $5000 worth of Bitcoins on Coinbase, and would if I had the money.

Fees of Gemini are low, ie .05 cents for $20 in BTC, or 50 cents for a $200 order.

Or localbitcoins, if you care about anonymity, but they charge a high markup.


Is there any Bitcoin Exchange that doesn't have fees for euro SEPA deposits/withdrawals? Since Tradehill disappeared, which was really sad, I cannot find any Bitcoin exchange that let's me deposit and withdraw euros without fees, while they do for US dollars.
Both Mt.Gox and Intersango have a 10-20 PLN fee that their bank charge. While Bitstamp has a 0.90 EUR fee + a EUR-USD conversion rate.
Note that I'm looking for a real exchange, not for a person-to-person service like Bitmarket.eu or Bitcoin.de.

Would a non-bank transfer work?  How about getting a realoadable prepaid debit card and using that for spending / ATM use?


Duplicate r value for an address: only an issue for a multi-input Tx? I've modified the r-scan Python code to look beyond the 50 Txs the Blockchain.info API usually returns.

My modifications take all the r values for my address and look for duplicates, but a commented out section of code makes mention of just checking the TxIDs which have more than one input script.

Is it only Txs with multiple inputs that are the problem?

Any reused nonce is a problem, it's not restricted to a single transaction.

No competent software will ever reuse nonces accidentally, so using a scanning script like that is just ruining your privacy for no real benefit. Bitcoin Core, Electrum and Armory all use RFC 6979 deterministic nonces so there is no room for RNG failure in these cases, though any software faulty enough to fall at that hurdle will have used the same RNG to make the private keys as well.


From Edge to Poloniex Bought bitcoin and have a balance in a exchange account at Poloniex. Is there another step I need to take or is this where the estimated value that changes is where I will be able to send this back to Edge, and change back to USD.
I guess my question is: Is this money at work for me here or do I need to do something else.
And is this deposit safe where it is or is there a layer of security that needs to be taken.
Obvious to say I'm new to this and also thank you for your help!!

Is this money at work for me here or do I need to do something else.

I believe Poloniex is a currency exchange. If you want to earn money simply by trading currencies back and forth, I believe you need to be an active manager of your trades.

Poloniex seem to offer margin trading - In general I suspect this is a good way to lose money if you are new to finance.

If you don't know whether your money is at work for you then it almost certainly is not.

  is this deposit safe where it is

Storing money on an exchange when you are not actively trading is one of the least safe places to hold money.

The safest would be an offline wallet with well backed up keys and/or recovery seed phrase in multiple locations, with rehearsed recovery and with instructions to your heirs in case of bus.