Is there an equivalent to the Xpub/Zpub for multisig wallets? When I have a typical wallet, I can give my Xpub to someone to generate addresses whenever they need. ("they" here could be an instance of BTCPAY server or some other application that I don't want to expose private keys to).

When I have a multisig scheme/wallet. How do addresses get generated? And is there an equivalent key (Xpub, zpub etc) that I could generate and put in my btcpay server?

Thanks

A multi-sig address is a hash of a script that combines multiple separate keys. In other words the purpose of it is to require multiple signatures from multiple keys that are stored (and usually generated) independently. For that reason it can not be generated from a single extended public key (xpub).
What you can do, is to have multiple extended keys, and for each address derive a public key from each xkey at the same path and combine those pubkeys to get your address.

For example a 2 of 2 scheme between Alice an Bob would work like this:

Alice generates a master private key, stores it in a safe and private place.
Bob generate a master private key, stores it in a safe and private place.
Alice gets her master public key for a specific path like: m/44'/0'/0'/0* and shares it with Bob.
Bob gets his master public key for a specific path like: m/44'/2'/1'/0* and shares it with Alice.
They both agree that Alice pubkeys have to come first** and start at index 0.
To get an address they each independently derive the same public keys from the two extended pubkeys they have, combine them (OP_2<AlicePubKey><BobPubKey><OP_2><OP_CheckMultiSig>) hash it and get the corresponding address.
Each time they want a new address, they get the next index and repeat step 6.

*. These paths are optional but the keys that are derived from these extended public keys can only have non-hardened paths.
**. Note that in step 5 the order is important and they have to agree on it first. Otherwise the address for OP_2<BobPubKey><AlicePubKey><OP_2><OP_CheckMultiSig> is different and mistakes like that could lead to losses.


Can you mine without transactions? As far as I know, mining means verifying transactions and thus keeping the Bitcoin network alive.
Today, at a local meetup, some people have informed me that mining doesn't need transactions. They said that even if there are no transactions waiting to be verified at all, you can just mine away based on the previous block's "hash", and as soon as you find the right salt you create a new block.
That would mean you don't do anything by "mining" except for blowing a bubble. Where is my logic flawed?

This is essentially correct: the protocol leaves it up to the miner to decide which transactions  to include in a block.  There is no requirement for them to include any transactions at all, other than the "coinbase" transaction which specifies where to send the block reward.

However, most transactions have fees attached, which the miner can collect only by including those transactions in the block.  So this gives the miner an incentive to include transactions if there are any outstanding.

Note that a block with no transactions does still contribute to the security of the currency: it increases the amount of hashing that an attacker would need to do to reverse a transaction recorded in a previous block.  (They would have to produce a chain showing more work than the current one, including the work proved by the zero-transaction block.)

See also Does mining activity only exist if there are bitcoin transactions?.


How to move only "blocks" and "chainstate" folders on an external USB hard-drive while running Bitcoin Client on connected laptop with Ubuntu? I have experience with secure-copy and secure-download but how do I move only the Bitcoin Client "blocks" and "chainstate" folders within the home directory of Ubuntu 18.04 to an external USB hard-drive while running the Bitcoin Client on the connected laptop with limited storage on board?  I'd sincerely appreciate the best-practice or recommended approach for hosting a Bitcoin full-node on a laptop with an external USB hard-drive since I am also attempting to run Blockstream and FIBRE on this environment- thank you

The easiest way to do this according to the Bitcoin Core Wiki is to append the datadir option after running bitcoind to launch the client according to the following syntax:

bitcoind -datadir=/media/myusername/backup/.bitcoin

example provided thusly:

bitcoind -datadir=/media/alexanderjsingleton/SEAGATE/.bitcoin

Also, don't forget to mount the external USB hard-drive by using the ls -l /dev/disk/by-uuid/ option by command line or by GUI-method.


What happens when the sent amount doesn't match the payment request exactly? If I opened an address with a request for 1 BTC, what is the limit that can be sent to me?
For instance, if someone sends 0.9/0.89+ to this address then it will consider as accepted, but if any less than that, it won't be received at all.

So I'm asking what are the rules here regarding sending less than / more than the amount requested.

Thanks!

There are no rules.

Once you share an address with someone, they can send arbitrary amounts of bitcoin to that address.  They can also send further transactions to that address any time in the future.  There is no way to reject a transaction just because you don't like the amount or for any other reason; if the transaction spends valid coins and is properly signed, it's valid and is irreversible once confirmed.

The various schemes for requesting a payment (bitcoin: URI, QR code, BIP 70) do include a requested amount, but it is nothing more than a request.  Most client software handles it by pre-filling the amount field in their "send coins" dialog, but typically the user can just change the amount if they want to.  They could also just extract the address from the payment request and send whatever they want to it.

It is up to you to decide what to do if you receive a different amount than you expected.  As far as the Bitcoin protocol is concerned, the money is just yours to keep or to spend as you please.

In a typical commerce platform, you would have had the user log in to make a purchase, and you would generate a unique address for them.  So if the user sends a different amount than you requested, you would know to contact that user and ask them to send more money or to provide refund instructions.  But that is outside the scope of Bitcoin itself.

You can try to create a new transaction that sends the coins back to the address(es) that sent them, but this has some pitfalls.  In some cases the sender may not have access to that address anymore.  You will also have to pay a transaction fee for this new transaction (or manually deduct it from the amount).  The BIP 70 payment protocol contains a "refund address" feature that makes this a bit more reliable; but this is optional. The sender can still send coins to your address without providing a refund address, if they choose.


Are there any combination of letters that a namecoin address cannot start with? It recently came to my attention that some Namecoin addresses might not be generated at all (see https://bitcointalk.org/index.php?topic=84569.msg1370025#msg1370025 ). Namely, there are issues with generating addresses starting with

Na, Nb, Nc, Nd, Ne, Nf, Ng, Nh, Ni, Nj, Nk, Nm, Nn, No, Np, Nq, Nr, Ns, Nt, Nu, Nv, Nw, Nx, Ny, Nz, NL, NM, NN, NP, NQ, NR, NS, NT, NU, NV, NW, NX, NY, NZ

Is there some reason behind it, or is it just some vanitygen bug?

Namecoin addresses, like Bitcoin addresses, are Base58 encodings of a public key hash. The encoded data starts with a version byte, and the value of this byte affects the first characters of the result.

Namecoin addresses specifically use a version byte of 52, which dictates a certain range of initials. The prefixes you listed are simply too high - they correspond to a version byte of 53 or even 54. Likewise, some prefixes starting with M are impossible because they correspond to a version byte of 49, 50 or 51. You could give a more precise "lowest" and "highest" addresses, in lexicographic ordering - the address must be between MvaNCeVyvP6ZXYFWGpKaDX9ujEQ418F7sm and NKuyBkoGdZZSLyPbJEetheRhMjezbtjJCf.

A full list of version bytes and first characters is available here, and the possible 2nd character ranges can be interpolated from it. For version bytes 0-2 and 144-255 the address length can be different from 34 so it makes the ranges less intuitive. But for 3-143 it's fairly straightforward: You have about 58^2 possibilities for first 2 characters to go between 141 version bytes, so each is only allocated a range of about 23 combinations. For Namecoin addresses that would be Mv to NK.


Get a programmatical notification when an address receives a transaction I am experimenting building an in-house Bitcoin payment system.

What is currently the recommended practice to get notifications to your web server when a certain Bitcoin address receives a transaction? E.g. trigger an action from somewhere which results a HTTP call made to a web server.

Are there any better alternatives than polling bitcoind?

External systems (blockchain.info) are good to go too for me.

Any way to filter for certain confirmation threshold (e.g. need 6 confirmations)?

Polling bitcoind is superior to any other alternatives as there is zero lag, your operations don't depend on a 3rd party SPOF service, etc.

A fresh incoming payment is also an outspent output, so calling bitcoin-cli listunspent 6 9999999 "[\"localAddressInQuestion\"]" will provide you with the exact unspent amount for this address only. Replace 6 with any number you wish to set as the confirmation threshold or make it 0 to get the unconfirmed payments as well.


Is the ordering of blocks in the rev*.dat files same as the blk*.dat files? I understand that blk*.dat files save the blocks in the order it gets them from it's peers. Is the rev*.dat files in the same order as the blk*.dat files?

For example, would the 400th magicbyte in the blk00000.dat file be representative of the same block as the 400th magicbyte in the rev00000.dat file?

No.

Block data is written (appended to) blk*.dat files whenever a block is received from the network (assuming things like PoW and a few other sanity checks pass). As blocks are received in parallel from multiple peers, their order on disk ends up being chaotic.

Undo data is written when a block gets fully validated. As full validation requires validation of all parent blocks first, the order of undo records tends to be much more monotonic. However, it is not guaranteed to be be perfectly continuous either, as reorganizations can cause discrepancies. If a received block never ends up being part of the active chain, it will never have an undo record, despite the block data being present.

The only guarantee is that block data and undo data is stored in matching files (e.g. a block which is stored in blk00473.dat will have its undo data in rev00473.dat).


Cryptsy, Mintpal, Bittrex API - how many requests can I do? Cryptsy, Mintpal and Bittrex have public APIs.

How many requests per second or minute can I do to these APIs?

Mintpal has a limit of 10 requests/second

MintPal API v1 offers a simple REST API to retrieve information about our markets. The API responses are JSON encoded arrays. Please be aware that calls to the API are rate limited to 10 requests per second, any requests exceeding this rate will be met with a HTTP 503 response.

I know Kraken has different rules. You can 'burst', instead of a flat limit. Source

The basic API rate limit is 1 call every 5 seconds. You can do faster bursts up to 10 calls, but then you'd need to follow that by a 50 second pause before you could resume the 1 call very 5 second rate. If you get locked out, it's for 15 minutes.
For really active traders (including those who want to market make with us), we can offer much higher limits. Anyone interested in this should contact us with a support ticket.

I know Kraken isn't on your wishlist of things to know, but I cannot find information about Cryptsy or Bittrex. But it gives you a insight at real limits, so you can maybe assume those two have similar limits.


How to use the bootstrap.dat in Mavericks? So I'm trying to sync with the network in Bitcoin-Qt, but I just can't seem to make use of the bootstrap.dat file that I downloaded, which is annoying because it will be awfully slow to sync without it.

There was no folder in Application Support where the file was supposed to go, so I made one:

User/Library/Application Support/Bitcoin - and put the bootstrap.dat file in there.

Yet still when I launch Bitcoin-Qt it fails to use the bootstrap, and just tries to sync normally.

Does anyone know if I'm doing something wrong here? Or if there's a way around this problem?

I'm running OSX 10.9 Mavericks.

Thanks

I can at least tell you what I did, on my iMac running OS X 10.9.1 (Mavericks).

I ran Bitcoin-Qt, which immediately started synching.  I could see by the progress bar that if it's roughly linear, it would take 8 - 10 days to complete.  The nice thing about it was that I could see the directories it needed by what it created for itself in ~/Library/Application Support
I downloaded the bootstrap.dat.torrent file from sourceforge.net
Installed the deluge torrent app (deluge-torrent.org), and ran that to expand the bootstrap.dat file (I had never used the BitTorrent protocol before -- was pretty straightforward.).  It put the result in my home directory (14222116865 bytes).
Quit the still laboring Bitcoin-Qt ... then renamed its directory so I could see what directories it required, and in case I had to go back to pick up where I left off:

cd ~/Library/Application\ Support; mv Bitcoin BC_save
Manually created the same directories so I'd have a place to put the bootstrap.dat file

find BC_save -type d -print   # See what dirs are needed

mkdir -p Bitcoin/blocks/index; mkdir Bitcoin/blocks/chainstate

(Later Qt creates Bitcoin/blocks/database, but it wasn't there at this point.)
I'm surprised that more than just "mkdir Bitcoin" is necessary, but apparently you already tried that, so...)

Started up Bitcoin-Qt again.  It immediately "adopted" the directories I had created, and new files were appearing (e.g., wallet.dat).  The lower-left edge had a message indicating it was reading a file from the disk -- so it appeared to be working.
An overnight run -- and it's already done.


Is Wallet softwares safe? then how verify? Some day, I thought that there are may fraud wallet to steal bitcoin.

It is really very achieved as following:

  User should make a keypair at first time. at this time, wallet
  software can send keypair to operator's server, but user doesn't know
  absolutely about this situation unless they capture network packets using Wireshark between wallet and destination address which is forwarded by wallet.

Of course, well-known wallet software may be verified, but I think that we should be careful brandnew wallet software because they are not verified.

Okay, it was my thought so far and my question is:

Is there any software or organization that can verify whether wallet is secure or not?
If first question's answer is yes, what is the method?

Sorry for my English.

Is there any software or organization that can verify whether wallet is secure or not?

You can use an open source wallet and take the time to read and understand all the code and then compile it yourself. This would be an unfeasably large task for most ordinary people. Software developers might find it a bit easier but it is still a large amount of work.
You can use a network sniffer to discover where a standalone wallet on a device you own is sending data.
You could pay a well-known independent security consultant to perform the above analysis or more likely, arrange for an employee or associate to do this. Someone of the stature of Schneier for example. This would be very expensive.

You can avoid the need for this by storing your private keys, and generating transactions, on a computer that is not connected to any network. Then carefully move the raw transaction data to a connected machine for transmission. For example use a new clean USB stick for each transaction. The connected machine has no access to your private keys and therefore cannot surreptitiously divulge them. Some software wallets support this (Armory?) and some hardware wallets are used in this manner (Trezor, Ledger).


Lower confirmation time schemes: any requirement between confirmation time and the probability to find a block during that confirmation time? Bitcoin, the first blockchain-based cryptocurrency, set a 10 minute confirmation interval time; LiteCoin set a 2 minute confirmation interval time; DogeCoin set it at 1 minute; QuarkCoin set it at 30 seconds; Ethereum set it at 12 seconds.

Is there any serious analysis about the stability of the blockchain when the confirmation time is reduced?

To be more specific: any requirement between confirmation time and the probability to find a block during that confirmation time ( specially when confirmation time is going to zero) ?

The lower confirmation time schemes for mining a block will have a pronounced effect on orphaned blocks, with an inversely proportional relationship prevailing.

Generally this can be explained quite simply; because shorter confirmation times for blocks will mean numerous simultaneous competing chains lengths. Of these competing chains, one will eventually be integrated into the ledger when the block height is greater than the competing chains' heights. However, the chains which are rendered obsolete (ie the shorter chains not integrated into the ledger) will mean orphaned blocks are much more likely as confirmation time decreases.

Take an example where it's 1 minute confirmation times. If there's 4 competing chains each 5 blocks in height/length then all it takes is for one of the chains' blocks to be confirmed in, say, 10 seconds, followed by the next confirmation in 10 seconds (which is not a rare event) which will make the block height 7. Therefore, the other chains of height 5 (or perhaps 6 if a block was solved) will be rendered orphaned, and all Txns therein will be orphaned.

There is a balance that needs to be struck between confirmation time and orphaned blocks, and from my experience with altcoins, the 2 minute mark (as employed by Litecoin) is the functional limit. Ethereum has a much, much shorter confirmation time because it's a totally different kind of altcoin. However for POW coins like LTC/BTC, a ~20s confirmation time is infeasible.


Transaction never confirmed over 2 days I did a transaction from my bitcoin core wallet.  The transaction 6263452f635713e60f83d45fe41b1c9ba3b5f5e3af664778bf18a05b15cfde06 has not confirmed, and it is now over 48 hours since I made the transaction.   Although blockchain.info will show the transaction (as unconfirmed) if I enter the transaction ID directly, it no longer shows it on the "unconfirmed transactions" page, https://blockchain.info/unconfirmed-transactions.

What should I do now?  I am a complete newbie - this is my first transaction, and this has been very frustrating.

Thanks.

Your transaction should be confirming shrtly(within 1 day)You did not send the appropriate miner fee which is why the transaction is slower to confirm. Do not worry tho it will confirm at some point tody:)


Is there any difference in pool mining with gash.io over slush? I am new to the crypto-coin mining. If I am mining with my own hardware, is there any difference if I join slush or gash.io? Any difference in payment? There are lot of posts that says to stay away from gash.io because of the 51% share but currently they contribute around 34% only. Should we worry about that? The thing about that is more like if everyone started to mine using gash.io it will become centralized which looses out the decentralized nature of Bitcoin right?

Also, there is the CEX.io which provides GH/s for certain BTC. But since the difficulty increases over time, the GH/s value reduces. The GH/s will mine forever but wouldn't there be a time where that power cannot do any significant mining? Isn't the case with custom hardware too? Can you elaborate on that.

Slush has a 2% fee, and GHash.IO has no fee. So that's a 2% difference for starters. There would be no difference in GH/s, because that solely depends on your hardware and tweaks. There is a difference of paying between the two, Slush uses Score, and GHash.IO uses PPLNS. An explanation from these two from here. You can choose whichever you like.

Score - Score based system: a proportional reward, but weighed by time submitted. Each submitted share is worth more in the function of time t since start of current round. For each share score is updated by: score += exp(t/C). This makes later shares worth much more than earlier shares, thus the miner's score quickly diminishes when they stop mining on the pool. Rewards are calculated proportionally to scores (and not to shares). (at slush's pool C=300 seconds, and every hour scores are normalized)
PPLNS - Pay Per Last N Shares. Similar to proportional, but instead of looking at the number of shares in the round, instead looks at the last N shares, regardless of round boundaries.

According to blockchain GHash.IO indeed has ±36% hashing power. But someone digged into the 'other' sources, and saw that some blocks came from IP-addresses owned by GHash.IO, but it doesn't mean that the block is indeed mined by GHash.IO. I think it is nothing to worry about for now, but GHash.IO shouldn't keep 51% of the hashrate for longer time. Then it indeed isn't decentralised, and the coin is vulnerable for a 51% attack.
I don't know how the CEX.IO works precisely, but you're right about the part the a certain amount of GH/s will return less BTC as the difficulty goes up. But as long as they upgrade the hardware, and get new equipment with a better GH/s/W ratio, it should still be profitable. If it isn't for a big company like them, it certainly isn't for individuals. They will stop, which makes the difficulty not increasing as much, and therefor new equipment will be more rewarding. If you mean that the GH/s you bought isn't worth it, you are right too. As the difficulty rises, the rewarded BTC is going down.


Does bitcoin stop periodically for finalising the next block? I have read that every once in a while, the new block is determined by a winning miner. The miner takes about 10 min to form a block out of the transactions he has received so far. Does that mean the network tells each miner all at the same time that it is the start of the race and that they are supposed to compute the next block? During this race does Bitcoin stop accepting new transactions?

No, block discovery is a memory-less process. Every try of discovering a valid block is completely independent from any other. Miners continuously search for a new block. The only thing that changes over time is which transactions they're trying to include and what preceding block they are building on-top of.

When some miner finds a block that fulfills the required criteria, they just publish it to the network. The propagation of the new block also works as the signal for all miners to switch work to a successor of this block instead of the predecessor.

Transactions are relayed in the network independently and continuously. Miners may update their block template to include new juicy transactions every once in a while, but it's up to them how often and when they do this.


when I looking to a debug.log I don't see anything about blocks. Is it possible?

I expect the net category of log information should contain entries relating to the exchange of blocks with peers but I would not expect the full block data to be logged.
The name of the debug log suggests it is mainly intended as a way to investigate problems, and not intended as a means to routinely extract block data. You should use the RPC API for that.

Related

What are the debug categories?
API reference (JSON-RPC)
getblock


Obtaining Lightning network graph data I was wondering if it is possible for me to obtain data about the Lightning network mainnet, particularly the nodes and the edges (channels) in the network. I know that the graph is visualized in explorers such as https://lnmainnet.gaben.win/ and https://graph.lndexplorer.com/. I wish to obtain the data itself so I can reconstruct the graph and run some network simulations for my research. I understand that the standard way is to run a Lightning node yourself and then sync for the network's topology through your node. However, I do not have access to the computational resources and memory to run a full Lightning node.

If anyone knows of a way I can obtain the data without having to run a Lightning node, or has the data and is willing to share it for purely research purposes, it would be of tremendous help.

Thank you!

Here's a snapshot of the listchannels output on c-lightning as of Feb 19 2018 https://gist.github.com/coinables/4f29d85c3902b3d8b0d929cd318af3f9

And same time as above but the output is for listnodes https://gist.github.com/coinables/19223b8bf09a24a3a6e8240433df04bf

With these two data sets you should be able to create a simple nodes & edges relationship chart. Here's a very rough example using sigma.js, but the performance is quite poor. https://gist.github.com/coinables/034003b80148e88f68c641950ff08956


Sending transactions to mining nodes only? Instead of propagating transactions across all nodes in the bitcoin network, would it be theoretically better to just send transactions to mining nodes as transactions are only confirmed and 'used' when confirmed inside a block. The other nodes would then be able to confirm and validate these transactions when they learn about the new mined block with the 'confirmed' transactions?

In theory, that would be ideal if your goal is solely getting the transaction to mine.

Hurts permissionless mining However it does require knowing how to reach miners directly. Mining is designed to be a permissionless business, accessible for anyone with the right hardware. Your solution would require publishing the IP addresses of miners to all transaction creators.

Hurts sender privacy It would also hurt privacy, as miners would learn the sender IP of transaction creators; possibly enabling them to censor based on that information.

Not relaying transactions doesn't gain you much The marginal cost of relaying every transaction to every node is low since the introduction of algorithms like BIP152 (compact blocks). Assuming a transaction will eventually be mined anyway, that transaction needs to reach every full node eventually (as part of a block). Relaying it as a separate transaction ahead of time doesn't cost anything, if the relay of the block can refer to the earlier transaction instead. There are some costs related to 'inv' messages that can be reduced though, without removing transaction relay.

Hurts block propagation speed And lastly, only broadcasting transaction to miners directly would worsen block propagation speed very significantly. Modern block relay protocols (like BIP152 and FIBRE) rely on nodes knowing the bulk of blocks' transaction ahead of time to quickly relay those blocks.


In what cases would a bitcoin address not have a private key? According to the https://en.bitcoin.it/wiki/Address site, it states that "most" addresses have a private key.  Here is the relavent text:

  Most addresses have a "private key"

  For most addresses, there is a corresponding secret number known as a private  key that is required to spend funds previously sent to an address.
  When using a Bitcoin client, private keys are typically stored in the wallet file. The private key has a special purpose - it is mathematically needed to create valid transactions that spend the funds originally sent to the address. If the private key to an address is lost (for example, in a hard drive crash, fire or other natural disaster), any associated Bitcoins are effectively lost forever.

I have always assumed that Bitcoin worked in such a way that all addresses must have a matching private key due to the public/private key encryption on which it is based.  In what cases would a bitcoin address not have a private key?

If an address merely 'looks like' an address and all other aspects of a transaction are ok then miners will include it in a block.

This has been (ab)used to embed ASCII art into the blockchain at the cost of permanently destroying some bitcoin.

For an example with explanation see https://bitcointalk.org/index.php?topic=33618.msg420597#msg420597


Script Null into raw trasaction bitcoin core I'm developing a parser for bitcoin core and into the alpha test of the parser,I noticed than the script bitcoin core are null and the hash raw transaction exist.
An example: for this transaction the script into exploring for blockchains
Transactions example into blockexplorer
Transactions example into blockchain.com
I have two questions now:

This null script event what is it due to? Is there any phenomenon I am not aware of?

Do these explorer sites to determine the starting and destination wallet execute the script?

Thanks for your help.
Sorry for my terrible English but I'm learning

This null script event what is it due to? Is there any phenomenon I am not aware of?

There is no script needed to spend the transaction vout referenced in the input because it was not locked with a key. For example, the txid of the first transaction referenced is c3d8d15a3ca1b50fc2519cbcb79f1db3b6be164c176c7ad51c7a5ec2e97ffa7b with output index 204. Below is how the that transaction output was locked.

{
    "value": 0.00000000,
    "n": 204,
    "scriptPubKey": {
        "asm": "7daba6288bcf43c2f7f555ec58f965eaac89b14bc4c4fc920a2a58163aa11e0e",
        "hex": "207daba6288bcf43c2f7f555ec58f965eaac89b14bc4c4fc920a2a58163aa11e0e",
        "type": "nonstandard"
    }
}

The locking script basically pushes 32 bytes of data onto the stack (7daba6288bcf43c2f7f555ec58f965eaac89b14bc4c4fc920a2a58163aa11e0e) with no verification opcodes at the end of it. That means, it can be spent with an empty signature. This types of transactions were generally done if you wanted to store hash of some data on the bitcoin blockchain. But that can now be achieved with a OP_RETURN opcode which prevents UTXO bloat. All but the last transaction that has been referenced are coinbase transactions which is paying out fractions of the newly generated bitcoins to the participating miners of the pool. It is possible that the pool manager wanted to encode and store a particular data onto the bitcoin blockchain.


Are there any C# wrappers for the Bitcoin REST API? Are there any C# wappers that take an OOO approach to the Bitcoin REST API, and encapsulate it in an easy to use format?

Take a look at this c# bitcoin rpc api wrapper: https://github.com/GeorgeKimionis/BitcoinLib that, unlike bitnet, is up-to-date.


How long will it take for OpenCoin to distribute the 50 billion XRPs? Out of the 100 billion XRP that can ever exist, the founders kept 20 billion while OpenCoin received the remainder of 80 billion. From that 80 billion OpenCoin will sell 30 billion to fund ongoing development beyond the initial angel investment, and the remaining 50 billion will be given away to spur adoption.

How long will it take OpenCoin to distribute the remaining 50 billion? One year from now, how many XRP will OpenCoin give away to each unique new user? What is the smallest amount that OpenCoin will eventually give away, over time? If there is no specific answer to the time, can OpenCoin provide a range (for example, between 5 and 50 years)? Is there a reasonably estimable lower limit on the time required to give away the 50 billion? Is there an upper limit on how much will be handed out (i.e. will anyone ever receive 50,000 XRP again as part of the giveaway)?

Answers, even if partial, appreciated.

The short answer is that nobody knows. In the short term, the rate of XRP release will be used to manage the network's growth. Once it transitions to a distributed network, that won't be an issue any more and it will likely then be limited just by how quickly we can give them away.


How does the bitcoin transaction fee be calculated? And who guide this? https://en.bitcoin.it/wiki/Transaction_fees

I learned that the transaction fees is given by sender to bitcoin miners to ensure that this transaction be confirmed.

But I notice that, in most exchange websites or clients, the default transaction fee is 0.0005BTC, so Could It be possible that the transaction fee will be guide by the exchange websites or popular client software providers?

Because if a person don't accept the transaction fee in main stream, his transaction will probably not be accepted and appended to the block.

When creating a transaction the Bitcoin-Qt client will determine the properties of a transaction and if the transaction is likely to need feeds the client will insist that a fee be added.   The rate is 0.0005 BTC per 1K of data consumed by the transaction.  If the transaction size is below 10K though and meets other criteria no fee is required:

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

Other clients may not have any requirement when sending.  For instance, the Blockchain.info/wallet allows "Custom" send in which the fee is entered by the sender.  Zero is a valid fee amount.

It really doesn't matter what the client or the user chooses, what matters are the level of fees the miner's require.   If few miners will accept a transaction because the fee is too low, the transaction will simply just take longer to confirm, eventually.

So there is a competitive market for transactions.  A miner can try to boycott transactions in which the fee is too low however the next miner might be willing to include the transaction and in that instance the boycotting miner is simply passing up the opportunity to earn the fees from that transaction.

So the market consisting of miners looking for revenues from transaction fees guide the rate that is required for a transaction to get mined in a timely manner.

It is likely the amount for the recommended fee in the Bitcoin-Qt client will be decreased at some point if 0.0005 BTC ends up becoming expensive (currently less than three U.S. cents).


The order of the generator point G used in bitcoin Hi I was just wondering how the order of the generator point G used in bitcoin was actually calculated.

From the specification listed http://www.secg.org/SEC2-Ver-1.0.pdf for secp256k1 I can see listed is the generator point G along with its order, however I am unsure how this was actually calculated.

In one of the books I was looking through it was mentioned that Hasse's Theorem was used to calculate this value, however upon looking up this theorem this seems to only provide a bound. Any insight would be appreicated thanks :)

It's easy to verify the order (n):  Multiply G by n and find that you get the point at infinity. This proves that n is either the order or a multiple of it. Then convince yourself n is prime using a Baillie-PSW primality test, so it must be the order itself and not a multiple of it.

Finding the order is not quite so simple as verifying it. To do so you would use Schoof's_algorithm, which requires quite a bit of number-theory complexity. The Wikipedia article on Schoof's explains how Hasse's theorem is critical to this process by restricting the range of orders that could possibly be the correct one.


What is a hallmark node in NXT (nxtcoin)? What is the purpose of a hallmark node for NXT?

From the NXT wiki

  A hallmark is a "stamp of approval" for a Nxt node.  By creating a digital signature based on your IP address and secret passphrase (private key), you are verifying that your account "owns" a node and is accountable for it.  This helps protect the network from attack, and increases the network's trust in your node. You do not need to generate a hallmark if you are a casual Nxt user.  It is a very good idea for those who operate public Nxt nodes on dedicated, public servers. Hallmarks have no impact on forging.


How do I call getblocktemplate from C#'s bitcoinlib? How do I call getblocktemplate from the bitcoinlib package for C#?
This call does not work
ICoinService CoinService = new BitcoinService(useTestnet: true);
var blockTemplate = CoinService.GetBlockTemplate();

var blockTemplate = CoinService.GetBlockTemplate( new { rules=new List<string> { "segwit" } });

This function call requires you to specify rules for the block you want to create and in newer Bitcoin Core version, you can only create blocks following the segwit softfork rules.


Is there a way I can get my own independent vanilla p2p cli wallet? To elaborate, I want a wallet that's independent of any third party intervention unlike coinbase wallets being dependent on the company.

If there is the way how much privacy can be maintained?

And is there a way I can access it globally. To be blunt, what kinda wallet would a black-hat hacker would use if at all? Or am I confusing addresses or wallets?
Also, it would be better to have a solution in which I won't have to download the entire ledger.

There are no recommendations in this answer, but there's some terminology that will help you with your further research:—

You want a wallet that doesn't require you to surrender your private keys to some third party. Ideally, a widely used wallet for which the source code is published for anyone to audit (i.e. open source), so that there are no hidden security defects.

Such a wallet will eliminate counterparty risk (i.e. the risk that a third party, knowing your private keys, spends all of your bitcoins). However, it will only marginally improve your privacy because all Bitcoin addresses and transactions are visible on the public ledger — Bitcoin is pseudoanonymous. The one slight disadvantage is that you have to make your own secure backups since there's no third party doing this for you. Some wallets let you make a paper backup by writing down a seed phrase — but don't let anyone find the piece of paper, and be sure to have a contingency plan in case of fire.

An SPV wallet allows you to construct transactions without having to download the entire ledger, but an SPV wallet connects to someone else's copy of the ledger, so you would have to decide for yourself if that's an acceptable compromise. After you've constructed a transaction, you can sign it (with your private key) without requiring a copy of the Bitcoin ledger — this is how you spend bitcoins from cold storage.


Why is a 51% attack guaranteed to outpace the rest of the network's miners? Doesn't 51% hashing power give only a slightly higher chance? I thought hashing power is an expression of the probability of being the one to solve the cryptographic puzzle and placing a new block on the network.

If that's true, owning 51% of the hashing power should just give a slightly higher chance of mining a new block than 49% hashing power. However when I read articles explaining Bitcoin and mining, owning 51% of the hashing power in the network is presented as a guarantee to be able to outpace the rest of the network, to the point where an alternate chain can be created and funds double spent.

Given what I assume (could be wrong) is a marginally higher probability of solving the puzzle first at 51%, how does that make sense?
Couldn't someone who got a little lucky do that with 40% of the hashing power? How does 51% of the hashing power guarantee that one will be able to carry out an attack on the network?

With any probability distribution, a larger sample size will converge onto the expected probabilistic outcomes.

So if you had 51% of mining power, there is a chance the other 49% of miners will outcompete you on a short time scale, but over longer time scales we’d expect you to win.

Really, the threshold for this is just >50%, but a ‘51% attack’ has become the colloquial term for this.

Note that a 1-2% of an advantage may not sound like much, but that’s the house favour on many casino games, and casinos generally seem to have no problem staying in business (despite sometimes paying out big to lucky players). Over long enough time scales, we reliably see a regression to the mean.


How are mined blocks broadcasted in a distributed environment? I understand that after the golden nonce is found by the miner he broadcasts the block and the other miners verify it. But I don't understand how they broadcast it because bitcoin is completely distributed with no servers to store the ip to distribute it to. How does a new miner know whom to distribute it to?

Any help is really appreciated ...

Miners operate nodes (as do many non-miners). These nodes make connections to each other. When a node receives a block or transaction from another node, it will check the block or transaction and then send it to the other nodes it is connected to. In this way, a block or transaction reaches every node in the network.

The miners do not connect to some central server or service in order to broadcast blocks to the network. They simply send the blocks to the nodes that they are connected to and the blocks are then relayed to all nodes.

As for how a node figures out who to connect to, please see this question: How does the bitcoin client make the initial connection to the bitcoin network?


How can merchants accept Bitcoins while keeping it in line with the original USD value? I mean, if a pizza costs $25 and a BTC is $500, the pizza store should be announcing a pizza for 0.05 BTC. However, if tomorrow the USD value of a BTC doubles or halves, that announced price for the pizza is no longer adequate.

How do merchants balance this?

Until Bitcoin stabilizes sufficiently, prices will be listed in local currency and be payable in an equivalent amount of Bitcoin, or if prices will be listed in Bitcoin, this price will have to be constantly updated.

I.e. price would be listed in USD and the amount of XBT due would be calculated just before the bill.


Copay Multi-user Wallet I am very new to Bitcoin.  My friend and I are doing a business that will accept Bitcoin as payment.  I would like to know how easy it is to use Copay as a wallet that we can both share, and that will require both our authorizations to distribute Bitcoins into separate Bitcoin wallets for us?  If someone could please answer this for me, I would be very appreciative.

Thank you!

how easy it is to use Copay as a wallet that we can both share,

copay.io says:

Copay is a true bitcoin wallet, not an account service. Secure your personal funds with multiple signatures, or just one

See also Multi Sig Use Cases

Multi-Sig Use Cases
m = signatures required to spend,  n = signatures possible
m=1 and n>1
Shared Wallet
Could be used for small group funds that do not require much security. Least secure multi-sig option because it is not multi-factor. Any compromised individual would compromise the entire group. Group funds for a weekend or evening event might be a good use case. A shared wallet might also be fun for some kind of games too. Besides being convenient to spend from the only benefit of this setup is that all but one of the backup/password pairs could be lost and all of the funds would be recoverable.
m=n
Partner Wallet
Scary because no keys can be lost. As the number of signatures required increases the risk also increases. Could be thought of as hard multi-factor authentication.

etc
Note that terms like "partner wallet" or "buddy wallet" are not generally used and understood. People are more likely to call this something like a "2 of 2 multisignature wallet" or a "1 of 2 multisignature wallet" respectively. Though the above terms are more general and usefully apply to many other values of m & n.

There have been desperate questions here from people who set up a 2-of-2 multisignature wallet and found their friend lost their wallet-password without making any backups. This meant all their Bitcoin became lost forever. So I'd suggest
Go for a 2-of-3 arrangement with a passive partner (someone you both trust not to use their signature except in pre-agreed  emergency
circumstances. e.g. create a third key with your friend, and lodge the key, written on paper in a sealed envelope, with a lawyer)
If you must go for 2-of-2, walk through the backup and recovery process with your friend and make sure both of you are aware of the risks of not making a backup, or of not having tested recovery. You could easily lose all your money through a bit of carelessness on your friend's part.

I can't really answer "how easy" since I don't use it and that is rather subjective anyway.
Copay appears to be a popular wallet. It ought to be well-tested by it's users. It's probably worth trying out. If you find it doesn't meet your ease-of-use needs, you can always move your funds to a different wallet or import the private keys into a different wallet (saving tx fees).


Bitcoin client incentives to share peers and blockchain Question a bit related to Microsoft's research on incentives of sharing transactions.

What is the incentive for a custom-tailored Bitcoin client to share information regarding known clients and the existing blockchain? For example, the client could set its "services" in "version" message to 0 and not be bothered with sharing much data. What encourages the Bitcoin clients, asides common curtsey from the people running the software, to share the data?

If data is not shared, Bitcoin won't work. So the people who want Bitcoin to work and be useful share the data. If there aren't enough people who want Bitcoin to work and be useful, then it doesn't matter whether anyone can get the data or not.


Are there btc in this multibit wallet I have several multibit wallets I put in storage years ago, and I'd like to check if there's btc in them . I see wallet IDs for 'receive address'  in the .info files - if those show 0btc does this mean the wallet is empty? Or is the receive addr not where btc would be stored?
I'd like to verify there's actually something in there before banging my head against how to retrieve from what looks like an unsupported wallet type.
The dirs look like:
wallet1.info
wallet1.wallet
wallet1-data
    key-backup
    wallet-backup
    rolling-backup
    wallet-unenc-backup

and the .info files look like (for wallet1 in this case):
multiBit.info,1
walletVersion,3
receive,1GFM...RGdp,
property,walletDescription,wallet1
property,walletBackupFile,C%3A%5CUsers%5Cjeremy%5CDocuments%5C%5Cwallet1-data%5Crolling-backup%5Cwallet1-20131201123906.wallet
property,receiveAddress,1GFM...RGdp
property,receiveLabel,

First dump your keys using the instructions here
Then open a new Electrum wallet, ask it to "Import private keys", and paste your private keys there.
Then you will be able to spend from there if you have coins.


Does any open source software exist for an e-wallet service? If I want to setup an e-wallet service, would I have to create it from scratch or is there any existing open source software that could be used?

It seems like the project was abandoned, but you might be able to recycle the code.

  During the last days I started hacking together a little online-wallet
  and thought some of you might be interested.

  It is based on the bitcoind RPC API for handling accounts and adds
  custom labels stored in database.

  If you want to send coins to a labeled address, just start typing the
  label and it will autocomplete.

  It is a Ruby/Rails application released under the MIT license, so you
  can setup your own online wallet or even run it locally and use it
  instead of the default client UI.

  Note that this is just a very early development version which still
  needs a lot of work.

  Project/Source: http://open.sourceagency.org/projects/webtc Demo
  (testnet): http://webtc.interesthings.de (There is a demo Account:
  foo@bar.baz / password, but feel free to create new accounts, the
  email doesn't have to exist)

  Feedback, bug reports, patches and donations welcome

bitcointalk.org


Delays in confirmation I have a bitcoin transaction which still hasn't confirmed in the last 3 hours. Any luck on how to make it fast?

I added the nominal 0.0001 fee that is common for all transactions.

Some times the network takes a bit longer to find a block but that does not seem to be the case right now, since there are plenty of blocks found in the last couple of hours?

Is your transaction already included in a block? If not it should be the fee that is on the lowish side.

It really depends on the size (in bytes) of your transaction.
You could check statoshi to estimate the fee for your transactions, depending on the amount of time you are willing to wait.


Does CPU mining become efficient as memory requirements increase? I am focusing on an anti scrypt coin called Vertcoin which increases it's N-factor at a set interval. On their main page on bitcointalk it states that CPU computation will make gains as N-factor (memory requirements) increase. Can anyone explain as to how this is possible if the memory requirements can reach to > 4gb

Currently, for a custom-built high-performance desktop, 16 GB of RAM (or even 32 GB) is typical, while one of the best GPUs, the AMD Radeon HD 7990, has 6 GB of GDDR5.

Suppose the memory requirements were raised to 4 GB. That means that each thread will require 4 GB, so a CPU can mine on 4 threads at a time (16 / 4 = 4), while a GPU can only mine on 1 thread at a time (6 / 4 = 1.5, with greatest integer part 1).

Contrast this to the current requirement of 2 MB. A CPU is bottlenecked by the maximum number of threads it can do (even the very best Intel Xeons are typically capped at 32 threads), while a GPU with just 2 GB could easily do 1000 threads at once.


What's the purpose of ScriptSig in a SegWit transaction? Here's an example of a SegWit transaction that also contains data in the ScriptSig field:

{
  "txid": "954f43dbb30ad8024981c07d1f5eb6c9fd461e2cf1760dd1283f052af746fc88",
  "hash": "a5947589e2762107ff650958ba0e3a3cf341f53281d15593530bf9762c4edab1",
  "size": 231,
  "vsize": 148,
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "56f87210814c8baef7068454e517a70da2f2103fc3ac7f687e32a228dc80e115",
      "vout": 4,
      "scriptSig": {
        "asm": "002001d5d92effa6ffba3efa379f9830d0f75618b13393827152d26e4309000e88b1",
        "hex": "22002001d5d92effa6ffba3efa379f9830d0f75618b13393827152d26e4309000e88b1"
      },
      "txinwitness": [
        "3044022038421164c6468c63dc7bf724aa9d48d8e5abe3935564d38182addf733ad4cd81022076362326b22dd7bfaf211d5b17220723659e4fe3359740ced5762d0e497b7dcc01",
        "21038262a6c6cec93c2d3ecd6c6072efea86d02ff8e3328bbd0242b20af3425990acac"
      ],
      "sequence": 4294967295
    }
  ],

If the txinwitness is the new location for the "unlocking script" section for a vin (as opposed to the old scriptSig field), then why would this transaction still have data in its scriptSig field?

The reason is that for now, no native segwit address format exists, so transactions cannot be sent directly to segwit outputs. A proposal for native segwit addresses was created, but it won't be usable until all senders and receivers support it.

Instead, segwit-inside-P2SH is used, where outputs go to a BIP16 output with as hash script the hash of the witness program.

To spend such outputs, we must stay compatible with BIP16, and thus a scriptSig that reveals the full witness program is required. That is what you're seeing in this transaction: a BIP16 scriptSig, which reveals a witness program, which on its turn causes inspection of the witness data for the real verification.


How can I sell my Bitcoin Gold? Do any exchanges support BTG deposits? Given I have Bitcoin Gold in my own wallet, what practical ways are there to trade this, either to other crypto-currencies or to fiat? Is there a list of exchanges that support Bitcoin Gold deposits?


In P2PKH Multisig Transactions, what is the address? In P2SH transactions, the address is the hash of the redeemScript. What is it for P2PKH transactions?

There are no "addresses" in protocol. There are only "output scripts". The address is only human-readable representation of script which matches the "output script".

The output script for bare multisig transaction is [m] + [hash1] + [hash2] + ... + [hashN] + [n]

And all of these parts are significant. There is no "classic" representation of such address yet.

bc.i uses the form of (Escrow X of X1 X2 X3) (where Xn is standard p2pkh address) but you may use your own.


When will I receive bitcoins Today I sent bitcoin to my bitcoin core wallet.  I used an address under recieve bitcoins.  The transaction has been cleared on the blockchain for several hours but is not showing up in my wallet.    The wallet itself is still downloading the block and is 3 years and 29 months behind.

Does this mean I must wait until this finishes before it shows up?

The wallet itself is still downloading the block and is 3 years and 29 months behind. Does this mean I must wait until this finishes before it shows up?

Yes, in order to understand the current state of the network (which includes the transaction that you received funds in), your node will need to work through the blockchain history. Otherwise, your node will be unable to determine whether or not a transaction you receive is in fact valid.

Once synced with the network, your balance should display correctly.


Error pushing hex of tx, generated with bitcoinjs 1.0, on testnet I'm new to bitcoin programming and decided to give it a try with the release of bitcoinjs-lib 1.0. Here is how I generate the hex for the transaction

var bitcoin = require('bitcoinjs-lib');

var key = bitcoin.ECKey.fromWIF("cS4fb6sHrJ2VrfqRNBkk6eHMCB5PY6Bayyo695VaSdfZLMbPZiGv");
var tx = new bitcoin.Transaction();

tx.addInput("129aa78e5649715ecc7121aee0cdba06527061976be9c38c3a9fd9ae258665c3", 0);
tx.addOutput("msj42CCGruhRsFrGATiUuh25dtxYtnpbTx", 15000)

tx.sign(0, key)

console.log(tx.toHex())

and here is the hex output

0100000001c3658625aed99f3a8cc3e96b9761705206bacde0ae2171cc5e7149568ea79a12000000006b483045022100e807c222e6f53795d1fa5fcef7e50176e5a2cd9c164a9c955a5e717544a0ef250220743c40908d190bd13c407b8dbbf0dd2d685858c34bc998ee99e4de9f4e9eb2830121023cb4fea046a3747ee2e966ac382435cfca4570f959bcccb6b680fdcc812e15b9ffffffff01983a0000000000001976a91485eb47fe98f349065d6f044e27a4ac541af79ee288ac00000000

I looked through the lib but couldn't find where to inject the bitcoin.networks.testnet object and the documentation is empty

Everything is fine with your tx.

Here it is: http://test.webbtc.com/tx/034dfa392aa7ea46bc0917cdaa2794a5f03e6f935b6518a103cb0f5e923a05be

I've pushed it to the network with this form: http://test.webbtc.com/relay_tx


How much extra disk space does txindex=1 require? For example for a 1 MB block, does the extra Tx index database take up another 100 kB on average?

And a follow-up: once my node has completed -reindex after setting txindex=1 can I COPY the blockchain AND the TX index database together to other nodes? I know the blockchain can be copied but I'm not sure if the new node needs to reindex the blockchain itself or if the index database copies over as well.

The total extra size is around 7GB as of November 2016. You can check by looking at the size of the $DATADIR/blocks/index directory.
If you copy that directory, you'll copy the index with it.

Updated values from comments:

11GB as of 2017-05-08 – via
ens
21GB as of
2019-07-16 – via Vasil
Toshkov
27GB as of 2020-06-14. – via
Anonymous


Too late to claim BCH and BTG I recently came back in from the crypto wilderness and heard about the BCH (Bitcoin Cash)and BTG (Bitcoin Gold), which were given out when the currency forked. I have 2 BTC's which I have started to update.

I was wondering if it's too late to claim the BTG and BCH?

There is no deadline to claim these forks. If you have access to the private keys of the addresses that owned Bitcoin during these forks, you own those coins too.


Bandwidth required for Bitcoin going global? Something that I feel might be the obstacle against Bitcoin going global -- but which I've never seen anyone mention -- is this:

If Bitcoin goes global, I think it's possible that the number of transactions per second will be so high that it will become impossible to download the block chain at typical internet speeds -- it will grow faster than it can be downloaded.

What I'm wondering is: is this a real possibility? If so, how might Bitcoin deal with it?

This is a possible issue.

Currently we have a block limit in size of 1Mb although many pools send out 250Kb to make their block propagate faster to avoid orphaned blocks.

This gives us a cap of 7 transactions per second, data usage of 6Mb per hour or 144Mb a day, almost negligible amount of bandwidth.

Visa on average handles 2000 per second.

So looking at 285 times the amount of transaction is using 40Gb per day in bandwidth.

Most home ADSL2 lines can handle this now.


Does Ripple support Gateway interest? I know that Ripple supports currency demurrage, as in the decrease of amount of currency one has over time. However, I am wondering if the opposite is also possible? Can one automatically program inflation into a Ripple currency?

Not directly. The gateway would have to create a transaction for each user, to award them their interest. It would not be built into the protocols as demurrage is. So it would really be up to each gateway to decide who would get interest and how much (and if this process breaks down, no interest gets paid)


How to use Signed Hash to Send Coins in bitcoinj I am very new to bitcoinj library. I am using 0.14.7 version of bitcoinj and developing my own application in java. I have created a watch-only wallet by using the tPub of the Offline wallet. Upto Receiving payments on watch-only wallet, it is working fine. Now, i have to spend those coins. For that, I have created a transaction and found its transaction Hash.

To sign that transaction Hash with private key, I have followed How to sign raw transaction given a private key and SHA hash (in java) code. and now I am getting the signed hash. Please guide me that how can I use this signed hash to send and broadcast the transaction.?

Your help will be appreciable. Thanks in advance.

The sample code is given below:

// Through this way, I am finding the Transaction Hash.

SendRequest request = SendRequest.to(Address.fromBase58(params,externalAddress), Coin.parseCoin(amount));
request.signInputs = false;
request.tx.getInputs();
request.missingSigsMode = Wallet.MissingSigsMode.USE_DUMMY_SIG;
String hash = request.tx.getHashAsString();

//now using createSignHash method, which is taking transaction hash and signing that with private key and returning the Signed Hex.
System.out.println("Signed Hash : " + createSignHash(hash));

sendrawtransaction signedHex

is the rpc you need to call which will submit your raw transaction to local node and network.


Can long time taken for confirmations become blocker for bitcoin adopotion? As of today, it is observed that up to 6 confirmations are needed in most of the places to verify that the transaction is complete. Assuming that it takes 10 mins for one confirmation, it takes up to 1 hour for 6 confirmation. This is really long time. People want real time transactions and would be reluctant to wait for such a long time. Can it become blocker for bitcoin adoption?

To answer the question today, It really depends on the confidence level of Bitcoin's image in the business' eyes.  To answer the question for the future, it's very possible that "things" built on top of the Bitcoin network will help solve this problem.  Not necessary reduce the time it takes to get confirmations but instead to minimize the risk of NOT waiting for 6 confirmations.  If you think about it with credit cards, businesses today completely ignore the risk with credit card charge backs and simply ship items as soon as the buyer has paid even though the buyer can issue a charge back days after the purchase.


How could the Bitcoin protocol be modified so that pruned nodes could still participate in BIP 37 SPV? According to Jameson Lopp (https://www.coindesk.com/spv-support-billion-bitcoin-users-sizing-scaling-claim/), allowing pruned nodes to advertise that they support BIP 37 would be impossible without "extensive protocol changes." What changes would make this possible?

Pruned peers do not have the full blockchain history and therefore have only limited value for SPV clients.
With Bitcoin Core 0.16, pruned peers will announce their service via NODE_NETWORK_LIMITED (see BIP159). BIP159 is not a consensus change.
This will allow SPV clients to connect to pruned peers. But, since they only signal for the last 288 blocks, SPV/BIP37 clients interested to load history older than 1 day of blocks would still require to connect to traditional peers.
In the future, pruned nodes may have a way to signal how many blocks they will keep on disk (without adding a fingerprinting vulnerability).
Note that BIP37 is a controversial concept. It has significant privacy downsides (see Jonas Nick's research).
A far better concept is "Client side filtering". See the upcoming BIP157 and BIP158.


LiteCoin Wallet balance does not match block-explorer.com My Litecoin wallet version v0.8.6.2-beta is showing a balance of 26.579 ltc
When I query http://block-explorer.com/address/LejrG23b2HcjqPRbZU8UWFxZhdJTUc75pS it is showing 0 balance.

I just sent 2 ltc to another address from my wallet successfully on 19 Feb 2014. This tx did not show up in the block-explorer.com (currently 20 confirmations), yet it did show the new balance correctly.

http://ltc.blockr.io/api/v1/address/balance/LejrG23b2HcjqPRbZU8UWFxZhdJTUc75pS is also showing a 0 balance.

Thoughts?

Not all of the addresses in your wallet are displayed in the QT client. There are certain addresses called change addresses which your client creates automatically when you send coins and have some left over. Those are still part of your wallet, but are not displayed.


How nodes verify if the hash on a P2SH output is from a valid script? I understand how the validation works if someone wants to spend coins from a multisig address. But what if the receiver makes a mistake and provides an invalid script hash to the sender? Is there anyway that nodes can verify if the hash is from a valid script?

A cryptographic hash function projects an arbitrary amount of data to a limited image space. In the case of P2SH, the hash is a RIPEMD160 hash, projecting the redeem script to an hash digest of exactly 20 B (160 b) length.

This is a trapdoor or one-way function that cannot be reverted (if it can be reverted, it's broken and therefore not a cryptographic hash function). Thus, a recipient cannot tell what redeem script was hashed to produce the P2SH address, and consequently cannot evaluate the validity of the redeem script.

If the recipient makes a mistake and provides the hash of an invalid script, there is no recourse.


Is there a bitcoin mining program that works with multple devices, and adds the collective satoshis together? I'm very new, and I created this account to ask this question. While at home, we have several unused computers from over the years and I set up 2 computers to run a mining program.

My question is, Is there a program that can add the collective mining efforts together so that they reach the payout threshold faster?

Just wondering.

I am assuming you are referring to pool mining since you mentioned "payout threshold".
You can simply connect all your computers/mining devices to the same mining pool as workers, and the pool will count each worker towards your shares/efforts.


How to sweep a bulk wallet? If I have a bulk wallet with, say 100000 key pairs (address/private key) and I have received payments on any, say 1000 of them, how can I sweep all the coins to a new address? It would be even better if I can do it from the command line, for example > sweep keypairs.txt 1Q7nrZ7PGWTtKVkQk1mLZovbJKEfLubXtv and all the available coins are transacted to the destination address. The format is for example:

1,"1E4MuBWjv2qZeJH5ti9ig5XMoJHQF63cdX","5JmLyBtdFEaKefsFXPd9E9PmbvT8JogG1V6Yer5jmZ9MX6bXP88"
2,"1BhJsijfGxwbzKgkQj5hRLDnBkmX2Y1RNN","5K5BBepZgaq8n9sJrsoM5inEWCX7W8bh7U8fr2wSP1PAkseasdQ"
3,"1ATP4LHYxqCZhDva661SLWJoN3vdNE2u1J","5JchXy3Y97F3TjaHsMJmyaaik1Gd4DpLP15PegbcvcZ5u2HBJg7"
...
100000,"17GX2ZFSpDip3BR6jMYP5He53tPMZqpSSG","5JyZsU9K2kokXzJQjg5F7mormCcwiPBcBjD3UZXHNwMSPuDGCNK"

A script exists on GitHub by the name of coinsweep.


OP_CHECKDATASIGVERIFY not working I'm trying to generate a signature and pass it through OP_CHECKDATASIGVERIFY as part of a P2SH address on a regtest network.  This results in the following:

Public Key:

036ab9012ecc30c30f9220d862a56c5c99b1a08d783be605406fbde8ece2807b2f

Signature:

304402200ac548d1e8b03c7d0bdfe4aedb4b13daacf2b1c2fa265afafae5d963d66a7fa702202cdb383bb3b4b4bc88403337fb2922f5166670c8bccf246e9bd5c963de93fae2

Data Signed:

7f7f9af76890ca09afc49e458a1b23fdd2e29cc061693c4b326b16e40728091a

Clientside (bitcore-lib-cash) says the signature validates and complies with the LowS check, but when submitted to the network the signature fails:

bitcore-lib-cash 0.19.0 => The signature can be verified

Bitcoin-ABC v190100 => 16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)

Debugging via bch-deb: https://hastebin.com/gelitojuge.rb

Is there anything that looks out of the ordinary here?

UPDATE: 3/20/19 - note, this is a different, simplified full example tx

Raw TX: There are extra variables being passed in, but only a couple are currently used.

0200000001a2f391ddcecd79218bf16999986a9996d29dfd33105b2921a82c7ca801493dcf00000000fdf7034c770200000001a2f391ddcecd79218bf16999986a9996d29dfd33105b2921a82c7ca801493dcf00000000000000000002d557cd170000000017a9148bf4c913a5942cb96ee1c094cff066ec41d33b9187a2180a000000000017a914f3ce6d3eac22ecdb1df736f412f760811df60fac87000000000100000022143f8147b020f3351da2cf15f133eeb2d9da0724430076b2011479aa5d79785e79bb4cd43038303030303033414e3033303002efbfbdefbfbd70d3adefbfbdefbfbd1c414d08efbfbdefbfbd572e37efbfbdefbfbdefbfbd6cefbfbd35027550efbfbdefbfbd65efbfbdefbfbdefbfbdefbfbd1fefbfbdefbfbd4d49efbfbd5fefbfbdefbfbdefbfbd66efbfbd32efbfbdefbfbd47efbfbd0defbfbdefbfbdefbfbd36efbfbdefbfbdefbfbd49efbfbdefbfbdefbfbd4defbfbdc6be4b1c23efbfbd77efbfbdefbfbd10df92efbfbd32efbfbdefbfbdefbfbdefbfbd687e4464efbfbd3b24efbfbd0925efbfbdefbfbdefbfbd266defbfbd0831376437383430304cbb3038303030303033414e303330303fefbfbd47efbfbd20efbfbd351defbfbdefbfbd15efbfbd33efbfbdefbfbdefbfbdefbfbd0724431fefbfbdefbfbd4d49efbfbd5fefbfbdefbfbdefbfbd66efbfbd32efbfbdefbfbd47efbfbd0defbfbdefbfbdefbfbd36efbfbdefbfbdefbfbd49efbfbdefbfbdefbfbd4defbfbdc6be4b1c23efbfbd77efbfbdefbfbd10df92efbfbd32efbfbdefbfbdefbfbdefbfbd687e4464efbfbd3b24efbfbd0925efbfbdefbfbdefbfbd266defbfbd0561326332614cb73038304130413033414e30333036efbfbd521b44efbfbd0818efbfbdefbfbdefbfbdefbfbd1055efbfbd30efbfbd231975541fefbfbdefbfbd4d49efbfbd5fefbfbdefbfbdefbfbd66efbfbd32efbfbdefbfbd47efbfbd0defbfbdefbfbdefbfbd36efbfbdefbfbdefbfbd49efbfbdefbfbdefbfbd4defbfbdc6be4b1c23efbfbd77efbfbdefbfbd10df92efbfbd32efbfbdefbfbdefbfbdefbfbd687e4464efbfbd3b24efbfbd0925efbfbdefbfbdefbfbd266defbfbd0831376364353764354630440220095afd33cce778a91f78cd1e2125278bc4625eac1bde3567cc9c3a3e357c2b1c022068d61ae2d17b35f24645a4e10b66a33d319d6c7cf188233acf72195d6a63234d2103ca8a4eaca7201da793e7127737990e47d6c813db0b4aa9c729199d30f91a9a054c8c411feedf4d49945fdfeab9669032efc447ab0db6ae87369bbeca4994f9fc4dafc6be4b1c239d77ffb910df92b732858c9cc0687e44648a3b24bd0925b4a0d1266db32102a4b770d3adf69c1c414d08eed6572e37bdfe956c8d35027550b2d0659cf78c88000058535353143f8147b020f3351da2cf15f133eeb2d9da0724430076b2011479aa5d79785e79bb0000000002d557cd170000000017a9148bf4c913a5942cb96ee1c094cff066ec41d33b9187a2180a000000000017a914f3ce6d3eac22ecdb1df736f412f760811df60fac8700000000

Script ASM:

1feedf4d49945fdfeab9669032efc447ab0db6ae87369bbeca4994f9fc4dafc6be4b1c239d77ffb910df92b732858c9cc0687e44648a3b24bd0925b4a0d1266db3 02a4b770d3adf69c1c414d08eed6572e37bdfe956c8d35027550b2d0659cf78c88 0 0 8 3 3 3 3f8147b020f3351da2cf15f133eeb2d9da072443 0 OP_DUP OP_CHECKSEQUENCEVERIFY 20 OP_PICK OP_HASH256 13 OP_PICK OP_OVER 14 OP_PICK OP_CHECKDATASIGVERIFY

Input Script Hash:

bdb4b1cbd79af7137ff1771cea2c3f818bf35884962bbbea6013ec6c75b865b0

UPDATE 3/23

Simplified TX with only data pushes, OP_CDSV, and OP_true: https://hastebin.com/raw/retabokura

Update 3/29/19: My signing process: https://hastebin.com/magehodufu.js

checking from https://hastebin.com/raw/imodonelic

static void test_sig ( )
{
  const MyKey32 prv ( QByteArray::fromHex ( "39f8ca6c7e7c05aaf9c97e3253fd4c688730b4404d0f502441eb3aacea01b569" ) );
  const MyByteArray pub ( prv.getPublicKeyCompressed ( ) );
  const MyByteArray sig ( QByteArray::fromHex ( "3045022100aecf494d10f3696809972bad0546a7ea65802ebc40dd1f369185fd52eac016c902201b35692e40d6edb21c422a735f217d028da5f14447ccb31c27aec56ee26b426e" ) );
  const MyByteArray dat ( QByteArray::fromHex ( "0200000001f8f9599fc41346a68507bfbdb26b06af464d20ef709075660657b29b7bc6136c01000000000000000002d5b4eb050000000017a914064ebb4529c5cade492e1790ae1f19943e0c6bfd87d2100a000000000017a914064ebb4529c5cade492e1790ae1f19943e0c6bfd870000000001000000" ) );
  qDebug ( ) << "prv =" << prv.toHex ( ).constData ( );
  qDebug ( ) << "pub =" << pub.toHex ( ).constData ( );
  const MyKey32 digest ( dat.sha256d ( ) );
  qDebug ( ) << "hash=" << digest.toHex ( ).constData ( );
  qDebug ( ) << "your values=" << ( digest.verify ( pub, sig ) ? "passed" : "failed" );

// now create correct values

  const MyKey20 addr ( prv.getAddressHashCompressed ( ) );
  MyByteArray csig;
  MyByteArray cpub;
  prv.signHash ( addr, digest, csig, cpub );
  qDebug ( ) << "sig=" << csig.toHex ( ).constData ( );
  qDebug ( ) << "pub=" << cpub.toHex ( ).constData ( );
  qDebug ( ) << "my values=" << ( digest.verify ( cpub, csig ) ? "passed" : "failed" );
}

The output is:

prv = 39f8ca6c7e7c05aaf9c97e3253fd4c688730b4404d0f502441eb3aacea01b569
pub = 02118805dc4fc1bc36c86a606e760fcc3875e215b88306cca33cd549d3d5668339
hash= cc8fc76706ec95500d170cc01e915725e3c35979b00c27e8638b2ef3399f3ce1
your values= failed
sig= 30430220683555525c15dfc685580824d172890d16f24a996fa37ad4cd22d1a49ff61510021f60d78601ed827e0d46fe8043cbc36f054f4a9cb96c481714b8b6d21575d336
pub= 02118805dc4fc1bc36c86a606e760fcc3875e215b88306cca33cd549d3d5668339
my values= passed

Note: my code does not use dECDSA


How to find where coin was picked up I just recently sent two transactions at $2,500 a piece to a wallet I was given to transfer the money to. The money was transferred and the person has disappeared. I'm wondering how to find out where the money was picked up at.

how to find out where the money was picked up

You can't.

Bitcoin was designed with privacy in mind.


List of Bitcoin consensus rules? Is there a comprehensive list of Bitcoin's core consensus rules anywhere?

In the Bitcoinwiki "Full Node" article  it says:

  Here are examples of consensus rules, though there are many more:

  Blocks may only create a certain number of bitcoins. (Currently 12.5    BTC per block.)
  Transactions must have correct signatures for the bitcoins being spent.
  Transactions/blocks must be in the correct data format.
  Within a single block chain, a transaction output cannot be double-spent.

I've looked around for a list of the "many more" but haven't located one yet.

in fact the current consensus rules are defined in code of bitcoin client which is used today by majority. this is by the definition of term "consensus". tomorrow we can have another consensus rules.

the wiki page https://en.bitcoin.it/wiki/Protocol_rules is good, but it does not describe BIP16 and many other protocol improvements which were already put as consensus rules (CSV, CLTV opcodes handling, may be something else)

some things mentioned on wiki page seems to be wrong, for example the transaction can be less than 100 bytes (tx messsages, rule #6)


Inconsistent mining profitability calculations I am gathering some btc details from coinwarz api as follows

Bitcoin difficulty: 711697198174

Bitcoin reward: 12.5

My personal hash rate: 1.425 TH/s

I then try to calculate  amount of seconds it would take me to mine 1 coin, so

(711697198174 / 100) / 1.425 = 499436630297

The reason I am dividing difficulty by 100 above is so I can keep using my hashing power in TH/s

After this I try to calculate how many coins I can mine per day:

86400 / 499436630297 * 12.5 = 0.0002162436502

where 86400 is number of seconds in 24h. I get 0.0002162436502 coins per day, however every calculator I used online returns value similar to 0.00050348 coins per day.

I think this 0.00050348 is correct value, but I don't understand where my calculation is wrong

The problem is that you're not using the correct conversions:

  The reason I am dividing difficulty by 100 above is so I can keep using my hashing power in TH/s

There are 1,000 GH to a TH.

  difficulty / hashrate[GH/s] = time[s]

difficulty and hashrate stand in the following ratio:

difficulty = hashrate[H/s] / 7158388.055

Note that the formula uses hashes not gigahashes.


Is it possible that bitcoin community along with core developers introduce new bitcoins into the system for the good cause? I want to create a imaginary scenario here to clarify my question.

Let's say, a bitcoin community is thriving at Cuba. Somehow few thousand Cubians manage to relocate at the remote location at Cuba and name the place Cubian bitcoin community city. The only mode of payment is bitcoin, so basically it's a bitcoin community city at Cuba that manage itself without help from Country Government.

Mr Smith from America sees tremendous opportunity to invest on Cubian bitcoin community city and also want to help since government doesn't care much. Mr Smith invested 1000 BTC to build Hospital on Cuban bitcoin community city.

After few months local Country Government raided the Cuban bitcoin community city and destroyed the hospital. Mr Smith loss all his investment.

So my question is in order to encourage investment on high risk countries like Cuba, can bitcoin community along with core developers upon collaboration and investigation generate new bitcoins and give it back to Mr Smith to recover his loss?

The reward schedule and therefore the amount of bitcoins in circulation are central rules of the Bitcoin system. Changing the rules to create additional bitcoins would be incompatible with the protocol and in contradiction to the social contract the Bitcoin community formed around. Breaching this social contract that is central to Bitcoin would destroy confidence in Bitcoin's value.

So, while it would be technically possible that more bitcoins are created, I am sure that the idea to change the protocol to bail out business ventures would not gain the overwhelming support necessary to implement it. It seems more likely that investors would use contracts or insurances that work on top of Bitcoin to hedge against the risk.


Is it a relatively big fee buying Bitcoin on bitcoin.com? I bought some Bitcoin on Robinhood for $0 fee, and about $2.99 fee on Coinbase.com, but since bitcoin.com seems like an official website, I tried installing the app to buy some Bitcoin, but for $180 of Bitcoin, the fees are like $13.50 + $2.32 = $15.82   (as paid by Apple Pay).
It seems such as big percentage (8.3%) of fees just to buy $180 of Bitcoin.  Is that just the way it is on bitcoin.com or any method to make the fees at most about 3%?

bitcoin.com seems like an official website

No, it is in no way official. If I remember correctly it was started by a group of people who created a new cryptocurrency by forking Bitcoin, they wanted to take over the name Bitcoin for their altcoin. They are not well regarded by the Bitcoin community. Their altcoin is not Bitcoin
There are no officials and no official websites for Bitcoin. This is because Bitcoin is intended to be completely decentralised.

Is it a relatively big fee buying Bitcoin on bitcoin.com?

Your numbers for other currency exchanges suggest that this is the case.

Is that just the way it is on bitcoin.com

Yes, apparently they are a business that charges higher fees than some other businesses.

how do I get a Bitcoin wallet?

A good place to start is https://bitcoin.org/en/choose-your-wallet but also see
I am new to Bitcoin, how can I get started?


How does the transaction signature prevent transaction duplication? Let's say that Alice sends 1 BTC to Bob.
We have then a signature of (Alice sends 1 BTC to Bob) with Alice private key.
What prevents Bob from duplicating this exact same transaction and sending it to the network to get another BTC (or many more), given that he already has Alice's signature of (Alice sends 1 BTC to Bob) ?

Thanks a lot :)

When Alice creates a transaction of 1 BTC to Bob, she is giving him a specific bitcoin, by using an unspent transaction output that she has the key to. The blockchain tracks the flow of coins from transaction to transaction, it does not have 'balances'. So when Alice makes a new transaction, she provides an input to the transaction of at least 1 BTC, and puts Bob's address in an output. This transaction then is mined into a block, and Bob can spend the output he holds the key to, in another transaction, and so forth. But after Alice broadcasts that first transaction, she has spent the outputs she used in it, she can not use them again in another transaction (double spend). Thus if Bob tried to 'replay' that transaction, he would just be resending the same thing as before, nothing would change because the network would already have seen and accepted the transaction and Bob would already 'have' the Bitcoin Alice sent him. In fact, no other node would be interested in the transaction as they can see that it is already written to the blockchain.


Sending bitcoins programatically without running a node How can I send bitcoins in my web app without running the daemon on my server?
Is there a way to do it? Do third parties allow you to send through them?

Yes this is completely possible. There are services which run fully featured API's that provide almost everything that the client can do.

http://blockchain.info/api

There are other merchant processors which have similar functionality depending on exactly what you want to do also.


Can the bitcoin lightning network support more than 8 decimal places? Say Bitcoin goes to 1 a million dollars. We need more decimals, but btc core only supports 8 decimals? By that time its safe to assume everyone will be using lightning to do transactions, but will lightning have support for more than 8 decimals?

Lightning uses millisatoshis as the unit of account for all transactions and routing fees, but the sub-satoshi balances are not reflected on the bitcoin blockchain in the event of channel closure.

When a channel is closed, any sub-satoshi amount held by each party is dropped from the commitment/closing transaction and goes towards payment of the on-chain transaction fee which miners collect.

Amounts below a satoshi, or rather, below dust_limit_satoshis, are made cooperatively between the parties of a channel and are not enforcible on-chain, but if many of such transactions are made, they add up to whole satoshi amounts which will be enforcible in later commitments.


How does Segwit achieve backwards compatibility in terms of the block size? If SegWit results in production of blocks that are larger than 1MB, how do old nodes see them as valid, instead of rejecting them due to exceeding the maximal allowed size of 1MB?

Segwit changes the definition of a maximum block size to be something called block weight. The maximum block weight is 4000000 weight units. We use the following formula to calculate the block weight:

3 * (size of non-witness data) + (size of everything including witness data)

So we can do some math here to figure out if the size of non-witness data will ever be more than 1 MB.

Let x = size of non-witness data
Let y = size of just witnesses
4000000 >= 3x + (x + y)
4000000 >= 4x + y
4000000 - 4x >= y

Since this is just a downwards sloping line, the point at which y = 0 is where x will be the greatest. So setting y to 0:

4000000 - 4x >= 0
-4x >= -4000000
 x <= 1000000

Thus the largest the non-witness data can be is 1 MB, which is exactly the maximum block size for non-segwit nodes. Since non-segwit nodes will only see the non-witness data, segwit is backwards compatible as blocks would still be within the size limit.


What are fee_method and fee_level in Electrum's getfeerate RPC call? I couldn't find any documentation on this.
I found that the options for fee_method are eta, static and mempool by reading the source code. But it's still not clear to me how fee_level relates to the fee_method, does it have something to do with configuration? If that's the case, the configuration isn't documented either. What is to be set? How does it work?

There are 3 options(fee estimation methods) available for fee_method: static, eta and mempool
static - static fees
eta - based on confirmation within N blocks
mempool - based on mempool depth

fee_level for ETA can be one of these values in Electrum GUI: 25,10,5,2
FEE_ETA_TARGETS = [25, 10, 5, 2]
https://github.com/spesmilo/electrum/blob/ea22d0073ea5f61d53449a7afd072c3fd78003e8/electrum/simple_config.py#L23

fee_level for Mempool can have one of the value mentioned below in Electrum GUI:
FEE_DEPTH_TARGETS = [10000000, 5000000, 2000000, 1000000, 500000, 200000, 100000]
https://github.com/spesmilo/electrum/blob/ea22d0073ea5f61d53449a7afd072c3fd78003e8/electrum/simple_config.py#L24


What is this code saying ? 16: bad-txns-in-belowout (code -26)
With the Bitcoin Core Console
I get this code when I'am done signing my transaction.
I get this message instead of a transaction ID number.
What is it ?

It means the total value of the UTXO spent by your transaction's inputs is less than the total total of the outputs.

Put otherwise, it's trying to create money.


Best trader from an European perspective I would like to buy some bitcoins (and potentially litecoins). I live in Europe, what is the best way to get and trade them from Europe? I would like to avoid all unnecessary fees, as much as possible.

Thanks.

I've also heard that MtGox has some problems and withdraw the money from there is quite annoying in this period.

One option is Bitstamp.net which is currently the exchange with the biggest trade volume world wide, operating out of UK. SEPA deposits valued in Euro are free and so is the withdrawal of Bitcoin. Deposits valued in USD and GBP have a minimal fee of 15$/15£ respectively.
They charge up to 0.5% commission on trades, less if you trade more.

I can't guarantee this is actually the best option, but they have a simple process in place and act as escrow. At least for small volumes of bitcoin the fees are better than Bitcoin.de, where they charge 1% commission and MtGox (up to 0.6%).

You can find a list of more exchange services on http://bitcoin.it.
However, at least some entries seem to be horribly outdated (e.g. Bitcoin24 was last updated in April 2013, yet there were some developments concerning their availability since then).


what do red and green bars at bitcoinity.org mean? The changebars graph at http://bitcoinity.org has red and green bars. Some of them below and some above zero.

What is their meaning?

If they are above zero

and are green
and are red

if they are below zero

and are green
and are red?

Is there a wikipedia article about that kind of graph? What would the search term be?

The rest of the graph is explained here http://i.imgur.com/516v5Nz.jpg but not the red and green bars.

Thank you.

If you click on the WTF on the upper right corner you get explanations for all of the graphs. But not yet for the bars being below or above zero. The author will add that soon (2013-03-23).

Meanwhile you can look at a reddit question here: http://www.reddit.com/r/Bitcoin/comments/1aqtgo/a_note_for_newbies_about_market_forces_feel_free/c8zz2ro

green bars above the axis represent increases in buy/bid orders
red bars below the axis represent decreases in buy/bid orders
red bars above the axis represent increases in sell/ask orders
green bars below the axis represent decreases in sell/ask orders

(I think you can replace axis and above/below by current price and right/left, then it is correct. Though this does not explain the bars above and below the line parallel to the x axis)

Well, I didn’t completely understand, why they are above and below, but I understood from the WTF explanation on the site, what red and green means. tl;dr: Green has different meaning, if it is left of the current price or if it is right of the current price. Same for red bars.

Maybe comboy, the author of that site, adds a good explanation for this soon (he promised to do so on freenode irc chat).


Ripple Distributed Consensus Algorithm What kind of a Consensus Algorithms does ripple use? Is that a leader or leaderless distributed consensus algorithm? Then what?

It's leaderless.

A validator begins a consensus round when it has either at least one unconfirmed transaction it thinks is valid, the idle time has expired, or it sees enough validators it trusts have begun a consensus round. Each participating validator makes an initial proposal listing the transactions it believes should be applied in the current round. The servers avalanche to consensus.

If there are conflicting transactions, all cases are handled. If just one gets in the round, it is applied and the other is forever invalid. If both do, a determinstic algorithm determines which is applied first and the other fails. If neither do, a deterministic algorithm determines which is announced in the next round so there should be an agreement in that round.

Because Byzantine failure is possible, validators build the next ledger at the end of the round and then broadcast a signed validation of that ledger. Seeing a supermajority of trusted validators sign validations for the same ledger assures that an actual consensus was reached. (If there was no real consensus due to Byzantine failure, the network simply tries again.)

The avalanche algorithm is designed so that minimal overlap of trust is required. Essentially, if there's no reason a transaction shouldn't be included, every honest node should agree to include it. If there's any reason a transaction shouldn't be included, there's no harm done in excluding it. (So long as it's included in the next round if it's still valid.)


Bitcoin Transaction Fees - Want to increase fees! I have my bitcoins on bittrex and I want to pay with increased fee to make sure its confirmation in the least possible time. I don't know how to do that.

In plain words, I want to deposit Bitcoin to my local exchange but bittrex is allowing only 0.001 BTC transaction fees. I want to increase it.

I thought that I'd purchase other altcoins like NEO or LTC and transfer it to other exchange first but so far, I am unable to find any exchange that allows "increasing transaction fees".

There's no way to increase it unless the exchange themselves set the fee. However, as you can see here : https://jochen-hoenicke.de/queue/#24h

The Mempool is getting freed so the fees are getting lower. From my experience bittrex satoshi/byte for that 0.001 is around 400-500. Right now you can get away with 200 satoshi/byte so as long Bittrex actually send the coin immediately, it will confirm in 1-2 blocks.


When does a node start mining the next block? Will a particular node on the Bitcoin network begin mining the next block after it has successfully been mined?

Mine right away.

When the node with the best computation power among the nodes participating in the bit coin network is mined, the next block is also considered to have a higher probability of mining than the other nodes. Do you have a penalty for this?

Do not mined immediately.

If you are waiting for the next block without doing so, can you verify that the blocks are propagating to all nodes participating in the bitcoin network?

To start with, nodes no longer mine in Bitcoin. Bitcoin's difficulty is too high, and mining is now done via a series of mining pools, which distribute the work to tens of thousands (if not hundreds of thousands) of ASIC miners.

  Mine right away.

Miners do start mining a new block as soon as the previous one is discovered, regardless of if it was discovered by them or another miner.

There is no penalty for mining multiple blocks in a row, since mining is not a operator-linked operation - That is to say, as far as the blockchain is concerned, there is no such thing as defined mining entities, and there is no database or registration against which the blockchain can check to see if a two blocks have been mined by the same entity.

Of course, the output in the coinbase transaction could be checked, but it is trivial to just send that to a new address each time.

Moreover, mining pools would usually assign a different block template to each participant, since ASICs can cover the nonce and timestamp space in a trivial amount of time. They then move on to updating the extraNonce, and by distributing different templates to each miner, pools can ensure work is not done twice.


Understanding what is being run through Sha256 When I am running through an example for Sha256 I am not understanding how to arrive at the right answer. If I use the following Hex string:

3ebb2d68d7007148b184e57bba9697d76bc04141155c57f97e3b92c5fd6a46bd

and run this through sha256, I get the following:

5f2edbb41f884a99227aedaeb5dd1739431e531d1e7be2a19976839bf9ccc17f

However, if I go the website: https://anyhash.com/sha256?hello
and run the same example through sha256, but with the Hex checkbox ticked off, I get the expected result I am looking for:

ff277f1f11cd72effe537f5e8a2690e08d8c911682d8a8150000000000000000

Can someone explain to me what it is doing when I check off that Hex checkbox? It would be helpful to know what I am transforming the Hex string into in order to run it through sha256 without having to check hex box.

When that "hex" check box is ticked, it tells the website to interpret the hex string that you entered as representing hexadecimal bytes, i.e. binary data. Normally when you just hash that hex string, it is interpreted as a string, i.e. a sequence of characters. But you really want to hash the binary data that that string represents, and that is what that hex checkbox lets you do.


how to parse input script of a transaction in blkzzzz.dat file? In data files, an input script of a transaction appears to be in this form:

[funky byte 1][signature][funky byte 2][public key]

Bitcoind displays an input script in this shape:

[signature][blank space][public key]

My questions are:

1. In general, how should I parse an input script?

2. What are the funky bytes?

3. How should I interpret/recognize the funky bytes during parsing?

The funky bytes, as you call them, are data-pushing op codes.  The wiki has a complete list of op codes.

For example, the op code before a signature is probably OP_71 (0x47) which pushes 71 bytes to the stack as data.  Without these data-pushing codes, there would be no way for Bitcoin to tell the difference between an arbitrary sequence of bytes (such as a signature) and op codes which need to be evaluated.

Parsing is simple:

The first byte is an op code.  Read it and do what it says.  If it's a data-pushing op code, read that many more bytes and push them onto the stack as data.
The next byte after that is an op code.  Read it and do what it says.  Repeat until all bytes have been processed.


Is there a rippled Windows binary available for download? Is there a compiled Windows binary for the Ripple deamon rippled available for download? I only found its source code...

No, but there is a guide to building rippled on Windows: https://wiki.ripple.com/Visual_Studio_2013_Build_Instructions

Note this, though:

  We do not recommend Windows for rippled production use at this time. Currently, the Ubuntu platform has received the highest level of quality assurance, testing, and support.

That's probably why they don't offer a windows build - they want people to use Ubuntu. Perhaps you could use a VM - that's essentially what the Docker suggestion does anyway.


How to add website visitors to a pool? As an experiment, I will have website visitors mine litecoins. Yes, I know this won't work very well, but I simply want to try it. If I want the visitors to be part of a pool, how should I create user accounts for them? Is it ok if I have them all mine under the same worker name, or do I have to create individual workers?

This kinda thing gets your website put in blacklists.

The only way (I know of at least) to mine in the browser is Bitcoin Plus, which actually is just a wrapper around a background Java applet. So you would probably want to make a Java miner and then work off that.


Is there really this big a difference between AMD and NVIDIA? As i am thinking of builing a system with a evga 670 i was wondering how much better a similarly priced AMD card would be in mining?
The bitcoin wiki
shows a hashrate of 406MH/s for the GV-R787OC-2GD  (a $250 card) while the EVGA GTX670FTW 2GB gets only 112 MH/s (a $400 card).

This seems really off to me. Is there really this big a difference?

As on many websites it says AMD is so much better for mining while because NVIDIA has Cuda everyone says its best for editing why doesn't cuda drive up Mhash/s?

Is there really this big a difference?

Yes.

  As on many websites it says AMD is so much better for mining while because NVIDIA has Cuda everyone says its best for editing why doesn't cuda drive up Mhash/s?

CUDA's a software framework for making GPU-based software eaiser to write. More stuff supports NVIDIA cards. Bitcoin GPU miners support both, so CUDA doesn't matter.


Can I use Bitcoin elsewhere except in the deep web? I really like the idea of having an universal online currency and I wanted to know if I can use it in the 'surface web'.

Yes. You can use bitcoins in many places. There are Bitcoin exchanges where you may exchange your coins for USD or vice-versa. You can also use them on various websites like Newegg for example.


Are transit fees supposed to be common in Ripple? In addition to transaction fees, Ripple also has transit fees when exchanging IOUs. Is it supposed to be common to pay transit fees, or is it for rare cases only? How much would the transit fees typically be?

For now, gateways are using transit fees as their primary revenue source. Bitstamp currently charges 0.2% and that's pretty typical.

We hope that those fees will go down over time for two reasons. First, competition and increased volume should bring the fees down. Second, when interest rates start to rise to more historically normal levels, gateways can use the interest on money they hold as a revenue source.

We've been asked to have a "transit fee cap" so a single transaction can't have a transit fee above a limit regardless of transaction size. And we've been asked to have a "fee exempt" flag so gateways can exempt particular accounts from paying transaction fees (perhaps in exchange for a monthly fee). These changes are under active consideration. For technical reasons, they're not as easy to implement as they might seem.


How to find top 100 richest bitcoin wallet addresses on given date? There is a list of top richest bitcoin wallets at this moment.

How can I find the list of top richest wallets on other dates in the past?

You can use blockchair.com. It allows to easily search and analyse the Bitcoin blockchain (also Bitcoin Cash and Ethereum).

In your case, you can sort the transaction outputs (addresses) descending
 by value and optionally specify the time in the time field so you get the top richest addresses at that time.


How instantaneous is a Bitcoin transaction? How quick does a bitcoin transaction happen? (assuming that both parties are online at the time)

I read somewhere on the Internet that it's not recommended to accept a bitcoin payment right away (better to wait for a dozen or so confirmations/verification).

Why is this? and how does it affect the time it takes for the transaction to be completed?

Bitcoin transactions are saved in a ledger. There needs to be a way for everyone to agree on the same ledger. In bitcoin this is done by making sure that the only valid ledger is the one where more computing power was put into it to "generate it". There's a lot of other details, where the ledger is actually a block chain, but overall the idea is that of "the most computing power" is the rule behind how nodes accept the main ledger.

With this in mind, it still could happen that someone with a large amount of computing power may create a ledger that replaces the one that is currently accepted by the network. Because of how the block chain works, this is exponentially harder to do for every block in the ledger that is generated/found.

So to answer your question to "why is it that we need to wait for 5-6 confirmations", it's because a malicious party with lots of computing power could hypothetically replace the latest 2 blocks or so. But, to replace the latest 5 or 6 blocks it becomes so hard that it's virtually impossible for it to happen. Therefore, a transaction without any confirmations is "less secure" than a transaction with 5 confirmations. The more the confirmations, the more secure a transaction is.