texts: Standing Orders, Is it possible with Bitcoins?

texts: Is there a service out there, or is there any intention to integrate Standing Order type transactions into the client ? (Every 30 days transfer 0.2BTC to a specific address for example).


texts: Why doesn't bitcoin place additional constraints on competing block chain forks, other than length of chain? (e.g., time and confirmation count)

texts:
In Bitcoin's proof-of-work system, consensus on which chain of blocks should be considered the "true" block chain is based only(?) on which chain is longer.

Accordingly, to quote a nicely written answer by Nate Eldredge, a typical 51% attack would look like this:

  Attacker privately starts mining their own chain, which diverges from the main chain at some block N.
  Attacker deposits coins to your business, sending them from address A. Call this transaction X.
  Attacker inserts in his own chain a transaction X' which conflicts with X; typically X' sends the coins from address A to another address belonging to the attacker.
  Attacker waits for several confirmations of transaction X, in blocks N+1, ..., N+6 (replace 6 with however many confirmations your business wants) of the main chain.
  Once there have been enough confirmations to satisfy you, you deliver goods or services to attacker.
  Attacker releases his own chain, which now has blocks up to, say, N+50. Being longer, this chain is accepted by the network. This chain doesn't contain the transaction X but instead X', so you don't have the coins you thought you did.

  Notice that up until Step 6, everything on the network looks completely normal; only the attacker knows what is going on.

My question then is: why doesn't bitcoin specify a maximum duration of time and/or a maximum number of confirmations, after which a competing/forking block is rejected even if it's backed by a longer chain of (secretly premined) child blocks?

To summarize this idea in pseudocode:

CUTOFF_TIME = 1200 # seconds
CUTOFF_CONFIRMATIONS = 3

is_acceptable_block(new_block, parent_block):
    if not is_valid_block(new_block):
        return false

    if is_first_child(new_block, parent_block):
        return true

    old_block = get_first_child(parent_block)

    if age_difference(new_block, old_block) > CUTOFF_TIME:
        return false

    if child_chain_length(old_block) > CUTOFF_CONFIRMATIONS:
        return false

    return child_chain_length(new_block) > child_chain_length(old_block)

If this would be viable, then the 51% attack scenario described above would become much harder; and as a result, the amount of time/confirmations to wait for before a transaction can be safely believed would decrease, right?


texts:
If I clone Bitcoin Core from the repository and switch to version v0.21 (git checkout tags/v0.21.0), the debugging (gdb src/qt/bitcoin-qt or gdb src/bitcoind) will work as expected.
But If I clone the project and simply debug from master, the gbd will not be able to find the files. Shows the message below for any file (in the example, the file is net_processing.cpp). The message says that the file does not exist.
Thread 22 "b-msghand" hit Breakpoint 1, (anonymous namespace)::PeerManagerImpl::MaybeSendAddr (this=0x555556721b50, node=..., current_time=...)
    at net_processing.cpp:4156
4156    net_processing.cpp: No such file or directory.

To reproduce the issue in Bitcoin Core v0.21 (will succeed)
git clone https://github.com/bitcoin/bitcoin.git && cd bitcoin
git checkout tags/v0.21.0
./autogen.sh
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --enable-debug
ccache make -j "$(($(nproc)+1))" check
gdb src/bitcoind
b net_processing.cpp:2278
(gdb) run -testnet

To reproduce the issue in Bitcoin Core master branch (will fail)
git clone https://github.com/bitcoin/bitcoin.git && cd bitcoin
./autogen.sh
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --enable-debug
ccache make -j "$(($(nproc)+1))" check
gdb src/bitcoind
b net_processing.cpp:2341
(gdb) run -testnet

It was tested on Ubuntu 20.04.
What has changed since version 0.21 that affects debugging and how to set up debugging correctly for master branch?

EDIT: The debugging error is caused by the change made in the PR #20353.
If the change to this PR is undone in the local machine, the debugging of the master branch will work normally.


texts:
I'm trying to run a BitCoin wallet on a USB Drive. I've got that working, but I'm trying to make the block chain get downloaded and stored inside of the USB drive as well. This is the only thing I've been able to come up with and I've had no success.

H:\Bitcoin\bitcoin-qt.exe" -datadir=H:\Bitcoin\appdata

I get the error "Filename is incorrect". I know there is a portable BitCoin program, but I'm also wanting this to work for other coins such as LiteCoin, and I know there aren't portable versions for those.


texts:
When I enter bitcoind getinfo on my remote ubuntu-Server I get this answer:

{
    "version" : 32400,
    ... (some other info)
    "errors" : "WARNING: Displayed transactions may not be correct!  You may need to upgrade, or other nodes may need to upgrade."
}

What went wrong?
How can I fix it?

This is what I did before:

I am running a remote server with Ubuntu 12.04 LTS as operating system. The machine is 800 km away from my home, I am connected to it via SSH. So there is no GUI, I only can use shell commands.

Yesterday I installed bitcoind calling this shell-command (while beeing root) after upgrading all other packeges (apt-get update followed by apt-get dist-upgrade):

# apt-get install bitcoind

bitcoind and 8 or 10 other packages was installed.
Then I edited /root/.bitcoin/bitcoin.conf and entered this:

  server=1
  daemon=1
  rpcuser=[my username]
  rpcpassword=[very long passphrade]

Then I did start bitcoind by calling

# bitcoind

The answer was

  bitcoin server starting

but even after waiting more then 5 minutes I did not get the shell back (I could not enter new commands). So I pressed

  ctrl-c

When I entered bitcoind again, I found that is already was running:

  Bitcoin: Cannot obtain a lock on data directory /root/.bitcoin.  Bitcoin is probably already running.

It was also running after closing and re-opening the ssh-conection to the server. So I thought everything was ok now. I also generated a bitcoin-address which worked fine.

Now, about 12 or 14 hours later, I reconnected to the ubuntu-server and entered

# bitcoind getinfo

but the answer was

  error: couldn't connect to server

also displaying all active processes by calling top showed me, that bitcoind was not running. So I started it again by entering bitcoindin the command line, but again I didn't get the shell back, so again I had to press ctrl-c. But when I entered bitcoind getinfo after that I got the answer that I posted at the beginning of this posting ("errors" : "WARNING: Displayed transactions may not be correct! ...)

So here are my questions:

What went wrong?
How can I fix it?
How can I start bitcoind and get back to shell again?
How can I stop bitcoind? (I just can kill the process, I don't know any other way)

EDIT 1:

(2014-01-08; evening)

About stopping bitcoind: I found out that the command is bitcoind stop. But when I tried this yesterday I got an error (sorry, can't remember the exact error-message. I guess it sayed "unknown command", but I'm not shure)

EDIT 2:

(2014-01-09; morning)

Yesterday I stopped bitcoind and deleted everything in the directory /root/.bitcoin/ except wallet.dat and bitcoin.conf. Then I started bitcoind again. Even after about 8 hours it still worked fine. Sometimes it took up to about 20 seconds to respond to commands like bitcoind getinfo, but bitcoind always did give the expected answer without any error messages.

So I went to bed and this morning I logged in to my server again and I found that bitcoind was not running (the answer to bitcoind getinfo was error: couldn't connect to server).

So I started it with the command bitcoind. The answer was bitcoin server starting, but I did not get back the shell (I am unable to enter new commands). So I opened a second shell and entered bitcoind getinfo there, and after a few seconds the server responded with an status-json-object with an empty error-string (which means: no error). So I think the start was successful. But the first shell (where I did start bitcoind) is still hang up, since more than 30 minutes now.


texts: Does government really seize Bitconnect assets?

texts:
https://www.coindesk.com/us-court-freezes-bitconnect-assets-as-lawsuits-mount/

This says yes.

However, bitconnect is anonymous.

So how can it be?

Any sources of the success and failure of seizing


texts:
I'd like to know all of the default derivation paths used by both software and hardware wallets for bitcoin.  According to https://iancoleman.io/bip39/?#english, the following are defaults:

m/0'/0' (bitcoin core)
m/0'/0 (Multibit)
m/44'/0'/0' (blockchain.info)
m/44'/0'/0'/0 (Electrum, Mycelium)
m/49'/0'/0'/0 (p2wpkh-in-p2sh)
m/84'/0'/0'/0 (p2wpkh bech32)

Am I missing any?


texts: How can I convert my private key from bitaddress.org to WIF without putting the key into a website or a programme?

texts:
Rule number 1 says: don't put your private key into any website or programme, unless you're performing a transfer. This way you won't be robbed.
Then, I want to "sweep" my money off a paper wallet from bitaddress.org, but Electrum wants me to put the private key in WIF format ( https://bitcoinelectrum.com/sweeping-your-private-keys-into-electrum/ ). How can I convert my key to WIF without breaking the rule number 1?
By the way, what's the name of the format bitaddress.org returns private keys in? It is base58?


texts: How to withdraw dollars to Dwolla from Mt Gox

texts:
I have been trying to withdraw $7000 US dollars from Mt Gox to Dwolla for over a week.  I am currently level 1 verified at Mt Gox, so my strategy has been to withdraw $1000 every 24 hours for 7 days until I am able to withdraw $7000.  The total of my withdraws from Mt Gox has been $2000 over the past 2 months.

I was able to withdraw $1000 twice last week using two separate $1000 transactions 24 hours apart.  But after these two initial $1000 withdraws occurred, subsequent my withdraws have not been successful.  During these unsuccessful withdraw attempts, the Mt Gox web interface says the transactions are being processed with a pleasant green-colored background to the message, and my USD balance decrements by $1000 each time I initiate the $1000 withdraw request.

This is the Mt Gox message I receive for unsuccessful withdraw attemps:

However, several minutes after submitting the request, my balance returns to the previous amount from before the request by going back to the original balance.  No transaction ever occurs, and there is no message or notification the request has been canceled.

I submitted a ticket to Mt Gox for technical support, but their answers are not satisfactory.  Mt Gox tech support reps told me the system canceled my withdraw requests and told me "I should try it again."  But when I try again I have the same result - transfer does not go through.  Mt Gox tech support has not been clear about what I should do to resolve this.

I now have this message on my account, even though my balance of USD is approximatly $5000 USD:

What can I do to successfully transfer USD from Mt Gox to Dwolla in my current situation?  I have no reason to believe my sitaution is different from anyone else who is Level 1 verified at Mt Gox, so perhaps Mt Gox and Dwolla are having difficulties.  If transferring USD from Mt Gox to Dwolla is not possible in my situation, can I somehow move USD from Mt Gox to a bank account using another method?  I prefer to avoid wire transfers as they are expensive and tedious.


texts: How do I set the transaction fee in Multibit?

texts:
I can't see any options in View > Preferences nor on the Send tab!

I can't find any results in a DDG search!


texts: Is the compact block protocol faster than normal blocks when it has to do getblocktxn/blocktxn round trip?

texts:
When a compact block fails to rebuild a block from the mempool the node sends a getblocktxn message to learn about the missing transactions.

Does requesting for the missing transactions make the compact block protocol as slow as the normal block during new block propagation?

Thanks!


texts: I would like to find out if its possible for a Bitcoin recipient not to receive a payment while on my side(Sender) it shows that the payment was successful? See print screen of payment below, the payment was done more than 36 hours ago.


texts: i have 0.10096 mbtc (0.00010096 BTC) in my btc wallet but when ever i try to send bitcoins it always says your balance is low to pay the fee

texts: kindly tell me how much fee is charged over 0.1 mbtc as i have this much amount and i want to send it but it always shows this balance is too low to pay charges.


texts: If one person sold bitcoins to another person using a smartphone, will a record of the IP addresses of the devices they used be seen in the blockchain?


texts: In theory could a pubkeyhash script be solved without the public key in the scriptSig?

texts:
When signing a pubkeyhash UTXO, it is required to provide both a signature and a public key. The public key is duplicated and one copy is provided to op_checksigverify to ensure the signature is valid, and the other copy is hashed to ensure it matches the pubkeyhash.

In theory, is it possible to build an opcode like op_checksigverify_pushkey that takes only the signature of the transaction and extracts the public key from the signature? With this it would be possible to only specify the signature and no need to provide the public key. The public key of course could be arbitrary, but would fail when hashed and compared against the vout pubkeyhash.


texts: Who can predict that a benign attacker has 51% hash rate of the system?

texts:
In the Bitcoin network, suppose that there is an attacker who has 60% hash-rate (hr) and then other users have 40% hr. Therefore, it is obcioust if other users generate any new block, attacker can ignore it and then genrates a new block with the same height and then outrun all other miniers.

However, suppose that this benign attacker is not so malicious. I mean that if other miners find new blocks, then the attacker will accept their new blocks. Therefore, in general, other miners can mine 40% of the new block in average.

1) As this benign attacker accept any new block by other miners, is it again illegal to have more than 50% of the total hash-rate?

2) If yes, who can detect such a benign attacker?


texts: Why cannot we trace back the Mystery Miner transaction and identify the exit point, where crypto is converted to fiat?

texts:
I read this wonderful article by Jamie.
"https://news.bitcoin.com/20-bitcoin-block-rewards-from-2010-moved-today-mystery-miner-spent-400-million-in-btc-since-black-thursday/"
I tried following the transaction and blocks, however I wasn't able to keep up until the final destination.
Why cannot we find the right final wallet address, which will be used in Crypto Exchange ?
How can we find if tumbler / CoinJoin was used in the process?


texts: Help with multi-input transaction by code

texts:
I'm trying to consolidate multiple inputs into a single output, all left over is for the miner.

When I send my transaction to a peer, it is never mined.
I believe something is invalid in the multi-input signatures.

This is a sample input transaction for 1MeTVq6X8LCtcRDG4MNz1QVezxzxyffSTL:

in_transactions = []
txid =
lx('bad6a00b1ab3c453a3569b4b5373fcaaeefaa01b1e48efcb118c1e1e08597382')
vout = 4
txin = CMutableTxIn(COutPoint(txid, vout))
in_transactions.append(txin)

This is how I create and validate signatures:

seckey = CBitcoinSecret("L1WIFKey...L1WIFKey")

# Create that scriptPubKey from scratch using the pubkey
# This is our signature to open each input
our_scriptPubKey = CScript([OP_DUP, OP_HASH160, Hash160(seckey.pub), OP_EQUALVERIFY, OP_CHECKSIG])

# Create the txout.
their_scriptPubKey = CBitcoinAddress(output_address).to_scriptPubKey()
txout = CMutableTxOut((btc_i_have - minner_fee) * COIN, their_scriptPubKey)

# Create the unsigned transaction.
# in_transactions is a list of [txin,txin,...]
tx = CMutableTransaction(in_transactions, [txout])

# Set the scriptSig of our transaction inputs appropriately.
# THE BUG *MIGHT* BE SOMEWHERE HERE
for idx, txin in enumerate(in_transactions):
  sighash = SignatureHash(our_scriptPubKey, tx, idx, SIGHASH_ALL)
  sig = seckey.sign(sighash) + bytes([SIGHASH_ALL])
  txin.scriptSig = CScript([sig, seckey.pub])
  VerifyScript(txin.scriptSig, our_scriptPubKey, tx, idx, (SCRIPT_VERIFY_P2SH,))

# finally this is the raw transaction
raw_transaction = b2x(tx.serialize())

I wonder if I'm signing the inputs wrong when I do it one by one.

Thanks in advance.

EDIT:

The code works, the error is silent. The transaction was dropped silently by the network. It was a wrong transaction because one of my vout was pointing to a wrong output.


texts:
I would like to know if this will be possible with Bitcoin:

Create a key with the following features:

Only be able to spend btc if a % of pre-definied keys allow it
The own of the key need for example 80% acceptance from pre-definied keys to be able to spend btc (same process to each transaction)
If 80% is not reached, nothing happens
Specify a time to people (pre-definied keys) vote agree or deny


texts: Why is pruning not considered already at the moment?

texts:
I understand that Bitcoin scales in several meanings (Scalability), and pruning is one important concept of it (SE Question). I also understand that a "Simplified Payment Verification" (SPV) needs to trust a lot the peer he is obtaining the block chain from.

A very conservative pruning (e.g. transactions older than six month and spent) wouldn't do much harm, especially when it would be only a configuration option for bitcoin-qt. That way the default is the full node, but it's easy to have a "small node".

But I don't see it coming anyhow soon. Is there a reason? Is it so important to have full nodes at the moment that the devs say "either you go for all or nothing"? Or is the development effort the bottleneck? IMHO a large network of non-SPV nodes is more important than a small network of full nodes.

Edit: Let's put it more concrete: Is there a major security issue of not having the complete transaction history of the world back to the genesis block?


texts: Does the mempool size as reported by Blockchain.com include the size of txs only?

texts:
Does the mempool size as reported by  (for instance Blockchain.com) include the sum of the 'size' of transactions only?  Or does it also include the overhead (due to indexes, allocation overhead, metadata)?
for instance, the ancestor-descendant mappings that it calculates and updates at every incoming transaction, is the size of the data structure used to store that also included in the total size as reported here https://www.blockchain.com/charts/mempool-size or here https://jochen-hoenicke.de/queue/#0,24h


texts: Why Does Litecoin Transaction Show Zero Confirmations for last 3 hours

texts:
I tried sending 193.09 LTC from my mobile wallet. There wasn't an option for how much of a fee to add to the transaction, so I just sent as is. It took a long time to send from my phone and then once it processed from my mobile wallet it just sat (and as of now still is) on the blockchain unconfirmed. I'm a relative noob to Litecoin, but I know that BTC and ETH won't even let you trade unless you attach the right amount of fees or gas, so I thought my transaction should go through just fine.

My question is, will this eventually go though?

Do I have any options to remedy this? Or is it just a matter of time before it gets confirmed?

Hash ID can be seen here:

http://ltc.blockr.io/tx/info/280589ea1fefd39bb05723cf9c3f92e12e12bd7b1d7b6c6e84fa6b4ff63e97aa

If there's any other relevant info needed to diagnose I'll gladly provide. Thanks in advance!


texts: Is there a minimum time to be mining a pool to have any results?

texts: For example if mining with Deepbit is there a minimum time one must run cgminer to have anything added to their Deepbit account balance?


texts: Is it possible to run a simple attack on a previous version of the client in testnet mode?

texts: I need to simulate an attack locally or in testnet (if possible) for academic purpose, on an old and bugged version of the bitcoin core client. I am in posses of test BTC in the last version. I want to know an easy way to exploit one this listed vulnerabilities(https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures), if this has been done before or if im speaking nonsense.


texts: Issue with getrawtransaction txindex and reindex

texts:
I am running Bitcoin Core Deamon version v0.16.0.0 on Ubuntu and need to call the getrawtransaction command for some TX.

To use the getrawtransaction I need to run bitcoin core with txindex=1.
But if I am running with txindex=1 it says that I have to run the core with reindex or reindex-chainstate.

So I did run first
bitcoind -reindex-chainstate
and then
bitcoind -txindex=1 and it still says that I have to run with reindex or reindex-chainstate.
So I tried to run
bitcoind -txindex=1 -reindex-chainstate  but still says run it with reindex or reindex-chainstate.
Now I am running bitcoind -txindex=1 -reindex

Is this the correct way? And is it normal that bitcoin-cli getblockcountis stuck on 0?


texts: Why are zero fee transactions not being included in blocks that are not full?

texts:
Today, I sent a Bitcoin payment but it has not been included in a block for about 10 hours now. The payment had the following characteristics:

~0.1 BTC
222 bytes
One UTXO as an input (I used coin control)
The UTXO was approximately 1 year old

Currently, blocks are not always full (in fact there are blocks that are only 8% full). For that reason I attempted to save the fee.

(https://bitcoinfees.github.io/#1m)

(https://blockchain.info/ 2016-08-08 20:42 UTC).

What policy do miners currently have regarding zero fee transactions? I have sent many zero fee transactions in the past (>1 year ago) and the block inclusion time was really quick (~5 blocks maybe). Did the policy of miners change?


texts: What does one need to do to earn Decred through PoS?

texts:
If I understand correctly, Decred can be mined through PoS (Proof of Stake) rather than PoW (Proof of Work).

What needs to be in place to achieve this? There are some technical details here about how Decred works but I'd like something in laymen's terms.

I understand that I would need to run a full node to qualify, but:

Is there a minimum number of Decred that need to be held? Does the age of them make any difference?
What kind of download/upload speeds would be required for the node?
Anything else I haven't thought of that I should know?


texts: Do I need to move bitcoins stored in a paper wallet?

texts: In mid 2012 I used bitaddress.org offline to generate address/private key pairs. I purchased bitcoins and had coins sent to these addresses. Do I have to move these bitcoins to keep them in the active chain? (I've read about the May 15 deadline to update the client, but never use a client).


texts: Why do self-loops exist in the bitcoin transaction graph?

texts:
I have obtained bitcoin data from block explorer and created the transaction graph. The graph consists of millions of nodes and edges.

i wrote a query that creates a relationship from source address to destination address and visualized a portion of the network; approx. 4500 nodes along with 50000 edges. What this means is that I omit the nodes depicting the blocks txs belong to, nodes depicting txs etc.

The nodes in the graph illustrate addresses connected by a relationship " sent_money_to "

There are many self-loops. In several instances a node u has n out-links to node w, while the same node u has n self-loops.

By no means I am an expert on the graph properties or protocol of the bitcoin network.

Any possible explanations? Trivial or non-trivial.

Thanks.


texts: BTG wallet or exchange with BIP39 seed import

texts: Can anyone recommend a Bitcoin Gold exchange or SPV wallet for Linux that supports importing wallets from a BIP39 seed? The best I’ve found so far is a fork of Electrum that supports BTG for Windows or exchanges with no wallet import.


texts: Mt.Gox API v2 with C# - authentication problem 403

texts:
I'm trying to access the Mt.Gox API v2 via C# and HTTP requests. I've put together the following code based on various examples I found online (e.g. the nitrous documentation).

private string MakeRequest(string apiCall)
        {
            var parameters = new Dictionary<string, string> ();
            parameters.Add ("tonce", Tonce.GenerateTonce().ToString());

            string path = Currency + "/" + apiCall;

            var request = new HttpPostRequest(BaseAddress + path, parameters);
            request.Request.Headers.Add ("Rest-Key", mApiKey);
            request.Request.Headers.Add ("Rest-Sign", mHmac.Sign(path, request.GetEncodedPostParams()));

            var response = request.Request.GetResponse();
            return response.ToString ();
        }

(Here HttpPostRequest is a rather simple wrapper around the .NET HTTP request)

I call the code like this:

MakeRequest ("money/info");

This leads to a 403-Error from the Mt.Gox server (access denied).

What I checked:

Tonce is generated correctly
HMAC signing works correctly (tested with nitrous example)

And here is the code for my HTTP Post Request class:

public class HttpPostRequest
    {
        public HttpWebRequest Request { get; set; }
        string mPostParams;

        public HttpPostRequest (string url, Dictionary<string,string> postParameters)
        {
            mPostParams = "";
            foreach (string key in postParameters.Keys)
            {
                mPostParams += Uri.EscapeDataString(key) + "="
                          + Uri.EscapeDataString(postParameters[key]) + "&";
            }

            if(postParameters.Count > 0)
                mPostParams = mPostParams.Substring (0, mPostParams.Length - 1);

            Request = (HttpWebRequest)HttpWebRequest.Create(url);
            Request.Method = "POST";

            byte[] data = Encoding.ASCII.GetBytes(mPostParams);

            Request.ContentType = "application/x-www-form-urlencoded";
            Request.ContentLength = data.Length;
            Request.UserAgent = "Mozilla/4.0 (compatible; MtGoxTradeCLI)";

            Stream requestStream = Request.GetRequestStream();
            requestStream.Write(data, 0, data.Length);
            requestStream.Close();
        }

        public string GetEncodedPostParams()
        {
            return mPostParams;
        }

        public string Send()
        {
            HttpWebResponse myHttpWebResponse = (HttpWebResponse)Request.GetResponse();
            Stream responseStream = myHttpWebResponse.GetResponseStream();
            StreamReader myStreamReader = new StreamReader(responseStream, Encoding.Default);
            string pageContent = myStreamReader.ReadToEnd();
            myStreamReader.Close();
            responseStream.Close();
            myHttpWebResponse.Close();
            return pageContent;
        }
    }

And my HMAC class:

class HmacSigner
  {
    private readonly string mSecret;

    public HmacSigner(string secret)
    {
        mSecret = secret;
    }

    public string Sign(string method, string postData)
    {
        string message = method + '\0' + postData;
        HMACSHA512 hmac = new HMACSHA512(Encoding.Default.GetBytes(message));
        hmac.Key = Convert.FromBase64String(mSecret);
        return Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(message)), Base64FormattingOptions.None);
    }

Does anyone have an idea what's going wrong here? Why is my authentication not working?
Thanks!


texts: Mtgox: Probability of Distribution, etc. - Report 28 sept 2016

texts:
In the last report regarding the MtGox bankruptcy it is mentioned that:

  However,  the  detailed  schedule  thereof  will  inevitably  be  affected  by  each  creditor’s  response  to  the
  acceptance  or  rejection  of  his  or  her  claim,  etc.

Does this mean that each user have to respond even if the claim was accepted?


texts: bitcoind > 0.9 - unexpected end of data - handling of arbitrary data in tx - UPDATE

texts:
I'm working on a pretty old blockchain here which was based on codebase 0.9 and never updated since. Now getting that stuff to a proper codebase, I'm facing following situation on initial block download:

Downloading headers is working fine, all block headers accepted
then, during the actual block download, always at the same height, we are throwing an exception at streams.h line 352: throw std::ios_base::failure("CDataStream::read(): end of data");

UPDATE

The block in question got 12 additional bytes appended to a standard transaction. Actually I thought from 0.9 this should not have been possible anymore since OP_RETURN was introduced. But afaik similar things happened in earlier bitcoin versions.

(general) Q: How did Core "fix" this issue as data is supposed to persist in the blockchain? e.g. How are newer clients treating it?

Q: Is there an example of a similar transaction on the Bitcoin blockchain (prior 0.9, I was only able to find the OP_RETURN examples)?


texts:
I am using the BlockCypher API to work on the Bitcoin testnet. Transaction creation is carried out in 2 stages: New Transaction Endpoint and Send Transaction Endpoint. The first stage consists in the transaction object fields filling by server, the second - in the local signing with a private key. This error occurs in my second stage:
{
   "errors":[
      {
         "error":"Error validating generated transaction: Error running script for input 0 referencing 5efa3d59dbdd391d8f8d277c49c6d9de7ae13f004190b8132ed6da203e14016b at 0: Script was NOT verified successfully."
      }
   ],
   "tx":{
      "block_height":-1,
      "block_index":-1,
      "hash":"f2b24467c1caa3181ab7effc8b23624c341d6f296fcb5bd4c49026ecc5b138e4",
      "addresses":[
         "mp9Cz49v2Nj2dfSmu4Lz9r91X1CF6hVHVz",
         "mwpG4fa4B3vSio81QEVPiDmA2Cgi26cnV4"
      ],
      "total":88900,
      "fees":11100,
      "size":226,
      "vsize":226,
      "preference":"low",
      "relayed_by":"92.101.184.223",
      "received":"2021-03-29T14:18:34.039933202Z",
      "ver":1,
      "double_spend":false,
      "vin_sz":1,
      "vout_sz":2,
      "confirmations":0,
      "inputs":[
         {
            "prev_hash":"5efa3d59dbdd391d8f8d277c49c6d9de7ae13f004190b8132ed6da203e14016b",
            "output_index":0,
            "script":"483045022100b83a6e3b3b3b997f83fd4ab13f4b1cbabdb69b883e96bbe97443889556b7523702200d2c4ee2e641e31b6f1ce2e20e2fda9bdedca21a668152d15471e040d542aede0121034593cfafe3723ff0396291415e5bc90ef46a1e5967af3fcaaeeb74420c2a72a4",
            "output_value":100000,
            "sequence":4294967295,
            "addresses":[
               "mp9Cz49v2Nj2dfSmu4Lz9r91X1CF6hVHVz"
            ],
            "script_type":"pay-to-pubkey-hash",
            "age":1968449
         }
      ],
      "outputs":[
         {
            "value":50000,
            "script":"76a914b2c7eab66c1e7b1326e228ec7883ef055c21ce1488ac",
            "addresses":[
               "mwpG4fa4B3vSio81QEVPiDmA2Cgi26cnV4"
            ],
            "script_type":"pay-to-pubkey-hash"
         },
         {
            "value":38900,
            "script":"76a9145e9c3e438a489470ed2e8cca4bbb96501f2a827b88ac",
            "addresses":[
               "mp9Cz49v2Nj2dfSmu4Lz9r91X1CF6hVHVz"
            ],
            "script_type":"pay-to-pubkey-hash"
         }
      ]
   },
   "tosign":[
      ""
   ]
}

I am using the Sign method from here. Tell me how to fix the error and, preferably, use the NBitcoin library, since it is already included in the project in order to generate Bitcoin addresses.
TXSkeleton unsignedTx = JsonConvert.DeserializeObject<TXSkeleton>(
    response.Content.ReadAsStringAsync().Result);

unsignedTx.PubKeys = new List<string>();
unsignedTx.Signatures = new List<string>();
Sign(unsignedTx, address.PrivateKey.ToHex(), true, true, true);


texts: Transaction confirmed, bitcoin not received

texts:
Is that normal to receive more than 6 confirmation in the Bitcoin transaction process? Because the time delay is unbelievable and I received 64 already. But according to blockchain.info, 6 confirmation enough for Bitcoin transaction.

So my question is, how much exactly transactions I have to receive at the end to be sure it's confirmed?
Because I sent my Bitcoin in the morning and now the night, but it still did not reach its destination and keep sending confirmations.

https://blockchain.info/tx/0e1ed99dc9932ec6725f9e3f0f406ac7305d53e9752f1b56a61dd8259d53f1b4


texts: What is the legal money range for a bitcoin transaction?

texts:
What is the legal money range for a bitcoin transaction message ?
I am guessing that the lower limit is one satoshi but what about an upper limit aside from the maximum block size constraint ?


texts: Is there any relation between the block version field and the one of the transaction?

texts: I am struggling to validate my custom miner against the testnet network and I can't seem to add a block of mine to the chain. I've noticed that all the other miners are appending version 2 blocks, so I decided to do the same. As I've read the block height should be included in the coinbase transaction script. So my question is if there is any relation between block version and transaction version because that's the only thing (in my opinion), that I could be doing wrong. I would appreciate an example of how should my block look like as byte array so it would be accepted by the network (testnet).


texts: Why do the xpubs from electrum and trezor not match when creating a multisig wallet?

texts:
For a little background, I am trying to set up a 2-of-3 multisig wallet with 2 trezors and a coldcard. I am trying to verify that my setup is correct before putting any meaningful amount of money in there, but I am finding that the master pubkeys for the trezors are not matching my expectation.

When creating a standard p2wsh wallet in electrum using a trezor, the default derivation path is m/84'/0'/0'. Immediately after choosing the script type and derivation path electrum displays the master public key. To ensure electrum is using the correct master public key I ran the following command: trezorctl get-public-node -n "m/84'/0'/0'" -t segwit. Sure enough, the master public keys displayed by electrum and trezorctl matched.

However, when trying to do the same verification when creating a multisig wallet, the xpubs do not match. Electrum defaults to the derivation path of m/48'/0'/0'/2' for native segwit multisig wallets. Running trezorctl get-public-node "m/48'/0'/0'/2'" -t segwit outputs a different master public key than what is displayed in electrum. Is this a bug in electrum or is there a reason for the discrepancy? I think that I am misunderstanding something because even though these master public keys don't match, electrum is able to sign and broadcast valid transactions using the trezor as one of the cosigners.


texts:
So I found my old wallet from 2011, I was able to pull my address and my PrivateKey using  pywallet. I downloaded Bitcoin-QT, copied the old wallet over and reran with -scan. Since it was a new install the blockchain is still updating (not finished as of this post).

I searched my address at blockchain.info and it said that address didn't have a balance. With that being said, are my efforts at recovering the wallet pointless? I pulled the wallet off an old drive so it hasn't connected since 6/2011. The entire directory is intact and the block that was processed is still in the directory as well, about 301MB big. Not sure if that helps me at all in this case.

EDIT: Here'e the pywallet dump with critical data removed. The fact that there is nothing under tx makes me believe that I'm wasting my time.

{
"bestblock": "REDACTED",
"ckey": [],
"defaultkey": "1PSatNhRDmmR6rfK5c9XJvqwB92z7beRa",
"keys": [
    {
        "addr": "1PSatNhRDmmR6rfK5c9XJvqwB92z7beRa",
        "compressed": false,
        "hexsec": "REDACTED",
        "label": "",
        "private": "REDACTED",
        "pubkey": "REDACTED",
        "reserve": 0,
        "sec": "REDACTED",
        "secret": "REDACTED"
    }
],
"mkey": {},
"names": {
    "1PSatNhRDmmR6rfK5c9XJvqwB92z7beRa": ""
},
"pool": [],
"settings": {
    "addrProxy": "127.0.0.1:23075",
    "fGenerateBitcoins": "False",
    "fUseProxy": "False"
},
"tx": [],
"version": 32100
}


texts: Decide Currency before buying mining hardware?

texts: As different Crypto-Currencies have different underlying Algorithms (e.g. SHA256, Scrypt, CryptoNight, etc : Source). Does this mean that if I am looking to buy cryptocurrency mining hardware, I need to decide the hardware after I decide which currency I am looking to mine? For example, a GPU setup may be good for Ethereum but for LiteCoin, I need some ASIC hardware?


texts: How to properly use the rpc command `listunspent` with `bitcore-lib` to create a transaction and get the transaction hash?

texts:
I am trying to use the rpc command listunspent to get all the UTXOs relevant to an address, and then I am trying to pass it to a transaction, using bitcore-lib.
Below is my code:

const Client = require('bitcoin-core');
const bitcore = require('bitcore-lib');
const client = new Client({
  network: 'regtest',
  username: 'bitcoinuser',
  password: 'bitcoinpass',
  port: 18443
});

var tx = new bitcore.Transaction();

var sourceAddress = ["mwkT2k1o6k4dF7ZZQ2VBbw7VedBkQA2CBK"];
var minconf = 6;
var maxconf = 999999;
var targetAddress = "2Mw3iwZdVXjeb7BN5hWqegFs8VdfZo5Rmdo";
var privateKey = "cQqVxdtPz95monJe8QJUE4h5JVtSSAjTQ1SU6z8PL9pmFj5V7ieA";

var txns = [];
client.listUnspent(minconf, maxconf, sourceAddress)
    .then(function(help){
    txns = help.slice();
    return txns;
  }).then(function(txns){
    return tx.from(txns).to(targetAddress, 15000).sign(privateKey);
  }).then(function(result){
    console.log(result);
  });

The result is similar to the transaction object.

What I want is to receive the transaction hash, which I can then broadcast.

Note: I am trying to run my core in regtest mode, I do not want to use livenet or testnet. I have also disclosed the public and private keys, as they do not hold any real value.

The first few lines of the output looks like this:

Transaction {
  inputs:
   [ PublicKeyInput {
       witnesses: [],
       output:
        Output {
          _satoshisBN:
           BN { negative: 0, words: [ 16972032, 37 ], length: 2, red: null
},
          _satoshis: 2500000000,
          _scriptBuffer:
           <Buffer 21 02 0b 0f c0 79 9d 39 8d 83 be 39 08 2c 72 49 0a 57 00 0e c2 f5 e0 01 ab a1 ee 9b 07 19 cc bd fb e3 ac>,
          _script:
           Script {
             chunks:
              [ { buf:
                   <Buffer 02 0b 0f c0 79 9d 39 8d 83 be 39 08 2c 72 49 0a 57 00 0e c2 f5 e0 01 ab a1 ee 9b 07 19 cc bd fb e3>,
                  len: 33,
                  opcodenum: 33 },
                { opcodenum: 172 } ],
             _isOutput: true } },
       prevTxId:
        <Buffer e1 45 8a fb cd df 9b 8b aa 4c a7 a0 13 b7 f6 d3 91 87 8f a3 02 94 78 92 ef 59 03 0e 40 f5 51 00>,
       outputIndex: 0,
       sequenceNumber: 4294967295,
       _script: Script { chunks: [], _isInput: true },
       _scriptBuffer: <Buffer > },
     PublicKeyInput {
       witnesses: [],
       output:
        Output {
          _satoshisBN:


texts:
Consider Testnet transaction 7a438...de03e which has vout[0].scriptPubKey =

OP_DUP OP_DROP OP_DUP OP_HASH160 039.....6fe OP_EQUALVERIFY OP_CHECKSIG

The script is equivalent to a standard pay-to-pubkeyhash scriptPubKey. Let's try to spend it:

> bitcoind createrawtransaction '[{"txid":"7a438.....de03e","vout":0}]' '{"mfq.....oDY":1.3}'
01000000013ee0bdf5779c48f42bda36cd740ba297ae071ec7fe3eadae6418602de48d437a0000000000ffffffff0180a4bf07000000001976a914039541a738df12eed1825b866eb5bb5aba6bf6fe88ac00000000

> bitcoind signrawtransaction 01000.....00000
{
  "hex" : "01000000013ee0bdf5779c48f42bda36cd740ba297ae071ec7fe3eadae6418602de48d437a0000000000ffffffff0180a4bf07000000001976a914039541a738df12eed1825b866eb5bb5aba6bf6fe88ac00000000",
  "complete" : false
}

As you can see, bitcoind refuses to sign the transaction (same hex and obviously complete is false) I guess because it can't find a suitable address (since it's a non-standard script). I do indeed control the address and have its private key.

Is there any way to sign this transaction?


texts: Antiminer s3 won't show the correct interface once i connect to (showing a DLink interface instead)

texts: Recently, I bought an Antminer s3 from eBay and I am having an issue with it. I am able to connect the miner to the internet just fine as its showing up on my router. However, it doesn't show the usual antminer interface, instead it shows a dlink interface with only network connection settings. It does not even show the pool settings. Can anyone here assist me? I spoke with the seller but I am not getting anywhere on that front.


texts: Should the BIP 39 mnemonic sentence checksum be eliminated from the standard? Does it do more harm than good?

texts: Should the BIP 39 checksum be eliminated from the standard? Should the BIP39 checksum be made optional to improve security?


texts:
Can I still use my key pair to receive and send bitcoins, even if I imported the private key in another location? I wondered about this, when I planned to import a backup of my online wallet in a pc-client, but still wanted to use my bitcoin in the online account.

Or is only the latest location where I imported my private key able to operate with the bitcoin? (I'm still trying to fully understand the bitcoin universe)


texts: What are the best JavaScript libraries to accept Bitcoin payments?

texts:
I used search engine "accept bitcoin payments" and:

https://bitpay.com/ - top result in my google charges 1% fee and requires some verification
Stripe charges 0.8% - https://stripe.com/bitcoin - capped at $5

I'm actually looking for some home-grown solution as described here - How to accept BTC payments - but I cannot find anything...

And I don't want to apply "false economy" - Stripe checkout process is sleek, they must have optimised it a lot... But yeah, still looking for a drop-in library for accepting BTC payments?


texts: How would Bitcoin usage be affected within a country that severed its Internet connection?

texts: Clearly this system depends upon data exchange.  What happens if national authorities in one or more countries decide there exists a "national emergency", "requiring" the shutdown of the internet in those nations?  How then does this system work?  Will commerce aboard this platform come to a halt, or is there a redundant communications method?


texts:
I was playing around with my Bitcoin Node, to try and understand how does Bitcoin Transactions work.

For this purpose, I used the sendtoaddress API call for bitcoin-cli, to send some XBT to my own Bitcoin Blockchain.Info wallet. The transaction was processed, and I was trying to understand the information that I get from gettransaction bitcoin-cli command, and the information that the Blockchain.info website shows about the transaction.

So, here is what I did:

I've generated a receiving address for myself in Blockchain.Info (17tzZwAi722L7V8V27bUGEKwJpRYVNRKVW)
In my Bitcoin node, I used the following command: bitcoin-cli sendtoaddress 17tzZwAi722L7V8V27bUGEKwJpRYVNRKVW 0.001

This gave me back a transaction id: 4f299e7313af7e4e091ea519bbf5983526d18fe4765b679ce1827bd9f75dbaff

I then checked the information that the bitcoin node gives about that transaction with: bitcoin-cli gettransaction 4f299e7313af7e4e091ea519bbf5983526d18fe4765b679ce1827bd9f75dbaff

What I noticed here is that the bitcoin-cli command gave me back the address I sent the money to, the fee it took to get the address, but it didn't tell me from which address the transaction was sent from.

Then I checked the information that Blockchain.info provides about the transaction: https://blockchain.info/tx/4f299e7313af7e4e091ea519bbf5983526d18fe4765b679ce1827bd9f75dbaff

Here, it can be clearly seen that an amount of 0.06611392 BTC was sent from 12bFMAPz7dhKmLxsoipfUqmCCjqENCDzKb XBT address, to two different outputs. One of the output is the address, Blockchain.Info gave me to receive the Bitcoin. The other output is an address unknown to me.

So I started thinking:
Am I correct, that when sending a bitcoin transaction, all of the amount from a specific address gets placed in the input, a part of it(the part which I specify) gets sent to the address I wish to send, and the rest gets transfered to a newly created address on the same wallet, from which the send operation was initiated?

Some other questions which arise to me:
How is Blockchain.Info able to retrieve information from any kind of Bitcoin Transaction, while I, using a full Bitcoin Node, can only find transactions which was either initiated by the node, or which has a receiving address which is in the nodes wallet?


texts:
I need 2 commands for electrum

To create X amount of addresses
to export those addresses to word or just be able to copy them


texts:
MyBitcoin used to be an online Bitcoin shared eWallet. It was the go-to place for easily handling bitcoins. The site eventually shut down with a major loss of coins, widely suspected to be perpetrated by the service operator.

Its time of closing down is well known (July 2011) but I could not find a reference for when it was opened.

(Potentially relevant reading: What is the story behind MyBitcoin?, How much Bitcoin was lost in the Jul. 2011 MyBitcoin site shutdown incident?)


texts:
In the Electrum wallet for pc, it is possible to modify a wallet from normal password to 2fA (two factor authentication ) without creating a new wallet?

Also, the fee for the 2fA it's billed only when sending funds from the 2fA wallet to outside, and not when we receive, right?


texts: Why are redeeming inputs themselves scripts?

texts:
When redeeming a UTXO it is necessary to provide certain values such as a public key and a signature. These values come in the form of a script.

First, the value providing scriptSig script runs. Whatever is left on the stack is fed into the script from the UTXO (scriptPubKey). So what actually runs is pieced together from the UTXO and the redeeming script.

Why is scriptSig a script and not simply a list of serialized values? Is there a use case for providing a script that is more than just a series of OP_PUSHDATA?


texts: How long does it take to recieve bit coins?

texts: I sent bitcoin almost 30 mins ago and still haven't received them yet how long does it take


texts: What's up with the block size of block# 295182?

texts:
I found an anomaly in the block size data: block 295182. This one seems to have a way higher payload. What happened there?

Or is this there something wrong with my parsing? This file block does appear to be at the end of a .dat file.
Here's the code I used:
import struct
import matplotlib.pyplot as plt

blockchain_path = 'mypath/blocks'

def get_block_path(index):
    file = 'blk' + str(index).zfill(5) + '.dat'
    return blockchain_path + '/' + file

def plot(x, y, title, xlabel, ylabel):
    plt.scatter(x, y)
    plt.suptitle(title, fontsize=20)
    plt.xlabel(xlabel)
    plt.ylabel(ylabel)
    plt.show()

def uint4(stream):
    return struct.unpack('I', stream.read(4))[0]

def blocks_remaining(f, i):
    cur = f.tell()
    try:
        uint4(f)
        f.seek(cur)
        return True
    except:
        print("End of file: blk" + str(i).zfill(5) + '.dat')
        return False

BlockHeight, BlockSize = ([] for i in range(2))
cur_block_height = -1

for i in range(0, 100):
    block_path = get_block_path(i)
    #stay with single file
    f = open(block_path, 'rb', buffering=16 * 1024 * 1024)

  #loop blocks in file
    while blocks_remaining(f, i):
        cur_block_height += 1
        magic_num = uint4(f)
        block_size = uint4(f)

        print(cur_block_height, f.tell(), magic_num, block_size)

        #append data
        BlockHeight.append(cur_block_height)
        BlockSize.append(block_size)

        #skip to next block
        f.read(block_size)

plot(BlockHeight, BlockSize, 'Block Size', 'block height', 'bytes')


texts: How to set exact bitcoins to receive in blockchain api?

texts: Is there a way that I can set up the exact amount the user should pay? When the user input is higher/lower on the amount that I have provided the transaction should fail. I'm using the "receive payment Blockchain API v2".


texts: Sending a Bitcoin (BTC) to a Bitcoin Cash (BCH, aka BCC) address in Kraken exch. without receiving the private key?

texts: Why cant Kraken simply receive full access to Alice account which she is willing to give. Kraken does not have to give Alice the private key. Kraken can create a wallet if that is really necessary or use a wallet that is already created which they have full access too, send the bitcoin to the wallet and then send it from the wallet to Alice BTC deposit account, give the Admin of Alice's Kraken account back to Alice's, therefore, No private key was given to Alice, security is still fully secure, Alice has the Bitcoin in her BTC account now. Alice pays Kraken for there services. Kraken is happy, Alice is happy. Why is this plan difficult?


texts: How do miners handle transactions when a different miner creates a new block?

texts: If all transactions are broadcast to all nodes, and all nodes are mining these transactions into blocks.  When a block is created and the block is broadcast to all nodes, it may contain transactions that other nodes are currently trying to put into their blocks.....what happens in this scenario?


texts: Which blocks get to be checkpoints, and why is one block chosen to be a checkpoint, rather than another block? And where can I find a list of checkpoint blocks?


texts: Can I use a single Hardware Ledger for multiple coins

texts: I am about to buy a hardware ledger to store my coins but I was wondering if I would be needing one ledger per coin I own or if one can hold all or some.


texts: 0/unconfirmed and now no transactions anymore

texts:
So recently (2days ago) I made this transaction:

Status: 0/unconfirmed, in memory pool
Date: 20.12.2017 23:30
To: N**** 1LecRzTpKXh9kCgqXbUXtdXfQjE145BR87
Debit: -0.00447735 BTC
Transaction fee: -0.00003840 BTC
Net amount: -0.00451575 BTC
Transaction ID: 850a72da35784c22c7fe1e39ac51cdc639923b26ab8bf7322f3cb7af4ffed263
Transaction total size: 191 bytes
Output index: 0

As you can see, the Bitcoins weren't sent and according to the Transaction ID the transaction wasn't done, as you can see here:
https://live.blockcypher.com/btc/tx/850a72da35784c22c7fe1e39ac51cdc639923b26ab8bf7322f3cb7af4ffed263/

So now I started to look around in different posts to get my coins back.
I found a post with the same problem... it told me to start Bitcoin Core like this:

E:\Programme\Bitcoin\bitcoin-qt.exe -zapwallettxes

but now i dont see my transactions anymore and i have 0 BTC in my balance.

I have no clue what to do now and how I can get my BTCs again.


texts: Is it possible to generate bitcoins with a Google Chrome extension?

texts:
I just came across Rlweb's Bitcoin Generator, a Chrome extension that claims to be the "first google chrome extension creating Bitcoins".

This extension looks quite shady to me, they don't even have a link to their website. Is it a scam?

Would it at least in theory be possible to write a miner application as a browser extension?
With GPU support?

Edit: For completeness, I found another Chrome extension named Bitcoin Miner.
This one looks more legit, but it says it's a Flash game. It doesn't really generate bitcoins, or does it?


texts: How can I integrate Bitcoin payments into my website created in C#?

texts: I am new to Bitcoin. How can I integrate Bitcoin payments into my website which is designed using ASP.Net?


texts: Why would sending a raw transaction from a different node fail?


texts: Why are there so many opcodes in Bitcoin Script, but they are not usable

texts: In my understanding, miners wont accept non standard scripts. Then why are there several opcodes which cannot be used in custom scripts because they are nonstandard?


texts: What is time warp attack and how does it work in general?

texts:
I am trying to understand the recent time warp attack on verge but since the attack is universal across all POW block chain i figure I could also ask here since people here are .. more knowledgeable.

I don't understand the detail of code.

But i assume something like, in bitcoin, there is a difficulty parameter that is decided for every 2016 blocks. Perhaps a integer. Such that all 2016 blocks mined during that that period all needs to have a hash that is less than that integer.

This difficulty is recalculated whenever 2016 blocks are mined. Everybody goes over this entire 2016 blocks, and take the earliest time stamp, take the latest timestamp, calculate how long it took to mine those blocks, and decide on a new difficulty integer for the next 2016 blocks.

But how does time warp works? I read something along, miners starts submitting blocks with large drifting timestamps (i think it is 2hrs for bitcoin?), but 2 hours is relatively small compare to the average time it is going to mine 2016 blocks (300+hrs). How would add or subtract 2 hours in the blocks cause mining to difficulty to decrease dramatically?

For a miner to drastically decrease difficulty, wouldn't he need:

Majority hash power so he can construct all 2016 blocks.
Change all timestamp in this 2016 blocks in a way such that it causes
dramatically decreased difficulty
profit... (but by that time people probably abandoned the chain anyway)

But once we get to point #1 we are.. kind of in trouble already, it's
just that having time warp made it worse???

Thanks!


texts:
I see some BTC to BTC trades on Ripple.
Are these just transfers from one exchange to another?
Or, is Ripple being used as a mixer?


texts:
I'm compiling on mac, and I get this error:

unsigned char *SHA256(const unsigned char *d, size_t n,unsigned char *md) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;

Why does this happen, and how do I fix it?


texts: Is there a way to identify number of wallets opened by an exchange

texts:
This is precursor to a data science question.
Essentially, I am trying to map bitcoin's price to the number of wallets opened today on an exchange.
It's quite common that the users would put in a buy request tomorrow, so a time series can be applied.


texts: Is there a reason big Bitcoin companies wouldn't use only SegWit transactions?

texts:
As I understand, SegWit allows anyone to create a SegWit address where they can send their bitcoins and transact from that wallet just as easily as they would with a traditional address. The SegWit inputs, however, would have a lower "weight", therefore they would appear smaller to the miners and thus would need lower fees to be included in a block. This would be despite the transaction itself being a bit bigger byte-wise due to the extra data required for the Witness part of the transaction.

So given all of that, is there any reason big Bitcoin companies that create a lot of transactions on daily basis wouldn't switch to SegWit addresses for the majority of their operations? It looks to me that if they would move their hot wallets onto SegWit addresses they could potentially cut down their transaction fees by a noticeable margin.

Is there any reason this isn't a standard way of doing things yet?


texts: Does block validation get more difficult as the blockchain grows?

texts: I just downloaded Bitcoin 0.5 and started downloading the blockchain from scratch. The process was rather fast early on but slowed down noticeably later. That could of course be related to network conditions (or I could be mistaken altogether), but it got me thinking if the cost of block validation (which apparently is the driving factor in determining how long importing new blocks takes) somehow depends on the length of the chain before it?


texts: bitcoind: cannot obtain a lock on wallet directory

texts:
Hello fellow bitcoiners,

I have a very annoying and mysterious issue with a bitcoind install. I had a blockchain corruption/stuck at some point. I deleted the old blockchain and copied an up-to-date blockchain from another machine. And now bitcoind does not succeed to run. When launched it complains about: "Cannot obtain a lock on wallet directory". I have deleted the .lock file, bitcoind obviously not running. After relaunch, the file gets created again. ps -aux | grep bitcoin returns no running process. bitoind starts (as a systemd service, which wasn't modified and run perfectly before, not in question). After the blockchain copy I chown the blockchain directory to the correct user on the target machine. I have enven  tried chown 777 giving all possible rights on the blockchain directory. Still have the lock issue.

Here is the debug log:

2019-12-22T21:26:19Z Using data directory /usr/local/bitc/blockchain
2019-12-22T21:26:19Z Config file: /usr/local/bitc/blockchain/bitcoin.conf
2019-12-22T21:26:19Z Using at most 125 automatic connections (1024 file descriptors available)
2019-12-22T21:26:19Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2019-12-22T21:26:19Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2019-12-22T21:26:19Z Using 4 threads for script verification
2019-12-22T21:26:19Z scheduler thread start
2019-12-22T21:26:20Z HTTP: creating work queue of depth 16
2019-12-22T21:26:20Z No rpcpassword set - using random cookie authentication.
2019-12-22T21:26:20Z Generated RPC authentication cookie /usr/local/bitc/blockchain/.cookie
2019-12-22T21:26:20Z HTTP: starting 4 worker threads
2019-12-22T21:26:20Z Using wallet directory /usr/local/bitc/blockchain
2019-12-22T21:26:20Z init message: Verifying wallet(s)...
2019-12-22T21:26:20Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2019-12-22T21:26:20Z Using wallet /usr/local/bitc/blockchain
2019-12-22T21:26:20Z ERROR: Error while attempting to lock directory /usr/local/bitc/blockchain: Permission denied
2019-12-22T21:26:20Z Cannot obtain a lock on wallet directory /usr/local/bitc/blockchain. Another instance of bitcoin may be using it.
2019-12-22T21:26:20Z Error: Error initializing wallet database environment "/usr/local/bitc/blockchain"!
2019-12-22T21:26:20Z Shutdown: In progress...
2019-12-22T21:26:20Z scheduler thread interrupt
2019-12-22T21:26:20Z Shutdown: done

Does anyone has a clue?

Best regards, cr!ptal.


texts: How much time does it take for the bitcoin-qt window to show up in OS X 10.4?

texts: I have downloaded Bitcoin-Qt for Mac yesterday. I understand that it takes a while to "synchronise" but this site says one can access it whilst this process takes place. I have the Bitcoin in my applications folder but when I click on the icon nothing happens. A friend says he could monitor the progress of the synch, I can't see anything. What am I doing wrong?


texts: How to transfer hash power from one pool to another

texts: Is it possible to transfer hash power from one pool to another? If yes, how?


texts: Is anyone using the blockchain (or other core Bitcome technology) for device registration?

texts:
I've been reading about several alternate uses for the underlying technology behind Bitcoin:

Proof of Existence (digital notary)
Namecoin (for DNS as well as identity and messaging)

I was wondering if there is any project or team working on a system for registering devices that are marketed broadly (like cellphones) with decentralized set of identity servers. Once it is registered with one server it cannot be registered with any other server, and if it is identified someone else they can look up which server and which identity manages the device. Also, if the valid user transfers the identity of the device to a new server, then everyone can be certain of the new host.


texts: Raw SegWit TX look solid and verifies, but is rejected. Need help figuring out why

texts:
Consider the following transaction expressed as hex:

  010000000001019F92908527985B1ED14E7F6127684808523750076AB82A03A6A5A50107AC40190000000000FFFFFFFF02446C1E0000000000160014ABFA07FB45DE4B7187360F0B5E4014991666ACCB40420F0000000000160014DFFE4A0C857A04597E0DCB446DB284DD0C068E8602473044022051F99A39749B925E32BF1ED0573ED4CCFC6965F92CD0F016F644C8CF17CA57E102202FCC06C7C26A7E5F71A2DF3353BDE494561E4A6394955DE9C825D08DB573BB1D0121024B2512FFD4AA888E0E0D358083770A4A45093952EE68F3753651932849F008EC00000000

If I paste it into online transaction decoders/validators like the ones here and here, everything looks solid.

But submitting them to any public pushTX API generates an error. The problem is that the error messages are so vague (e.g. "invalid transaction") I'm not even sure where to look.

BlockCypher gives the following error:

  "Error running script for input 0 referencing
  1940ac0701a5a5a6032ab86a0750375208486827617f4ed11e5b98278590929f at 0:
  Script was NOT verified successfully."

I've researched this particular error and people occasionally encounter it when a signature is bad. But I've checked the signature countless times. It's valid. In fact, pasting the transaction here actually shows a little checkmark next to the "signed" icon indicating a proper signature.

Further, the decoders all show the correct inputs, outputs, amounts, etc. So the serialized data doesn't appear to be corrupt or otherwise unreadable.

What could I possibly be doing wrong? I've spent the entire day researching it but can't come up with anything.


texts: Wallet says “unsynchronised”, is that stopping me from seeing my bitcoins that I just received?

texts:
I don't see the bitcoins I was supposed to receive today at 3PM and I tried to close the application to refresh it but it still hasn't arrived. I used GoldUX so that he could send my webmoney to my bitcoin wallet. I gave him the address that took it from my bitcoin application on my windows first.

So right now I'm seeing a wallet (unsynchronized) is this the reason why I cant see the money I was supposed to have received???


texts:
I got a transaction that is still not confirmed for about one week, and I can see a field called "Lock Time" that says:

Lock Time Block: 419382
https://blockchain.info/en/tx/ea445ae61c2906d43f8f8d73cfef2caefe3d63ae504da31a6a829cc35527faf6

What does that mean and how long do I have to wait until my transaction gets confirmed?


texts: what is forking attack? and different between forking attack and selfish mining?

texts:
I am a student who studies block-chain for these days.

I have a question about forking attack and selfish mining in mining strategies

as you see picture below

I don't understand why miner should send some money to a victim to do forking attack...

what does this means to do forking attack?

is it possible to do forking attack except sending some money to a victim?

and as below picture about selfish mining

what is difference between forking attack and selfish mining if miners exclude

to do send some money to a victim in forking attack?

can anyone help me to understand what M->B and M->M'(double spending) means??

and why do need it to do forking attack??


texts: Why did repeated "R" values occur in Bitcoin transactions before?

texts:
Please explain why earlier the repeated values of "R" occurred in Bitcoin transactions.

For example, this transaction has a repetition of the value "R":
https://www.blockchain.com/btc/tx/19d66411a5aa716a04b37197c11c93c9446a54694a2d2302093d8b0a93ed5d83

If you look at RawTX:
https://btc.com/19d66411a5aa716a04b37197c11c93c9446a54694a2d2302093d8b0a93ed5d83.rawhex

repeat value "R":

R = cabc3692f1f7ba75a8572dc5d270b35bcc00650534f6e5ecd6338e55355454d5

What was the reason for this? Explain the reason for this error?


texts: Associating a bitcoin address with a user in a shared wallet

texts:
How can I associate a transaction with a unique user in a shared online wallet? It makes no sense to have one wallet account per user in the shared wallet as it would degrade performance (say I have 1M users).

Thus, I need to have bitcoind running in parallel with a database that hosts all the users and when a transaction comes in update the balance of the particular user.

My question is: how do I identify with which user this transaction is associated?


texts: Do checkpoints in the block chain help to avoid a 51% attack that rewrites the entire blockchain?

texts:
I have read sometimes in the web, that in the blockchain are checkpoints, so that an 51% could not the blockchain before that checkpoint even with over 51%. Is this true?

In this answer this is missing completely:
Can an attacker with 51% of hash power change old blocks?

For this question i would assume that the 51% attacker would change the client he uses any way that would help to do this attack

Cheers!


texts: Is it possible to determine the index of a bip32 address?

texts: Let's assume that we only have the bip32 derived btc address, no private or public key. Is it possible to find out its index used for the bip32 generation?


texts: How is Bitcoin itself represented (either technically or code level)

texts:
I've gone through dozens of videos and texts, but haven't found properly how is the actual bitcoin itself represented technically or at code level?

From what I have understood thus-so-far (if correct), is that a single bitcoin itself is NOT represented by any class/object at code level (or technically NOT represented by a unique ID like fiat money has printed on it), but rather bitcoin is ONLY a figure that's stored in a distributed ledger (blockchain).  And that the creation of a 'new' bitcoin is out of thin air as a reward for verifying transactions together with proof-of-work (i.e. solving a math problem in order to delay the broadcast of verification of transactions) for security purposes (and thus NOT as some put it to discover new bitcoins - as no bitcoin has a permanent unique ID to be discovered).

Is there a bitcoin expert or bitcoin developer that could verify (and possibly add more info) if my understanding is correct, and if not, to please explain how bitcoin itself is represented either technically or at code level (and it will help me understand more clearly if you could also explain the technically process of the creation - or the so-called discovery) of 'new' bitcoins in a way that's related to this question)?

Thanks.


texts: Reindexing after initial download of bitcoin core

texts:
I recently downloaded bitcoin core. Took about 1+ week to download 80%. One day I checked, it got an error message. When I closed and reopened the bitcoin core, it started reindexing. Any idea how long this will take? Turned it off after a day of "calculating indexing time". Was trying to mine low to no fee transactions as I start getting into bitcoin.

2017-10-18 05:36:19 receive version message: /Satoshi:0.15.0.1/: version 70015, blocks=490420, us=71.202.75.20:62505, peer=1908
2017-10-18 05:37:32 Pre-allocating up to position 0x6000000 in blk00622.dat
2017-10-18 05:37:45 receive version message: /Satoshi:0.13.1/: version 70014, blocks=490420, us=71.202.75.20:62519, peer=1909
2017-10-18 05:39:29 Pre-allocating up to position 0x7000000 in blk00622.dat
2017-10-18 05:40:07 socket send error An existing connection was forcibly closed by the remote host.  (10054)
2017-10-18 05:40:37 receive version message: /Satoshi:0.14.2/: version 70015, blocks=490420, us=71.202.75.20:62551, peer=1910
2017-10-18 05:41:03 Pre-allocating up to position 0x8000000 in blk00622.dat
2017-10-18 05:41:44 ProcessMessages(version, 113 bytes) FAILED peer=1911


texts: Ardor Lightweight Contracts: (Almost) trustless way with new Phased Transaction type?

texts:
I asked that question on Bitcointalk, but got no response so far. As Lior has proposed to make Stackexchange the main medium of exchange about Ardor I'm asking here.

As I read in the FAQ, the main drawback of Lightweight Contracts is that they are not totally trustless, because you cannot guarantee the "contract owner" really runs the contract.

So for example, if the contract is an "exchange contract" that should give you some token for ARDR (e.g. this IGNIS/ARDR exchange), then if the contract owner doesn't run the contract, you won't get the tokens (and the contract owner could steal your ARDR).

You can run the contract yourself, but AFAIK you can't achieve that the "contract owner" signs the exchange transaction without himself running it - you can only validate that the contract does what he should do according to the source code. (Correct me if I'm wrong here.)

But perhaps you could do the following:

You first run the contract yourself and calculate the "expected transaction" that should result from it, based on the input from your planned transaction (in this case, the transaction that rewards you with tokens from your ARDR).
You now issue a phased transaction ("conditional transaction") with the condition of the "expected transaction" - in the exchange case, that you receive the calculated token amount from the contract account.
If the contract doesn't run or doesn't give you the expected token amount, the transaction expires at some block in the future.

This way, the contract owner can only spend the resulting coins when the contract owner runs the contract. So you are safe from "selective scammers" that run contracts once and then never again.

The contract owner is also safe: The contract should be possible to be constructed in a way to check first that it really is able to produce the desired transaction. If not, then he simply doesn't issue the "expected transaction". So nothing happens (only that we have an useless phased transaction recorded on the blockchain, but I think that is a minor issue, and it creates the incentive to only trigger the contract with possible conditions).

Is this scenario possible? I haven't read it in the discussions about Lightweight contracts. If not, I think it would be a nice addition, as then Lighweight Contracts would be as trustless (or almost as trustless) as Ethereum Smart Contracts (or even more, as Ethereum contracts can run out of gas).

AFAIK it would need a new type of Phased Transaction - one similar to the one requiring a linked transaction, but with the ability to not  require the complete transaction hash (which is impossible to calculate in this situation) but the "unsigned" transaction or the amount of a token/coin to receive.

Cheers, d5000


texts: How to get info for public address from bitcoin-cli + local db? (Can it be done without creating a wallet?)

texts:
I just started running my own full node.  IBD is finished, and I'm now learning how to use bitcoin-cli.
First I would like to extract all the available information for one or more public addresses from the downloaded blockchain.
For the most part 1, I have not been able to find a way to do this that does not require creating a wallet.
For example, if I run
% bitcoin-cli getaddressinfo 1XPTgDRhN8RFnzniWCddobD9iKZatrvH4

...I get an error message that says
error code: -18
error message:
No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A \
default wallet is no longer automatically created)

(BTW, I get the same error as long as I provide one argument after getaddressinfo, irrespective of its value.)
It seems to me that it should not be that difficult to dump all the information that the local blockchain currently has for a given address, without the need for a wallet.
Can this be done with bitcoin-cli?
If not, is there some other way to do it (without creating a wallet)?

1The only partial exception to this statement is that, if I have a transaction ID, I can use bitcoin-cli gettxout repeatedly, and look for the desired address(es) in the output.  This is not only absurdly laborious, but it requires having a specific transaction ID.


texts: What the maximum number of txout in a transaction?

texts:
I know the maximum transaction size is 500Kb.

I also know there is a maximum for sigop in a transaction (20,000?).

What I'm interested in is what is the maximum number of txouts you could include in a single transaction.


texts: Do web wallets keep customer accounts isolated?

texts:
Say there's an online wallet or exchange or some site, and they give me an address to send my bitcoins to.

I get the public address but not the private address because technically those bitcoins are now "theirs" - and i'll use them to exchange for other crypto currencies at some time.

But the public address is listed on sites like blockchain.info and I can see all of my transactions to that wallet.

Is it normal to see transactions going out of that wallet, even if I haven't spent those bitcoins with the service? Is my wallet isolated to transactions I might conduct?

Or do they use a normal bitcoin server, so whenever anyone withdraws, it uses whichever bitcoin transactions are available in this company's entire collection based on their bitcoin servers algorithms using all the accounts listed?

In theory, it shouldn't matter, so long as the total amount in everyone's accounts is equal to the total amount in all of the private keys they maintain. But do any of the services keep them isolated as sort of a check to make sure that a customer's coins are still there and it's not some type of ponzi scheme?


texts: How do I convert Bitcoin to cash at my bank via Mt. Gox?

texts: If I use Mt.Gox to do this, what are the specific steps I need to take?


texts: I got sent funds but I do not have enough space on my computer to update bitcoin core and therefore the funds will not come is there anyway to cancel the transaction.  The website I got the funds from said they cannot cancel so can I cancel.


texts: How does nix-bitcoin provide greater security for installing Bitcoin nodes?

texts:
nix-bitcoin claims on its GitHub repo to facilitate the installing of Bitcoin nodes and higher layer protocols (e.g. Lightning) with increased security? How does it do this?
[edit: as RedGrittyBrick points out below this project is a work in progress as of time of writing (August 2020)]


texts: How can my private key be revealed if I use the same nonce while generating the signature?

texts:
I know it is well understood that it is not a good practice to use the same nonce while generating the signatures, but I am not getting the math right.

Assume I have some UTXOs that are controlled by my private key Q. Say I have spent two of the UTXOs using nonce 'N' to generate my signature. Now the (R,S) components of the signature are public and the transactions are public so everyone has access to them.

S1 = N^(-1)*[hash(m1) + Q*R] mod p

S2 = N^(-1)*[hash(m2) + Q*R] mod p

S1 - S2 = N^(-1)*[hash(m1) - hash(m2)] mod p

Even though we know S1, S2, m1 and m2, isn't solving for N^(-1), and hence N, becomes equivalent to finding the solution to the discrete logarithm?


texts: Flatpak bitcoin-core not generating .cookie file

texts:
I'm using the version of Bitcoin-Qt 0.18.1 that comes with Flatpak. I've looked in the Bitcoin datadir, which is in ~/.var/app/org.bitcoincore.bitcoin-qt/data/ and there isn't any .cookie file there. This is preventing me from running Electrum Personal Server.

My Linux distro is MX Linux.

My bitcoin.conf is empty.


texts: There are a lot of messages that are sent around the Bitcoin network - e.g. updating new blocks, spreading new transactions. Do these not flood the network? Is it a pure broadcast to all the connected nodes?


texts: How to revert back several blocks in Bitcoin Core without re-syncing from scratch

texts:
My node was running on a computer that I accidentally unplugged and it died. When trying to restart Core now it is not working, presumably because the computer dying forced Core to exit non-gracefully.

I'm wondering if there's a way for me to "rewind" back to a state before my computer crashed, so I don't have to resync the entire chain from scratch.


texts:
Can a core wallet coinbase-transaction (generation transaction) be moved intact to a net new core wallet?

Wanting to go through cautious steps to claim BCH but, I hear a BTC coinbase-transaction when still 'whole' can be worth more when sold 'whole' than the sum of the BTC in said coinbase-transaction if divided up.

In v0.14.2 bitcoin core wallet, is there a way to move a coinbase-transaction intact/whole to a net new core wallet (so it remains worth more as noted above)? Source wallet does also contain some fractional BTC that can be used for fee.


texts: Which code part in bitcoin-core project generates new bitcoin addresses?

texts:
i am trying to find out which c++ code in https://github.com/bitcoin/bitcoin

is responsible for generating bitcoin address and private key.


texts: Electrum Seed Purpose for MultiSig Wallet

texts:
I'm curious as to what exactly is protected by the seed that Electrum generates for a multisig wallet. My knowledge of the protocol implementation is rather basic, so please correct me where I'm wrong or incomplete.

As I understand it after reading Bitcoin multisig the hard way: Understanding raw P2SH multisig transactions, a P2SH multisig doesn't have its own private key; it has a redeem script that's reproducable by anybody who knows the public keys involved, their order in the script, and how many of them are required to spend the encumbered coins. (Based on this answer, it seems like Electrum follows BIP45 to allow deterministic ordering of keys, so knowing their order wouldn't be important.)

The P2SH multisig is then a hashed version of the redeem script which, apart from providing brevity, hides the public keys & the number required to be spent that are involved in the redeem script. After address generation, so long as each signer keeps track of her private key, is there any extra private information to safeguard?

An obfuscating element to P2SHs in Electrum, specifically, is the use of "master public keys" as inputs rather than plain public keys. How does electrum decide which generated public keys to use as the inputs to the redeem script? Is this what's protected by the seed?

Points of confusion:

What is protected by the Electrum seed for a multisig address?
If it's the redeem script—whose secrecy protects the public keys involved with the P2SH address—shouldn't it be possible to regenerate when it's time to spend the funds, and spare the user the burden of guarding another seed?
How does Electrum generate a redeem script from master public keys?


texts: Security risks with running bitcoin core, and how to protect yourself

texts:
I'm new to bitcoin and want to help the network by running a full node. I plan to download bitcoin core from the bitcoin.org website, and run it on a spare laptop, by my concern is how do I protect my machine from attack? As I understand it, my IP address will be visible to see. Do I install specific security software or are there other practical steps for me to take?
I would appreciate it if answers can be made in simple, and if possible not overtly technical terms as I'm new to all of this.
Many thanks.


texts: In what sense does the security model of proof-of-stake require users to "log on to the internet every few months"

texts:
This is primarily a question about something I heard Vitalik Buterin say in an interview the other day. (Unchained podcast's January 9, 2018 episode, at 34 minutes, 15 seconds) I quote:

  As far as the cons [of proof-of-stake], I would say the main one is that it is a different security model. It’s a different security model that basically says that, in order to securely authenticate the blockchain, you have to log on to the internet at least once every few months. And if you don’t do that, then in order to bootstrap yourself to the chain again you basically have to trust some group of people who have. And I think that in reality this is a totally fine security model because people basically already trust this security model for software updates.

I don't understand this quote. The way I understand it is that, regardless of proof-of-work (PoW) or proof-of-stake (PoS), a person has two choices: Run a full node, or run a "lite" node where you trust a third party node.

If you run a full node, you have to download all of the chain before you can create new transactions. If you run a lite node then your balance and transactions are dependent on the third party, but you don't have to wait to download the chain. It seems to be that way both for clients of both PoW and PoS blockchains. So I don't see how the consensus algorithm is relevant. The only explanation is that I'm completely misunderstanding the quote, so I'm hoping that someone can shed some light on my misunderstanding.

Note: This question is not asking if PoW is better or worse than PoS. I just want to understand the quote. Thank you.


texts:
Since every Bitcoin wallet can link multiple public keys / Bitcoin addresses to a single person, is there a mechanism in Bitcoin network to avoid 2 persons having the same Bitcoin address? Or it is achieved only by the space of possible keys/addresses (2^256 | 2^160)?

Thanks!


texts: Why does my bitcoin "to US dollar" worth change when the stock market is closed?

texts: My bitcoin wallet "US dollar" amount is changing. It's Saturday the market is closed. How is this happening?


texts: Key exported from BitcoinJ is different from the key shown by bitcoind

texts:
I am quite new to Bitcoin. I am trying to use Bitcoinj with regtest mode.
I have created the following application:

public class TestBitcoinj {
    private final static BigInteger ONE = new BigInteger("12345");
    private final static BigInteger TWO = new BigInteger("67890");

    public static void main(String ... args) throws Exception {
        final ECKey from = new ECKey(ONE);
        final ECKey to = new ECKey(TWO);
        System.out.format("from: %s, to: %s\n", from.toAddress(RegTestParams.get()), to.toAddress(RegTestParams.get()));

        final WalletAppKit kit = new WalletAppKit(RegTestParams.get(), new File("/tmp/bitcoinj"), "mirko_btc") {
            protected void onSetupCompleted() {
                System.out.println("Key chain size: " + wallet().getKeychainSize());
                if (wallet().getKeys().isEmpty()) {
                    wallet().addKey(from);
                }
            }
        };

        kit.setAutoSave(true);
        kit.connectToLocalHost();
        System.out.println("State: " + kit.startAndWait());

        System.out.println("Address: " + kit.wallet().getKeys().get(0).toAddress(RegTestParams.get()));
        System.out.println("Private key: " + kit.wallet().getKeys().get(0).getPrivateKeyEncoded(RegTestParams.get()));
        System.out.println("Balance: " + kit.wallet().getWatchedBalance());
        System.out.println("Done");
        System.out.println("State: " + kit.stopAndWait());

    }
}

I have started bitcoind with the following:

bitcoind -regtest

I have generated some blocks just to have some money:

bitcoin-cli -regtest setgenerate true 101

Then I have run my program just to have the private key, which is:

Chiave privata: cNQM8FUZ9tJeNKNNJPiwHZpWkREqzzk5JhioYJWZaszHa5vgsLct

Now I import that private key in bitcoind using the following:

bitcoin-cli -regtest importprivkey cNQM8FUZ9tJeNKNNJPiwHZpWkREqzzk5JhioYJWZaszHa5vgsLct mirko4

Finally, I have noticed that my program dumps the following:

Indirizzo: mrtwCcpmvRYU5wBDaUP8LiaW85nGEkbauM

whereas if I run the following:

bitcoin-cli -regtest getaccountaddress mirko4

I get the following address:

mrXizN9m9cyKgvBKqCVzTvMAWJoVgnBBev

That address is far different from the one I have dumped using Bitcoinj. However, the private key should be the same.

Probably I am missing something, but I can not figure out what.

Thank you very much for your support.


texts: How do you mathematically add and subtract hash power?

texts: My question was how do you mathematically add and subtract hash power. I recently purchased four Antminer D3s.They all run at the average rate of 19-20 MH/s but when I go to my stats in the pool that I joined I see 32.2 GH/s. Please Help!!!


texts: bitcoind cannot keep up with the blockchain

texts:
My Bitcoin full node worked in the past, but some time ago, it stopped synchronizing properly. The blockcount increases but stays far behind the blockchain:

% bitcoin-cli getblockcount
457842

(The chain is at 493006 at the same time)

bitcoin-cli getpeerinfo shows that I have only two peers (I kept old results and, when it worked, it was several dozens of peers). Network seems OK on this machine, I can find no connectivity problem (tested with RIPE Atlas probes).

Log shows:

2017-11-04 06:58:01 UpdateTip: new best=000000000000000001605913d6d8dcf9ba337d613fc78a269f6c1ac0bc1a3e1e height=457868 version=0x20000002 log2_work=86.145812 tx=205962119 date='2017-03-18 20:33:31' progress=0.767130 cache=553.1MiB(4251353txo)
2017-11-04 06:58:58 UpdateTip: new best=000000000000000001be0ed9edf7d9bce998acf5019833624b929df320544df7 height=457869 version=0x20000002 log2_work=86.145846 tx=205963787 date='2017-03-18 20:46:52' progress=0.767136 cache=553.5MiB(4254813txo)
2017-11-04 06:59:21 UpdateTip: new best=0000000000000000024e01c470375adb787205320c094dccb5e5177b71381fab height=457870 version=0x20000002 log2_work=86.14588 tx=205965243 date='2017-03-18 20:49:17' progress=0.767141 cache=553.5MiB(4254630txo)
2017-11-04 06:59:32 UpdateTip: new best=0000000000000000017f1f8cc3a3adb4117563f4da24e0e8bf84eefc27689a87 height=457871 version=0x20000000 log2_work=86.145915 tx=205967793 date='2017-03-18 21:02:50' progress=0.767150 cache=553.8MiB(4256794txo)
2017-11-04 06:59:34 UpdateTip: new best=000000000000000000dddeee9c69bc6801414576d3d1f2f386077d72782f15f8 height=457872 version=0x20000000 log2_work=86.145949 tx=205968320 date='2017-03-18 21:07:23' progress=0.767152 cache=553.8MiB(4257262txo)

Version seems to be the latest one:

% bitcoind -version
Bitcoin Core Daemon version v0.15.0.0-g3751912e8e

Running on Ubuntu "xenial" (16.04)


texts: API Call when a transaction is unconfirmed

texts:
Is there a way to get blockchain.info API call to know when the network sees an unconfirmed transaction? I'm also interested in any other method to get this result.

The API works fine on the first confirmation but I need a faster method; I can't use bitcoind.

Here's an example that uses chain.so. (I'd prefer to use blockchain.info for all my queries)

here is an address that has 1 BTC unconfirmed transaction by the time of writing:
12gZ9aUaQbu7Pnguot6aKKjuuzQyY15VAE

the API call is : https://chain.so/api/v2/get_address_received/btc/12gZ9aUaQbu7Pnguot6aKKjuuzQyY15VAE

and the output is :

{
  "status": "success",
  "data": {
    "network": "BTC",
    "address": "12gZ9aUaQbu7Pnguot6aKKjuuzQyY15VAE",
    "confirmed_received_value": "0.00000000",
    "unconfirmed_received_value": "1.00000000"
  }
}

unconfirmed_recieved_value is what I need.


texts: Does a new private key is generated at each transaction?

texts:
So, imagine I bought 1 BTC, so I have my private key generated by my online wallet and also my public key that I can give to people/friends.
My question is, if I spend 0.5 to buy Apples on a website?

How does that work?

1) Only 0.5 BTC is sent to the website, I still have 0.5 BTC on private key A

2) 1 BTC total is sent through the protocol, thus the change is sent back to me.
On which key?
Key A where I had 1 BTC ? Or a new one generated? (Key B)

Thank you :)


texts: Will I be still getting segwit2x coins if I store BTC in my desktop BTC wallet

texts:
I'm with three exchanges, one says they don't support BTG and therefore user should withdraw their BTC before Nov 16th's fork takes place.

Another one says they will issue 1:1 segwit2x.

The last one doesn't seem giving a clear answer.

I have some BTC in these three places. If I withdraw my BTC to my desktop wallet, would I be able to receive segwit2x and BTG when fork take place?


texts: How was the 95% miner adoption threshold determined?

texts:
SegWit does not need to utilized by all (or even most) nodes in order to be used safely, but it must be adopted by almost all miners in order to successfully minimize or virtually eliminate the risk of forks or double spends after SegWit activation.

My understanding is that (non mining) nodes that have not activated SegWit, will still consider SegWit transactions valid (because they see no requirement for a signature). However, if some miners includes SegWit transaction(s) in a block that other (non SegWit) mining node(s) reject double spends or forks could theoretically occur. Is that understanding correct?

With this risk in mind, exactly how was the 95% miner adoption level selected? Are there any available statistical simulations that estimate the chances of double spends or forks at a threshold more or less than 95%?


texts: What are atomic multi path payments (AMPs) and why/how is it being implemented in Lightning Network?

texts: There has been a lot of discussion and articles around how the implementation of AMP is going to benefit the routing capabilities of Lightning Network. What is the exact issue in the current implementation of Lightning that AMP is solving? How does AMP really work? and how is it going to be implemented?


texts: Derive the bech32 address from the transaction 'txinwitness' witness data in Bitcoin Core 0.16

texts:
I'm trying to extract the bech32 address associated to an input or output using the txinwitness field included in every pure SegWit transaction.

An example with transaction 0x6b6167a3d35efb043639837bbac853903d2c800ba1e324be0fffb2858e251da0 would return this output:

$ bitcoin-cli decoderawtransaction "$TX_DATA"
[...]
  "vin": [
    {
      "txid": "22b3f827d5574045f4b9b1dea448d66d92b2f334741687b8a3d778672530cfea",
      "vout": 1,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "30450221008695b35cee8bd73fe870868b9f281ffd6f375b6082369310c910f35d524536fe022050c7c8442823af465acec6034283adb13b9481d57741a2be668d59322ea50b3701",
        "02959a2410df7168279d9c8372bbd7b7e2d27959987dd3fae64b10e9c2d62b2e75"
      ],
      "sequence": 4294967295
    },
[...]

I'm using the API in Bitcoin Core 0.16 but I haven't find any way of querying the Segregated Witness tree with that txinwitness data.  The documentation or Google hits about this are almost non-existent, other than people commenting that sites like e.g. blockchain.info don't use Bitcoin Core and they have other ways of getting that information (because they show the bech32 address in the transaction info page).


texts: Does MultiBit Classic assign a password or is it manually set?

texts:
I have a MultiBit Classic wallet that I have had since 08/2014 and for the life of me I can not remember the password, I honestly don't even remember putting a password on it at the time.
My question is, would MultiBit assign a password automatically once bitcoins have been deposited into it?
I am stuck and I have tried every password that I could think of that I may have used.
Any help greatly appreciated
Cheers


texts: BTC that i received 2 days ago are missing, how come?

texts:
I received 0.8 BTC 2 days ago, transaction was confirmed and i saw the money in my wallet, now i just log in to my wallet and the money dispersed include the confirmation from my transactions history. What that means? PLEASE HELP.

Transaction ID is:1CbZ3neNZxgfXzgswQpWJuHLGxMDQBaSVq


texts: Which clients offer a way to replace unconfirmed transactions?

texts:
On this site, we see a lot of questions from people who have sent a transaction which isn't being confirmed, often because they have neglected to include an adequate fee.  The Satoshi client doesn't appear to offer a convenient way to handle this; the only advice to the user is either to wait indefinitely until the transaction is picked up by an altruistic miner, or to do some kind of elaborate hack involving replacing wallet.dat, etc, so that the client forgets the transaction ever existed.

The obvious solution from the point of view of the protocol is to produce and send a new transaction spending the same coins, but with a fee added.  Since this would technically constitute a double spend, it's perhaps not surprising that client authors don't want to include such a feature; but all the same it would be very convenient in certain situations.

Are there any clients that provide this feature?

Alternatively, has anyone produced a patch adding this functionality to some client?


texts: Is there a way to retrieve my LTC that did not go into my wallet?

texts: Last night I tried to send LTC from my Binance account to my desktop wallet. I found out later that my wallet doesn't accept LTC so the transfer is lost. Is there any way I can retrieve it? I have the transaction ID and Blockcypher ledger with all the inputs consumed and outputs created. Is there any way I can recover my funds using that info? Green Address wallet said they can't help me, and the response from Binance is generic and non helpful. Please help?


texts:
I have two client Bitcoin, 0.17.0 and 0.12.0 and I want to see the difference between the same transaction.
0.17 has segwit, 0.12 doesn't have.
If I do that RPC call in 0.17.0

/bin/bitcoin-cli -datadir=./datadir getrawtransaction 6b6d286189a73d1fde6710cf7d168d0414e12d7a71e156e538e101ddc05f247a true

I can see the transaction in detail.
If I repeat the same call in 0.12 I can see the same result.
I expected that the node (0.12) stripped field like txinwitness
I use the same datadir for each node.

Why I can see this result inside vin

"scriptSig": {
        "asm": "001458f0440b4c57e6f537f519f2e991e7ee1b7bae36",
        "hex": "16001458f0440b4c57e6f537f519f2e991e7ee1b7bae36"
      },

What is 001458f0440b4c57e6f537f519f2e991e7ee1b7bae36?
Another question, how can I find a P2WPKH transaction?

-- Update --

I try to add rpcserialversion=0 in one node, and when I use getrawtransaction I can see the hex without segwit elements.
I can see in wiki

  -rpcserialversion   Sets the serialization of raw transaction or block
  hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default:
  1)

In fact if I use verbose I can see txinwitness.
txinwitness is stripped in node legacy?


texts: Lightning Network wallet applications for different operating systems?

texts:
What are the best / most secure wallet applications of Lightning Network for each of following operating systems/platforms ?

Windows
Mac OS
android
iOS
web browser extensions


texts: How can Bitcoin Cash be blocks ahead of Bitcoin SV

texts: After the Bitcoin Cash & Bitcoin SV fork, Bitcoin Cash is happy to be "ahead" of Bitcoin SV, but how is this possible? aren't blocks supposed to be mined constantly every 10 min?


texts: Can bitcoin transaction data be used to study markets?

texts: The nice thing about bitcoin is that it generates partially anonymous data about every single transaction. Can this data be used to gain insight about real-world markets? Or are there some fundamental differences that cannot be accounted for? If this data can be used, does anybody have any references on academic papers that use the bitcoin data?


texts:
I have straggle to compile bitcoin core on mac OS machine. it has an error as the following:
/usr/local/include/QtCore/qglobal.h:667:65: error: expected '>'
         typename = std::enable_if_t<std::is_arithmetic_v<T> && std::is_arithmetic_v<U> &&
                                                                ^
/usr/local/include/QtCore/qglobal.h:667:65: error: expected ',' or '>' in
      template-parameter-list
/usr/local/include/QtCore/qglobal.h:668:66: error: expected unqualified-id
                                     std::is_floating_point_v<T> == std::is_floating_po...
                                                                 ^
/usr/local/include/QtCore/qglobal.h:679:35: error: no type named 'Promoted' in namespace
      'QTypeTraits::detail'
using Promoted = typename detail::Promoted<T, U>::type;
                 ~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/local/include/QtCore/qglobal.h:679:43: error: expected ';' after alias declaration
using Promoted = typename detail::Promoted<T, U>::type;
                                          ^
                                          ;
/usr/local/include/QtCore/qglobal.h:691:31: error: no template named 'Promoted' in namespace
      'QTypeTraits'
constexpr inline QTypeTraits::Promoted<T, U> qMin(const T &a, const U &b)
                 ~~~~~~~~~~~~~^
/usr/local/include/QtCore/qglobal.h:693:28: error: no template named 'Promoted' in namespace
      'QTypeTraits'
    using P = QTypeTraits::Promoted<T, U>;
              ~~~~~~~~~~~~~^
/usr/local/include/QtCore/qglobal.h:694:5: error: unknown type name 'P'
    P _a = a;
    ^
/usr/local/include/QtCore/qglobal.h:695:5: error: unknown type name 'P'
    P _b = b;
    ^
/usr/local/include/QtCore/qglobal.h:699:31: error: no template named 'Promoted' in namespace
      'QTypeTraits'
constexpr inline QTypeTraits::Promoted<T, U> qMax(const T &a, const U &b)
                 ~~~~~~~~~~~~~^
/usr/local/include/QtCore/qglobal.h:701:28: error: no template named 'Promoted' in namespace
      'QTypeTraits'
    using P = QTypeTraits::Promoted<T, U>;
              ~~~~~~~~~~~~~^
/usr/local/include/QtCore/qglobal.h:702:5: error: unknown type name 'P'
    P _a = a;
    ^
/usr/local/include/QtCore/qglobal.h:703:5: error: unknown type name 'P'
    P _b = b;
    ^
/usr/local/include/QtCore/qglobal.h:707:31: error: no template named 'Promoted' in namespace
      'QTypeTraits'
constexpr inline QTypeTraits::Promoted<T, U> qBound(const T &min, const U &val, const T &max)
                 ~~~~~~~~~~~~~^
/usr/local/include/QtCore/qglobal.h:710:31: error: no template named 'Promoted' in namespace
      'QTypeTraits'
constexpr inline QTypeTraits::Promoted<T, U> qBound(const T &min, const T &val, const U &max)
                 ~~~~~~~~~~~~~^
/usr/local/include/QtCore/qglobal.h:713:31: error: no template named 'Promoted' in namespace
      'QTypeTraits'
constexpr inline QTypeTraits::Promoted<T, U> qBound(const U &min, const T &val, const T &max)

Please advise.
i used command brew install qt5