Is there any way to directly query the block chain for the body of a transaction given its hash?

You can use JSON-RPC to achieve this. The only missing information will be the relayed_by field.

To use the JSON-RPC API of your client edit your bitcoin.conf file like this

rpcuser=user
rpcpassword=password
rpcport=8332
server=1

Then you can use a library to query the API like JSON-RPC for PHP

You can also do it on a much easier way by using the command line

./bitcoind getblock c15f762e8dbbdd407534047ef2a9211ca0e79c3625d5fe73cdacade4f9118d6


What happens if the US govt. bans Bitcoin?

Same as the ban on drugs:

People would continue to use them, they'll just do it in secret.
The value will rise.
The government will spend lots of your taxes to try to fight it and fail.


In what respect is Bitcoin "programmable cash"?

Bitcoin transactions are essentially the movement of coins, by encumbering the coins with a restriction on who may redeem them. Bitcoin's internal scripting language is used to accomplish this.The restrictions can be overcome by the owner of the coins, since only they can meet the requirements of that script.

An example is a pay-to-pubkey script. The network interprets this as: whoever can produce a signature from the private key of this public key, can spend the coins. It looks like this:
[public key] OP_CHECKSIG.

To redeem the coins, one provides a the right signature.

Scripts can have varying degrees of complexity. For example:
OP_IF OP_2 [pubkey1] [pubkey2] OP_2 OP_CHECKMULTISIG OP_ELSE [publickey3] OP_CHECKSIG OP_ENDIF.

This script ensures that coins can only be redeemed if the owners of pubkey1 and pubkey2 provide a signature for a suggested transaction, OR, if the owner of publickey3 provides a signature. If either of these conditions are met, then the coins can be spent. That makes it programmable on a very low level.

Scripts are evaluated by the network whenever a transaction occurs, ensuring that the signatures or data which is provided actually meets the needs of the restrictions on the funds.

And although distinct to bitcoins scripting language, since bitcoin software is usually networked to maintain up-to-date knowledge on which transactions are currently spent and unspent, you could write applications to move money around without any human intervention.

In a sense, most payments API's are programmable cash, but the scripting language bitcoin uses is as low as you can get.


Is it possible derive pathes without prive key? If so in which wallet?

Yes, you can use a hierarchical key ("xpub") to do that. The seller will generate a wallet and provide you with their wallet's "xpub" public key, and they keep the corresponding private key "xprv". You can use the "xpub" to generate addresses for their wallet, and the seller can use their "xprv" private key to spend from those addresses.
I believe most wallet software supports this by default.


After restarting Electrum and creating a NEW wallet the old addresses (and Keys) where still there.

So you went through the process of creating a new wallet? You got asked what wallet type you wanted to create, you chose standard wallet, a seed was generated and displayed and then in the step after that you were asked to re-enter the seed to confirm that you wrote it down properly. After that it asks you to enter a password if you like. You did all this?

If you created a new wallet file then it should not contain your old addresses. The only way it can contain your old addresses are:

the old wallet file is still on your hard drive and you have that opened. you can switch wallet files via file > open or file  > recently open. it's also possible to specify a specific wallet file via the -w command line switch. For example c:\path\to\electrum.exe -w c:\path\to\wallet. If you don't specify a specific wallet file it'll open the default_wallet file in the \Users\YourUserName\AppData\Roaming\Electrum\wallets folder
you have a malware infection and those addresses aren't really yours. they belong to the malware author and the malware is injecting all your wallets with those addresses in the hope that you will send bitcoin to them.

Also note that public keys are not private keys. You imported armory private keys not public keys.


You only need to use OP_PUSHDATA1 if you are trying to push more than 75 bytes of data onto the stack.

For pushing smaller sized values onto the stack, you can use the opcodes 0x01 to 0x4b to indicate the number of bytes being pushed. Thus, to push a single byte of value 210 (0xD2) onto the stack, you would use the byte sequence 0x01 0xd2.

To push a 16-bit number, such as 1000 onto the stack, you would use the sequence of bytes 0x02 0xe8 0x03. Note that little-endian byte ordering is used. You can do similarly for a 24-bit number, or 32-bit number.

The minimum size should always be used when pushing a value - meaning the most significant byte of the pushed value should never be zero.

The value pushed will internally be zero-extended to a represent a 32-bit signed integer. All of the numeric operations in bitcoin script are limited to 32-bit integers. The result returned by a numeric operation can be treated as a signed 64-bit value, but values which overflow the 32-bit integer range may not be used in subsequent numeric operation.

On OP_PUSHDATA1, this is used for pushing arbitrary binary data onto the stack which may be used as arguments for operations such as OP_SHA256. This works by having the first byte of the sequence being OP_PUSHDATA1, the second byte being the length of the pushed data, and the remaining bytes being the content. For data more than 255 bytes, OP_PUSHDATA2 is used, where the second and third bytes of the sequence represent the length, and so on. The minimum size rule applies to all of the kinds of pushes, including that you should not try to push a single byte <=16 onto the stack using 2 bytes, but should instead use the OP_N single-byte opcodes.


It turns out that the solution didn't really have anything to do with bitcoind itself - I was running it on a virtual machine hosted on Azure, and I needed to create firewall rules for the port not only on the actual Windows machine, but also in the Azure portal!


How can I be sure that bitcoin mining software is not compromised?

cgminer / bfgminer are both open source, get it from the official repository and you can be fairly sure that some geek will have noticed if there's something suspicious! If you're talking about mining some altcoin with a custom hashing algorithm then you have a valid concern.


BitInstant - How do I trade my plain cash for Bitcoin at CVS, 7-11, Walmart

BitInstant has teamed up with an already-existing payment processor. This payment processor is designed to allow those without credit cards make purchases online. The way it works is that you make your purchases, check out, and a special receipt is generated with a transaction ID. At this point the transaction is in a "pending" state, awaiting payment. You take that receipt to a participating location (thousands worldwide), they check the transaction ID from the receipt and your cash and then finalize the transaction.

Purchasing bitcoins via BitInstant is really no different, except that your "cart" contains Bitcoins.


Monitor non-wallet bitcoin addresses for new transactions

Bitcoin-qt has several limitations when it comes to this type of thing. There are only really two ways to do this.

Use the listunspents RPC call to watch the balance for a particular address, and compute the total balance. Then trigger your call on the backend from your .net application.
Use the external wallet-notify bitcoind option that sends transaction data to your .net process via a script, parse the result to determine the payment. This can cause problems on high volume sites as it spawns external processes per wallet notify.

Finally, you can only use this method to interact with addresses registered to the local bitcoind. Either addresses it controls, or that you have manually loaded.


In NXT, what is the difference from Account ID and Account Numeric ID?

Starting in software version 1.1.3, the numeric account format has been changed to Reed-Solomon format by default (the account address starting with NXT- ) which provides higher security against typing mistakes. You still can use both address formats, but the new format is recommended.


Why doesn't BTC reward miners for confirmations, too?

I'm not 100% sure I've understood your suggestion, in part because you've used some non-standard terminology.
But it looks like this is actually two suggestions rolled into one.
The first is a mechanism to incentivize miners to include transactions which have little or no fee.
That is a bug, not a feature, for two reasons:

Including transactions in the blockchain is costly. Every transaction needs to be processed not only by every node that operates now, but every fully validating node that will ever start operating in the future. The more transactions there are, the harder it is to run a node, and the less decentralized the system is.
This is why we don't want people to have the opportunity to spam the network with transactions of low economic value (due to either negligence or malice). If someone wants to have their transaction included, they have to pay for the privilege. That's why there is a limit on the block size, and users compete with fees on the right to enter the block.
Low-value payments is what we have the Lightning Network for.

A core principle of Bitcoin is to have a known monetary policy. Every reward obtained by a miner has to come from somewhere. Either from the pre-agreed inflation schedule for Bitcoin, or from already existing coins paid by users as fees. You are suggesting that miners should be paid above and beyond the inflation schedule and the user fees. Where will the money come from?
This problem is not completely insurmountable - but it's not really a simple matter of tuning a few parameters, and it does complicate the issue.

Your suggestions also seems to hint at the possibility that fees for a transaction will not be just given to the miner who includes it in a block, but rather divided between that miner and future miners who built on that block. This is similar to what I suggested here. But this is not really effective enough to be worth the trouble.


how to use bitcoind "walletnotify" for unique transactions only

There is no walletnotifynew option in Bitcoin, you will have to do deduplication on the application side.


Is it possible to write a script, which can allow spend only own inputs except all of them?

No, it is not possible for a script to be able to determine who "owns" the input (as in whether the input was created by Alice or by Bob). Scripts cannot look at things like the txid of the input it belongs to, the index of the output the input spents, or any of the output scripts. There is no facility in Bitcoin to do that. So no, such a script is impossible to do in Bitcoin.


That depends on what type of P2SH address it is. Only some P2SH script types actually have a one-to-one relationship with a private key. The most common case is probably embedded segwit. If its a P2SH-P2WPKH address, you can retrieve the public key from the embedded P2WPKH script using the dumpprivkey RPC command.


I've not touched a large part of my online wallet (two weeks), nor the paper wallets under my sink (two years), but they are by no means disappeared, idle or lost. There's really no way of telling, no matter how much thought is put into it.

Some coins can be called lost, that is they don't have any associated private keys known, but there's no way of verifying that they are indeed unspendable. The exceptions are spends to addresses that the private key was never known like 1BitcoinEaterAddressDontSendf59kuE (1.6BTC).

There's an almost constant stream of suggestions that "idle" coins should be recycled, but really, what constitutes idle?


You can do that via the default bitcoind API.

I suppose you are used to use Bitcoin-Qt? Then most probably the bitcoind daemon is also installed on your computer.

You can move an address from one wallet to another using the setaccount command. It works as follows.

setaccount <bitcoinaddress> <account>

So, when you have an address, let's say 1HDPmDGcgXkRTBbACYXNQ1SNeoCQEPvN3v, that you want to move from wallet1 to wallet2, then you can do the following command.

setaccount 1HDPmDGcgXkRTBbACYXNQ1SNeoCQEPvN3v wallet2

You can perform these commands most easily from a command line interface. In Unix systems where bitcoind is installed, you can do the following:

Make sure Bitcoin-Qt is closed.
Launch bitcoind as a daemon:

bitcoind -daemon

Do the command I mentioned above: (It's possible that you get an error that the Bitcoin server is not yet running, just wait a little.)

bitcoind setaccount 1HDPmDGcgXkRTBbACYXNQ1SNeoCQEPvN3v wallet2


What are the pros and cons of Ripple's consensus as compared with Bitcoin's proof-of-work?

The big advantage on the Bitcoin side is that its technology is now well-proven. Ripple's consensus system is the newcomer. Ripple was designed by people who had the benefit of seeing exactly what Bitcoin was doing and its strengths and weaknesses.

Ripple's consensus process can validate a transaction such that irreversibility is reasonably assured much more quickly. When a validator processes a transaction it signs the resulting final ledger. Those signatures are provided within seconds.

Bitcoin's proof of work scheme isn't path dependent. Ripple's consensus scheme is. This has advantages and disadvantages on both sides. Because proof of work is not path dependent, someone with sufficient hashing power can rewrite the past. However, the lack of path dependence also means that no state is required to determine the right chain. The rule for the winning chain is very simple -- the valid chain with the most work wins.

The biggest difference is how trust works. With a proof of work scheme, you must trust the majority of work. So long as the majority of hashing power remains in the hands of a large number of disjoint organizations, that's fine. However, if hashing power become consolidated, it's not clear what the fix would be.

With Ripple's consensus scheme, you choose who you want to reach a consensus with and declare the system unusable if you cannot. One advantage here is that you can reliably detect if you can't reach consensus. With Bitcoin, if the Internet splits in half and you're on the side with less hashing power, you can only infer it as a statistical probability. With Ripple, if you're not reaching consensus with people, you know it immediately.

Another advantage is that if you ever do have an attack or disruption, you have signed cryptographic proof showing who did it and what they did. You can simply stop trying to reach a consensus with them and then they would have to start over from scratch to attempt such an attack again. Because the effort required is so great and the payoff so low, it's much less likely people will try.

The disadvantage here is that UNLs (lists of who you want to reach consensus with) must be maintained and if your UNL is broken, you can fail in various ways that get worse the more broken your UNL is. The downside of being in control is that you can shoot yourself in the foot. The upside is that you can do something if someone else tries to shoot you in the head.

Bitcoin could fairly easily adopt some of the principles of Ripple's consensus scheme and gain many of these benefits. For example, mining pools could sign a statement indicating which chain they are building on. In the event of a network split, this would make it rapidly clear whether you were still on the same chain as those pools. In the event of a bug-induced chain split, you'd quickly know that something was wrong and would be able to stop relying on transactions automatically rather than having to wait for a manual warning to go out.


For how long has a channel been inactive?

You can look for "last_update" field in getchaninfo output.

Below I also submitted https://github.com/edouardparis/lntop console screenshot which does the same thing.


Multipool clients generally have two sets of functionality fail-over or load balancing.  Fail-over is simply having backup servers in place so that your miner can continue working if your primary server goes down or experiences a connectivity issue.  Load balancing will split up the work across multiple pools simultaneously.  This would make the most sense to me in an environment where multiple people purchase a rather expensive mining rig and want to distribute shares of the rigs capability to accounts that are controlled by different owners.  I can't see a scenario where this functionality could be unfair to someone mining in a single pool.


I want to distribute small amount of bitcoins

I read this on bitcoinfees.com

If any of the outputs (including any change) of your transaction are less than 0.01 BTC, then a fee of 0.0005 BTC is required.

This is called bitcoin dust. Smaller transactions as you intend todo comes with a fee.


As the answer by @MeshCollider states, those BTC are lost forever, altough there is one more thing I believe is worth of consideration.

Cryptanalysis never get worse, it always get better with time. One day, the current algorithms used to secure bitcoin could get old and weak enough. It will probably be, as it typically is with cryptanalysis, a gradual process. First there will be some unpractical, but theoretically possible attacks, then some practical, if not too hard or improbable, then with a good equipment and enough money it will be possible to spend those coins and finally everyone will be able to do that with their PC. This whole process will probably take years of slowly advancing cryptanalysis.

The bitcoin community will probably adapt a new algorithms which will require a new generation of addresses when the current algorights will be close to be broken, but the old coins will remain insecure as long as they are on old addresses. That will probably require users to transfer their coins to the new-generation addresses to secure their BTC. If that will be the case, the lost BTC will remain on the old addresses, where they will be vulnerable to retrieval. It will result with a new enterprise of retrieving those coins, which will therefore return into circulation.

Note that it this answer is highly speculative. It relies on two assumptions:

That the algorithms will be broken one day, which is a highly reasonable assumption, as it has been the case with many algorithms before.
That the problem will be solved by the community in a way I described, which is reasonable in my eyes, as I haven't seen any better proposal to date, but noone can be sure if that will be the case.

Bottom line: lost bitcoins might be like gold sunken in the oceans: it may be unretrievable now, but one day it might return to circulation.


A transaction of the form:

2 pubkeyA pubkeyA pubkeyB pubkeyC 4 OP_CHECKMULTISIG

should do what you want. Give it a try on testnet, shouldn't be hard to whip up a test case using the raw transactions API of Bitcoin Core.


Double transaction on same hash (transaction ID) - Loosing 0.01 btc each time

See above link about How change works. Looking at this transaction 5f48a419f861ca157e938492a5a8550a85c4d93749cd7d2bcdb9822be6ee9b3b:

(Assuming) you tried to send .001 BTC to 1PqarrL2NAobkNbExtjBA1KEzXk7rwPfGQ, but there did not exist any unspent transaction outputs (UTXO) to satisfy that exact amount (plus tx fee). So your wallet chose to use the UTXO worth 0.01105895 BTC. It then sent the change (minus tx fee) back to your wallet in a separate output to 147FWjxpW9nYo5Z32qaHSoUZbVCNgsPGuL. The address for the change is different because it is based on a different public key (it is a hash of a public key, thus a different address), but is presumably still spendable by your wallet.


Really I am not understanding the Basic things of BitCoin? -- Layman question

Satoshi Nakamoto mined the genesis block in January 2009 and then he sent 10 bitcoin to Hal Finney who was one of the first to run the bitcoin core software. Finney then started mining hundreds of bitcoins in the days that followed. Satoshi then offered his peers equity in the form of bitcoins in exchange for them to work on the bitcoin core software, both developing and testing. So the original guys did not need to buy bitcoin, they were given it as a form of equity. Only in 2010 did the first bitcoin exchange MT Gox open in Tokyo and this allowed other people to buy and sell bitcoin using Fiat currency.


What future can bitcoin have if more and more countries will ban it?

Let's imagine a worst case scenario where bitcoin becomes illegal in all countries. If you put a bitcoin address on your site, you'll get shutdown. If you run a bar and you have the bitcoin logo saying that you accept bitcoin, you'll get fined. Online bitcoin exchanges will be made illegal everywhere.

Even if all this happens, bitcoin as a technology cannot be uninvented. All of this banning will just slow down the adoption. You'll eventually see it uprise again and being used in closed communities worldwide.

People will find other ways of converting fiat currency into bitcoin using decentralized exchanges that go through anonymized tor networks. Local bars and shops will adopt systems where you'll be able to pay your coffee, wirelessly, anonymously, through a hardware bitcoin wallet, without even having to scan a QR code. Paying with bitcoin will become untraceable, ubiquitous and unstoppable.

It's simply a better technology than the current monetary system, and in my opinion history has shown that better technology cannot be stopped no matter the regulations or the policies against its adoption.


Redeem multisig tx using bcoin with multiple inputs (from an exhcnage)

That guide might be a bit outdated. There is a newer guide that just runs through the CLI commands here.
You can also join us on bcoin slack or on IRC in the #bcoin channel.
We'd need more information from you about how you constructed your transaction. The error you're getting indicates that you are trying to spend from a non-existent output. It may never have existed, or it may have already been spent in the past.


Changed Merkle Root and Genesis Hash - Not Compiling

Do you have all of the checkpoint blocks that are referenced within the source for the coin you are cloning commented out or removed?

I had a similar problem my first go at cloning a coin with it's own blockchain.

Also, what did you use to generate your genesis hash? What software/parameters.

I can recommend a piece of software if the problem lies within the parameters that make up your genesis block.

Also, the Assert error your receiving is due to the genesis hash for your testnet parameters not being valid for the rest of the genesis hash input values. I would double check under testnet in chainparams.cpp and make sure that ALL the values (nonce, timestamp, pzTimestamp, genesis reward, bits) are correct for the given genesis hash.


I have a 100 character text message and I want to encrypt this message with my bitcoin "PUBLIC KEY" and decrypt it with my private key in Javascript

You could use something like this eccrypto (Do your own research on the security of this implementation). Also, doesn't appear to allow compressed public keys. Update: It now supports compressed keys as of v1.1.

index.js

var crypto = require("crypto");
var eccrypto = require("eccrypto");

var privateKey = new Buffer("c337ded6f56c07205fb7b391654d7d463c9e0c726869523ae6024c9bec878878", "hex");

//var publicKey = eccrypto.getPublic(privateKey);
var publicKey = new Buffer("04730a151f545f5dcdb1c6d99fb1251f5c70f216f39ba2681bcf10db16bd582e6720bc881d51f25ffbe961df6a0af24a9d39a4db3d86a7f6b3f9bf4eaac0e4006b", "hex");

// Encrypting the message for B.
eccrypto.encrypt(publicKey, Buffer("msg")).then(function(encrypted) {
    console.log('Encrypted message ' + JSON.stringify(encrypted));
  // B decrypting the message.
  eccrypto.decrypt(privateKey, encrypted).then(function(plaintext) {
    console.log("Decrypted message: ", plaintext.toString());
  });
});

Output

$ node index.js
Encrypted message {"iv":{"type":"Buffer","data":[204,13,168,25,80,255,9,233,111,60,165,204,180,126,53,65]},"ephemPublicKey":{"type":"Buffer","data":[4,192,3,65,241,134,65,186,52,52,250,61,208,189,216,167,122,206,156,152,27,173,69,152,37,138,164,5,54,189,227,88,37,243,220,183,22,204,235,37,212,110,207,66,225,244,25,92,69,223,247,175,218,228,134,210,247,190,211,248,239,77,183,21,36]},"ciphertext":{"type":"Buffer","data":[75,104,205,95,93,108,18,50,220,120,164,224,42,214,75,28]},"mac":{"type":"Buffer","data":[63,243,230,143,99,187,246,241,194,10,247,215,188,163,82,98,140,15,186,158,58,207,170,49,230,143,26,17,117,248,195,143]}}
Decrypted message:  msg


How to get private key from bitcoin wallet?

Blockchain.info can create a new wallet from an existing Bitcoin.org client's wallet.dat with a simple Drag and Drop:

https://blockchain.info/wallet/import-wallet

The wallet.dat is in the data directory.


replicating in python what the electrum wallet does during (deterministic) wallet creation

Bip32 is the implementation of hierarchical deterministic wallets. This fully describes what you are discussing here. The full text of bip32 can be found https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
The mnemonic maps to specific bits for the encryption, the words themselves are not used. Read the bit about extending the keys it will also explain how the master public key is generated.  It also explains the three derivations that can be made from the public and private keys which are:

Parent private key -> child private key

Parent private key -> child public key

Parent public key -> child public key

It is worth noting the child private key cannot be generated from the parent public key.


There are no means of inspection that could lead to a safe assumption that a transaction will not get invalidated by a double-spent input.

Giving up your money and leaving the trade with zero-confirmed coins is asking to get scammed.

Waiting for one confirmation is only safe if you are certain that the seller exchanged a total of less than 25 coins over the past few minutes (both in-person and online) and does not control 50% or more of the network's total hashing power (so it wouldn't cost him a penny to perform this kind of attack). Luckily for you the most a mining pool currently holds is 25% of the network's total hashing power (attacks are still possible at that rate but less likely to succeed and cost more for the attacker) but unfortunately you can never be sure that the seller or a partner-in-crime didn't spend more than 25 coins online so one confirmation won't do the trick either.

Waiting for more confirmations will always increase your security to a great extent. 6-blocks confirmations are not 100% safe either but they are way much more secure than single-block confirmations in all aspects.

On a side note, a reliable escrow service could take the hassle away and make your life easier when trading with strangers on the street.


USDT transfer at BTC address from binance exchange

The btc address you transferred the coins to, does it belong to you or binance? If it is yours, then you can be able to recover it without needing binance.


How do I use Blockchain.info's Receive Payments API with node JS / Express?

I'm working on something like this now. I do not have a complete implementation built yet, so please bear with me for any errors or troubles that might arise. However, this might help get you on your feet...

I started by installing bitcoind and setting it up as a client which Node.js can interact with the Blockchain through. I did this by setting up bitcoin.conf with my Blockchain information and starting bitcoind in a screen. Take a look at this page for information on connecting bitcoind with your Blockchain account: https://blockchain.info/api/json_rpc_api

You'll also need middleware for Nodejs to interact with Blockchain through bitcoind. Here's the one Blockchain links to: https://github.com/jb55/node-bitcoin can be simply installed with:

npm install bitcoin

The readme file on this Git provides information and code snippits you can use to connect Nodejs with Blockchain. Node connects to your local bitcoin server:

var bitcoin = require('bitcoin');
var client = new bitcoin.Client('localhost', 8332, 'username', 'password');

Node gets the balance of all your addresses, with at least 6 confirmations:

client.getBalance('*', 6, function(err, balance) {
  if (err) return console.log(err);
  console.log('Balance:', balance);
});

Here's a list of all the possible Blockchain API requests: en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list

You can use these functions to create and destroy wallet addresses, check their balances, as well as send funds from your script if you so desire.

Speaking briefly about security, double encryption is recommended and can be enabled in the Blockchain My Wallet 'Account Details' page. This means each address has it's own access password, on top of the master wallet password. Simple operations such as fetching a balance do not require both passwords to be sent, but sending funds would require Node to send both the master and wallet passwords. If you're using a server with a static IP, you can also use the 'IP Lock' setting in Blockchain to restrict access to outsiders. Gotcha: two-factor authorization must be disabled on your Blockchain wallet to allow access from your script.


Why, when sending BTC to my pruned node's generated wallet, the BTC aren't showing there?

Your node isn't synced with the blockchain yet.

 "blocks": 367670,

Your node has downloaded and verified 367670 blocks.  According to https://blockchain.info/ there are currently 484790 blocks in the blockchain.  Your node will not have an up-to-date view of the transaction register until it has downloaded and processed all of them.  At that time, your transaction should become visible to your node.


The transaction is valid. This golang code gives the correct result.

You need to HASH160 51, not 1.

Additionally, make sure you run the hash on 0x51, not "51" or int(51).


Why is JSON-RPC over SSL "strongly discouraged"?

The RPC interface isn't designed to be used in any scenario which would require SSL, which would be access over the internet or other untrusted networks. It doesn't have the necessary denial of service protections or review to make it safe for use this way, and so letting potentially malicious clients connect to it would be incredibly unwise. If you need to talk to a remote bitcoind instance you are better off tunneling with SSH or stunnel which will provide a secure, authenticated path without exposing the socket any further than localhost.

As of 2017, support for RPC SSL has been completely removed to support the continued move away from reliance on OpenSSL in the daemon (unfortunately BIP70 mandates its inclusion for the GUI client).

As of 2019, all reliance on OpenSSL has been successfully removed from bitcoind.


Question about transactions added to mempool

Do they just get rejected?

No, they will just wait for another block to be included in.

Note that transactions have a time to live in the mempool of 336 hours (configurable using the maxmempoolexpiry startup option).


How long a high-priority transaction takes to evaluate

When a transaction is published to the network, every node that hears about that transaction will check to see if it is a valid transaction according to the network's rules. If it is not valid, it will be discarded, but if it is valid it will be added to that node's mempool. Nodes will relay valid transactions to their peers in the network, but there is also no requirement for a transaction to be known to all nodes before it is included in a block. A miner can put their own valid, but otherwise not published transactions into a new block they have mined.

Similarly, when a node hears about a new block, it will check to see if the block is valid according to the network's rules. If it is, then the node will update it's blockchain record to reflect any state changes incurred by transactions in that block.

With each subsequent block that builds off the block of interest, there is a higher degree of certainty that the transactions included in the block of interest will be permanently included in the blockchain record.


Is it Possible to put s9i software on an s9

You need some software engineer to do so. Because its like installing a different IOS version on iPhone. You can do it but you need someone from Apple or an expert to do that. anyway, after all, you would save only 1$/m extra since the new software saving 20 watts less than s9 software that's the only difference.


This means you have to wait until the transaction has 3 confirmations before you can use it on Paxful.  The time needed for each confirmation is random, but averages about 10 minutes.

By the time you read this, your transaction probably will have 3 confirmations.

If after several hours it still says 0/3, then go and read Why is my transaction not getting confirmed and what can I do about it?.  You may have set a transaction fee that was too low.


How can anonymity and uniqueness be achieved in the blockchain?

I think the best way to interpret the sentence is that the voter can cast her vote anonymously and she can also verify that her vote was tallied.

This has less to do with the blockchain than just end-to-end verifiable elections. A simple example of such an election is the ThreeBallot system.


Implementation of BIP39, I want to generate a BIP39 512-bits seed from 12 mnemonics but failed

Just as a side note: What you get from 12 words is a seed of 512 bit length because it was stretched with PBKDF2. The entropy is only 128 bit with 12 words (each word represents 11 bits of information ~= 132 bit with 4 bit checksum).

If you look at a library like https://github.com/bitcoinjs/bip39/blob/master/src/index.js for example, you see that the spaces between the words aren't removed. If you paste the original words into the PBKDF2 tool you get the correct seed.


Script for sending funds to a multisig address

Yes. Script for P2SH should be:

OP_HASH160, address_hash, OP_EQUAL


Yes, this is supported. As specified by JSON-RPC 2.0, you can send in an array of requests, and receive an array of solutions.


How to prevent lightening network spend two times the balance?

The lightning network consists of many payment channels between users on the network. Each channel has a certain amount of bitcoin locked up in it, and that amount is the maximum which can be transferred in the channel, you cannot add any more BTC. So it is not possible to spend double the balance, no.


Bitcoin Core RPC "importaddress" for a P2SH watch-only

I believe the issue is that you forgot the label parameter. According to the RPC help documentation, the parameters for importaddress should be:

 importaddress "address" "label" rescan p2sh

You have used "address", rescan and p2sh but not label, so the error is likely due to an issue converting the parameters you provided into the ones it expected.

But the fact that the error message is so hard to understand / unrelated to the actual error is a bug, please open an issue on github here: https://github.com/bitcoin/bitcoin/issues


You have no ASICs and no OpenCL-compatible GPU. Note that noone mines on GPU anymore anyway, it's completely useless.

Buy an ASIC miner, 1 TH/s (1000 GH/s) or faster. It will be a stand-alone machine, and you don't need to use your PC at all.


How does one install Bitcoin Core on a CentOs server?

There is an rpm family for Centos 7 - and remember you will need at least 300 GB of hard drive space to keep it running for a while - and the blockchain itself is approaching 200 GB alone.  it hits the cPU cores pretty hard, and then you will need good security because it will invite every hacker in the world to break in.  Within 12 hours of putting ours up - we had 59,000 attempted unauthorized log ins


How to convert my bitcoins to another currency

Bitcoins can be sold for other currencies at Bitcoin exchanges and exchange services. There are many exchanges all over the world (listed here), but the largest exchange with the greatest depth is Mt. Gox.

You can also use a merchant services provider such as Bit-Pay which will automatically handle for you both receiving Bitcoin payments and immediately converting them to other currencies.


Transfer bitcoin from gdax to my nano s and now it’s pending

Quoted from GDAX:

  Withdrawal transactions will be generated instantly, and the value
  withdrawn from your account.

  There are occasional delays with both deposit and withdrawal
  transactions. If you believe that your transactions are taking too
  long, please contact us and provide as much of the following
  transaction information as possible:


All addresses Bitcoin Core generates will be permanently stored in your wallet.dat. It now depends on what your "complication" was. If you just pressed "receive" again and generated another address, you've got nothing to worry about, your money will show up once Bitcoin Core is fully synchronized.

If your "complication" included that you've removed Bitcoin Core in between and also deleted your wallet.dat, your money would probably be lost.


How much would it cost to do a 51% attack

There is a handy chart at https://en.bitcoin.it/wiki/Mining_hardware_comparison.

If we assume that it is complete, and that the figures listed there are accurate (I have not verified them), and that the attacker must buy the hardware, then the most economical device is the Antminer S5+, which produces 7.7 TH/s (7.7e12 H/s) and costs US$2300.  It draws 3.4 kW.

The current network difficulty is about 5.6e10.  This means that an average of 5.6e10 x 2^32 = 2.4e20 hashes are needed to mine one block.  Assuming that one block is mined each 10 minutes (600 seconds) on average, the network as a whole is producing 2.4e20 / 600 = 4.0e17 H/s.

So a 51% attacker needs to produce about 4.0e17 H/s himself, to match or slightly exceed the hashing power of the existing network.  This means he needs 4.0e17 / 7.7e12 = 52000 Antminer S5+ devices, which would cost 52000 x $2300 = $120 million.

(This is unrealistic in a couple of ways - buying that many devices would not only drive up the price but probably exceed the production capacity.  On the other hand, such a large order might qualify for a quantity discount or wholesale pricing.  This attacker might also find it more efficient to license the design and do the manufacturing themselves.)

Running these machines would consume 52000 x 3.4 kW = 177 MW of power.  If the attacker is located in the US, this table shows that the cheapest place to get electricity at an industrial rate is Washington State, where it costs an average of 4.5 US cents per kWh.  At this rate, the attack would cost US$8000 per hour to supply with electricity.

If they are all to be located in one place, there will be additional costs to build / rent and operate a facility to house them all, with appropriate electrical infrastructure.  There will also need to be significant network and server infrastructure to connect them all to the Bitcoin network.  Cooling costs will also be substantial - Google says that their data centers have electrical overhead of about 12% (i.e., on top of the electricity used by the equipment itself, an additional 12% is used for cooling, power supply losses, etc).  They say that the industry average is more like 70%.  You would also have to hire an IT staff to maintain everything.

This overhead might be reduced if the devices were to be distributed (e.g. each of 52000 people keeps one in their house) but then you start to incur administrative costs to keep all those people organized.  (Just picture the communications department to tell them what to do, accounting to make sure they all get their cut of the proceeds from this evil scheme, human resources to recruit new participants, etc.)


Create Pay to Witness Script Hash in Pay to Script Hash Address

Seems to me that

  ... creating a Pay-to-Witness-Script-Hash (P2WSH) output that would
  look like this:
  0 9592d601848d04b172905e0ddb0adde59f1590f1e553ffc81ddc4b0ed927dd73...

means that this hash is an example not derived from the data above


Blockchain as a solution for software licensing?

The following are just some ideas that came to my mind when reading your question:

Let's say that all the instances of the software you want to protect share a blockchain with the servers of the producer company.
Licenses are released through the blockchain as a transaction, with the user who purchased the license as the receiver. This user, who will have its own private key (let's say a password), will be the only one able to unlock the license.

Each copy of the software program will also be registered on the blockchain (as an integrity checksum), so to uniquely associate the license to that specific copy.

The "license" transaction contain all the data that need to be verified, including:

the "coin" representing one license (maybe more than one)
the user ID (public key)
the the software copy ID/IDs (embedded in the software image)
a timestamp for the beginning of the license validity
the expiration time / date

Alternatively to the user ID, a unique identifier of the machine that will be allowed to run the code can be stored (e.g. the CPU ID, or something stored in a non-writable memory, so that it cannot be modified; this data can be sent by the user along with a "purchase transaction" on the same blockchain).

Now, the protected software connects to the blockchain each time it runs, to verify it can be actually run on that computer: if all the conditions written in the license transaction are valid, it runs the program, otherwise it stops.

Since data store in the blockchain cannot be modified, this prevents tampering.
The software copy ID can be an integrity checksum of the program image that is also stored on the blockchain; so if someone tries to crack it, the software will not recognize itself because the new checksum is not stored on the blockchain (only the transactions signed by the producer will be valid).
In case of software updates, new checksums can again be released through the blockchain (by the producer).

So, these were just a couple of ideas, but it's my belief that it wouldn't be hard to think about more and more sophisticated techniques.

In conclusion, let me point out that what we are actually talking about here, is a special case of the so called "smart contracts".

Hope this helps


What about http://bitcoinwisdom.com/? It visualizes data from 14 different exchanges.


when does an address shows on blockchain?

Are you sure that you are checking Bitcoin addresses with blockchain.info (a Bitcoin address from a Ledger Wallet starts with a "1")?

If there has not been sent any bitcoins to an address, then blockchain.info will show it without any transactions and a balance of zero. It should never say "unrecognized search pattern".


how to send money using json-rpc in bitcoin-cli for php?

The suggested library for Bitcoin JSON-RPC via PHP is the EasyBitcoin-PHP library. Source

Here's a simple example:

<?php
require("easybitcoin.php");

//authenticate
$bitcoin = new Bitcoin("RPCusername", "RPCpassword");

//execute ternary command
$send = $bitcoin->sendtoaddress("1SomeBitcoinAddy", 1);
echo $send ? $send : "Oops an error: ".$bitcoin->error;
?>

The first argument for sendtoaddress() is the address you want to send funds to, the second is the amount in whole bitcoins.


What does "Unable to decode output address" mean?

If you look at the output script for that output, you can see it looks like this:

 RETURN PUSHDATA(32) [some garbage]

This script, beginning with OP_RETURN, is called a null-data output, and is used to store arbitrary data in the blockchain. These outputs can never be spent, there is no way to make the script ever evaluate to true. Because of this, they will always show up as unspent on blockchain, and can be pruned from full node UTXO sets.

In general it's required that these outputs are accompanied by at least one 'normal' output. Any bitcoins in an OP_RETURN output are destroyed forever because they cannot be redeemed, that is why they all have 0 value


generate wallet addresses from extended public key

As Watching wallet is a wallet which does not have private key. It is created with the help of public key. So, for generating addresses from extended public key for watch-only wallet, First of all you need to first create the watch-only wallet by that extended public key. and then you can simply derive the addresses from that one by one.

Sample code is shown below:

// Specify the Network Parameters for mainnet or testnet
NetworkParameters params = NetworkParameters.prodNet();

// Provide the public key from which you want to derive addresses
String xPub = "xpub6Cw8YA6Mko3xfkYpMQDZjGjgDTWUrJr87NBSiDPXqcmcSJTgxLXm3VCw3iQs4iC5ZrwpY3M21a43DZmiMzDXWzzhF1n7yxSXDnEHjJN6jwK";

// Create watching wallet, with the help of Wallet class
Wallet wallet = Wallet.fromWatchingKeyB58(params, xPub, DeterministicHierarchy.BIP32_STANDARDISATION_TIME_SECS);

// Print the very first derived address from provided public key
System.out.println("Receiving Address : " + wallet.currentReceiveAddress());

The Output will be :

1L23PHmL38qjqbs75doB1VTSL3CKPwkPbC

You can get the public key from https://iancoleman.io/bip39/ and its all particular derived addresses. You can compare your first generated address from there, to make sure that you are getting correct addresses.

If you want to fetch first 20 or 30 Addresses then you can use given line in a loop. Provide loop limit upto 20 or 30 (which you want).

    // Run this statement in a loop, where i is the loop variable.
    System.out.println(i + " : " + wallet.freshReceiveAddress());

You can again compare these addresses from https://iancoleman.io/bip39/

NOTE: This wallet will be watching wallet, you can receive coins at these addresses but you can't spend those. Until and Unless you are not Signing the transaction to the particular private key, or you are not providing private key to this wallet.


walletnotify and transaction malleability

Yes. You receieve a walletnotify for every transaction your wallet sees that is relevant to it. Once when it is first seen, and once when it is seen in a block (first confirmation). These two may coincide, in which case you only get the confirmation one.

For mutated transactions, you will see a first one that never confirms (and in 0.9 will get a "-1" confirmations marker), and a second transaction that does confirm.


what is the explanation of "witness version" and its usage?

part 1 of the question has been replied by Tony.

witness data is more than signature, you can have a pub key "behind" the signature, or a redeem script or other smart contracts. Take a look at V_IN scripts as of non-Segwit tx.

on the second part of your question:
The number at the beginning (the flag) identifies the number of inputs, that have witness data. You might create a tx, that has 5 inputs, e.g. 2 non segwit, and 3 segwit. Then this flag has a value of "3".

See this example with two V_INs, and the flag value being "1", cause only one part of the tx has Segwit/witness data. Also see at the end the number of segwit elements for referenced V_IN (TX_IN[1]). The first two elements is signature (with OP_SIGHASHSINGLE - hex 03 at the end!), the third element is a pub key.

01000000000102FE3DC9208094F3FFD12645477B3DC56F60EC4FA8E6F5D67C565D1C6B9216B36E000000004847304402200AF4E47C9B9629DBECC21F73AF989BDAA911F7E6F6C2E9394588A3AA68F81E9902204F3FCF6ADE7E5ABB1295B6774C8E0ABD94AE62217367096BC02EE5E435B67DA201FFFFFFFF0815CF020F013ED6CF91D29F4202E8A58726B1AC6C79DA47C23D1BEE0A6925F80000000000FFFFFFFF0100F2052A010000001976A914A30741F8145E5ACADF23F751864167F32E0963F788AC000347304402200DE66ACF4527789BFDA55FC5459E214FA6083F936B430A762C629656216805AC0220396F550692CD347171CBC1EF1F51E15282E837BB2B30860DC77C8F78BC8501E503473044022027DC95AD6B740FE5129E7E62A75DD00F291A2AEB1200B84B09D9E3789406B6C002201A9ECD315DD6A0E632AB20BBB98948BC0C6FB204F2C286963BB48517A7058E27034721026DCCC749ADC2A9D0D89497AC511F760F45C47DC5ED9CF352A58AC706453880AEADAB210255A9626AEBF5E29C0E6538428BA0D1DCF6CA98FFDF086AA8CED5E0D0215EA465AC00000000

VERSION
 01000000

SEGWIT (BIP141): this is a segwit tx, marker=00
       (BIP141): flag=01

TX_IN COUNT [var_int]: hex=02, decimal=2
  TX_IN[0]:       6EB316926B1C5D567CD6F5E6A84FEC606FC53D7B474526D1FFF3948020C93DFE
  TX_IN[0] hex=00000000, reversed=00000000, decimal=0
  TX_IN[0] Script Length hex=48, decimal=72
  TX_IN[0] Script Sig (uchar[]) 47304402200AF4E47C9B9629DBECC21F73AF989BDAA911F7E6F6C2E9394588A3AA68F81E9902204F3FCF6ADE7E5ABB1295B6774C8E0ABD94AE62217367096BC02EE5E435B67DA201
  TX_IN[0] Sequence (uint32_t)
  FFFFFFFF
  TX_IN[1] F825690AEE1B3DC247DA796CACB12687A5E802429FD291CFD63E010F02CF1508
  TX_IN[1] hex=00000000, reversed=00000000, decimal=0
  TX_IN[1] Script Length hex=00, decimal=0
  TX_IN[1] Sequence (uint32_t) FFFFFFFF

TX_OUT COUNT, hex=01, decimal=1
  TX_OUT[0] Value: hex=00F2052A01000000, dec=5000000000
  TX_OUT[0] PK_Script Length hex=19, dec=25
  TX_OUT[0] pk_script 76A914A30741F8145E5ACADF23F751864167F32E0963F788AC
  This is a P2PKH script, and translates base58 encoded into this bitcoin address: mvNy8bVyGDyuCiS1zMzm61eDtCBbUVfHPD

WITNESS TXIN[0] stack elements: hex=00, decimal=0
WITNESS TXIN[1] stack elements: hex=03, decimal=3
 WITNESS[0] data length (var_int), hex=47, decimal=71, data(uchar[]):
  304402200DE66ACF4527789BFDA55FC5459E214FA6083F936B430A762C629656216805AC0220396F550692CD347171CBC1EF1F51E15282E837BB2B30860DC77C8F78BC8501E503
 WITNESS[1] data length (var_int), hex=47, decimal=71, data(uchar[]):
  3044022027DC95AD6B740FE5129E7E62A75DD00F291A2AEB1200B84B09D9E3789406B6C002201A9ECD315DD6A0E632AB20BBB98948BC0C6FB204F2C286963BB48517A7058E2703
 WITNESS[2] data length (var_int), hex=47, decimal=71, data(uchar[]):
  21026DCCC749ADC2A9D0D89497AC511F760F45C47DC5ED9CF352A58AC706453880AEADAB210255A9626AEBF5E29C0E6538428BA0D1DCF6CA98FFDF086AA8CED5E0D0215EA465AC

 LOCK_TIME
00000000


How can I recover BTC sent to BCC wallet from Bitcoin Core Wallet?

You can not unless you also have the same BTC address as BCC address.
Basically you need the private key for the address you sent it to.
So let's say your BTC address is A, and you sent it to BCC address B.
You now need to have the private key of B on the BTC network, and you need to import it into Core.
Look up the private key of your BCC address B, and see if you can import it t into Core. I don't think it will work, but i have never tried that.


Can the Bitcoin network boycott a misbehaving miner?

I'm not sure what you mean by 'misbehaves', but if a miner creates an invalid block, the rest of the network will ignore it.

And in any case, a specific miner cannot be banned from participating in the network. The network only cares about whether a new block is valid or not, the origin/creator of that block is not even necessarily known. There is no 'ID' or anything like that that links blocks to certain miners. Anyone that submits a valid block hash can create the next block on the network.


Is there a list of mining pools' Bitcoin nodes IPs?

The following list will have inaccuracies. I have not been maintaining it as much recently. Some ips are known not to belong to a particular pool but are marked as such because they located nearby (e.g. same datacenter).

http://pastehtml.com/view/c7rf4x1gc.rtxt

Again no guarantees of accuracy *


A fuzzing harness is a test case or a particular test target. This blog post defines a harness as an "entry point executable". When you want to fuzz input that is not reachable from the command line you need to write a new testing harness.

For example, if we wanted to assess the security of a client/server application, a testing harness would need to perform many actions, like starting the server process prior to sending network input from a client connection. Or if we wanted to fuzz test the inputs of functions in a DLL (loaded library), since there is no entry point defined we would need to write a testing harness to pass input from the command line into DLL functions.

This blog post goes through an example of writing a test harness to take input from a file and then pass that input to a vulnerable function that we want to fuzz.
There is also a glossary of fuzzing terms here.
Thanks to Marco Falke for answering this question on IRC.


How to calculate the transaction size from the signed hex encoded?

Can I simply get the size in bytes of the hexadecimal decoded to binary?

Yes. The hex encodes the raw bytes of the transaction that will be broadcasted throughout the network. Assuming the transaction is fully signed and ready to be broadcasted, the size is the number of bytes, or the length of the string divided by 2.


Can a person only send large amounts an have a $500 transaction log between us before he could send? How can i get around this?

Sounds like a scam; that's not how Bitcoin works. I wouldn't have high expectations about the outcome of this. The goal is to get you to send them money.

I would say the following:

Send me the $500 and I'll partly refund you once your transaction is confirmed.

This is because, unlike bank transactions, transactions in Bitcoin are irreversible and it's not possible for them to "transact and cancel the transactions".


What happens if segwit node receives blocks from legacy node?

SegWit nodes simply won't download blocks from non-SegWit peers. Preferential peering tries to make sure outgoing connections go to other SegWit peers, but even if not, downloading of blocks only happens from compatible peers.

If we receive a block from a peer which claims to be SegWit compatible, but it lacks witnesses, it will be treated as if the block were invalid, and the peer who gave it will be banned and/or disconnected.


How can we trust any crypto currency if the NSA could use 51% attacks?

As mentioned in comments, the 51% attack doesn't let you fake transactions. You just take control of what gets in the blockchain from the moment the attack is realized.

As to realizing the attack, the current Bitcoin hashing power is about 60,000TH/s.

Right now, the more efficient mining rigs cost at least $2,000/TH/s. So just getting all that mining power would cost the NSA, or any similarly powerful actor, about $120M. That's assuming that so many miners can actually be sourced which is highly doubtful at the current production volume.

Then you'd have to factor in all the procurement, the time it takes to setup operations of that scale and the mind-boggling electricity bill. So it's probably a 2-3 years project with a half-billion dollars price attached.

And then what would be the NSA's motive? The dollar is doing just fine right now and the US government can control Bitcoin just as well is they want to do so.


Decentralized Data Storage System in NXT - How do you disable the 2 week data pruning?

Yes you can disable data pruning by editing the config file at conf/nxt-default.properties

This would effectively make the node into an NXT Archival Data Node and I'd imagine you would be able to charge to retrieve old data in the future.

# Override the lifetime of prunable data to keep them longer, value in seconds.
# Set to -1 to disable pruning. Has no effect if set to less then the minimum
# required lifetime of two weeks (1209600 seconds) on mainnet, or 24 hours
# (86400 seconds) on testnet.
nxt.maxPrunableLifetime=0

# Always include prunable parts in transaction json, as long as still available,
# even if expired.
nxt.includeExpiredPrunable=false

Just change it to -1 and true in those settings.


is Gap Limit only for consecutive address?

The gap limit is the number of consecutive unused addresses after the highest used address. So if address 19 receives some Bitcoin, then, with a gap limit of 20, the next 20 addresses will become the lookahead. Since 35 will then be seen, the next 20 after address 35 become the lookahead.


How to store 30kb file using Decentralized Blockchain Data Storage on NXT (nxtcoin) by attach messages?

Seems that the new 1.5 nxt version is giving users the ability to attach up to 40kb worth of data in the blockchain. See here:

NXT 1.5 decentralized storage on the blockchain

Also found the discussion of NXT Transient Data where data can be stored on the blockchain temporarily and then removed after a certain amount of time to reduce blockchain bloat. As discussed bye Jean-Luc: https://nxtforum.org/general-discussion/price-speculation/msg126548/#msg126548

  We could add a "transient data" attachment that can have larger size,
  but is only kept in the blockchain for a limited time, say 24 hours.
  The hash of the complete attachment will be included in the
  transaction bytes that are signed and will be kept permanently, so
  that transaction signature can always be verified, but the actual data
  will be deleted after this expiration period. Then the bloat to the
  blockchain and extra traffic will be limited to those attachments for
  the last 24 hours. This wouldn't be that useful for images for goods
  that sellers keep in stock permanently, but for short lived items, or
  even message with picture type of attachment, may work. Just an idea.

Decentralized file storage released on production blockchain:


Running Miner as embedded system (No OS) - Can it be done?

That's about all there is to it.  You don't need to handle the Bitcoin protocol or worry about the blockchain, the mining pool does all that for you.  Just issue a request for 'work' to the pool using the JSON-RPC interface.  Hash the supplied work with different nonces over and over until you get a hash less than the given target, and use the JSON-RPC interface to submit successes.

You might want to poll for new work in a separate thread, so you know when the block you're working on has been found by someone else.


Mastering Bitcoin: Where is the checksum coming from when running bx base58check-decode?

decimal to hex, and then reversed ordering:

$ echo "obase=16;2274467570" | bc
87919EF2

reversed:
87 91 9E F2 -> F2 9E 91 87


Unfortunately, there is no way to get it back.  Once it is sent and confirmed into a block, it is permanent.
Best hope is that the address belongs to someone and they send it back thinking it was a mistake.

Sorry


Altcoins: Determine how many confirmations to require to deposit

Yes, there is a mathematical grounding behind this, namely Poisson distribution. See Satoshi's original paper (last pages) for some details about calculating the odds of a successful double spend attack given a certain portion of the networks computation capacity. This also means of course that networks with a larger hashing power are more susceptible to an attack than networks with lower hashing power.


Understanding IP address tracing via Bitcoin Transaction

If an entity runs a large amount of relay nodes on the network, they could figure out which of their nodes was the first to see a transaction, and which peer that transaction came from.  That does not necessarily tell them the originating IP, as it could have been a a node relaying a transaction rather than sending one.

This leaves a large amount of uncertainty in the trace.  Due to the decentralized nature of Bitcoin, no single entity is likely to be in control of the majority of relay nodes.  Let's say, for arguments sake, that there is a company that runs 40% of all relay nodes.  They have a very good chance that a wallet sending a transaction is directly connected to one of their nodes, and therefore they can work out the originating IP.  But what about the other 60% of nodes?  Can they ever say for sure that a transaction didn't bounce around the other 60% for a few hops before they saw it?  No, and odds are petty high that just that happens often.  And to my knowledge, no single entity runs that many nodes.

Point is, the more relay nodes there are, the less possible it is to trace an originating IP address.


You may mix up block data with the UTXO set (unspent transaction outputs).
Bitcoin Core uses LevelDB for the later (the UTXO set).

Quick lookups for unspent transaction is important for performance.

The block data is a different things. If you have a non-pruned peer (normal full node mode), Core stores all block files so it can serve those blocks to other peers bootstrapping (and for chain reorganisations).

Those block files are not an API, use it with care. If you interested in parsing blocks, consider using the RPC or REST API.

The .blk files contain a bunch of blocks (raw network serialisation format). There is also a block index (a levelDB database) that contains the file offsets and the headers.

Learn more about the blocks format here (or google).


Configuration file is not found for bitcoind

You can see it here,

  cd  $HOME/.bitcoin/


How does a Merkle proof differ from the Merkle tree?

Merkle proofs are not for blocks nor is there a singular "the merkle proof." Merkle proofs are for transactions. They prove that a particular transaction is contained within a particular block.
A merkle proof begins with the transaction that is being proved. Then each branch in the merkle tree that cannot be derived from the transaction is provided, all the way up to the root. The result is a path from the merkle root to the transaction. A verifier can then use this path to compute the merkle root and check that it matches the one in the block header.


Teslacoin sync error - No Suitable Inputs Found

Updated wallet to v3.3 and re-ran synch :)


What's the recommended way to start testing the Bitcoin Core source code?
testing for verification of bug fixes

See https://github.com/bitcoin/bitcoin/blob/master/src/test/README.md which says:

To run the bitcoind tests manually, launch src/test/test_bitcoin. To recompile after a test file was modified, run make and then run the test again. If you modify a non-test file, use make -C src/test to recompile only what's needed to run the bitcoind tests.
To add more bitcoind tests, add BOOST_AUTO_TEST_CASE functions to the existing .cpp files in the test/ directory or add new .cpp files that implement new BOOST_AUTO_TEST_SUITE sections.
To run the bitcoin-qt tests manually, launch src/qt/test/test_bitcoin-qt
To add more bitcoin-qt tests, add them to the src/qt/test/ directory and the src/qt/test/test_main.cpp file.

There is more.


What is 'birthday' in the context of BIP39 / Lightning seed generation?

It simply means that BIP39 seeds have no way to tell you when they were created - If you need to check one for transactions, you have to start at the genesis block and work your way up to the present day.

This is in contrast to the traditional Bitcoin-qt wallet.dat, which maintains a date for when the address was created. Usually, it will not check for transactions for that address before that date (if the birthday is missing, it will check from genesis)


Bitcoin-cli how to createrawtransaction without spending entire input?

Is there any possible way to create a raw transaction using Bitcoin-cli createrawtransaction API that doesn't require spending the entire input?

No.  It's an inherent feature of the Bitcoin protocol that inputs must be spent entirely or not at all.  It's a binary state: spent or unspent.  There is no "partially spent".

  What I'm doing now is consuming that entire input sending 0.01 to the address specified and sending the change back to the address I'm withdrawing from.

Yes, that's what you have to do (though for privacy reasons it is better to send the change to a freshly generated address instead).

  If I deposit 0.5 BTC to my wallet and withdraw 0.01 is there any method to be able to work with my 0.49 BTC I have remaining without having it consumed entirely and being sent to the change address

Nope.

  because then I'm stuck waiting for it to confirm and it gives off the impression my wallet balance is 0 when it's really 0.49 BTC.

Yes, that's something you just have to live with.  However, you don't necessarily have to wait for the transaction to confirm before spending the change.  But the second transaction won't confirm until after the first one does.


Are there any clients that allow for multiple wallets and API acccess?

Armory supports multiple wallets and has a scripting interface.
Blockchain.info is an online wallet service that has an interface very similar to bitcoind.  They also have an API to create wallets.


If I receive a LN payment from an anon sender... is there a way to send back to this individual?

No, there is no definitive way to detect the source of a payment on the Lightning Network.
However, there exists techniques (either active or passive, such as probing or some heuristics) which may be used to try to deanonymize parties involved in a payment.
So, while you can't reliably identify a party, you cannot assume it's totally anonymous either.


They only get that profit as long as they operate their 51% fairly by the rules. Which is still kind of okay for bitcoin. As soon as they start playing tricks, they risk losing more and more blocks as orphaned. For example to double spend they need to precalculate a block but keep it secret. For the time that it's secret they run the risk that someone else will find another block instead.
Remember to get 51% of tomorrows network, the new player would have to more than double todays network speed (and keep up with the growth). So that means buying 102% of the current network speed.
Doing that halves the profits for everyone, including themselves. So even if mining is profitable for people now, the crooks will have to factor in a halving of the profits as well.


I can't send a transaction uses BitGo API

According to BitGo Documentation:

  amount    number  Yes Amount to be sent (in Satoshis), e.g. 0.1 * 1e8 for
  a tenth of a Bitcoin

https://bitgo.github.io/bitgo-docs/#send-coins-to-address

So, the amount should be passed as 0.1 * 1e8 = 10000000


Displaying price in BTC based on USD exchange rate

Save the code to a PHP file in the web directory:

<?php
  $url = "https://bitpay.com/api/rates";

  $json = file_get_contents($url);
  $data = json_decode($json, TRUE);

  $rate = $data[2]["rate"];   //$data[1] is outdated now, they have updated their json order. This new number 2 now fetches USD price.
  $usd_price = 10;     # Let cost of elephant be 10$
  $bitcoin_price = round( $usd_price / $rate , 8 );
?>

Price: <?=$usd_price ?> $ / <?=$bitcoin_price ?> BTC


Is it possible to calculate TX size from its hex?

If your hex string looks something like "12abcd" then it uses two hex characters per byte.  Just take the length of the hex string, divide it by two to get the number of bytes in the transaction, and then divide by 1024 to get the number of KiB.


The Mt. Gox API allows you to do these things. It allows you to create new deposit adresses and withdraw/deposit money into existing ones.

While the API dosent actually have something to tell you when your specific order has been executed, you can get a list of your open orders and compare those against a local listing of placed orders to determine which have been executed. However their websockets API will tell you when any trade has been made on the network which you could then check yours against as well.

Another good API solution would be bitstamps though theirs donsent have a websocket component.


lightning-cli listforwards

  List all forwarded payments and their information


Blockchain Receive API - custom Parameters

You appear to be confusing two different blockchain's API services into one. The code snippet you provided is for their old deprecated wallet API, but your title mentioning the receive payments API is another.

Wallet API: https://blockchain.info/api/blockchain_wallet_api
(The new version requires a local service installed via NPM)

Receive Payments API: https://blockchain.info/api/api_receive

You can add any custom parameter you would like when using the Receive Payments API just by including it as a GET within your callback URL.

$callback_url = "yourwebsite.com/callback.php?parameter1=".$var1."&parameter2=".$var2;


Could not sign Transaction with SignRawTransactionWithKey through the RPC (RegTest)

You are passing the parameter with signedTx incorrectly. A JSON-RPC param key must have a value that is either an array or an object. You are passing in a string. Instead you should pass in the parameter similarly to how you did for the signrawtransactionwithkey call.

You should have something like this:

     Dictionary<string, object> param = new Dictionary<string, object>()
            {
                {"hexstring", signedTx }
            };

    string decode = await disp.DecodeRawTransactionAsync(param);

The same should be done for sendrawtransaction.


How does Open Transactions solve the double spend problem?

When I withdraw 10 clams, my client software generates a random ID:  lkjsdfoiu

It then chooses a random blinding factor, which it keeps secret.

It then blinds the random ID using the blinding factor along with the server's 10-clam public minting key, producing (say): 897345jh

This random, and now blinded, ID is then sent to the OT server along with my withdrawal request.

Once the server verifies that it has successfully withdrawn 10 clams from my account, it uses its 10-clam private minting key to sign the blinded ID:  897345jh SIGNED: Server.

The server returns this to me. My client unblinds it using its secret blinding factor along with the server's 10-clam public minting key:  lkjsdfoiu SIGNED: Server.

When you ask, "Ah-ha-ha, but how can the server's signature still verify, when the ID has changed from 897345jh back to lkjsdfoiu again?" (since it was unblinded) ==> The answer is, that is the whole point of blind signatures. They still work, even after they are unblinded. That is the whole magic of digital cash. (I encourage you to Google "homomorphic encryption" to learn more about the applications for this concept.)

At this point:
1. My client now has a random ID with a valid server signature on it.
2. The server has no idea what that ID is, since the ID was blinded when it was signed.
3. Therefore I and I alone am the only person who knows that ID.
4. When I give the token to Bob who redeems it at the server, the server can see that the token is good (since it has a valid signature.) The server also knows that it's worth 10 clams, since only the 10-clam public key can verify that signature. But the server has no idea where it came from.

Once the server redeems the token for Bob, it records the token's ID (lkjsdfoiu) in a spent token database. This way, if the token is ever redeemed twice, the server can see that it is no good, because it has already been used.

OT expires and rotates cash tokens and mints, in order to allow the server operator to erase its spent token database every few months. Otherwise, the server operator would be forced to store a growing database forever, which is not feasible for a server operator.


How does Bitcoin keep track of account balances?

Those are quite some widespread questions.
Tracking of account balances
There are two parts that keep track of an accounts balance:

each node keeps track of the transaction history
a node keeps track of the private keys for the accounts it owns

Bitcoin at its core is a distributed ledger that keeps track of every transaction ever executed. Every node in the network stores a copy of the complete transaction history and can therefore reconstruct the balance for each account. Catching up with the rest of the network will take quite some time exactly because you need to download and verify the whole transaction history.
The private keys come into play when bitcoins are transferred from one account to another. To spend bitcoins you have to create a transaction and the owner of the sending account has to authorize the transaction by signing it with the private key associated with the account. So anybody that knows the private key to an account may spend the bitcoins that are in that account. Bitcoin-QT (the client you downloaded) creates a file on the harddisk called wallet.dat, which contains all the private keys for your accounts, so don't lose it. Other clients use different methods of storing the private keys.
Mining (or "free" bitcoins)
Mining is Bitcoin's way of minting new currency. There is no central bank that prints bitcoins, instead nodes are rewarded for their help in the network. They help the network by verifying and confirming the validity of transactions in the network.
As others have pointed out mining is not free: the initial investment in mining equipment has to be amortized and electricity has to be paid. While initially it was easy to mine, the fact that you compete with all the other miners about a limited supply of new bitcoins mined has quickly driven the cost of mining up.
Mining nowadays requires such a high investment that some miners never break even.


I am not aware of any. Whilst I like to think of such not-yet-existing services as simply waiting to be provided soon, there is a significant barrier to creating such a service. A broker wanting to offer taking bitcoin deposits as collateral for your stock holdings would need a reliable and classical-finance-compatible way of converting this collateral into USD. This would be needed in case stock price or bitcoin price movements come close enough to using up all the available collateral. With stock exchanges, the broker can do such a service whilst not taking any risk not somehow addressed or knowingly tolerated in the world of finance. Existing bitcoin exchanges do not fit into this because they operate slightly differently from regular stock or foreign currency exchanges. Hence there is additional risk that, whilst apparently acceptable to customers of existing bitcoin exchanges, would probably be seen as utterly unacceptable on many levels by a broker (regulatory, reputational, own risk assessment, ...). Basically, I think such a broker would have to find a bitcoin exchange operating the same way and regulated in the same way as a stock exchange, to be able to make it square with the rest of his business. There may possibly be exceptions among brokers only catering to accredited investors---those are people rich enough that the law automatically trusts them to enter financial business otherwise prohibited for customer protection reasons. But if you qualified as such, I doubt you'd go to a website for advice about finding a broker...


Can i store multiple crypto currencies in one wallet?

Coinomi Universal HD Wallet will do exactly what you're looking for.

Coinomi is a very secure and lightweight, universal, open-source HD wallet for Bitcoin and many altcoins. At the moment the supported coins are:

Bitcoin
Dogecoin
Litecoin
Peercoin
Darkcoin
Reddcoin
NuBits
NuShares
Blackcoin
Feathercoin
Rubycoin
Digitalcoin
Cannacoin

with more integrations on the way.


Reuse of payment hash in Lightning Network

R cannot fail the payment once they have released the preimage. The commitment transactions which were agreed before R released the preimage contain a condition where the payment_hash is embedded in the script. By providing the preimage as part of the witness to this script, each party can claim the amounts due to them without cooperating with the other party.

In the case of C forwarding a payment from B to R, C will agree their commitment transaction with B before they negotiate their commitment transaction with R, and so forth.

The commitment transactions are only invalidated when a new state is agreed where the relevant HTLCs have been removed, which no party will agree to unless they have received the corresponding preimage or had the HTLC removed by the party they are forwarding payment to.

R doesn't need to try and invalide a transaction to not encourage reuse of a payment_hash, because R creates the payment_hash to begin with. If he uses a proper DPRNG, the chance of two payment_hash colliding are unimaginably small.

Intermediate nodes are not required to keep track of the preimages which have previously been used, and it would be unreasonable to expect them to. Most of the time, they will just forward the payment because they have nothing to lose by doing so - the party who sends them the money commits to the funds before this intermediate party commits to forwarding them.

It is possible that a node keeping track of previously used preimages could steal funds if they see one reused. They could use their knowledge of the preimage to remove a HTLC and receive the money from the sender, but not forward anything on to the remaining nodes in the path.

If a node such as B or C does keep track of previous preimages, and R fails a second payment using the same payment_hash, then B or C could decide not to forward this failure on to the sender of funds, and instead claim the money by fulfilling the HTLC or broadcasting the commitment transaction agreed with the sender.


Lightweight Wallets Communication with Blockchain

You should have a look at the SPV (https://en.bitcoin.it/wiki/Thin_Client_Security#Simplified_Payment_Verification_.28SPV.29_Clients).

It was also mentioned by Satoshi in his paper at page 5 point 8:
https://bitcoin.org/bitcoin.pdf


What prevents real-life robberies in the hypothetical future where Bitcoin is widely used?

Robber A now knows the address of the vendor. Robber A can sit and wait until someone (Victim A) purchases something from this address and has a very large Bitcoin balance.

Most vendors would generate a new receiving address for each customer, as is recommended, which would stop this from happening. It is likely Victim A would also have generated multiple addresses rather than owning all his BTC on one address.

  Robber B goes to random persons house with a gun and demands a Bitcoin transfer equal to Victim B's full wallet.
  Am I missing something because it seems incredible easy for people to do? Today cash, credit, and debit robberies have preventions/limitations in place to thwart very large robberies.

How can a cash robbery of exactly the same type be prevented? Although as above, it is unlikely the robber would know their entire amount of BTC owned, so they could not know if the victim had sent everything or not. In general you could keep large amounts of BTC stored on encrypted cold wallets off-site which any robber should not know anything about.


One of the key aspects of a mining protocol is that the miners should be informed immediately when a new block is confirmed on the network. Otherwise, they will continue working on the old block which would then be useless work.

This is why there is not a simple GET/POST protocol for mining. The miners keep a connection open to the pool servers, so that there can be immediate two-way communication between them (from the miner for the case of a share completed, or from the server in the case of a new block).


Raspberry Pi 3 / Bitcoin Node / No space left on device / Link Database to External Hard drive /

You can tell the Raspberry Pi to use your usb drive as your root file system (rootfs). That would fix the problem.

I am also running a full node on RPi 4 and a 1TB SSD, and what I did was to flash Rasbian in the SSD as well as in the SD card. Then, after booting for the first time the RPi with the SD card and with the SSD unplugged, I told the RPi to boot from the SSD like this:

Connect your USB Hard drive to the RPi.
Change the id of the drive to something different so the RPi can differentiate the SD card from the drive. Let's set the id to 0xd34db33f by doing this:

sudo fdisk /dev/sda

Enter the next values to the options that are going to pop up next:

Command (m for help): p
Command (m for help): x
Expert command (m for help): i
Enter the new disk identifier: 0xd34db33f
Expert command (m for help): r
Command (m for help): w

Check that the PARTUUID of the SD card and the drive are different now by using the following command:

sudo blkid

the "/dev/mmcblk0p1" and "/dev/mmcblk0p1" are referencing the SD card, and the "/dev/sda1" and "/dev/sda2" are referencing the drive. So the PARTUUID of the sda1 and sda2 must be the one that we just setup (d34db33f) followed by a dash and the number of the partition.

Modify the cmdline.txt file to tell the RPi to boot from your drive like this:

sudo cp /boot/cmdline.txt /boot/cmdline.txt.bak
sudo nano /boot/cmdline.txt

Once in the file, find the variable root=PARTUUID=#######-02 and change it to the one that we just set. The line should look like this:

 console=serial0,115200 console=tty1 root=PARTUUID=d34db33f-02 rootfstype=ext4....

Exit by pressing CTRL + X, Then "Y" to save changes, and then ENTER to confirm.

Reboot the RPi:

sudo reboot

Make sure the RPi is booting from the drive:

findmnt -n -o SOURCE /

if it shows dev/sda2 then your good. If not, just recover your cmdline.txt file by using the backup we saved, and start over.

Finally, we will tell the RPi to mount automatically the drive and use it as the file system by modifying the fstab file:

sudo nano /etc/fstab

Once in the file editor, modify the second PARTUUID to the id we setup earlier. The file should look like this after modification:

proc            /proc           proc    defaults          0       0
PARTUUID=########-01  /boot           vfat    defaults          0       2
PARTUUID=d34db33f-02  /               ext4    defaults,noatime  0       1

CTRL + X, Y, and ENTER to save changes.

Reboot the RPi again, and That's it!

I had to resize my SSD after this, but I am not sure if you will have to. If you do, or if you need more details, this is the tutorial I followed:

https://jamesachambers.com/raspberry-pi-4-usb-boot-config-guide-for-ssd-flash-drives/

All credits for the guy of the tutorial.


How does Ripple decide which offer to fulfil if they offer the same rate?

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

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

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


Exchange-based vs over-the-counter (OTC)

Exchange-based transactions, ;

  Exchanges bring together brokers and dealers who buy and sell these objects. These various financial instruments can typically be sold either through the exchange, typically with the benefit of a clearinghouse to cover defaults, or over-the-counter (OTC), where there is typically less protection against counter-party risk from clearinghouses,

  This is the case if you for example buy altcoins on Bittrex.com, Or poloniex.com All these transactions Are ""Exchange-based".

This means in the case of cryptocurrencies, that it is done through a third party, and you don't know the seller of the currency.

OTC transactions :

  Over-the-counter (OTC) or off-exchange trading is done directly between two parties, without the supervision of an exchange. It is contrasted with exchange trading, which occurs via exchanges.


Can someone please explain FIBRE to me like I'm 5 and why is it useful?

First the "why it matters":

Fibre (Fast Internet Bitcoin Relay Engine) is a protocol which attempts to deliver Bitcoin blocks around the world with delays as close to the physical limits as possible.

This is very important because Bitcoin mining is intended to be a fair lottery: If you have x% of the hashrate you should find x% of the blocks, on average.  But when it takes time to communicate blocks mining acts more like a race than a lottery: the bigger miner gets an unjust share, creating a pressure to centralize.

This is because when a miner makes a block other miners can't work on extending it until they've heard of it, during that time they might make their own blocks.  If you are a small miner and make a block this works against you because no one attempts to mine the successor to your block until later. If a larger miner mines a block it also works against you, because you've fallen behind.

This race behavior is the same that enables selfish mining.

The race effect can also benefit attackers trying to overpower the network, because they don't need to compete with hashrate lost to stale blocks.

Improving propagation speeds reduces the race and makes mining more fair, lowers pressure to centralize, and improves network security.

Now, "why is it hard":

The world is a big place and a round trip from San Francisco to Australia is well over 200ms typically. These delays are substantially due to speed of light in fiber and while better routing can improve them somewhat, they aren't going away without through-earth-neutrino communications or other stuff from science fiction.

International internet links frequently have packet loss.  If you send a message on a 200ms RTT path you can't hear about any missed packets for 200ms, and they can't get any replacements for another 100ms.  Traditional transmission protocols like TCP do a poor job of achieving link capacity when delays are high especially if there is any loss.

In theory the problem is aided somewhat because 99.9% of the block data is already known because the block mostly contains transactions that have already been broadcast, but unfortunately a node sending a block doesn't know which transactions you'll be missing by the time their block shows up and you telling them will take too long just due to the above mentioned round trip times.

What Fibre does do to solve it:

Fiber lets you effectively build a distributed node that internally moves a block around the world very close to the lowest one way communications delay between the computers comprising it.

The author of fibre runs one such node on public systems which are well maintained and anyone can connect to.  The normal Bitcoin P2P protocol, with BIP152, is used for the last mile-- since that is what BIP152 is optimized for.

Similar to BIP152 (which it was co-developed with) Fiber first sends a short block sketch: A list of short hashes and lengths that allow the far end to use its mempool to lay out transactions into a block, with holes in positions where the transactions were missing or the hash was ambiguous.

Then Fibre breaks the blocks into packets and sends error correction data.  The error correction lets the receiver recover the block as soon as it has received as many packets as missing chunks, even though the sender doesn't know whats missing. Error correcting coding is also used on the initial sketch. This is similar to how Raid or PAR encoding works, but the implementation is made much more complicated by needing to be very fast.

All of this communication happens over UDP with pre-programmed transmission rates, so it doesn't need to ramp up slowly or wait for lost packets.

The sender also sends different chunks to each of its Fibre peers and those peers themselves relay the chunks among each other as soon as they get them, in order to make use of all the interface bandwidth available. When a Fibre peer gets enough to decode the block they do, and start emitting novel chunks.

This process avoids any duplicated data being sent and is highly robust to packet loss as well as link and node failures and achieves very consistent delay.

At every step Fibre trades off bandwidth for latency and can send several times the size of the block data in order to achieve the lowest delay across the long-haul links that it rides over.

There is a lot more to the details of it, probably enough for two dozen questions.

Where did Fibre come from?

Fibre was built by Matt Corallo and was the product of several years of experience running earlier fast relay networks as several years of research into fast block propagation techniques.  Matt took many ideas that were far too computationally slow to be practical, solved the remaining engineering challenges, optimized the heck out of it and then put the result up on a well curated public system.  Good network management and sysadmin work are almost as important to getting low delays as the protocol itself.


Best simple linux cmd tool for offline transaction creation and signing?

There are many command line tools for creating and signing raw transactions offline, most of them written in Python: pycoin, python-bitcoinlib, pybitcointools and others.

If you use Electrum wallet, it has command line tools for offline transaction creation and signing:

$ ./electrum help createrawtx
$ ./electrum help signtransaction


Any ideas or can someone be of assistance? I really don't know what to do

TL;DR:  Your money has been stolen. There is nothing you can do that has any significant probability to recover your $660.

The thief got access to the private-keys stored in your wallet.

  a transaction sometime in March of 2019 was made and I didn't make any transactions in March

One possibility is that someone gained access to your wallet and stole your money.

One recent issue was with the Electrum wallet.

However, if you have a PC wallet or access an online wallet from a PC it is always possible that other malware on your PC stole your passwords and used them to access your wallet, steal money and finally erase logs and data to cover their tracks.

  I have put my receiving address into [a] block chain [explorer]

Most modern wallets are HD wallets that create a new receiving address for each transaction.

  I created new receiving addresses which I read can sometimes [make] your available bitcoins appear.

I've not heard of this, it would have to be a bug in a specific wallet. In general I would be surprised if this helps.

If you found unexpected transactions in a blockchain explorer, it is unlikely that there is a fault in your wallet software. More likely you are a victim of theft.

If your wallet is misbehaving. One solution is to make a careful copy of your seed-words or your private key (you should have these already in a safe place), then use those on a fresh computer (or phone etc) to download and install the wallet software from the only genuine trusted website and make a new duplicate wallet and let it synchronise fully. You don't need to erase your old wallet until the new one is working fully.

  it is safe for me to paste my receving address here

Yes.

There are potential privacy issues if you only use one receiving address. Anyone can see a list of all the transactions made involving that address. But it doesn't give anyone any way to access your money.

You can also safely publish a transaction id and the name & version number of your wallet software (e.g. bitcoin-core 0.18.0, electrum 3.3.4, ...)

Never give anyone your private key, your seed-phrase / recovery-phrase or the password to your wallet or online wallet or account. Changing a previously disclosed password does not re-secure your wallet/account.

  Also this is what I read regarding created a new address can sometimes show balances again: reddit.com/r/Iota/comments/6sim7o/

That advice relates to IOTA not to Bitcoin.

  I'm positive that I never used bitcoin this year

Everything suggests your Bitcoin was stolen.

I wouldn't use that wallet again and I wouldn't use that PC for any new wallet or any further financial activity again. Even after zeroing the disks and cleanly reinstalling the operating system, I'd worry about BIOS malware, infected USB devices, etc.


What site should I use to create a Bitcoin wallet?

I wouldn't recommend Jaxx wallet since, several weeks ago, it was found exploitable, giving an attacker the possibility to retrive your 12 words seed .
Usually, you choose a service that gives you the full control and ownership of keys. Blockchain.info doesn't give you this option.
Some service I would recommend are GreenAddress and Samurai Wallet.


Can someone show me an example rootstock smart contract that is the equivalent of an Ethereum Smart Contract?


Click on 'Request' as if you were going to request a payment. The wallet address will be on the next window. Copy/paste it and then keep the amount requested at 0. If you want, you can delete the request after you've copied your wallet address under the 'Payments' tab.


Signing the bytes of the private key of ECKey key is unacceptable because you are vulnerable for realeasing information about your private key.

In the case of signing a message(as a String) you have to estimate the :

 byte[] result= sha256(message)

The result will be a byte[] and this array finally will insert to the :

 Sha256Hash input= new Sha256Hash(result);

Then the procedure is simple in order to produce the ECDSASignature.
You have to do the following:

ECDSASignature signature= key.sign(input);

and finally in order to validate your signature you have to check the following:

key.verify(input, signature)


Create simple and secure transaction without checksig?

This transaction actually does have a signature check. Instead of OP_CHECKSIG, it's OP_CHECMULTISIG as the script is a multisignature script. The script in this case is the redeemScript which is provided in the input itself. To see this OP_CHECKMULSITIG, you need to decode the redeemScript.

The redeemScript is:

5141042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf51ae

Decoded, this redeemScript is:

1 042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf 1 OP_CHECKMULTISIG

As you can see, this has an OP_CHECKMULTISIG in it which does do a signature check. OP_CHECKMULTISIG checks that n of the public keys listed provide a signature. n is the number that is at the beginning of the script. In this case, n is 1, and the public key is 042f90074d7a5bf30c72cf3a8dfd1381bdbd30407010e878f3a11269d5f74a58788505cdca22ea6eab7cfb40dc0e07aba200424ab0d79122a653ad0c7ec9896bdf. So this script is looking for a signature that corresponds to that public key.


Installed latest Bitcoin-Qt, fully synced, but 'getreceivedbyaddress' etc doesn't work?

getreceivedbyaddress only works for your addresses, i.e. those for which the private key is in your wallet.  Those are the only addresses for which bitcoin-qt keeps indexed transaction data.  Getting balance and transaction information for arbitrary addresses is unfortunately not supported by bitcoin-qt; sites like blockchain.info write custom software that manually parses the block chain.

See also this answer.


Is the otherwise promising Ripple set to become a great currency fraud?

Opencoin plans to give away 50 billion XRP. It is actually in Opencoin's best interest to make this distribution as wide as possible as the system will only be successful if it can gain a critical mass of users. Giving away enough XRP to keep the system as cheap as possible for as many people as possible for as long as possible is the only strategy they believe will work.

A lot of people have suggested possible nefarious schemes and conspiracy theories around Ripple. But you have to remember, if the Ripple payment network doesn't become popular, nothing else matters. It is simply a better strategy to give away lots of XRP as fairly as possible to drive adoption. Not to mention, not doing what they said they would do would reduce confidence in the system.

Billions of XRP will be distributed as widely as possible. The system will be fully open source. There will be no central authorities. That's what's in the founder's best interests, that's what's in Opencoin's best interests, that's what Ripple was designed to be, and that's what Opencoin intends to do.

The founders get 20 billion XRP. OpenCoin gets 80 billion XRP -- 50 billion of which can be given away to promote widespread adoption. That's the deal that was struck.

Note: I'm an employee of Opencoin and one of the architects of the Ripple payment system. I am speaking only for myself.


Lightning Network's RSMC: what happens if there's no revocation transaction?

My assumption was wrong: in a RSMC (Relative Sequence Maturity Contract), a Revocable Transaction refers to the transaction whose output can be spent after a specific amount of time (eg: 1000 blocks) by the counterparty, not the original party.

The counterparty won’t get all the funds in that channel, but whatever was their balance before. After 1,000 blocks, if the original party doesn’t notice the malicious activity, the counterparty is able to spend (presumably) more than they should (as the counterparty published an old Commitment Transaction, it means that they try to reverse the payment for whatever service or product the parties).

This is the reason why users may want to monitor the blockchain for old Commitment Transactions, as a counterparty caught broadcasting an old one will lose all their money when a BRT (Breach Remedy Transaction) is broadcast. The BRT’s private key might be delegated to a third party “watch tower”, since they can't do any harm.


Every website may have a different way of aggregating this sort of data. I would expect that the exact method used by each website will be determined by their specific needs/applications. There is no absolute "right or wrong way" to get this job done. For example:

A simple implementation someone makes for fun might just display the average of two different API calls
A firm like the CME will pull data from only the most legitimate sources, with external considerations to ensure the price data cannot be manipulated to game futures trades on their exchange

To find more info on some actual implementations, I would suggest looking up some websites that display data in the way you're looking for, and see if they provide any info on the algorithms/methods used. I would guess at least a few sites make that info public.