text:
How to install a Bitcoin client on Ubuntu Server
I've googled a lot for this issue. Hehe. I have found some tutorials, but they were of no use because they are for systems that do have a GUI. I have no plans to install a GUI on that system, and I want to use bitcoin from the command line, or via RPC API. This is the system I run:

Linux redacted 3.2.0-40-generic-pae #64-Ubuntu SMP Mon Mar 25 21:44:41 UTC 2013 i686 athlon i386 GNU/Linux

I found I can do this:

sudo apt-get install bitcoind

But hardly I know what to do with it after that. It installs successfully. If you are going to ask a reason why I want this, it's because I want to communicate with it via PHP or I'll see how, but mostly it's for automating services with it. Please help. :-(

When installed, can I use the client for getting payed on apache (php or tomcat) web pages?

If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context.

Once you've installed bitcoind, you should create a configuration file (stored in ~/.bitcoin/bitcoin.conf) containing at least an RPC username and password, and then you just run bitcoind to start the server.

Thanks! I'm checking right now how can I add it to system startup.

Edited answer after Tom van der Woerdt's comment about using an untrusted repo
from: https://gist.github.com/WyseNynja/2503687
sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libboost-all-dev libdb5.1-dev libdb5.1++-dev libgtk2.0-dev

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/src

make -f makefile.unix clean; make -f makefile.unix USE_UPNP= bitcoind

# from #bitcoin-dev:
# sacarlson: USE_UPNP= : don't build upnp, USE_UPNP=0 : build but disable by default, USE_UPNP=1 : build but enable by default

# optionally,
strip bitcoind

download blockchain (check against http://blockexplorer.com/q/getblockcount):
bitcoind

test bitcoind:
bitcoind getbalance
bitcoind getaccountaddress account #(where account is the rpcuser account you created earlier in your bitcoind.conf file.) It will look like this: 1djfdLXSgqrwtexqkn9JewSrCJU4vu74eR4

send coins to the address and doublecheck bitcoind getbalance

Baaaad idea. Untrusted repo, while the default ones have it too.

I don't think this is correct. Can anyone else confirm this, because the INSTALL file tells you to install using ./autogen.sh && ./configure && make

After cloning a repo, for reliable operation, you should git checkout the current stable release version.

In the Open Synaptic Package manager, search: bitcoin and click install.
Bitcoin is already in the UBUNTU repositories.

I already posted this answer, but it's gone for some reason. If some moderator deleted it, then I am ok with it, but shame on them for not informing me. In any case, here is the shell script I run on my computers to get bitcoin up and running:
#!/bin/bash

# Word of caution, I am not an experienced shell programmer. All I can #
# guarantee is that this script has worked for me, and that it has     #
# done so on multiple Ubuntu machines (one 11.10 and one 13.10), so    #
# hopefully it will work for you too                                   #

# Install some packages as instructed on various web sites
sudo apt-get -y install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev
sudo apt-get -y install libtool autotools-dev autoconf
sudo apt-get -y install libdb4.8-dev     # Generally this step fails
sudo apt-get -y install libdb4.8++-dev   # Generally this step fails
sudo apt-get -y install libboost1.37-dev # Sometimes this step fail
sudo apt-get -y install libboost-all-dev # Sometimes this step fail
sudo apt-get -y install libminiupnpc-dev
sudo apt-get -y install libdb++-dev
sudo apt-get -y install libprotobuf-dev
sudo apt-get -y install libqrencode-dev

# Build berkley db4.8
# Technically, this should only be installed if the above              #
# libdb4.8XX-dev packages failed to install but nothing beats a little #
# overkill =)                                                          #
cd ~/Downloads

if [ ! -e db-4.8.30 ]
then
   wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
   tar zxvf db-4.8.30.tar.gz
   rm -f db-4.8.30.tar.gz
fi

cd db-4.8.30/build_unix
../dist/configure --prefix=/usr/local --enable-cxx # If this doesn't work, try removing or changing prefix
make
sudo make install
cd ~/Downloads
rm -fr db-4.8.30/

# Build bitcoin
cd ~/Downloads
if [ ! -e bitcoin ]
then
   git clone https://github.com/bitcoin/bitcoin ~/Downloads/bitcoin
fi

cd bitcoin

./autogen.sh
./configure # Non Ubuntu 13.xx versions
# ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu # Ubuntu 13.xx version
make
sudo make install

cd ~/Downloads
rm -fr bitcoin

If any of your posts were deleted you can see them by checking your profile. At the bottom of answers/questions overview is a link "show recently deleted answers/questions". I think you might also get a "response flag" (not sure). If you wish to inquire what happened to your answer, please see How can I know why my post was deleted?, and if that doesn't resolve it for you, please post a question in [meta].

i am able to get them but i am getting the api of functionalities which are in the link https://en.bitcoin.it/wiki/Running_Bitcoin bit not related to client api list which are in https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Welcome to BitcoinSE! Your answer can be improved if you state what "them" are and possibly explain how you use the api.

This is ubuntu we're talking about.

sudo apt-get install bitcoin

will work.

Oh, once you run it after install, It could take up to 7 hours to update your wallet. After it's updated. Remember to encrypt your bitcoin wallet with a hard password but one you can never forget. Because if you do forget your password, All your bitcoins will be lost.

Please edit your answers to improve them or comment on them instead of adding additional answers.


text:
How does a wallet learn of a transaction it has received?
I'm curious how a wallet learns of an incoming transaction. Is it constantly searching the blockchain for blocks containing addresses it generated?

A bitcoin wallet application that runs as a full node client contains a copy of every unspent transaction in the blockchain. This allows a wallet to construct transaction inputs as well as quickly verify incoming transactions as having correct inputs. However, most user wallets run lightweight clients that only track a users own unspent outputs. If the wallet does not maintain a copy of unspent transaction outputs it can query the bitcoin network using a variety of APIs. The API's will return all the unspent transaction outputs for an address. Most wallets will not run continuously and so when a user starts up the application it will query the network to synchronize with it.

How does a wallet (e.g. Bitcoin.com mobile wallet) know to send me a notification when I receive a transaction? It is almost instantaneous so I wonder how that works.

@autr3go - he never answered your question!

Some wallets scan every transaction, other wallets use different mechanisms to learn about payments. Bitcoin is a peer-to-peer gossip network. Nodes on the Bitcoin network announce new blocks immediately to all their peers, so if your wallet software interacts with the Bitcoin network, it will know to scan for updates whenever a new block is announced. Wallet software that does not directly participate in the Bitcoin network regularly polls a server to request updates or might register for push notification, but usually doesn’t process the entire blockchain itself. If your wallet is only online intermittently, it will learn about the transactions as soon as it comes online and catches up to the chaintip.

Full node
If you run a full node, it will learn about new blocks from peer announcements and process the blocks itself. The Bitcoin Core wallet will scan each transaction as it enters the mempool and scan every transaction on each block as it comes in. It will identify any transactions that contain known output scripts, and any transactions that spend any of its own UTXOs.
Light client
If you run a light client (that does not keep a full copy of the blockchain), it may use bloom filters, the Electrum protocol, or compact block filters to learn about payments. Whenever a new block is announced on the network, the light client attempts to learn about new confirmed transactions that pay it. Some mechanisms also let it learn about unconfirmed transactions paying it.

Compact block filters
Since about 2020, many full nodes offer compact block filters (BIP 157, BIP 158). You can think of them as a register for looking up "addresses" in blocks. Some light clients download this compact block filter whenever a new block is found, and then client-side check whether any of their output scripts or UTXOs produce hits on the filter. If they get a hit, they download the whole block and parse each transaction to find the ones relevant to them. This has pretty decent privacy, as the wallet could even download the compact block filter and the block from different peers, so that the peers actually learn next to nothing about what the wallet was interested. It trades this privacy off with a higher bandwidth usage and more implementation work, as the node actually needs to be able to parse blocks and implement BIP 157 and BIP 158. Also, the compact block filter protocol cannot inform about unconfirmed transactions, so a light client that only depends on it will only learn about transactions once they are confirmed.
Bloom filters
Transaction bloom filtering was introduced by BIP 37 in 2012. The client would craft a bloom filter from its addresses, hand this filter to the server, the server would scan its mempool and recent blocks with the filter and return any transactions that produced a hit. The bloom filter had a configurable false-positive rate, which was supposed to provide some plausible deniability. This scheme has since fallen out of use, since it had multiple issues. Firstly, the false positive rate had to be set so high to actually achieve any privacy, that it would have dramatically increased bandwidth use. Therefore most wallets set the false positive rate low and essentially leaked their entire address list to any peer they requested the bloom filter service from. Secondly, the nodes offering this service would need to run a separate filter for each client which could cause a lot of computation, especially on a rescan of an old wallet. Offering the bloom filter network service opened a node up to several DOS vectors. Bitcoin Core 0.19 disabled this service by default.
Electrum protocol
Most light clients use the Electrum protocol. The light client connects to a pre-defined or random Electrum server on the network and tells the server exactly what output scripts it is interested in. The server checks whether it has any hits in its database and serves the corresponding data. This is simple to implement and uses minimal bandwidth, but the light client leaks its entire body of addresses to the Electrum server including even addresses that never got paid.

Account with custodian
If you have an account with a custodian, your "wallet" software
connects to the service provider’s backend to look up its account information. The service provider pushes notifications when a new payment is spotted or a payment is confirmed.

source: Stack Exchange

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

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

sort: votes


text:
How to create an altcoin
I'd like to create a Litecoin fork. This is purely for educational purposes. Any tips on how to get started? I've googled for guides online but I can't find any good ones. Info is scattered all over the place. Thanks for your help!

There are or there were sites where you could input a coin name, logo and other parameters and download a built app for your custom coin, without any knowledge of programming. But once the question states that's for educational purposes, I'll suggest the following:

Download the Litecoin sources and build it from scratch. Refer to the Litecoin project tutorials for details of how to do that for your operating system.
Run it to make sure you got everything right.
Make some random changes to the source and build and run it again to see the effects.
Make changes to the relevant bits of the source, like the name of the coin, logo, app name, texts shown to the user, genesis block id or whatever else is necessary to make a different coin. Build and run it again.

can you share those websites?

I don't remember what ones I saw, it was years ago, but it was like this: https://bitcointalk.org/index.php?topic=704105.0

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


text:
Is it possible to exchange Polish Zloty for Bitcoin with CoinFloor Exchange?
CoinFloor is an exchange that accepts deposits and withdrawals of fiat currencies EUR, GBP, USD and PLN. One can trade EUR, GBP and USD for bitcoin, but not PLN.
In fact it doesn't seem possible to trade PLN for anything, not even other fiats. Of course, it doesn't make much sense for them to accept PLN if you can't do anything with it, so I could be mistaken. If I deposit PLN, is it possible to trade it? How can this be done this?


text:
After the fork, can I send my BTC out of Binance when it has not yet implemented the B2x wallet?
Binance has committed to support the B2x fork.
Before the B2x fork, I sent my BTC to Binance to wait for the fork. A day after the fork and after it has crossed the block, can I send the BTC from Binance back to my Trezor now after the fork without waiting for Binance to implement the B2x fork?
Or can I sell my BTC now after the fork? Must I wait for Binance to implement the B2x fork before doing anything? Will I lose my B2x if I sell my BTC now?

B2X was cancelled in november 2017.

Binance has told me that they taken a snapshot of all btc balances on their exchange. They are studying the issue and will make decision on whether to support B2x in the future.
But for some reason the tech help also told me to hold mt btc in the account until a decision is made


text:
How are bitcoins reassigned?
How are bitcoins reassigned, that is, what about a transaction makes a "coin" no longer usable by the sender, and makes it usable by the recipient?
Alice wants to send bitcoins to Bob. Alice's wallet gathers transactions originally sent to Alice so that the monetary amount of said transactions is at least the amount that Alice wants to send Bob. The transaction is basically a message, so a little bit of ECDSA on top of that and boom, there's a transaction: only Alice could have created that particular transaction (message), and anyone can verify Alice's signature for that transaction.
Now Bob "receives" the money. Why can he use it? (Indeed, why could Alice use the money above...) Digital signatures of themselves don't solve this problem, i.e. the transaction/message along with its signature doesn't "transfer" anything, there's gotta be some other ingredient involved, but what is it? I can't see, or at least not understand, the answer in the various sources I've read.
It has to be something about Bob's private key, but I can't see how it's used to "unlock" the money he received from Alice. I don't know what transactions look like exactly, but suppose they're basically of the form tx_1 = (Alice's public key)+amount+(Bob's public key) - would Bob's wallet basically be saying "reproduce Bob's public key and you can access tx_1"? I guess that would do the trick, but then again Bob was already "logged on" to his wallet so he's already proven the ability to reproduce Bob's public key.
Ok I think I'm getting ahead of myself. Anyway, received transactions, how are they "unlocked"? Thanks.
(Yes, I have tried finding an answer on BSE and elsewhere already.)

Simply put, Alice provides the key to the lock that currently holds the funds, and a new lock (that she got from Bob somehow) to put on the funds. Bob has to give Alice a lock he has the key to -- which is what a Bitcoin address is.

Transactions are chained in a way that when Alice spend funds, she has to provide two pieces of information, the first one is a proof that the money was sent to her  and the other is a challenge for whomever wants to spend the coins she is sending, so when Alice received her coins she provided an Address, I.E the challenge, or a hash of the challenge to be more precise.
When Bobs gives his address he is doing the same, he is providing the challenge that needs to be solved in order to spend the coins.
When Bob generates an address what he is doing is generating a key pair, the private key he keeps secret to use when he wants to spend funds, and the public key is hashed twice and encoded in a special format, (Base58Check), and is that encoded hashed value what he shares with Alice.
So when Alice pays to Bob, she creates a new transaction, that refers to the old transaction from which she is spending, that old transaction has the hash of Alice's PublicKey, it pays to whomever can demonstrate that owns the ECDSA private key that generated Alice address. That is easy to check, because Alice provides the public key that hashes to that address and she signs the spending transaction with the private key and adds the signature to the transaction that spends the funds.
It means that she needs not only to prove that she has the private key, but she must also prove that having the private key she approves the spending by signing the transaction that spends her funds.

I am wondering what keeps another actor, Charlie, from copying Alices's announcement when Alice wants to transfer her coins? So if Alice accidentally only announces her proof that she may spend the funds to Charlie, can Charlie use this information to spend the coins?

Well, all the data is provided in one transaction, if you separate the proof from the spending then you'll need Alice to sign the new spend again, and for that you need Alice to collaborate, which renders the attack useless.

Thank you for your answer. I was unclear. I meant: what if Alice announces her entire transaction (with Bob as recipient) only to Charlie, but nobody else. Why can Charlie not use that information to spend Alice's coins?

the moment he changes any input, or output he has to sign the entire transaction with Alice's key, the maximum he can do is censor Alice, but Bob will notice that and he could ask Alice for the signed transaction so he can broadcast it. This concept is what allows Lightning Channels to work.


text:
Anybody using bitcore.io? I can't seem to make it work properly
I've installed bitcore.io on a folder for my nodejs, using the npm command.
npm install bitcore
npm install classtool

Of course, I tried to run an example code, the one is shown at their website. I saved it as "test.js"
var Address = require('bitcore/Address').class();

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

try {
    addr.validate();
    console.log("Address is valid.");
} catch(e) {
    console.log(addr.data + " is not a valid address. " + e);
}

Then I did:
myuser@ownbox:~/bitproj$ node test.js
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa is not a valid address. RangeError: start > end
myuser@ownbox:~/bitproj$

Is there something I'm missing? I've been googling for hours, for a solution. The address indeed does exist, I've checked it with blockchain.info.

I had nodejs outdated. My version was "v0.9.9" when the latest is (right now) "v0.10.26", and that was all the issue.


text:
wallet.dat backup and 100 pregenerated keys
Reading about the "change" addresses and doing "wallet.dat" backups, I keep reading that -by default- bitcoin-qt generates 100 keys and use them when you need a new address. My question is this: what happens after you use all 100 keys (for change, mainly). bitcoin-qt generates another block of 100 keys?. Only one?.
The information is critical for backup policy, and I can't find it online.
If you get a new 100 keys block, doing regular frequent backups is mostly fine, but if only a new key is generated, you should backup the wallet after any incoming or outgoing transaction...
Better yet, bitcoin-qt should have a permanent pool of 100 addresses, and add a new random address when you use one, in a FIFO style. That way you should be quite safe if you do less than 100 outgoing transactions between backups!.

Better yet, bitcoin-qt should have a permanent pool of 100 addresses, and add a new random address when you use one, in a FIFO style. That way you should be quite safe if you do less than 100 outgoing transactions between backups!.

That's what it does.

The only exception is if you are using getnewaddress from the API.  Because you don't need to unlock the wallet, it simply pulls from the key pool.  It won't create a new one and you can deplete the wallet of all keys from the key pool.

Stephen, in that case is the pool going to refill "eventually", or your pool is now 99 keys long forever?.


text:
Is it possible to exchange bitcoins into PayPal credit?
I'm aware that PayPal's terms of conditions do not allow for purchase of virtual currencies such as bitcoins, however, is it possible to sell bitcoins and receive PayPal credit in return? MtGox allows you to exchange BTC > USD, but there's no way to withdraw it using Paypal or a similar service.
Is there an exchange that supports either MtGox coupons or direct bitcoin transactions to top up a PayPal account, without the use of a credit card or bank transfer? I'm interested in more obfuscated methods/workarounds as well, even with the use of multiple exchanges.

Have you tried coin2pal.info?

BIPS.me does that for 11%

Some people are selling bitcoins and receiving PayPal payment on LocalBitcoins.com:
https://localbitcoins.com/sell-bitcoins-online/paypal/
LocalBitcoins is in-person exchange. The problems with PayPal tend to hit the bitcoin seller; because PayPal transfers are reversible and bitcoin transactions are irreversible you must trust the party to whom you are selling bitcoins. A malicious party can file a PayPal claim and get their fiat currency payment recalled after they receive the bitcoins. This problem is not specific to PayPal, but all credit card backed payment methods (Venmo, Dwolla, etc.)
Some people have found it possible to resolve issues with PayPal payment recall policy.
Also LocalBitcoins has guide how to avoid this kind of fraud. The sellers have 25% - 50% margin when selling on PayPal, so they can cover up possible losses. Also when done successfully one can profit from the risk, as there is high demand buying bitcoins on PayPal.
LocalBitcoins also has an API, so you can at least half automatize the process, but you still need to have enough buyer audience to make sure there is demand for your bitcoins (there is).

I had an awful time when I was paid bitcoins from a new international employer instead of USD.   But after I figured it all out its pretty easy however converting it was expensive so I'm trying to find a different converter but here's how you do it.

Go to bitstamp.net, open up a free account and buy your bitcoins from your wallet.   Its free.
Go to bitinstant.com, and you'll pay from your bistamp coupon to your Paypal account.   Bitinstant took almost 10% USD so I'm trying to find someone else.   But it is quick and they are reliaible.   If there's a problem, their support team responds quickly.

I had actually called Paypal about bitcoins and they said they are very familiar with bitcoins now and as long as you are a verified member of Paypal, there won't be a delay in the transaction.

I would not recommend using Paypal for any transaction involving Bitcoins. Many in the community have been scammed and PayPal still considers Bitcoins to be the same as ISK or WoW Gold. Instead for your transactions, I would recommend Bitpay and Dwolla.

Mind you, it's essential that the final transaction ends up in a PayPal account. I'd use Dwolla, but it doesn't support transferring to PayPal in any way as far as I can deduce. I'm not looking for alternatives, but a way to directly (or indirectly) top up a PayPal account using bitcoins. Not to mention that the information I've been able to find so far isn't exactly favourable either. (http://codinginmysleep.com/dwolla-begins-suspensions/)

My issue with Paypal is that you are technically violating their eula for the commerce you wish to engage in. How about you just use your bank as a man in the middle. And transfer between Dwolla to Bank to Paypal. If you don't mind the fees, you could also setup a pay link for paypal and pay yourself from Dwolla


text:
Procedure to restore Bitcoin Core backup
I am looking for the procedure necessary to restore a backup of Bitcoin Core v0.15.1 official release version.
Assuming I safely exit Bitcoin Core, take a backup of the ~/.bitcoin folder and put it away safely. I use my wallet for possibly many years making many transactions and eventually, my computer dies.
I get my new computer, install (let's assume the same version of) Bitcoin Core and copy my backup back to the correct location. Obviously, it will need to sync with the network once I start it up and, I may need to upgrade to a newer version of Bitcoin Core but; surely the restored backup will not know of my many new addresses used for transactions since the backup when checking for transactions during synchronisation?
Does anybody have the actual steps necessary for this procedure?

If you are using bitcoin 0.15.1, it will be using a HD (hierarchical deterministic) wallet by default. This means that all addresses it uses are generated from a single master key in a deterministic way. That means that even addresses you generate after the backup will still be recoverable, as will any transactions sent to them. The exception would be if you upgraded to a new wallet version which supported address types that 0.15.1 didn't (at some point in the future), in which case if you send funds to those address types 0.15.1 might not recognize them (although the private keys can probably still be recovered from your HD wallet

Okay, recoverable, thank you. What steps are necessary?

It will automatically find addresses which it supports. Please accept my answer if it satisfied your question btw, so the question doesn't remain "unanswered"

So, the process is automatic and no further steps are necessary. I suppose that first upgrading the backup to the newest version before starting it up would also solve that other problem. Thank you.


text:
Pending transaction towards a not syn wallet
Hi guys need a bit of help I send my ember coins from cryptopia to old ember wallet address which is not syn my transaction is coming in pending since 2 days..how do I cancel my transaction so the coins r back to available.


text:
Derive new public keys from a public key?
This article says you can generate new public keys from an already generated public key. How is this possible?
https://bitcoinmagazine.com/articles/deterministic-wallets-advantages-flaw-1385450276
I thought you could only generate new public keys from private keys. What is the mathematical property that guarantees this? Is there a kind of associativity, or better say, an homomorphism between the set of private keys and public keys? Because the article says that you can either sum before or after the public key is generated.

Here is a very short summary of the math, by the armory developer: https://bitcointalk.org/index.php?topic=56424.msg1146359#msg1146359

Is there a kind of homomorphism between the set of private keys and public keys?

Yes. You can think of f: G -> H being the function that derives a public key (i.e. something from the set of H) from a private key (something from the set of G).
More to the point, f(a + b modulo n) = f(a) # f(b)
(I'm using the # symbol above to mean 'secp256k1 elliptic curve point addition')

Because the article says that you can either sum before or after the public key is generated.

That's accurate.


text:
I Transfered Bitcoin without synchronizing Bitcoin core
I am very new to bitcoin wallets and to all and I really need help for anyone who can help me. I just transfered bitcoin from my LocalBitcoin site to JUST downloaded Bitcoin Core wallet. I didnt know about synchronizing until I sent bitcoins to there.  I went to receive address and got an address. The problem I have is I have a LENOVO PAD which does NOT have the memory to download the whole BLOCKCHAIN.  I stays currently 3years 2 weeks behind.  And it seems it will not be able to download.  How do I get back my coins to LocalBitcoins and PLEASE ANY HELP WILL BE GOOOD.
thank you in advance


text:
How can i bring my bitcoins back to me?
I deposited bitcoins on an online investment. the record on my bitcoin wallet shows that it was indeed sent to the wallet address of the online investment. but my account on that online investment is still empty or zero. they didn't put my bitcoins on my account to that investment. what should I do. I want my bitcoins bring back to me. please help me.

I would suggest researching Ponzi schemes. If it is a ponzi scheme, your best bet is getting enough of your friends to join so that their money funds your returns.

I would suggest to disregard the above advice, because it is likely to add losing friends to your predicament of losing money.

Bitcoin transactions are not reversable. The only way for you to get your bitcoins returned is by convincing your business partner to send them back to you.

Only whoever you sent your bitcoins to can help you. If they are scammers you're out of luck.


text:
What are the pros and cons of different methods for transferring Bitcoins between different wallet services?
I am interested in transferring Bitcoins between several different wallets: my Mt.Gox account, my Bitcoin client wallet, and my Blockchain wallet.  I am aware of two primary ways to transfer funds between any two of these:

Perform a transaction from one address linked to one wallet to an address associated with the other wallet service, or
Export private keys from one wallet and import them on the wallet I wish to effectively transfer to.

I was wondering what pros and cons there are to these two different methods and if there is an obvious "right way" to do it?  Any other methods, ideas or advice relating to transferring Bitcoins between these wallet services would also be appreciated.  My primary concern is maintaining security, however ease of use would I think obviously be a nice benefit.

This is a very interesting question. Of course there is no "right way" and as far as I know not even a best practice. I can't make up for myself either what I'd consider the best method, but I'll list up some considerations.

Not all clients allow exporting and/or importing private keys. I think this will be the biggest problem when you decide to go for the second method. There are even wallets that don't store individual private keys for every user, but just store all the coins from all their users somewhere together (probably for a big part in safe cold storage) and just send some when you want to make a transaction.
Transferring private keys involves some risk. Any sort of malware can be operating in your computer to monitor the appearance of private keys. F.e. malicious browser plugins scanning web pages for private keys, spyware monitoring your clipboard and looking for wallet.dat files or network spoofers monitoring private keys included in unencrypted network traffic.
Sending the coins over can cost you a transaction fee. This is normally no significant amount, but when sending much small amounts this can weigh. Of course you have to keep in mind that when you export-import the private keys, you will eventually pay the fee as well when you want to spend the coins.
When you want to transfer the coins to the wallet that will become your mail wallet, you may already have used its address on several places on the internet. When importing the private keys for other addresses will not make the coins available on your main address, but on the imported one. Most clients have no problem with sending/receiving from multiple addresses, but f.e. when you send coins with that other address to a contact that saved your main address in their contact list, they will not know that the payment comes from you.
The inverse argument of the previous one counts as well. If the address you want to move to another wallet is considered your main address (the one you shared with contacts), you will probably very much like to keep this address in your new wallet and importing it in your new wallet will be the very best option.
Just sending the money over is of course far easier than the hassle involved with transferring private keys. Some wallets f.e. don't allow you to import raw private keys but require them to be in some specific form like a wallet.dat file or some home-brew JSON format.

I hope some of my considerations help you to decide what to do with your two wallets.


text:
How do pool operators do their hashing?
For every "getwork" served by the pool, a Merkle root must be calculated for a block.  The run time of SHA-256 is proportional to the number of "chunks" of 256 bits, and a typical block will have thousands of these chunks (a block header has just has three, after preprocessing).  So the pool operator will need hashing power in the Mhash/sec range, roughly.  Am I right so far?
The individual miners need much more hashing power, but in a simpler form: here's a three chunk preprocessed block header; hash it with each of 0000_0000x through FFFF_FFFFx in the nonce field.  If hashing engines specialize on that simplicity, to make them cheaper and/or faster, then they don't work so well for the pool operators.
So if I'm a pool operator, or a solo miner, and I need to generate millions of Merkle roots, what are my options? Do the hashing engines (CPU/GPU/FPGA/ASIC) have an API I can use?

Related: Getwork is just one approach to distributing work for pool mining.

A pool will generally create a unique merkle root for each getwork request by a miner.  If it accepts difficulty 1 shares, the miner can spend an average of about 4,000 Mega-hashes on that block (and will earn an average of 1 share per getwork).
To create a block header for each miner, the pool operator changes some unique information in the first (generation) transaction of the block, and then rehashes the block to create the merkle root.  If done naively, this will take O(N log N) sha256 hashes (where N is the number of transactions in the block being mined).  By saving some information from computing the last merkle root, you can recalculate a change in the generation transaction with only O(log N) hashes.
With hundreds of transactions per block the ratio of hashes performed by the pool operator and the miners is over 100 million to 1.
For an even greater savings, pools can accept a getblocktemplate api request instead of a getwork request.  This mode allows the miner to generate his own block headers and mine for an average of 10 minutes before needing to be refreshed by the pool.

One compute-intensive part of the server work is creating new merkle roots. As mckoss mentions this becomes a lot faster if you only recalculate the merkle branch that is changed by the new generation transaction instead of recalculating the entire merkle tree.
The other compute-intensive part of the server's job is verifying the proofs of work that are later sent in. In general this means hashing two SHA-256 chunks and verifying the result against the difficulty. But if there are multiple proofs of work with the same merkle root then you could calculate the midstate once, and then just hash one SHA-256 chunk for each proof of work you want to verify. Just like clients do with rollntime.
So every new merkle root is work to generate, and also creates more work later by needing a new midstate to be calculated.
BitMinter makes use of rolling the ntime field on the server as well as in the client. Every time the wall clock ticks forward one second, you update the ntime field of the block data with a new timestamp. Then you can reuse all the merkle roots and midstates you have from the previous second.
This saves a massive amount of work on the server, and it is how BitMinter could run with low load on a single server with 2-3 TH/s of hashpower while some (not well optimized) pools needed a new server for every 300 GH/s of hashpower.
Since then such optimizations have become less important. More clients started supporting rollntime. Servers and clients started using work difficulty above 1, meaning much less work had to be verified on the server. And then there are the new protocols to replace getwork: Stratum and GBT (getblocktemplate). With these protocols the server just generates a template which is very cheap to generate, then the clients do the heavier part of creating work based on the template.
I still think it's a good idea for clients to use the ntime trick to reuse merkle roots and midstates, which allows midstate reuse on the server side as well, although this is no longer a big deal.


text:
Upcoming Fork - Wallet Safety
In downloading the newer client, do I need to worry about my addresses and hence bitcoins disappearing, or will everything in the old wallet transfer nicely into the new?

Everything should transfer just fine, but as with any change to your system you should take a backup of your wallet before upgrading, just in case.

You should always keep a backup of your wallet, just in case.


text:
Bitcoin Charts API Data
So I'm trying to learn how to work with an api, and how to get bitcoin historical price data.  Ideally, I'd like all of it, and the nice gui that they have on the site for displaying the charts (but I don't suppose I can get the gui?).
Alternatively, I'd like to be able to just see the last 2000 trades, up to an end date, as it seems to say I can here, using http://api.bitcoincharts.com/v1/trades.csv?symbol=SYMBOL[&end=UNIXTIME].  This works fine for UNIXTIME up to a couple days ago, but not further back.  Is it possible to retrieve older data?  Or are there better ways to go about this?

There's a start and an end that can be quoted, and only one is required although both can be used.
If you want US$ per BTC data from a 24th April until now until now, use:
http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1366784293
If you want all US$ per BTC data until now, use:
http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1279424500
If you want all US$ per BTC data until 24th April 2013,:
http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1279424500&end=1366784293


text:
I cannot send btc before my last transaction get confirmed
I store all of my btc in one address (say from_address), and when I want to send any btc to any address (say to_address) I get a transaction like this:
INPUTS: from_address
OUTPUTS: to_address and from_address
See and example here: https://blockchain.info/tx/e0bcd29288deae6611337c75b8236a548926887796501486ffa3c486707d28c6
Now, I cannot send any BTC before this transaction is confirmed! and says "Insufficient Funds Available" (as I have all of my BTC in my from_address and it is unconfirmed!!)
Is there any tip to send BTC except this?

The transaction referenced has >200 confirmations now.

This will happen sometimes, and there's not much you can do about it. Much the same thing happens with cash. Say you have a $100 bill, and you want to pay me $10. In our transaction, the $100 will be split -- you'll get $90 back and I'll get $10. But while that's unfinished, you can't spend your $90 change from the transaction with me because it's not fully yours yet.
The exact mechanics will depend on what unspent outputs you have. If you only have a single output, then you will have no funds available until the transaction confirms. If you have multiple outputs and not all of them are needed for the transaction, then some of them will still be available before the transaction confirms.
Cash behaves the same way. If you have a $10 bill, a $50 bill, and a $100 bill, you can send someone $60 and still have the $100 bill available. Or you can send someone $65 out of the $100 bill and still have the $10 and the $50 available while that transaction is finalizing.

How does child pays for payment (CPFP) fit into this? As I understand it, unconfirmed change output can be spent with a high fee in a way that incentivises miners to select and confirm a parent 'low fee' transaction. This would be spending 'unfinished' tx change. Bitcoin core seems sporadic in terms of accepting CPFP vs giving an 'Insufficient Funds' error


text:
How to setup my own exchange? How does Exchange set Initial price of any cryptocurrency
I have read other answers related to how can I setup my own exchange
What is needed to make a bitcoin exchange?
but I still have few doubts.

When an exchange is launched and there are no buyers or sellers initially how is the price of any cryptocurrency set.
In my country there are few exchanges which don't provide any order book functionality, they just list their buy and sell price for each cryptocurrency and we can buy on that prices, so how does that work? To name a few of such exchanges. buyucoin, bitcoin-india. These exchanges don't have order book but still around 30 cryptolisted to buy/sell.

It isn't.  Exchanges don't set prices at all, they merely provide a place for people to trade with one another at whatever price they can agree on.  If there are no customers, the order book is empty; if you like, you can think of the bid being zero and the ask being infinity.  If the first customer is someone who wants to buy, they can enter a limit buy order at whatever price they want, and that will become the bid.  When someone arrives who wants to sell, either their price matches the existing buy and a trade happens, or it doesn't and that price becomes the ask.
These are not really exchanges, just dealers.  You are not trading with the company's other customers, but with the company directly. Just like an ordinary retail store: they have a product, they offer to sell it at a particular price, and their customers either buy at that price or take their business elsewhere.

And as general advice:

How to setup my own exchange?

If you have to ask the question, then don't.  This is not a do-it-yourself project; the security and legal and financial considerations are daunting and need to be handled by experts.  At best you will waste a lot of time before realizing that it is impractical.  At worst you will discover it is impractical after you have lost a lot of money belong to yourself and your customers.

If they are just dealers then do they have a large supply of coins with them, which I think is less likely.
How do these exchanges set buy/sell price?
I know that it is not a do-it-yourself project and involves alot of different things. It's just I want to understand how these things work, right now I have a team of around 5 so we are just exploring things

@nishantagrawal: That's right, they should have a large supply of coins when they first get started.  Bear in mind that they also buy coins from customers to continually replenish this supply.  Of course, they will adjust their buy and sell prices to keep their supply of coins from getting too small or large.  But the point is that, on both ends, transactions take place at the dealer's quoted price or not at all, and so there is no need for an order book.

Thanks a lot for your explanation. I have one more question. I have read somewhere that there are few exchanges which provide API's to start your own exchange, means behind the scenes order will be getting placed on that exchange and the exchange(on which customer places order) profits by the difference in buying and selling price. Am I right? If yes then are you aware of any such exchanges?

@nishantagrawal: I don't know anything about that.  You should post it as a new question.


text:
Tether decouples demand from price?
So I don't understand how Tether (USDT) works. I hear two contradicting things about it. First, is that it is pegged to the dollar, plus or minus a few cents here and there. Second, that you can buy or sell freely from some other cryptos.
BUT, usually when lots of people are buying a crypto, it's price will go up. But tether seems to somehow decouple demand from price. I thought that was impossible?

the company behind usdt (tether) can create and sell new usdt (eg. if the price is greater than 1$) and buy them back (eg. when the price is smaller than 1$). they say they have enough money to buy all usdt back (but many people are in doubt about it). furthermore the community knows that tether tries always to adjust the price of usdt to 1$. so only very few people will sell usdt for <1$ or buy it for >1$ (because it is probably uneconomical). so the trader-community is "helping" tether a little bit by continuing mostly accepting this 1usdt=1$-"rule" which could be useful for everyone on a long-term basis.

They can buy and sell, but do they? For example take an exchange like Poloniex which supports USDT but not USD. There is no way to change USD to USDT on Poloniex, so even if they wanted to, they couldn't. I have a hard time believing they have accounts with, or agreements with, every exchange where USDT is supported. Furthermore it seems they can't accept USD from non-Taiwanese accounts right now, which limits their shepherding ability. Probably it is the exchanges that are arbitrarily deciding that USDT should be worth $1USD. The exchanges are pegging the value, not Tether.io. Yes? No?

And if tether.io isn't really buying back USDT much, but is selling USDT at will to anyone who wants it, that's surely a dangerous situation. They are basically printing their own money. This is too crazy to be true -- surely I'm missing something..?

The question about Tether really buying back or not, is a discussion topic that does not have place on BitcoinSE


text:
Troubleshooting "access is denied" error when running cgminer
I am trying to run cgminer on Windows 7.  However every time I execute the command:
cgminer --scrypt -o http://coinotron.com:3334 -u username -p pass  --thread-concurrency 8192 -I 10 -g 1 -w 256

It says access is denied.
What am I doing wrong?

You have to replace the part "-u username -p pass" with the actual username and password of your worker.
Log into coinotron and create a new worker in the "Add Worker" section. The worker will appear in the table below. Use the displayed name and password of your worker in the command and you should be fine.

Thats precisely what I did. I didnt want to put the username and password so I subsituted it in the post

It was an antivirus issue. It finallly worked

Processes that use a lot of system resources are sometimes blocked by antivirus software, because sometimes adware mines bitcoins on the computer of its victim.


text:
Bitcoin Transaction Stuck, Attempt to double spend with higher fees
I made a BTC transaction a few days ago, where I set the fee amount way too low. It seemed that the transaction was lost in limbo.
I did some research, and apparently you are able to double spend your btc, if the transaction hasn't been confirmed yet.
So I imported my wallet into Bitcoin Core, where the unconfirmed transaction wasn't shown, and I was able to initiate another transaction with higher fees.
Now it seems that Blockchain.info doesn't show my transaction, and pushing it manually results in a mempool conflict. The same happened with this service: https://coinb.in/#broadcast.
But I was able to push the transaction through https://localbitcoinschain.com/. Now the transaction ID is unconfirmed on localbitcoinschain, but can't be found anywhere else (Blockchain.info, coinb.in).
Can this second transaction be approved, or is it impossible, if its only recognized by localbitcoinschain.com?
How should I proceed? At this rate, my transaction seems to be lost for a long time.
Kind regards

Hi @drGesus You provide valuable information, however, this Question and Answer are very unstructured. Please rephrase your question and answer. Otherwise this question may get closed.

As @nulldev suggests, the content from this question might be very useful to other users, I'd suggest posting the steps as an answer to this question: https://bitcoin.stackexchange.com/questions/9046/why-is-my-transaction-not-getting-confirmed-and-what-can-i-do-about-it

The problem has been resolved.
My second transaction, although only listed on LocalBitcoinschain and nowhere else has been approved.


text:
How to refund money send to an address already used
I sent money to a block chain wallet address which had once been used to receive money. Now money is not found in the account. What do I do to recover the money. Thanks

money is not found in the account

If you sent your money to an exchange market wallet then you should ask their support about that issue.
Otherwise, please give us your transaction ID so we can look at it. You may have sent your coins without enough fees or to a wrong address.


text:
bitcoin transaction denied
I am waiting for a transaction from Dec 13 to get denied by the blockchain and be able to use the funds again. How long does that usually take? I have tried multiple transaction accelerators both free and paid and nothing has helped at all. I am using Mycelium wallet , have tried deleting that transaction and reloading my wallet from 0 and it keeps coming back, tried using the verification phrase to open the wallet on another device and same thing. How long will this take? It's about $250 and I can use the money. I tried CPFP but Mycelium says can't do it, and the receiving end is a Coinbase account and that won't allow it either. Any help would be appreciated. If anyone is able to have it accelerated successfully I will be glad to tip.
Thanks

duplicate of https://bitcoin.stackexchange.com/questions/9046/why-is-my-transaction-not-getting-confirmed-and-what-can-i-do-about-it?noredirect=1&lq=1
if you were actually using bitcoin-core as per your tag, it'd be easy with -zapwallettxes. I've used that even after only 24 hours and been able to resend the transactions.

Did you rebroadcast the transaction? Because the transaction got accepted into blockchain.info's mempool 03.01.18 . It takes AT LEAST 2 week for a transaction to be dropped if you are lucky(based on Bitcoin Core default settings). But most likely it will float for weeks/months. Do you have the transaction ID, may be useful considering available options.


text:
Can we report a fraudster by their bitcoin wallet address?
I was recently notified by a friend that someone sent her a message (posing as me) on an app asking her to send them some bitcoin so they could make a purchase. Luckily she knew it was not me and let me know right away. I am trying everything to figure out where they swiped my picture from. Since obviously their account is fraudulent, I was wondering if there was at least someone I can report their bitcoin wallet address as being used for fraud? It may not help me, as Im sure the damage is done with them using my picture for a fraud account, but Im hoping maybe this will help to stop them or somehow make it catch up to them

Nope, sorry, there's no way to do this.  The whole point of Bitcoin is it's censorship resistant, so there's no way to publicly blacklist addresses (although some exchanges have been known to spy on your incoming and outgoing transactions, such as Coinbase which have a TOS that prohibits it, and will threaten to close an account if you send transactions straight to/from a gambling site: https://www.coinbase.com/legal/user_agreement?locale=en).
Plus the user is probably using a new address each time, since you can generate as many as you like there's no need to reuse it.

I figured this was the case.. But call it wishful thinking.. I just really hate that people always have to try to find a way to scam great new technologies. The blockchain would do much better off without these people, but alas, I understanding it is probably no different than banking or anything else. They win.

I am not so sure in that. Many scammers and fraudsters find Bitcoin as a suitable tool for different scams and frauds. But what is the most important thing is the education about it and that is the only way to stop those destroyers of the idea of cryptocurrencies.
Even if Bitcoin is not truly anonymous and is semi-private, I think it is still possible to catch up some addresses. But for officials, that address is not important to do the hard work.


text:
How to get started with building an fpga mining device
I plan to make an fpga mining device for bitcoin mining just for the fun of it. I thought understanding bitcoin as  whole would be the first step to take. However I realize that understanding the whole verification and transaction process in bitcoin would take a lot of time. Time that I really dont have. So I just wanted to know what would be the most important things to know related to bitcoin before getting started as only solving the nonce would be the part that I write in verilog/vhdl. The remaining part related to understanding how bitcoin uses Script and processes transaction would be quite unnecessary to know since I am not going to use it for the project. Having said that knowing how the whole system works is important and I will do it but from the point of view of an fpga mining device I would like to know on what to really focus on?

How much verilog/VHDL do you know?

Not too much.I am getting started on that too but I have someone to guide me for the verilog part

possible duplicate of How do I mine with FPGAs?

See: Open Source FPGA miner and additional info

I had already looked at the open source fpga miner but I guess I forgot to mention it in the question. I will defintely look at hard core forensics. Do you think I should focus on any specific part of the bitcoin protocol


text:
24 Hour price change Mean
If a currency price is showing ABC per coin and its price % is +X% or -X% then this reference is taken from which last price i.e. which point of time the price is taken

The 24h % change is the difference between the current price and the price 24 hours ago.
The current price of bitcoin is $14988 and was $14937 24h ago. So the 24h change is +0.3%, even if there was a huge spike between this period of time.

How did you get +0.3%, if the current price is $14988 and was $14937 24hr ago

@JiggyFrancis (14988-14937)/14937 * 100 = 0.34%


text:
Where is my BCH - Blockchain wallet
I had a small amount of BTC before the fork in my Blockchain.info wallet. I got the same amount in BCH post fork. Up until Blockchain started accepting BCH in the main dashboard (November 2017?), I used to be able to see my BCH balance in the Settings menu. Post Blockchain accepting BCH in the main dashboard, my BCH balance seems to have disappeared from the Settings menu. I sent a ticket to Blockchain and have not had a reply in like 2 weeks.
Is anyone else having this problem? Any ideas how to get my BCH?
Thanks

Related https://bitcoin.stackexchange.com/questions/65591/why-have-my-8-bch-bitcoin-cash-disappeard


text:
Bitcoind Testnet time/timereceived constantly changing?
I've got a small question: over a week ago I did some transactions on the Bitcoin testnet as I am developing a new GUI header for full nodes. When continuing development today, I noticed that when running the command 'listtransactions' the fields 'time' and 'timereceived' are different from what they were last week.
When checking the transaction ID on this website, it shows the date corresponding with what I receive when using listtransactions.
Can anyone explain to me why the time/timereceived fields changed and why they are so far off from when I actually did the transaction?
Some additional info:

I started my node on the testnet today for the first time since a
week
Actual transaction happened last week on (I think) tuesday
around 13:00 Amsterdam time

What are the values for time and timereceived and what do you think they should be?

"time" is a Unix epoch time when the transaction was added to the wallet
"receivedtime" is A Unix epoch time when the transaction was detected by the local node or the time of the block on the local best blockchain that included the transaction. Not returned to move category payments

I understand, but why is the time that is being returned by bitcoind different from what it was last week?

Does your computer time change?

no, my computer time hasn't changed.

Could you send TXID?

0efb691a93a17ea4253a25a51a081918a73bc09366ae8dfaed6c28098f2eaf02 , on online trackers it also shows the 4th of january. I suppose that the code I use isn't showing earlier transactions for whatever reason. I'll dig into it some further :)


text:
What Do SegWit Addresses Look Like?
Probably a question that has been asked a lot before, but how do I know if an address I generate with bitcoind and bitcoin-cli is SegWit?
I take the following steps to (attempt to) generate a SegWit address with the command prompt:
$ bitcoin-cli -testnet getnewaddress

n2BC24zr3L5BwVazecnvPPh7NwgcV2Vfxa

$ bitcoin-cli -testnet -addwitnessaddress n2BC24zr3L5BwVazecnvPPh7NwgcV2Vfxa

2NBnkQpnPitDbE3evwZXGpNpRLE51cJpdGA

Now this confuses me because in this post it is stated that SegWit addresses start with a '3'. Yet in this address it is said that they start with 'bc'.
The address I've generated in the above example starts with 2N, which is neither of the above. How can I know if it is still SegWit? Or did I do something wrong while trying to make a SegWit address?

You are using the testnet which uses 2 instead of 3, but as far as i know it is impossible to tell if something is a multisig or segwit adress when they both start with 3 on the "real" bitcoin chain, It could be both..
However you can indeed be sure that it is a segwit adress when they start with BC1, these are so called bech adresses. See more here, https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki

I generated the address as shown above: I first call 'getnewaddress' which returns the n2B address. Then I use that address as a seed for the 'addwitnessaddress' which gives me the 2N address. Is it because I am doing all this on the testnet, perhaps?

Ah yes, 2N is indeed the default for the testnet. See https://testnet.smartbit.com.au/tx/d529ccb7c17557bb784e410bfffc1bf57b60991b86eb0f48028369182491c0fb for example


text:
How do i list my ICO token created on Stellar to an exchange?
I believe stellar has a built in exchange called stellarterm for tokens created through their platform. My question is am I able to list my token on another exchanges or are we limited to only stellarterm?

check this https://www.youtube.com/watch?v=7lQ801k6RX4

Most exchanges will only list coins which have a proven record of exchange volume and price. If you create your own token it is unlikely it will be used by anyone else, or purchased on an exchange, so it is thus unlikely any exchange will want to list it I'm afraid.


text:
How can I recover a missing BTC from a correct transaction and who is the responsible for it?
today I withdraw 1 BTC from my account at Gatecoin exchange to be sent to CEX exchange. I got the BTC address from CEX and created the withdraw address for my withdrawal. I proceed with it and it took 30 min approx to be confirmed by Gatecoin and then waited 1,2,3 hours and nothing was arriving in CEX. I got worried and checked the Gatecoin link for blockchain transaction and for my surprise NO Transaction was registered there!!
OMG! went back again and again to both exchanges to see whether the BTC was back, but not at all. My BTC is gone and disappeared. No trace in both accounts Gatecoin and CEX. For the worse, not even the Blockchain has a record of it? Seems vanished. Gatecoin confirmed the withdrawal after 30 min. and once open the transaction link, nothing was found in the Blockchain!
How can this happen? Is Gatecoin responsible or CEX?
Anyone having similar experiences and would like how to resolve them?
The terrible scenario is that both Support Departments don't answer any query as they are overloaded with the great demand from new clients.
I have already reported to both exchanges but now how long and how this is going to be solved?
I will appreciate some feedback from you guys. Thanks in advance.

Do you still have the transaction id/link?

Yes of course. But when open the link, the Blockchain: Transaction NOT found!!  This is what has put me in alert, as CEX requested the blockchain link to find out what happened... in my opinion, Gatecoin system is the responsible for not performing the transaction properly, right? As it is impossible to get any quick feedback from Support, I am sitting here like a duck wondering where is my BTC? It's really unbeliavable!

It is possible that your transaction was sent with a lower than average fee or Gatecoin had some broadcasting issue, therefore the transaction hasn't been picked up by certain nodes mempool yet. If you provide the txid we can further determine the cause.

Sorry for late come back...well, after more than 60 hours waiting for the transaction to happen....finally the BTC arrived at CEX and was credited to my account. What really scared me was that no trace of the transaction in blockchain...what Support mentioned wrote me later, was that due to high traffic and demand the blockchain delayed the transaction....BTW, how this supposedly new technology claiming to outperform the banking systems in speed, costs, and transparency, seems completely the opposite? Costs are increasing and also the time delays....

@Luis The network knows of a transaction as soon as it is broadcast, it can be looked up on sites like blockchain.info and it just shows up as unconfirmed. It sounds like they just gave you a bad transaction link! Or, the actual delay may have been in broadcasting the transaction but, I can only speculate here. It was likely one of the two.

Without your tx id it is hard to tell what exactly happened but usually you don't need to be worried. Your described scenario sounds like a "miner fee too low" issue, the transaction gets broadcasted successfully, thus Gatecoin or any other exchange believe the funds are out of their system, but then got pushed out from the mempool because other transactions have a higher fee. Such issue usually fixes itself once the fees on the network/mempool go lower. The transaction will be automatically re-broadcasted by the bitcoin node of the exchange and then gets included in a block and you get your coins on the receiving address.

Sorry for late come back...well, after more than 60 hours waiting for the transaction to happen....finally the BTC arrived at CEX and was credited to my account. What really scared me was that no trace of the transaction in blockchain...what Support mentioned wrote me later, was that due to high traffic and demand the blockchain delayed the transaction....BTW, how this supposedly new technology claiming to outperform the banking systems in speed, costs, and transparency, seems completely the opposite? Costs are increasing and also the time delays....


text:
Cannot do anything at all with Bitcoin in my Blockchain.info wallet
Blockchain support is useless, have had a couple of (small) transactions pending since November that will seemingly never get dropped or confirmed.
Whenever I try to send anything at all, from any device and with any fee, I get this:
× Close
BitcoindException(super=com.neemre.btcdcli4j.core.BitcoindException: Error #-26: 66: mempool min fee not met, code=-26)

Coinify sell orders don't work at all either so my "money" is literally irretrievable.

Well, there isn't much we can do for you regarding blockchain.info. But you can try to export your private keys and import into Electrum, perhaps you might be able to spend from there.

Thanks, I was thinking of doing this. Do you have any idea what the error is on about though, never got it up until quite recently.

Since you have tried with higher fees, this smells like some kind of bug on their side.


text:
Error getting bitcoin block to process from DB
i am installing a full node on a linux server  and i'm trying to connect to bitcoin with BIFROST(https://github.com/stellar/go/tree/master/services/bifrost) but i am getting the error below which looks like a bitcoin error. All blocks have been downloaded. Please someone should guide me. Thanks
Error getting bitcoin block to process from DB: Error getting bitcoin_last_block from DB: get failed: get failed: pq: relation "key_value_store" does not exist  pid=65548 service=BitcoinListener
ERRO[2018-01-05T18:42:41Z] Error starting the server                     err="Error starting BitcoinListener: Error getting bitcoin block to process from DB: Error getting bitcoin_last_block from DB: get failed: get failed: pq: relation "key_value_store" does not exist" pid=65548

I had problems like this too and through hours of trial and error, I got it working, Check out my bitcoin and bifrost settings found in repositories here
https://github.com/StellarKit
I can't remember the exact problem, I think I remember I had my rpc urls wrong.
BIFROST_BITCOIN_RPC_SERVER:         "bitcoind:18332"
bitcoind refers to the bitcoin docker image and uses dockers networking.
But look at the docker-compose.yml files for a working example.
You can install everything I have to get bifrost working on testnet.


text:
Copying an old private key (from 2011) into Electrum: any risks?
I have an old phone, with a version of the Bitcoin wallet from 2011.  It has a few satoshis in it, which are now worth enough to be worth recovering.  However, the phone can't connect to the Internet.
This version of the wallet apparently stores the private key in an unencrypted base58 file, which I think is therefore equivalent to the Wallet Import Format.  I have root access, so I can view any file on the system, so getting it out isn't a problem.
Would there be any risks involved in simply copying the private key into Electrum 3.0 using these instructions and then sending the contents to a more modern wallet?
From my understanding, the private key gives full access to the contents of the address, but a friend told me that given the key's age, I'd need to import it into bitcoin-qt and do a full sync in order to make sure that the address works properly.

No, Bitcoin Core (formerly known as Bitcoin-QT) is not a wallet, it is a full node software + wallet, so there are better software to use as a wallet. Sure, you can use Bitcoin Core, but you'll need to keep your Bitcoin Core connected to the internet for days to synchronize.
To summarize, you should use a wallet software (sure, Electrum!) to import (or sweep the funds of) the private key.
Note: A few satoshis is worthless. The median transaction fee is currently 110,740 satoshis. according to this.

Thanks!  When I said a few satoshis, it's about 0.01 BTC so still worth something, I think.


text:
Public Key + Private Key enough to backup?
I invested in bitcoins and unfortunately I have problems to understand the system. Perhaps you can answer me the following questions?
1.a) I know my public and my private key. Do I still have to backup my wallet.dat?
1b) If I need the wallet.dat: There is no point in saving my public and private key, if I need the wallet.dat anyways, right?

If I secure my wallet.dat with a strong password, can I put the wallet.dat just on dropbox and send it to a few friends or do I have to keep the file more private?
Is the decripting function of Bitcoin-QT enough?
Am I okay with these actionsteps:
Encrypting my wallet with Bitcoin-QT and writing my password on paper
Writing my public key and private key on paper
Sending the bitcoins from mtgox to my public address
Using the backup option of Bitcoin-QT and send the backup to dropbox + a friend I trust

Please let me know if I need more steps or I can take a step out.
Thanks!

The private key is all that is needed.  The public key is derived from the private key, so it needn't be backed up.  It actually isn't exposed nearly anywhere either.  A Bitcoin address is derived from a public key.

Knowing your private and public keys is enough to be a backup of that address. If you only have one address all you would have to do is create a new wallet and import that private key.
Why backup the entire wallet.dat then?

Because restoring the wallet.dat saves you the step of importing the keys from the command line. Most people find it easier to backup a file than understand the details of keys and addresses.
Because many users have a lot of addresses. If you have a hundred addresses, restoring one wallet file is quicker than restoring each private key.
Because of change addresses. The default client ends up creating a lot of change addresses automatically. You may think you know your private/public key pair, but if you've conducted some transactions in the standard client it is likely that you also have a bunch of change addresses that you aren't directly aware of and aren't displayed in the GUI.
Because of the address buffer. The standard client keeps a buffer of 100 addresses that it intends to use. This means that even restoring a wallet.dat can sometimes save you even if you don't have an up-to-date backup of your wallet. (Because the transactions/addresses that aren't in your wallet are probably in that buffer of addresses.)

In short, yes, the private/public keypairs are the important thing and if you know them (say by keeping them in a paper wallet or encrypted somewhere) you can recreate your wallet. But there are lots of mistakes you can make (such as forgetting change addresses) if you are manually tracking keys. If you aren't certain what you are doing, you may find backing up the wallet.dat as the easiest approach.

You can generate your wallet from your private key by following the directions at: https://en.bitcoin.it/wiki/How_to_import_private_keys_v7%2B .
You could also send an (encrypted) wallet to your friends, or store it on Dropbox.  The encryption should be more than adequate.

Thanks! So where is the point in doing a backup of the wallet.dat if I need only the public and private key? Should I either backup my wallet.dat OR printing out my public and private key or doing both?

Backing up your wallet.dat would be more convenient than printing out your public key.  Personally, if I had a lot of Bitcoins, I'd do both.  That'd be the most reliable.


text:
Senders Address with Bitcoind in PHP
I've not been able to figure out why I can't relaiably get the senders address using bitcoind 8.1 on the json API with php.
foreach ($bitcoin->listtransactions() as $transaction) {
 if ($transaction['category'] == 'receive') {
  $info['account'] = $transaction['account'];
  $info['address'] = $transaction['address'];
  $info['amount']  = $transaction['amount'];
  $info['confirmations'] = $transaction['confirmations'];
  $info['time'] = $transaction['timereceived'];
  $info['txid'] = $transaction['txid'];

  $txdetails = $bitcoin->getrawtransaction($transaction['txid'],(int)1);
  foreach ($txdetails['vout'] as $vout) {
    if ($vout['value']  $info['amount']) {
      $info['sender'] = $vout['scriptPubKey']['addresses']['0'];
    }
  }
}

The result I get is

Array
(
    [account] => Pool
    [address] => n3YgVTznqBCTb5ghWwNUoSmn5z37vfg4VK
    [amount] => 2
    [confirmations] => 7
    [time] => 1368107164
    [txid] => 94a25aac9e26b19cbf3c0afd4e7689047e33f9adbea4bbe9d5bd198cdc918717
    [sender] => mvoiUMUyR5QvX1Z2SYBAqT9eK6rjuQGVCF
)

But the address I get in the [address] does not receive anything I send back to it.
What am I missing?

I find it weird that the addresses do not start with a 1 or a 3.

@StevenRoose These are testnet addresses


text:
Blockchain Tools for Voting Among Small Groups?
I am considering starting a new co-op based business. Since the business will be member-owned, it would be nice to launch the business with a voting tool. I want to be able to propose items to the co-op members and have them vote through a transparent system. I understand that there are efforts to use the blockchain (or blockchain-esque tools) to handle voting. But all of the ones I can find are for large scale efforts (like BitCongress).
Are there any blockchain tools/approaches that can handle voting for small-ish groups? Ideally it would:

Handle voting from 300-400 people
Be able to be deployed on my own server (not a cloud-based solution)
Be simple to use for people that may or may not have previous BTC/blockchain experience

I should also add that I have the coding skills to develop my own blockchain voting tool. So if there is no OOTB solution for what I need, I'd appreciate links to whitepapers or other documentation that outlines approaches to a blockchain voting scheme.
All help is welcome.

Blockchains are a bad solution for voting, and in my opinion the widespread interest in using them for this purpose is misguided.
One of the important properties of a voting system is making sure that it is impossible for a voter to prove after the fact what vote they cast, in order to avoid vote selling or intimidation. Because of this, systems that do allow voters to prove what they voted for are in fact outlawed for government elections in many jurisdictions.
The property you want is auditability (individual users need to be able to check their vote was counted, and verify that the tally was computed correctly), but that doesn't require publication. A blockchain is however inherently a publication mechanism, and systems that rely on a blockchain to tally votes imply that everyone can see all votes.
In practice, modern cryptographic voting systems (see E2E auditable systems) actually have very good properties, without the need for publication. They rely on a central server which can see the IP addresses of the voters (but can't see the encrypted votes, and Tor can conceal IPs), let a group of trustees jointly decrypt the resulting tally, and let individual users verify after the fact that their vote was included in that tally.
But isn't that centralized? Yes it is. But decentralization is only a means to achieve a goal. In Bitcoin, we need decentralization as it's the only alternative to having a central party with transaction censoring rights. In a voting system, having a central party who can censor encrypted votes is typically preferable to allowing the whole world to see your vote (and still allow a 51% majority to censor and thus influence the outcome).
I also recommend reading Ben Adida's blog post on the matter: https://benlog.com/2017/12/28/blockchain-and-voting/

I believe http://followmyvote.com is worth looking into; at least they claim to allow both anonymity, security and auditability at the same time.  I'm not sure if it's resistant to vote-buying, it sounds a bit too good to be true, but I'd recommend to reach out to Adam Kaleb Ernest and ask for details.
There is also the opposite approach, just accept that the nut is uncrackable.  The German Pirate Party seems to be doing that; they are using Liquid Feedback and voting non-anonymously there.  Centralized tool and no blockchain involved; the developers don't see blockchain tech having anything to do with voting systems.  Anonymity collides very much with the idea behind "Liquid Democracy", and they've so far given up on the idea of going for pseudonymity.  Probably the design in followmyvote could be used to allow for pseudonymity.

This is certainly possible with Ethereum. It won't meet the requirement of being "simple to use for people that may or may not have previous BTC/blockchain experience" but if you have programming experience you could hook up it up to a nice app or website.
Alternatives that don't seem to meet your needs:
Bitcoin multisig allows up to 15 people voting on a single standard transaction. This has the most support and tools for people to that are new to the concept of a blockchain. Maybe you can do a delegate type setup?
NXT implemented a voting system that allows up to 100 answers. I'm not sure about the number of tools to make this easy to use for your average person.


text:
How do I find out what getwork would have returned for an already mined block?
Lets say I want to find out what getwork would have returned for an already mined block http://blockexplorer.com/block/00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d. How would I go about doing this?

Are you asking what the getwork that created that block looked like? Is this to create test data for a Bitcoin miner?

Yes. Thats right

Since we have quite a few questions about mining I took the liberty of creating a tool that demonstrates how to get from the getwork to the actual hashes and testing them against the target.
Your question is simply the reverse direction of mining, so let's get started.
All parameters are taken from the actual block.
This is a version 1 block so we start with the 01000000 (1 little
endian). This is followed with the 32 byte prev_hash, again in little
endian:
00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81

becomes
81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000

same goes for the merkle root:
2b12fcf1b09288fcaff797d71e950e71ae42b91e8bdb2304758dfcffc2b620e3

becomes
e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122b

Next comes the timestamp. 1305998791 (4dd7f5c7 in big endian) is
c7f5d74d in little endian. Then the bits (encoded difficulty)
440711666 is 1a44b9f2 in big endian and f2b9441a in little endian. And
finally the nonce. Since you are asking for the getwork this is the
part that your miner will have to find, hence we just mark it out with
0 (00000000).
Putting it all together we have a data field of the getwork request
that is
0100000081cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122bc7f5d74df2b9441a00000000

Then getwork does a strange thing: it chunks the header up into groups
of 4 byte and switches the endianness. So that this string becomes
00000001ab02cd818b9e567ee21793cddef299feb29ad444a41b85b8000008a300000000c2b620e3758dfcff8bdb2304ae42b91e1e950e71aff797d7b09288fc2b12fcf14dd7f5c71a44b9f200000000

This is exactly 80 bytes in length and corresponds to the data field
(without padding). The getwork however includes some padding to become
two SHA-256 blocks of length 64 bytes.
The padding is discarded by the miner, but for completeness:
000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000

Next in the getwork we have the midstate. This is simply first 64
bytes of the header with a partially applied first round of hashing,
hence we can recover it from the block header (or data):
93c524951367c505ba69e616a010282d376ee807daa9562f69ce5bcd2dda787a

The getwork also includes an additional field that keeps some internal
state from the SHA-256 algorithm, the hash1 field:
 00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000

It is always constant, and is pretty useless.
The final field in our reconstruction of the getwork request is the
target. This is the one field we cannot actually reconstruct as it
depends on the pool setting that provided the work. It is likely to be
difficulty 1, hence the field itself is:
00000000FFFF0000000000000000000000000000000000000000000000000000

which is a long, below which the found hash has to be. Due to this
being Bitcoin it is again little endian and becomes
0000000000000000000000000000000000000000000000000000ffff00000000

The entire reconstructed getwork should look something like this
{
  "midstate" : "bfc1dbf82dd6335830eb42a5258fb7ceb4c566ed2ae7ec4ed1d23bd9dbbff68f",
  "data" : "00000001ab02cd818b9e567ee21793cddef299feb29ad444a41b85b8000008a300000000c2b620e3758dfcff8bdb2304ae42b91e1e950e71aff797d7b09288fc2b12fcf14dd7f5c71a44b9f200000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000",
  "hash1" : "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000",
  "target" : "0000000000000000000000000000000000000000000000000000ffff00000000"
}

To see how a miner finds a block from these parameters just enter them in the manual miner I created. Notice that if we fill in the nonce that is in the block (2504433986 or 9546a142 in its hex representation), we indeed get a block of the required difficulty.
Edit: Frank Buss contacted me for a correction: the midstate I posted above was wrong.

The midstate is still wrong. From the "reconstructed getwork" data field, the following midstate can be calculated: 93c524951367c505ba69e616a010282d376ee807daa9562f69ce5bcd2dda787a, e.g. with this script: http://pastebin.com/sZrMZ0EK

Thanks, I corrected it and removed it from the manual miner as it was unused anyway.


text:
Lightning network: how was malleability actually fixed?
Section 3.1.2 of the Lightning paper (Version 0.5.9.2, last modified 14 January 2016) discusses ways to fix the transaction malleability issue, which prevented Bitcoin transactions from spending UTXO from yet unconfirmed transactions. Specifically, it mentioned SIGHASH_NOINPUT transaction type.
As far as I know, the malleability issue was fixed with the Segwit soft fork in August 2017. Was the malleability issue fixed with SIGHASH_NOINPUT or with some other method? How does it affect the Lightning network design as described in the paper?
A related (very old) question, another one.

As far as I know, the malleability issue was fixed with the Segwit soft fork in August 2017.

Yes.

Was the malleability issue fixed with SIGHASH_NOINPUTor with some other method?

No, using SegWit.
SegWit stands for segregated witness. It's a generic and backward compatible change that results in signatures no longer contributing to txids. As the txids of previous transaction outputs being spent are included in what transactions sign, this indirectly results in malleation no longer resulting in the invalidation on descendant transactions.


text:
Abe first time execution
I'm running Abe to generate a Blockchain clone. It's been generating the database for over 3 days. The server is not very powerful, but 3 days seems too much time. The last tx output:
block_tx 121881 469801
block_tx 121881 469802
block_tx 121881 469803
block_tx 121881 469804
block_tx 121881 469805
block_tx 121881 469806
block_tx 121881 469807
block_tx 121881 469808
block_tx 121881 469809
commit
block_tx 121882 469810
block_tx 121882 469811
block_tx 121882 469812
block_tx 121882 469813
block_tx 121882 469814
block_tx 121882 469815
block_tx 121882 469816
block_tx 121882 469817
block_tx 121882 469818
block_tx 121882 469819
block_tx 121882 469820
commit
block_tx 121883 469821
block_tx 121883 469822
block_tx 121883 469823
block_tx 121883 469824
block_tx 121883 469825
block_tx 121883 469826
block_tx 121883 469827
block_tx 121883 469828
block_tx 121883 469829
block_tx 121883 469830
block_tx 121883 469831
block_tx 121883 469832
block_tx 121883 469833
block_tx 121883 469834
block_tx 121883 469835
block_tx 121883 469836
block_tx 121883 469837
block_tx 121883 469838
block_tx 121883 469839
commit
Is this correct? How much more time will I need to wait?
Thanks

The initial block file parsing can take a lot of time. From the readme:

Reading the block files takes much too long, several days or more for the main BTC block chain as of 2013. However, if you use a persistent database, Abe remembers where it stopped reading and starts more quickly the second time.

It depends on the hardware you have, besides a good CPU it probably benefits from a fast hard drive (SSD at best).
On my Macbook Air (2013, 8GB RAM, i7, SSD) it took a few days.


text:
Securing web app wallet.dat (Ubuntu)
I'm building a web app making JSON-RPC calls to the bitcoind server. I have security concerns on how to protect the wallet.dat file.
I'm encrypting the directory where wallet.dat will be.
Should I also use the bitcoind encryptwallet command?
When using Bitcoin client wallets like Electrum every time I send BTC it asks me for my password. Building a web app where users will have their own account (and addresses) should a bitcoind password be used? Does bitcoind store the private keys for every public address generated?
Thanks

Yes for all your questions.
Suppose you don't encrypt wallet, if someone access your computer with unlocked bitcoin directory (such directory must be readable for running bitcoin) he can steal your BTC.
It might be better just to encrypt wallet and leave unencrypted directory. He can steal encrypted wallet.dat, which isn't useful.

When encrypting my wallet using encryptwallet the following API calls fail until I run walletpassphrase:
settxfee
sendtoaddress
Which are essential for my web app.
How would this be done? Every time a user wants to send Bitcoins to another address I will need to call the walletpassphrase function, which requires to enter the passphrase and leaves the wallet.dat file unencrypted for N seconds.

Yes, you are right


text:
What are the reasons to avoid spend-paths that become invalid over time (without a transaction)?
I have been told that a spend-path that expires is something bitcoin designers have explicitly avoided, and that it would cause bad reorg behavior (eg here).
To be clear about what I mean by an expiring spend-path, imagine a script opcode that require that a particular spend-path be executed before a timelock has expired (rather than the usual timelock where the spend-path is only valid after the timelock expires).
Satoshi mentioned this kind of thing here saying that:

"In the event of a block chain reorg after a segmentation, transactions need to be able to get into the chain in a later block.  The OP_BLOCKNUMBER transaction and all its dependants would become invalid.  This wouldn't be fair to later owners of the coins who weren't involved in the time limited transaction."

However, if you wait for 6 confirmations, no transactions should be happening that expect to have actually received the coins if, say, a transaction is sent with only one or two confirmations. If that happened, a reorg after 3 confirmations would invalidate those transactions too. And a reorg after more than 6 confirmations is statistically impossible unless a 51% attack is underway. So I don't understand satoshi's point here.
I was also told that during a reorg, nodes don't have to re-evaluate transactions that have already been validated, but if an expiring spend-path then you would have to re-evaluate transactions. However, don't' nodes have to re-evaluate transactions in a reorg anyways currently? Since the re-org could have introduced double-spending transactions, all transactions need to be rechecked in the new UTXO context, don't they?
I was further told that there are "a whole bunch of other reasons". I'm curious what they are, but I haven't been able to find much discussion of these things by searching for "bitcoin monotonic" and "bitcoin context free". I would very much appreciate links to more information about these issues.

It seems the objections are primarily:

Potential spam risk, where a spammer might be able to broadcast a transaction that expires soon (as soon as 1 block) with a fee too low to be included in the next block, wait until it expires, then broadcasts again.
Mempool complexity. Since transactions can expire, additional logic would be needed to keep track of this and evaluate transactions for eviction from the mempool and whether they're worth rebroadcasting at all.
Reorg safety issues, where a transaction confirmed just before it expires might be excluded in a reorg that orphans that block, and the transaction would be unable to be included in that alternate chain that becomes the main chain.

There is a risk that this could be abused by a malicious actor who pays victims who accept single-confirmation transactions as payment, with transactions that expire soon in the hopes that a reorg will reverse the transaction after they receive whatever they bought with the payment.
There is also the risk that child transactions are created using the expiring-soon UTXO, and that a reorg invalidates those transactions as well.

These seem like solvable issues, but regardless, these are the risks / potential issues I've come across.

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


text:
Lightning network: Are decrementing timelocks used in bi-directional channels?
I am surely not getting some part of this, but it seems to me that the paper and the video (both listed on the official Lightning website) contradict each other. In particular, the paper describes a simple bi-directional payment channel in Section 3 using only one timelock value (1000 blocks). In the video though they claim that in order to reverse the direction of the channel you have to use a shorter timelock (which makes indefinite number of channel updates impossible).
Are decrementing timelocks actually used in simple bi-directional channels? If so, what would go wrong if new commitment transactions were just created with the same timelock value, say, 1000 blocks?

Possible duplicate of https://bitcoin.stackexchange.com/questions/62868/lightning-network-explaination-bidirectional-channel-funded-by-one-party still without answer.

I checked https://bitcoin.stackexchange.com/questions/42887/transaction-overriding-in-lightning-network/43691?noredirect=1#comment73043_43691. Seems there is no need for decrementing time locks at least in 2 parties channel.

The paper Towards Bitcoin Payment Networks (thanks this answer for the link) gave me a clearer understanding of the topic. Here is a very simplified summary of what I've learned.
There are multiple approaches to payment channels, including:

A simple uni-directional channel (replace-by-incentive);
A simple bi-directional channel (with decrementing timelocks, i.e., replace-by-timelock);
Duplex micropayment channels (see also: my related question);
Lightning network.

In Lightning, a single bi-directional channel is constructed using a breach remedy transactions (BRT), the idea being: before updating the channel state, both parties commit that if they broadcast an earlier state, the counterparty will be able to claim all funds. This is achieved with relative timelocks.
Furthermore, Lightning channels are connected into a network, where payments can be routed through non-custodial parties. This construction is based on hash time locked contracts (HTLC). The receiver generates a random value R, sends H(R) to the sender, and the sender specifies in the output script that R is requires to claim it. After the transaction propagates through nodes, the ultimate receiver discloses R and claims their funds; knowledge of R, in turn, allows all parties along the route to claim their funds from the previous node. In order to give each party time to do so, decrementing absolute timelocks are used.
Summary: the Lightning network does not use decrementing timelocks in a single channel, but uses them in multi-hop channel networks.

By relativer timelock you mean that if a party broadcasts exit transaction (one-party exits) it must wait some preagreed time to use funds? And this is to allow other party to broadcast anticheat transaction if needed?

@croraf Exactly.

Check this question for intro into lightning: Lightning network smart contract technical explaination (unidirectional payment channel).
Say Alice puts 100 BTC into common address and sends 3 transactions to Bob. First 10 BTC, then 10 BTC then 10 BTC. This means she spends from common address with transactions of 90Alice-10Bob then 80-20 then 70-30 (assume on same day), each with 30 days nLock and with her signature.
Now Bob in 5 days wants to send Alice 10 BTC, this means he must make and send Alice a 80-20 transaction from common address with his signature on. Let's say he also puts nLock 30 days on this transaction. Meaning Alice can put her signature on this 80Alice-20Bob transaction and activate it only after 30 days.
But this means nothing to her, because Bob has hands on previous 3 transactions and can after 25 days (5 days prior to Alice) activate the 70Alice-30Bob transaction. This will cause 80Alice-20Bob transaction to be immediately invalid as the coins from common address are already spent with 70-30 transaction and cannot be respent with another transaction. Effectively Bob would steal 10 BTC from Alice.
Thus Bob's transaction should have <25 days nLock time, so Alice can on day 30 activate this 80Alice-20Bob before Bob can activate transactions in his hands.

I see why decrementing timelocks are required here, but the Lightning paper describes a different construction: there, if Alice wants to send 10 BTC to Bob, she first asks Bob to sign an additional transaction that would let Alice get all the money from the channel in case Bob cheats (i.e., broadcasts an older transaction trying to close the channel in the previous state). Only then they co-sign the next pair of transaction reflecting the latest state. So there seems to be two distinct constructions known under the name "payment channel"...

I think this is the same construction as in my link. There is an initial refund transaction Bob sends to Alice that she can activate in 30 days to get her funds refunded. So further transactions Alice sends to Bob should have lock time up to that date (or not to have lock time at all).

I think we use the term "redeem tx" in different meaning. What I actually meant is what they call "Breach Remedy tx" (BRT) in the paper. From what I understand, before signing new "commitment" tx's, the parties sign a new BRT each, letting the counterparty redeem all funds in case of cheating. In your example, if Bob tries to enforce an old state (80-20) on the blockchain, Alice immediately broadcasts her BRT and claims Bob's delayed UTXO of 20. Am I correct that the construction you describe in the answer doesn't have BRTs?

Yes. I've seen such a construct in an answer. That seems non-trivial. My construct is trivial to achieve and explain. https://chat.stackexchange.com/rooms/69126/room-for-croraf-and-sergei-tikhomirov


text:
How complex can bitcoin multi-signature addresses be?
From what I've read, M-of-N multisig addresses are possible in bitcoin. But nothing I've read talks about the limits of that (eg I'm not sure if there are limits to M and N) nor whether there are more complex forms of multisig.
For example, something I think I would like to do is have an address that can be spent on in the following conditions:

Address A signs it, or
At least 3 of B,C,D,E,F and G sign it and H also signs it

This would allow me to have an address I can use normally that also can be accessed by a number of trusted 3rd parties in the case that Address A gets lost or destroyed. This would be useful to back up your bitcoins by distributing some keys to a number of friends (B,C,D,E,F,G) with an explanatory note and final key in your will (H).
Is this kind of thing at all possible in Bitcoin?

The limits of such constructs are the 520 bytes of the redeem script (its opcodes). A signature is roughly 70 Bytes (length code, r-key, s-key ...), so you can calculate what n-of-m versions fit into 520 bytes.
All your ideas are possible with bitcoin.
E.g. you can create a 2 out of 6 multisig for B,C,D,E,F and G.
When you say "A" can sign it, I believe it is the same as "H".
Then you run into 8 keys (8x70=560 bam...), so you are beyond the limits.
You might circumvent this when creating a simple "smart contract":
if <pubkey A> OR <pubkey B> else <2-of-6 msig>

then you are again in the limits. These type of ideas are explained e.g. in Andreas' book "Mastering Bitcoin, 2nd edition", chapter 7 "Advanced Transactions and Scripting".

520 bytes is not the limit today with SegWit.

yup, Pieter has explained it here: https://bitcoin.stackexchange.com/questions/51509/will-segwit-allow-for-m-of-n-multisig-with-very-large-n-and-m?rq=1

and in this case, one could even remove the if/else stuff, and just provide two addresses for "A" and two for "H"... (but watch out for the tx fees, as it grows in size)

Address A signs it, or
At least 3 of B,C,D,E,F and G sign it and H also signs it

OP_IF
  pubA OP_CHECKSIG
OP_ELSE
  OP_3 pubB pubC pubD pubE pubF OP_5 OP_CHECKMULTISIGVERIFY
  OP_2 pubG pubH OP_2 OP_CHECKMULTISIG
OP_ENDIF