I need help on a 24 hr unconfirmed transaction on blockchain If anyone can please help I transferred $254 worth of bitcoin to my coinbase account and it has been 24 hours now and it still has 0/3 confirmations so my money is just floating out there somewhere. I'm very confused because my first transaction literally took 20 mins and it was for about the same amount. Is everything alright or do I need to worry? I see people saying stuff about raising the miner fee but from what I have seen you can't do that once it has been sent. If everything is ok and I have nothing to worry about then that's great but I'm really starting to worry here. I thought bitcoin transaction were stress free but here I'am freaking out. I can't imagine if it was a big transaction what I would do. Please Help! Has this happened to anyone? Is this normal? How do I avoid this is the future or is this completely normal (because everything I read says 30 mins)? First time poster so please take it easy on me I would appreciate it. Thank You for your time

It's "normal" but it shouldn't be :/ https://blockchain.info/unconfirmed-transactions when this goes pretty high there is a large list of transaction that needs to process and the miners are selecting the transactions that have the largest fee density. If you want you can post your transaction here and I'll give a more detailed explanation for your specific situation. The good way to avoid this is to adjust your miner/transaction fee in consequence of the size of the backlog.


Are any hashes (Tx or block) actually stored in the blockchain? ...or is each client responsible for storing hashes for blocks and transactions in their own database? So when I send a transaction, I indicate the prev_out by its hash, and I just assume everyone on the network will know what that hash means, even though it's not specifically, literally IN the blockchain?

Is blockexplorer.com doing me a favor by listing the hash for this raw Tx? Or is that hash actually sent by the original transaction-sender?
http://blockexplorer.com/rawtx/85dce726e04af12eaaa716d00c753e2b7d6eb83a04c2c20e1b71a63d9512f03a

No. Hashes are computed upon receipt of the Tx message, and stored in a database outside the blockchain by the client/node.

http://www.reddit.com/r/Bitcoin/comments/1sqa1q/techincal_do_transaction_messages_between_nodes/


Why aren't blocks "zipped"? Considering how large the total blockchain is relative to average download speeds, why were the blocks never data compressed before being sent?

Why could this not be implemented on a new alt?

Because the data is already serialized in a pretty compact way and large parts of that data are hashes which are effectively random numbers as far as compressability is concerned. (Random data is not compressable.)

Also when you search for for example a transaction id in an index, it will point you to the exact location in the blockchain. Having to read a whole bunch of data around that area and decompress it before being able to access the transaction that you wanted, adds disk I/O, CPU overhead and memory consumption. That severely limits the dictionary size any compression algorithm could use, and therefore the compression ratio.

Give it a try by zipping the whole blockchain file, but remember that any usable live compression would have a lower ratio than what you would find.


Naming convention: MilliBit or Millibitcoins (mBTC), microbitcoin or Mikrobitcoins (μBTC)? I heard about many use: Bitcents, Bitmills (or Bitmilles)

  1.02 - One bitcoin and two bitcents
  0.001 - One millibitcoin (nickname "one Millie")
  0.000001 - One microbitcoin (nickname "one Mike")
  0.00000001 - The bitcoin base unit (nickname "one Satoshi")

millicoins, microcoins, and nanocoins

Which are the official naming conventions and should Bitcoin be capitalized when you are referring to the unit?

"Official" units of bitcoin

To my knowledge, only the bitcoin and the satoshi are "officially" named units of bitcoin.
As of 2014/2015, one also often sees bit as a moniker for one microbitcoin, i.e. 100 satoshis.

BTC has been used as the abbreviation for bitcoin for a long time, yet, in September bitcoin was added to ISO 4217, as XBT, where X means not associated with a country, just as  in XAG (Silver) and XAU (Gold), and opposed to national currencies, e.g. USD (US Dollar). However, it seems to me that XBT has not been adopted by the community, BTC remains prevalent.

Origin of millibitcoin and microbitcoin

Millibitcoin and microbitcoin follow the conventions of the International System of Units, and thus are derived from the main unit bitcoin with a prepended "m" for millibitcoin and a prepended "μ" for microbitcoin.
Following the same conventions and starting from the common abbreviation BTC for bitcoin, one would use mBTC and μBTC.

Millibit and microbit are confusing

While usually people will understand the meaning, using the abbreviations "millibit" or "microbit" gives the impression that they are assiociated with bit as the main unit. This is especially confusing with the advent of bit as a nickname for microbitcoins.

"bit"

Bit is a terrible name for two reasons: Bit, the binary digit, is the basic unit of information. It is used a lot in the context of anything related with computers and therefore shouldn't be doubled as a subunit of bitcoin. Second, due to people using "millibit" and "microbit" it is terribly confusing to anyone that is new to Bitcoin, but familiar with the International System of Units.

Millie and Mike

"Millie" and "Mike" were proposed nicknames for millibitcoin and microbitcoin, but I haven't seen them get much usage. I don't think that they will see adoption.

Units in English

In general currencies are not capitalized in English, unlike the name of the protocol. So, you would write about the Bitcoin protocol, but five bitcoins.

Overview

I would argue for the following usage of units:

Unit       Value in bitcoins  Value in satoshis   Abbreviation
-------------------------------------------------------------------
bitcoin        1.0               100,000,000             BTC
millibitcoin   0.001                 100,000            mBTC
microbitcoin   0.000001                  100            μBTC
bit            0.000001                  100             bit
satoshi        0.00000001                  1         satoshi


Why was noise XK fundamental pattern chosen in the transport layer (BOLT 08) of the lightning network I am currently reviewing the transport layer of the Lightning network protocol. It builds on top of the noise protocol framework handshake patterns.

What I don't get: Why was the fundamental pattern XK chosen?

XK
  <- s
  ...
  -> e, es                  0                2
  <- e, ee                  2                1
  -> s, se                  2                5
  <-                        2                5

First of all why not KK? Nodes are announced via gossip and on my tcp socket I should see who connected to me being able to look up the static key of my peer. Was the reason so that lightning nodes could be private and in particular on tor?

Second of all why not using protocols without static keys? Is the reason that we wanted to have property 2 and 5 for initiator and recipient respectively?

Property 2:

  Sender authentication resistant to key-compromise impersonation (KCI) . The sender authentication is based on an ephemeral-static DH ("es" or "se") between the sender's static key pair and the recipient's ephemeral key pair. Assuming the corresponding private keys are secure, this authentication cannot be forged.

Property 5:

  Encryption to a known recipient, strong forward secrecy. This payload is encrypted based on an ephemeral-ephemeral DH as well as an ephemeral-static DH with the recipient's static key pair. Assuming the ephemeral private keys are secure, and the recipient is not being actively impersonated by an attacker that has stolen its static private key, this payload cannot be decrypted.

It feels like I have given the answer by quoting from the noise protocol framework page. But maybe I am mistaking so it would be great to get your insights.

First of all why not KK? Nodes are announced via gossip and on my tcp socket I should see who connected to me being able to look up the static key of my peer.

It isn't really possible to tell who is connecting to you based solely on the IP information you receive. The public IP information received over the gossip protocol only lists the listening endpoints which you can connect to, but this does not imply that those endpoints will be the ones connecting to you. In fact, they can't be, because the listening port requires a dedicated socket, so any outgoing connections from that IP would be on a different port. The port for outgoing connections is usually assigned automatically, although you can bind it to a specific local port explicitly, this is not common. You can't bind to the same port as the listening socket anyway, and if you're behind a NAT you have no control over the port the recipient might see at their end.

The IP address alone is not sufficient because you could have many nodes behind the same IP on a network, or due to NAT. It would be guesswork which node you think is connecting to you to try and pick the right public key.

Since the initiator's key can't be known for sure, the other options from the Noise protocol are N, I or X. We can rule out N because it does not provide the security guarantees you listed above, and I leaks information in plaintext which could be intercepted. X is therefore the most reasonable option.

For the responder's public key, we can again rule out N, leaving either K or X. We already know the key though, from the gossip network (or DNS), so there is little point on transmitting it also. Additionally, the recipient has a little extra information hiding because their public key is never transmitted.

The Lit project from MIT uses the XX pattern. I believe this is because nodes don't have information about public keys in advance because they use hashes of the public keys to identify nodes instead. Once the public keys have been transmitted, their hashes can be compared to the previously known public key hashes.

  Second of all why not using protocols without static keys? Is the reason that we wanted to have property 2 and 5 for initiator and recipient respectively?

The reasons are as you've listed from the Noise protocol document. The public keys alone are sufficient to have both encryption and authentication without relying on any third party for the security guarantees. Other protocols such as SSL have inherent points of failure - such as the PKI, which has been abused for many real world attacks on security. (In addition to it being a rent-seeking industry.)

  In that case I don't understand why key rotation takes place with HKDF and not a new handshake generating new random ephemeral keys.

The purpose of the key rotation is to prevent the decryption of older messages if the keys are compromised in the future. This could also be done with a new Noise exchange each time, but from a practical point of view it is more computationally expensive to do a handshake (multiple ECDH calls) than to produce new keys with the HKDF. There may be some other risks to it that I'm not aware of though.


Best way to mix bitcoins? mixer, coin join (shared send), dark wallet, stealth addresses? When you want to anonymize a few hundred BTC, what would be the best (safest) way?

I can think of these alternatives:

Deposit to and withdraw from exchange (like Kraken, Bitstamp, etc)Pros: reasonably safe (especially when using a solid, trusted exchange).Cons: not really anonymous, major exchanges must subject to KYC laws and have strict identification rules.
Mixing service (like bitmixer.io)Pros: very anonymous.Cons: can't really estimate the risk, you have to trust some anonymous 3rd party who can decide to disappear with your coins. Also, it can be expensive (depends on circumstances and requirements, but I'd consider 3 BTC fee to mix 300 BTC kind of expensive).
Coin JoinPros: pretty much risk-free (don't have to trust anyone).Cons: is there a steady, easy, accessible way to setup large coin join transactions? The shared send feature of blockchain.info/wallet? Sharedcoin.com?
Dark Wallet / Stealth AddressesPros: as far as I understand, this offers high anonimity without the need no trust anyone, although I'm not 100% sure of how this works technically.Cons: To my knowledge it's still in development, unstable, not suitable for usage with large sums of money?

What your take on this? Any other options?

I would say connect to tor, create a blockchain.info account, send you bitcoin there, then send the bitcoin to https://shapeshift.io to another currency which you have a wallet setup, then back to a second blockchain account, then to wherever you want.

This is pretty much 100% untraceable, as it goes via anonymous wallet - anonymouswallet - converted to another blockchain, sent to anonymous wallet, then converted back to bitcoin through another anonymous wallet! You can't track that transaction on the blockchain.

Enjoy :)


How are bitcoins generated during mining? I know that when someone is able to find a block and hash that can be attached to the chain, he will be awarded with "newly found bitcoins"

However, isn't mining simply finding the hash? Where do these new bitcoins come from?

On a high level, the entire bitcoin network is built on the fact that all of the nodes are following the same rules. The rules state that whoever hashes the next block gets to mint a number of coins, so they can.
From the Bitcoin white paper:

By convention, the first transaction in a block is a special
transaction that starts a new coin owned by the creator of the block.
This adds an incentive for nodes to support the network, and provides
a way to initially distribute coins into circulation, since there is
no central authority to issue them.

From the wiki:

Bitcoins are created each time a user discovers a new block. The rate
of block creation is approximately constant over time: 6 per hour. The
number of Bitcoins generated per block is set to decrease
geometrically, with a 50% reduction every four years. The result is
that the number of Bitcoins in existence will never exceed 21 million.


What does validation cover conceptually in the Bitcoin Core codebase? What does validation (.h and .cpp) cover conceptually in the Bitcoin Core codebase?
This question was asked by Larry Ruane at the May 12th 2021 Bitcoin Core PR review club on a Carl Dong PR to de-globalize ChainstateManager

John Newbery answered this at the Bitcoin Core PR review club session.

Conceptually validation stores and maintains our best view of the blockchain and associated UTXO set. It also includes an interface to submit unconfirmed transactions to the mempool.

In addition, James O'Beirne's slides from a presentation on Bitcoin Core architecture at Bitcoin Edge Dev++ stated:

Validation handles modifying in-memory data structures for chainstate and transactions (mempool) on the basis of certain acceptance rules.
It both defines some of these data structures (CChainState, mapBlockIndex) as well as procedures for validating them, e.g. CheckBlock().
Oddly, it also contains some utility functions for marshalling data to and from disk, e.g. ReadBlockFromDisk(), FlushStateToDisk(), {Dump,Load}Mempool(). This is probably because validation.{h,cpp} is the result of refactoring main.{h,cpp} into smaller pieces.

Here is a diagram from James' presentation showing how validation relates to other regions of the codebase.


How to clear invalid transactions from one's wallet? I've recently been testing double-spend attacks against myself using a couple wallets, and the standard client does not appear to clear conflicting transactions from its transaction list, even if the other ones have already become a part of a block. How do I get rid of invalid transactions from my wallet?

This question was answered before for someone to clear a too low fee transaction that wasn't accepted by the network. https://bitcoin.stackexchange.com/a/2415/1461


What are steps 4-9 in bitcoin address generation for? From a perspective of generating collisions, it appears that many of the steps outlined in https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses do not need to be computed by any would be attacker.

For any address which has spent an input, the ECDSA public key is in the block chain, rendering steps 2-9 unneeded to check for a collision.

For any address which has not spent any inputs, the RIPEMD-160(SHA-256(publickey)) is available in the blockchain, rendering steps 4-9 unneeded to check for a collision.

Thus, what purpose do steps 4 through 9 of the address generation serve? Why not simply BASE58(0x00 RIPEMD-160(SHA256(publickey)))?

Steps 5 to 8 are the checksum (a rudimentary error detection code). They make sure that if the user makes a typo when writing down the address, the resulting address will be invalid and the coins will not be sent to oblivion. (The checksum used isn't perfect so this could happen, but rare)

In addition, step 4 is the version byte, it makes sure that humans looking at the address understand what it represents - pay to pubkey hash, pay to script hash, or a different network.

Step 2 and 3 make sure that receiving funds does not require publishing the public key. This helps if ECDSA is compromised, either by algorithm research or quantum computers. For this and other reasons, it is recommended to avoid receiving funds to an address from which funds were previously sent.

You've mentioned "check for a collision" in your question - none of the steps serve to check for a collision, it is assumed that collisions are impossibly unlikely.


Bitcoin multisig contract - to Lock coins with nTimeLock (BIP65) I really need help.
I am currently Developing a Bitcoin wallet and want to build in a SMS Based send function where the sender does not need to know the receiver publicKey. After the contract get executed on the reciever phone through the wallet the public key should be added to it and execute the redeem process / script.

Is that possible in any way?

No, it is not possible.

"Bitcoin contracts" are executing when spending funds from UTXO. If the receiver can do it without signing the transaction - everyone can do the same thing.


Having trouble setting up the escrow function - returns transaction ID but doesn't get to blockchain? Looking at both this example:
https://earlytemple.com:8181/index.jsp
and this example:
https://gist.github.com/gavinandresen/3966071

I think I plowed through everything to the point where I was doing it all right: I made sure the transaction funding the escrow account came from one of the two parties in the multisig address, in this case it was

createmultisig 2 '["02bf4782452f7605994a27ad130ff2d6ee7f2e3399f8c0be79a114a5c116794277","035602e50d80b4c0066d4bb004f33557b100d421f02a32cd853bb24ead7bbfd351"]'
which produced the escrow address 3QQTMoaJZzkRqWAavPJRvEcTTFt7sRxiPL.

I funded the transaction manually with createrawtransaction, pulling from one of these two accounts, then I created a redemption transaction, then I signed that the way specified in the instructions, then I went to the other machine running bitcoin-qt and signed the output of the previous signing operation with the private key on that side, then I tried a send operation from that machine (didn't let me) so I went back to the original machine and sent it from there (did let me) and it returned a transaction ID of 30a6693a74e9c60a34af0262c14e516dd4ffa75cb9f496cd2f6ba484135bbe2a, which does not seem to be getting into the blockchain.  I've had that happen about three times now.  I specified settxfee 0.0002 to make sure (I hoped) that I was paying to get it included?

Can anybody point me in the right direction here?  I really could get a lot of use out of this function if I could get it to work, and I just can't figure out what I'm doing wrong.

Struggled with this for a while as well. You need to announce the transaction to your local node and the network via the sendrawtransaction call with the raw transaction id.


I bought bitcoin from an ATM machine but the person I want to send it to didn't not see it this is the receipt I got but the address on it is different from the address I want to sent it to

Both of the transactions are confirmed and can be viewed using a block explorer. Furthermore, both of them were spent by your friend 6 hours ago.

Transaction 1
Transaction 2

In other words, those transactions have been seen by them and spent.


What are some http mining pools out there? The open source FPGA miner with source available at https://github.com/progranism/Open-Source-FPGA-Bitcoin-Miner does not support stratum, so in order to test it, I need an http pool. Are there any left?

Sounds like you need to use getblocktemplate. If you do an http POST to http://gbt.mining.eligius.st:9337 with a body of:

{"id": 0, "method": "getblocktemplate", "params": [{"capabilities": ["coinbasetxn", "workid", "coinbase/append"]}]}

You should get a transactions to process. See https://en.bitcoin.it/wiki/Getblocktemplate for more information.

I can't find many other sites that support GBT but there is a list of compatible pools in the above link as well.


How does muun lightning wallet requires no trust and no backups? https://muun.com/ claims it has a wallet that does not rely on backups.
Here: https://blog.muun.com/why-not-just-a-mnemonic/ it says

Muun is a multisig wallet with lightning support, so backing up a
mnemonic alone would mean your bitcoin could be easily frozen.
Self-custodianship is at the core of everything we do, so this wasn't
acceptable. We built an Emergency Kit that gives you full self-custody
of your money when combined with your Recovery Code[6].
Your Emergency Kit is a PDF document with the information and
instructions needed to find and spend your funds independently. No
need to brute-force any missing data. Everything is there, including
your private keys and output descriptors[7].
Your private keys are securely encrypted with your Recovery Code. This
makes your Emergency Kit harmless by itself: you can keep multiple
copies, and you can even store it safely on the cloud.

How can it, however, keep track of the state of my lightning wallet? If I use it to only spend, then there's no problem. However, if I receive more than I spend, it's of my interest to save the transaction state so I can propagate it when I want to close the channel.
I don't see how this emergency recovery kit can help me recovering the state.

I'm the CEO at Muun wallet.
Muun does rely on backups since the Emergency Kit is a backup, just not using mnemonics. The problem with mnemonics is that they don't contain a lot of stuff needed for the recovery of a multisig / lightning wallet, like the derivation paths, scripts, etc.
When using Muun, you will back up two pieces of data: the Recovery Code and the Emergency Kit. The Recovery Code is a randomly generated code that you write on a piece of paper, in the same way that you usually do with mnemonics. In fact, this code has higher entropy than a 12-word mnemonic. The Emergency Kit is a PDF document with all the stuff needed for recovery but harmless by itself. It has:

The two private keys (Muun is a 2-of-2 multisig), encrypted using the recovery code.
The output descriptors, with the derivation paths and scripts.
Instructions on how to use this data to recover your funds.
All this data is also available inside the PDF in a machine-readable format.

When using the recovery tool (https://github.com/muun/recovery), you will be able to move the funds using your Recovery Code and Emergency Kit combo. The next version of the recovery tool will use the machine-readable metadata in the PDF for easier input and better UX.
Regarding the lightning aspect of the recovery process, Muun uses super optimized submarine swaps to execute the lightning payments, both incoming and outgoing. This means that your funds are on-chain and thus recoverable by the mechanism I just described.
From the next version, Muun will start maintaining off-chain funds, and thus it will need to backup the off-chain commitment transactions. These transactions will be included in the PDF metadata. I'll update here with more information once we release this.


What is the magic number used in the block structure? What is the Magic no used in the block structure, why is the value always 0xD9B4BEF9 and what is it used for ?

Thanks

The magic number is not something specific to bitcoin.

Magic numbers are used in computer science for both files and protocols. They identify the type of the file/data structure. A program receiving such a file/data structure can check the magic number and immediately know the supposed type of that file/data structure.

This is what the Unix/Linux command file uses to quickly identify the type of file. It only requires to check only the first bytes of a file to determine its (supposed) type. A list of files and their magic numbers can be found here.

Protocols like bitcoin use data structures to talk to each other (e.g. propagating blocks through the network). Nodes check the first bytes to identify the type of data structure.

Another use of magic numbers is that you can check the type of the file or data structure on a text editor. E.g. while a png image is binary if you open it with a text editor you will notice that it starts with .PNG..... Another example, the SMB protocol replies start with FFSMB. Note, however, that this is not always the case.

Other files/structures have magic numbers that do not make much sense; they may be some geeky code or inside joke of the developers that chose it.

So that is what it is used for. As far as I can tell 0xD9B4BEF9 is quite arbitrary... but maybe there is some meaning for its creator.


How can I see how many Bitcoins my c-lightning network node has? I am running a c-lightning node and want to know how many btc I am owning on this wallet and how many I can spend. lightning-cli listchannels does not help. What do I need to do?

Use the RPC-Interface listfunds lightning-cli listfunds which lists all payment channels and UTXO.

If you wish to have a more nicely display you can use this small tool: https://github.com/renepickhardt/lightning-helpers

git clone https://github.com/renepickhardt/lightning-helpers.git

cd lightning-helpers
sudo make install
listfunds

it aggregates everything so that you can see your total funds. Also you can add a parameter to change the unit of display.

If you don't trust a third party tool and don't want to read the source code you can use this little shell script:

utxo values:

lightning-cli listfunds | grep "value" | sed 's/      "value": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'

total channel balance on your side:

lightning-cli listfunds | grep "channel_sat" | sed 's/      "channel_sat": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'


Why doesn't Lightning have DNS bootstrapping? Bitcoin uses a DNS-based bootstrapping mechanism to help new nodes find peers. As far as I'm aware, Lightning doesn't have such mechanism, and new users are supposed to just search for node addresses on the web (or use nodes maintained / recommended by their wallet developers, or whatever).

What is the rationale behind this design decision?

It does!
There is even a BOLT for it (check out: https://github.com/lightningnetwork/lightning-rfc/blob/master/10-dns-bootstrap.md )

from there you have the following example:

dig lseed.bitcoinstats.com AAAA
lseed.bitcoinstats.com. 60      IN      AAAA    2a02:aa16:1105:4a80:1234:1234:37c1:9c9

Christian Decker is maintaining the dns seed list. I even used this in my autopilot (the c-lightning wrapper). check out:

  def __get_seed_keys(self):
        """
        retrieve the nodeids of the ln seed nodes from lseed.bitcoinstats.com
        """
        domain = "lseed.bitcoinstats.com"
        srv_records = dns.resolver.query(domain,"SRV")
        res = []
        for srv in srv_records:
            bech32 = str(srv.target).rstrip(".").split(".")[0]
            data = bech32_decode(bech32)[1]
            decoded = convertbits(data, 5, 4)
            res.append("".join(
                ['{:1x}'.format(integer) for integer in decoded])[:-1])
        return res

    def __connect_to_seeds(self):
        """
        sets up peering connection to seed nodes of the lightning network

        This is necessary in case the node operating the autopilot has never
        been connected to the lightning network.
        """
        try:
            for nodeid in random.shuffle(self.__get_seed_keys()):
                self.__clogger.info("peering with node: " + nodeid)
                self.__rpc_interface.connect(nodeid)
                # FIXME: better strategy than sleep(2) for building up
                time.sleep(2)
        except:
            pass


Obtaining Bitcoin Cash generated at the fork in August 2017 I had Bitcoin in my ANX Wallet at the fork in August 2017 I transferred it to my Blockchain wallet in September. Is there any way I can obtain the Bitcoin cash generated at the fork?

It sounds like ANX will not give out the private key to your wallet, at least not now.

ANX terms 16.5:

  16.5 In the event of a Fork, the value, function, and/or even the name of the Digital Asset you store on the Exchange may be materially
  affected. In any such event, you agree that ANX may temporarily
  suspend the service (with or without advance notice to you) in its
  sole discretion and ANX may decide based on commercially reasonable
  efforts either (a) configure or reconfigure its systems or (b) not to
  support (or cease supporting) the branch derived from the forked
  protocol. In the instance of any private keys held and managed by ANX,
  ANX does not convey ownership or any related rights associated with
  the Users. You acknowledge and agree that ANX assumes absolutely no
  responsibilities whatsoever in respect of an unsupported branch of a
  forked protocol.

Bitcoin Cash fork happened August 1st, 2017, only way for you to claim Bitcoin Cash is if you manage to persuade ANX to give it to you, or give you the private key.

However, you may be eligible for Bitcoin Gold if you had Bitcoin in your Blockchain.info's wallet 2017-10-24,if so then follow this procedure.


Bitcoin Blockchain block time From Bitcoin.org

  The peer-to-peer network allows block time to be up to two hours ahead of real time, so a locktime transaction can be added to the blockchain up to two hours before its time lock officially expires.

Why does the bitcoin blockchain allow blocks to have timestamps 2 hours ahead of real time (the real world clock time on a node)? What is the advantage of doing this?

Because not everyone's nodes' clocks are in sync with each other and because of network latency, there needs to be some buffer of time that a block's timestamp can be in so that nodes will still accept blocks.

Having a larger buffer allows for miners to change the timestamp too in addition to the nonce in order to have more possible blocks given the same list of transactions.


Is Binance a scam exchange/wallet? Now 5 days ago, I initiated a transfer from my Bittrex account to Binance, using Binance's ID code snip and the receiving Address code snip. The coin was immediately removed from my Bittrex a/c but is yet to appear in my newly created Binance a/c. Worse yet, after five postings to Binance Support, I am yet to receive any human reply regarding the missing deposit, only the auto-generated robo responses when the support ticket is submitted. I'm about ready to contact a legal authority about Binance, but I believe it may be a Japanese or Chinese enterprise. Is there any "global" policing authority, such as the USA's SEC or FCC that could take actions against potential scam operations regardless of where that operation's home office might be located?

At this time I would think that they are. They have no concept of customer support and they are very unprofessional. If you need support and need them to fix something, they will delay and delay until you are desperate and then they come up to you for paid support.

I contacted support for days and days and when i finally got response, it was that I had to pay them ETH for service or say bye to my money.

I deal with many crypto exchanges and this was a new for me. After I agreed, I was then told it would take a month for me to access my own coins because dev team is supposedly tired from working.

So yeah if you mess up anywhere expect either to pay for support or never see your funds.


Bitcoin-Qt command line control on Mac I'm trying to communicate with the new Bitcoin-Qt -server via a command line on Mac. I run ./Bitcoin-Qt -server, the application starts, but my terminal window is stuck on an empty line (no matter what I type in, there is no response). Only when I quit Bitcoin am I able to run any commands, but then I can't communicate with Bitcoin, because it is already off.

How do I start Bitcoin-Qt -server on Mac and control it through command line?

You can start it from the command-line using:

open Bitcoin-Qt.app --args -server

I think the --args option to open is OSX 10.6 and later; if you are running an older OSX put server=1 in your ~/Library/Application Support/Bitcoin/bitcoin.conf file. In fact, to use the -server command you must set a -rpcuser/-rpcpassword, so I'd suggest creating a bitcoin.conf that contains:

server=1
rpcuser=yourname
rpcpassword=...something else

We don't ship a bitcoind for the Mac, but you can use curl (for example) to send commands to the running Bitcoin-Qt:

curl --user yourname --data-binary '{"id":"t0", "method": "getinfo", "params": [] }' http://127.0.0.1:8332/

The bitcoin source tree also contains python code that uses the free 'jsonrpc' library to communicate with a running Bitcoin-Qt (see contrib/bitrpc/).


Bitcoin exchange platforms and foreign exchange regulations I'm wondering how cryptocurrency exchange platform adapt to country regulations where foreign exchange is forbidden (especially where sending money outside is forbidden).

How they could buy Bitcoin from outside without violating regulations (foreign exchange regulations), in the case if they don't have much liquidity to match international market price of Bitcoin ?

There's basically no way to answer this in a way that's general to countries that forbid foreign exchange, because these regulations have different goals in different countries.

For example, in Venezuela, all foreign exchanges must go through a state bank. The purpose of this is so that they can pretend that their currency is worth more than it actually is. If the central bank in Venezuela doesn't deal in the currency of your choice, I don't think you have any sort of recourse.

I don't have any advice for you, besides, "Hire the nephew of the guy who runs the central bank in your country."


What is a millisatoshi? I thought satoshi is the smallest unit? I encountered 'millisatoshi' (msat) while browsing Lightning Network..., see screenshoot below:

And subsequently I found it mentioned here:

https://github.com/ElementsProject/lightning/blob/master/README.md#sending-and-receiving-payments

Obviously, I am curious... I thought satoshi is the smallest unit?

It's not a mistake, it's literally a thousandth of a satoshi. A satoshi is the smallest unit for bitcoin, but lightning can transact with even smaller units while channels are open. The amount is rounded down to the nearest satoshi when the channel is closed and broadcast to the blockchain to adhere to bitcoins limit.


GPU mining slows down my ubuntu I'm trying to mine using my CPU and GPU. When the CPU is set to use all its cores, I have no problems, but when I use my GPU, my desktop gets way too slow because unity uses it too I think, so I need to find a way to be able to use my GPU for mining while using Intel graphics for unity and the rest, can anyone help? I have a Nvidia GTX 850M and Ubuntu 16.04, and I don't know where to begin.

Mining on a cpu at all is a bad idea, it can and will wear the cpu down, and is ridiculously slow compared to a gpu. Also mining with an Nvidia card isn't the smartest thing either as they are much slower than AMD cards. Regardless you will make next to no money mining with this kind of hardware given that there are thousands of people with ASIC miners that pump out 2TH/s +. My advice would be save up some money and purchase a high-end ASIC miner and refrain from mining with your current computer.


Why is there separate private key for every adress? What should i record for my paper wallet? Why is there separate private key for every address in Litecoin?
What should I record for my paper wallet?

Why is there separate private key for every adress in litecoin?

Because that is how public key cryptography works. Each address is the hash of a public key, and each public key only has one private key. Thus each address has its own private key.

  What should i record for my paper wallet?

The private keys of your addresses. You should really only be using paper wallets for long term storage. They are not very good for doing transactions.


delay in transaction I created an account with bc-wallet.com, and they gave me this wallet address 3HxxDmCWgLu2yJfrbTjdhfPTqEW7aftX3b and I sent to to a friend of mine who uses block chain account, and asked him to transfer bitcoins to me, he did it and up to now nothing has show up in my account... I'm very confused if this is my address or the address is a spam.... Please help me with this..... since yesterday around 19:00 GMT..

The address you've linked has been involved in eleven transactions already. If you don't see anything in your account, either it is not your address, or the website is not working correctly.

Looking at the website of bc-wallet.com, it looks hastily made to me. Are you sure that it is a proper wallet service and not a phishing/scam site?


Multibit vs Electrum - which is more mature and secure? I'm having a hard time finding objective reviews / comparisons of these two 'lite' clients. Can someone who tried them both give some comments?

Thanks

At the moment the Electrum client is more secure as the wallets are password protected.

I am the lead developer on MultiBit and am working on wallet encryption but it will take me a few weeks yet. There are a number of changes to make.


What is the maximum number of transactions per seconds on Bitcoin Cash? What is the maximum number of transactions per seconds on Bitcoin Cash? I know that on Bitcoin (BTC) is was 7 tx/s.

The throughput in Bitcoin is not defined in transactions per second, rather indirectly, via block size limit. What matters in the size of transactions in bytes. The more complex the transaction is (complex meaning more inputs and outputs, long scripts), the more space it takes. A typical full (nearly 1 MB) block in Bitcoin includes around 2000 transactions, or around 3 tx / sec at 10 min / block. 7 tx / sec in the absolute maximum, calculated in the assumption that a transaction contains one input and one output (most real-world transactions contain two outputs -- the second one being the change). BCC increases the block size limit to 8 MB, that means it can handle 8 times more (assuming other things equal).


What's the advantage of making a new node sync from the genesis block? Bitcoin's blockchain is very much like a version control. It versions the unspent output database (and some metadata I don't know about) and blocks represent the deltas (commits or patches) to this database.

Now if you want to know the state of the system after 1000 blocks, you need to start from the genesis block, then download, verify and apply 1000 blocks (patches) to it. Now we are beyond 500000 blocks and syncing up new node takes ages.

Version controls solve this problem by inserting a full snapshot instead of deltas after several revisions so one don't have to apply all patches from first to last to get to the latest state. But this is not necessary.

It's enough if patches contain a hash of the state they are patching allowing the verification of the deltas themshelves. So if you have revision 1234 of the state, the patch that upgrades it to revision 1235 contains a hash of it. So the one who applies the patch can verify if they apply it to the correct state (it would be cryptographically very difficult to forge a different state that matches the hash and appear valid). So it's technically possible to design a system that allow syncing from the middle.

In case of the blockchain this would simply mean that instead of storing the hash of the previous block, it would store the hash of the previous state of the utxo database. This would mean that if I could download the utxo database eg. at block 500000, I could start apply the next 6000 blocks to it and reach the correct latest state without having to start from the genesis.

However the current design of blockchain doesn't allow this. You have to start from block 1 and catch up from that.

In 2009 when Bitcoin started version controls were probably well known already. And I think I wasn't the only one who suggested and discussed this. Probably there is a good reason for not allowing to start from the middle. So what's the advantages of having to start syncing from the genesis?

The great advantage of a new node starting from the genesis block is that the node is able to individually verify every transaction is valid and does not need to trust any other node to know that when done the entire blockchain is valid. The blockchain is verified independently and the integrity of the blockchain is established.

For those not interested in that, it is possible to just run an SPV client which just uses the headers.


Bitcoins missing following wrong bank account number entered In 2019 I commenced trading with an online Bitcoin trader called Assetgates, who had contacted me via my mobile phone.
Money was transferred from my bank to a Kraken account, then to Assetgate in the form of Bitcoins to trade. a broker contacted me daily and transactions were made be the said person.
By March I had accumulated $160,000 which I decided to withdraw.My broker transferred me to another person who took me through the process of transferring the said monies to my Kraken account. In the process of the transfer the Kraken bank account number had the K missing off the end.
My broker then informed me that my money was with the Miners who would give it back if i forwarded 17% (£22500) which was money I did not have.
I was then informed that the miners would divide the money between themselves, and I would receive nothing.
Can you advise me if there is any way I can trace this money to see infect where it ended up?

I believe you are undoubtedly the victim of a scam.

It is extremely unlikely you will be able to trace the money to any identifiable individual. Bitcoin is designed to make this very difficult.

I suggest you firstly report to police that you are the victim of a fraud, secondly accept that the money is irretrievably lost and move on with your life.

You will receive private messages from people telling you that they, or someone they know, can recover your money. They also are fraudsters. I strongly suggest you ignore them. You will be tempted greatly but it can only lead to further loss.

Some reasons why this is the case:

  I commenced trading with an online Bitcoin trader called Assetgates, who had contacted me via my mobile phone.

Unsolicited contact by people using disposable phones (or by throwaway account on Facebook) claiming to be a broker/trader/miner or other expert is a sign of fraud.

  My broker then informed me that my money was with the Miners

This is not the way Bitcoin works. Miners do not hold investor's money.

  the Miners who would give it back if i forwarded 17%

This is not the way Bitcoin works. Miners cannot reverse transactions.

Anyone who had previously received your "investment" money could create a new Bitcoin transaction to return it to you for a cost of a few pennies. If they were greedy enough to want to keep 17% of your money they could simply send you the other 83% directly without needing any up-front fee from you. The up-front fee is another clear sign of dishonesty.

  the miners would divide the money between themselves

This is not the way Bitcoin works.  Miners cannot take control of money that is under the control of other people.


Run Bitcoin and BitcoinCash in same server I use debian 9
I have compile 2 files:

bitcoinCashd -version
Bitcoin ABC Daemon version v0.16.2.0-6af5e93

bitcoind -version
Bitcoin Core Daemon version v0.15.1

So i need run in same server. Can some one help?

maybe need rename some executable files and connected both wallets on different ports?

Maybe good step by step manual

The PORT (to receive data) for both of them is 8332 by default. So you must determine the PORT in the config file for one or both of them like this:

For BitcoinCash:

server=1
daemon=1
rpcuser=xxx
rpcpassword=zzz
rpcport=8355
port=6950

For Bitcoin:

server=1
daemon=1
rpcuser=aaaaaa
rpcpassword=bbbb
rpcport=8320
port=5380

Don't forget to allow the ports by firewall and specify different data directories for them.


Full node or Full node third-party services pros and cons I'm setting up P2P Bitcoin website similar to LocalBitcoin for school project.
Before I go deep into this journey I'm doing some plannings.

I have lot's of questions in my head and have been studying bitcoin technology.
I would like know if its better to run full node on my server and execute RPC commands or should I just look for companies that offer such services to save me some time?

What are the  pros and cons of running full node
I will also appreciate recommendations for third-party services for Bitcoin P2P market

What are the pros and cons of running full node

it all comes down to the level of trust. Whom do you trust? Your own system, or someone else? And then, how much money are we talking about? Several low values, or monthly or yearly values?

For sure I recommend a full node. And yes, it has the disadvantage of downloading the blockchain (easily up to three weeks), and you need to have that infrastructure up and running. For this you gain the absolute security, that noone faked a block or a tx in the blockchain, that is assembled on your system. Also the level of privacy is higher than e.g. SPV nodes. A full node supports the decentralization aspects of the network. More full nodes, more tamperproof is the whole bitcoin eco-system.
Using RPC calls to your local bitcoin node requires then some developer knowledge, or a dev-team. That can add to costs in setting up your environment.

Using services like bitpay or similiar has the advantage of getting quickly started. This way you can start to setup your business, and later on, if you have really big values, you are still able to convert to a full node.

So from a risk perspective: when it is low values, go ahead with services from third parties, but when you achieve higher values (above monthly income), think about securing your environment with an infrastructure, that is under your own control.


JSON-RPC problem with Bitcoin-Qt 0.8.5 I am running bitcoin-qt v0.8.5 on Linux/amd64 and I encounter a strange behaviour for account commands when using JSON-RPC.

My initial wallet looks like this:

Test-Account | 1PNU1vZbruMCZpVBFk3eKmKrfGKDugBsjB

After issuing the command

setaccount '1PNU1vZbruMCZpVBFk3eKmKrfGKDugBsjB' 'Renamed Account'

I just expected the old account to be renamed, but the wallet changes to:

Renamed Account | 1PNU1vZbruMCZpVBFk3eKmKrfGKDugBsjB
Test-Account    | 16jfcbLM9tGrkvXqGKnuC46j2jqKVMAe46

It created a new address for the old account (it is always the same new address for the same old address !?). Is that behaviour intended? The documentation I could find is unconclusive about that.

After this I issued the command

getaccountaddress 'Renamed Account'

and I expected to get the address "1PNU1vZbruMCZpVBFk3eKmKrfGKDugBsjB" as a result. But instead I got the single address "176uhGVRT8KxScvQqdA7Yh87qQ8F5LMMM6" - and the wallet now looks like:

Renamed Account | 1PNU1vZbruMCZpVBFk3eKmKrfGKDugBsjB
Renamed Account | 176uhGVRT8KxScvQqdA7Yh87qQ8F5LMMM6
Test-Account    | 16jfcbLM9tGrkvXqGKnuC46j2jqKVMAe46

What is happening here? What am I doing wrong?

From the Accounts wiki page:

getaccountaddress will return the same address until coins are received on that address; once coins have been received, it will generate and return a new address.
getnewaddress always generates and returns a new address.
setaccount changes the account associated with an existing address. Coins previously received on that address (if any) will be debited from the previous account's balance and credited to the address' new account. Note that doing so may make the previous account's balance negative.

Use the getaddressesbyaccount method to list all addresses associated with an account.


How to select minimum difficulty when mining with Slush Pool I am mining on a single Antminer S9 with Slush Pool.

There is a setting called "minimum difficulty":

When I read their manual, item #8 states

The pool automatically assigns difficulty that corresponds to the hash rate of your miner.

My scoring hash rate and hash rate are consistent with what the manufacturer of my mine advertises: 13.5 TH/s

and my default difficult is set too be 128.

However when I proceed reading their manual further I find that minimum difficulty should be set at 1024 for 1TH/s and then increases linearly with the hashrate.

According too the table my difficulty should be 13 times 1024 which is 13312. This is way higher than the pool determined 128.

What should I set the minimum difficulty be?

I tried to understand what minimum difficulty is but I was unable too find a clear and simple explanation what this number represents.

From the research I have done to understand the minimum difficulty it boils down to a balance between server/client bandwidth limitations and time to put at risk.

The pool which you connect to distributes work for miners to solve. The more difficult each "package" of work sent to you, the longer you will take to find a solution and reply back to the pool with this solution, named share.

As explained in this Post you will on average be rewarded the same solving problems of 10k difficulty at 10 seconds per share, as solving problems of 1k difficulty at 1 second per share.

On the Antminer s9 Miner Status Tab the stats I believe, it may not be correct, I have deciphered are the following:

Summary:

Elapsed - Time passed since online
Utility - Number of Accepted shares per minute
WU (Worker Utility) - Total Difficulty Submitted (Accepted + Rejected) per minute

Pools:

Accepted - Number of Shares Accepted by the pool
DiffA# - Total difficulty of accepted shares
DiffR# - Total difficulty of rejected shares
Rejected - Number of submited Shares rejected by pool

either good hashes of bad work or bad hashes of good work

Discarded - Discarded Work that has not been worked on. According to a developer of cgminer, meaningless.
Stale - Number Shares that were sent after a block was already solved.
LSDiff - Last Accepted Share Difficulty
LSTime - Time since Last Accepted Share

You can now check to see which difficulty the pool has automatically assigned to you in the Miner Status Page.

So back to the initial question / response of the "optimum" difficulty is a balance of how many packages back and forth the network connection between the server and client is comfortable with handling and time to put at risk.

If the difficulty is very low, the network and server will be flooded with shares of solutions you have found and may reject some as it can not handle so many packets per second.

So some work you have done in solving problems has gone to waste as these solutions have been rejected.
you are spending some time waiting for recieving new work from the server and also spending time sending the solutions to the server that could have been used for finding solutions.

If the difficulty is very high, you may be working on solving a problem which no longer needs solving and so you will get no credit for the work. As far as I understand, these submited shares would be marked as Stale or Perhaps Rejected.

Currently a new bitcoin block is found every 10 minutes or so, sometimes under a minute sometimes more than 15 minutes. So, if you set the difficulty to a value which allows you to generate 1 share per minute --> Utility = 1.0 then when blocks get found under 1 minute, you have lost that minute because the pool will generate new work with the latest new block to mine and the work you were working on that you couldn't complete in time would be useless. But if the next block were found in 1 minute and 2 seconds, you would have only lost 2 seconds theoretically cause you would have probably managed to submit a share.

So, ultimately you don't want to overload the pool but you want to make sure that you risk as few shares as possible.

Your Risk would be approximately = "1 / ( Average Accepted Shares per minute * Average Minutes per Block )"

From my experience hashing at 13.5 TH/s at a difficulty of 13.3K will produce approximately 1 share every 4.5 seconds or so --> Utility = 13.5 --> "WU = 13.5*13312 = 179712" , Risk of approx 0.74%

To optimize your difficulty you should look to maximize the WU : Worker Utility Value. Theoretical Max WU you can achieve is approximately 1 per 71.6 MH/s, so a 13.5 TH/s machine can not achieve a better than a WU of 197706.

I currently have a system configured at 10k Difficulty with a Utility of 18.0 obtaining a Worker Utility of 190k, mining at KanoPool. I have aimed for 18 shares per minute as that is what is recommended by the pool.

Just though I may contribute my research on the subject incase it helps :)

Disclaimer: This response are just compiled bits from forum replies, github code and other bits here and there I have found and my own understanding of how it apparently works. This is not necessarily 100% correct information.

Some of sources:
- CGMiner Github Repo
- BFGMiner Github Repository
- BFGminer Forum talk


How does Chaum style e-cash work? (all the Wiki links are broken) I'm trying to learn how Chaum-style ecash worked specifically how:

  "the issuer does a blind signature on a serial number"

I tried looking up on Wikipedia but the page is pretty light on the details, and all the pages don't work (even the Wayback machine pages are broken)

Here's the basic idea of blind signing in Chaumian e-cash:

Let's suppose that a central issuer (Chaumian e-cash is centralised) has an account in my name with a value of 10 dollars.  In order to "withdraw" this money as 1-dollar "bills" I begin by generating ten random serial numbers, each long enough that I can be reasonably sure no one else will generate the same numbers.

I am going to have the central issuer sign a message saying these are now worth one dollar each, only I don't want the issuer to know which bill is which (otherwise they could just match up outgoing and incoming serial numbers to know who I spent it with, since Chaumian e-cash can only be spent once before it has to be re-issued).

So in addition to the serial numbers I also choose secret 'blinding factors' and combine them with my serial numbers.  I give these blinded serial numbers to the central issuer, and they sign each one with their 1-dollar key (they have different keys for different denominations) and reduce the amount in my account with them accordingly.  They know how many 1-dollar bills they signed, but they don't know what serial numbers were on each bill they signed.

Now, the trick with "blind signing" comes in.  Because of how blind signing works, I can now remove the blinding factor, but I still have a valid signed message which can be verified using the issuer's public key.  This gives me a signed one dollar bill with its own serial number that the bank doesn't know (but they do know how many one dollar bills they have signed, because each one can only be un-blinded to a single serial number).

Now, to spend the bills to someone else, I simply show them the un-blinded, signed serial number.  They must now immediately "cash in" this token by going to the central issuer and showing them the signed serial number.  The central issuer verifies the signature using their "1 dollar" key, records the serial number, and credits the new person's account.  From their perspective, this dollar is indistinguishable from any other they have issued in the past.

However, if someone else shows up and tries to cash in the same dollar again, they will not honour it because they have already recorded the serial number as spent.  You also cannot spend a $1 serial number as a $50 serial number because $50 serial numbers use a different key.

More details about e-cash, including an "offline mode" that relies on trusted hardware, can be found here.  They use a different method of ensuring a $1 bill is not spent as a $50 bill--I don't remember which variant is whose but there are several of them which basically accomplish the same thing in slightly different ways.


I can't access my wallet i put in my identifier to log in and it stays stuck on the log in page.
It says "changing wallet identifier" and doesn't let me log in.  After a while, it says that they disabled login for too many attempts.
I have not been able to log on for the past 2-3 days.
please help.

That would be best left to contacting the support of the online wallet.  Most online wallets use that kind of login and usually have a link for support.


Wallet Address(MultiBitHD) How do I see my wallet address? I use MultiBitHD. When I tried to use bitvisitor, it told me to type my wallet address. But, I don't know where it is written on.

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


How did Satoshi manage to mine so many bitcoins being the first user of the system? I'm just learning about Bitcoin and if I understand its conception properly, mining bitcoins means validation of transactions by computing a hash which should satisfy some preset condition. In other words, mining == servicing network and getting money for it.

If Satoshi was the first user, how did he earn his bitcoins if there were no transactions?

I understand, that in the very beginning some geeks were involved in the network, so maybe 5 or 10 persons' (first testers) transactions and their validation (mining) generated a lot of bitcoins, because of the low difficulty and high reward. But how did the very first coins get rewarded?

Blocks can include transactions, but it is not necessary for transactions to occur in order to create blocks. The only transaction that is required in a block is the coinbase transaction which is the transaction that creates new bitcoins and collects the transaction fees. This transaction is created by each miner individually for their block attempts (as it sends money to their own address which is different for each miner), so it'll surely be available. In fact, the first transaction other than a coinbase transaction occurred in block 170.
So, since transactions are not a requirement, block creation is limited differently, it happens by means of the difficulty. Miners create block candidates continuously, and then check each whether it fulfills the difficulty requirement. Whenever they find a block that surpasses the required difficulty, they have successfully mined a block. As the difficulty resets regularly to adapt to changes in the hashrate of the mining network, the blocks work out to be discovered approximately every ten minutes.
In the very beginning of Bitcoin, mining difficulty was very low as there were few people running their home computers to mine Bitcoin. Satoshi Nakamoto was the first one to run a computer for mining, and thus was able to mine a large portion of the early blocks.


p2pool merged mining I installed p2pool on my server for triple merged mining - VTC, MON, PLX. Server is running smoothly, but I don'know how to setup my addreses in miner. I have read that you can add for example MON address in password field, but what if you mining more than two coins, where put the addresses?

You actually don't use the addresses, but the RPC info for the daemons. For example you'd start the pool with the following switches:

python run_p2pool.py --net vertcoin3 --merged http://*RPCuser1*:*LongRPCpass1*@127.0.0.1:6888 --merged http://*RPCuser2*:*LongRPCpass*2@127.0.0.1:7817

You will see "Got new merged mining work!" in console as confirmation.


Sent Bitcore (BTX) to my Bitcoin Core wallet (a bitcoin wallet) - anyway to recover the BTX? Topic says it all. For some reason I thought the Bitcoin Core wallet was for holding Bitcore Coin (BTX) but obviously that isn’t the case! I sent Bitcore (BTX) coins to that wallet last night and obviously isn’t being recognized in the wallet.

Does anyone know if it is possible to recover the BTX from the Bitcoin Core wallet? The Wallet doesn’t think I received anything so not sure I can recover private keys from it that represent the BTX coins.

Any help would be greatly appreciated!

Private keys are independent of actually receiving any coins. You can get the private keys from your wallet by using the dumpprivkey or dumpwallet commands.

Alternatively, because Bitcore's wallet is based on Bitcoin Core, you can just copy and paste your Bitcoin Core wallet.dat file into the Bitcore wallet's datadir, replacing it's wallet.dat file (assuming that you are using bitcore's fork of Bitcoin Core).


Solo vs Pool mining for new crypto-currencies? I have a not-so-good miner in terms of mining, like with CPU mining with LTC, it goes to 15 kHash/s which is pretty low.

I thought nor pool mining nor solo mining will earn me much when at this speed. But what if when mining other crypto-currencies like NVC, TRC or PPC? They have a lower difficulty level and probably would yield more in solo mining.

Simple question is that, if I want to mine them, what should I do, solo or pooled? and Why?

Also, how much time approximately will it take to mine one block of any of these at this speed?

Yielding literally "more" units of one currency compared with another isn't necessarily a good thing. Would you rather have 5 Japanese Yen or 5 US dollars?

The choice between mining solo or pooled is mainly one of variance; would you rather take a chance on trying to solve a block yourself, trying for a full block reward, or would you rather earn an amount roughly proportional to the work done (and probably pay a small fee for the privilege)? Unless you have a large amount of mining capacity, you may end up with nothing if you mine solo. Most people choose to pool mine for that reason.

You may find this question of interest, discussing solo mining vs pooled.

When it comes to time to solve a block, that's a completely different question, but this might help you. It will differ depending on the currency you choose (difficulty and perhaps hashpower will be different for each).


Where exactly is the scarcity? In discussions on the intrinsic value of BTC, one often reads the claim that BTC is scarce because the maximum amount of BTC that can ever exist is 21 million BTC. I find this explanation rather unsatisfactory.
If a group of people collectively decide to move all their savings into tulips, the price of tulips should skyrocket. However, new greenhouses could be built and some farmers could start growing tulips. As a result, the price of tulips would start falling and converging to the price prior to the "tulip mania". Seeing the value of their savings dropping, these disappointed tulip-lovers would rush to sell their tulips, causing the price of tulips to plummet. The media would then mock them for their financial illiteracy. It's hard out there for a tulip-lover...
If the former tulip-lovers then decided to move their savings into gold, the price of gold would almost certainly rise suddenly. However, new gold reserves cannot be manufactured out of, say, lead — assuming that no form of working alchemy is developed, of course. Without the required increase in the supply of gold, the price of gold would stay "inflated" and there would be no panic-selling. A computer scientist would perhaps say that the supply of gold is rate-limited.
I know nothing about economics, but I suppose an economist would say something along the lines of "the supply of gold is much, much more price-inelastic than the supply of tulips". To me, BTC looks closer to digital gold than to digital tulips.
Questions — As a total novice, the scarcity pertaining to BTC I do see is in the rate at which new BTC can be generated. But, what exactly does that have to do with the number 21 million?  When mentioning the total amount of Bitcoin that can ever be mined, shouldn't the practical upper bound on annual mining also be mentioned? Is my understanding of "Bitcoinomics" roughly accurate?

In discussions on the intrinsic value of BTC, when people write about scarcity I think they just mean that the supply is capped, that the difficulty of finding new bitcoins is increasing.


How do I use Bitnode API? I just started running a full node and was wondering how to use these commands to verify my node: https://getaddr.bitnodes.io/api/

Specifically, what command line or IDE do I need to type these commands into? Very new at this, sorry

If you are on MacOS or Linux use

curl https://getaddr.bitnodes.io/api/v1/nodes/SERVER-ADDRESS/

in Terminal or iTerm2

e.g.

curl https://getaddr.bitnodes.io/api/v1/nodes/107.3.158.6-8333/

will return to you

{"detail": "Not found"}

because it's not a running node address and port

and

curl https://getaddr.bitnodes.io/api/v1/nodes/80.56.212.9-8333/

will return to you

{"status": "UP", "data": [70002, "/Satoshi:0.10.0/", 1431732528, 1, 356844, "f212009.upc-f.chello.nl", null, "NL", 52.3667, 4.9, "Europe/Amsterdam", "AS6830", "Liberty Global Operations B.V."], "bitcoin_address": "", "url": "", "verified": false}r


Key Pools and best practices I'm wondering about what the best practices are around generating and maintaining key pools for a wallet.

What is the maximum number of keys/addresses that can be created for a single wallet? Phrased another way, what is the largest value one can safely put for the keypool option in bitcoin.conf?

If I generate some keys with bitcoind keypoolrefill then generate some new addresses and then call keypoolrefill again, will the original addresses still work, and will my private key now work for all addresses I've ever created?

Is there some way to determine how many keys are left in the current key pool?

The Bitcoin documentation says that this feature is actively being phased out. When will this happen and what will the new system be?

This wallet type is being actively phased out and discouraged from being used due to the backup hassle.

Answers to any of these questions is greatly appreciated.

Gavin Andresen (Bitcoin's Chief Scientist) has to say on the topic:

Backup every 30 sendtoaddress or generatenewaddress and you'll be fine-- you should always have at least 3 backup copies of all your keys.
If you're running a very busy service so backing up every 30 is too often, then run with -keypool=1000 and backup at least every 300 sends/generates.

What is the maximum number of keys/addresses that can be created for a single wallet? Phrased another way, what is the largest value one can safely put for the keypool option in bitcoin.conf?

The type of that parameter is int64_t so the maximum value is 2^(64-1)-1. In practice, you can put any number you want and it should not make the software break. However having a lot of keys (hundreds of thousands) will result in a very large wallet and potentially slow down the wallet loading phase.

  If I generate some keys with bitcoind keypoolrefill then generate some new addresses and then call keypoolrefill again, will the original addresses still work,

Yes. Everything is stored in the wallet and keys are never deleted.

  and will my private key now work for all addresses I've ever created?

That's not how private keys work. Each address has a private key, so if you have one private key, it corresponds to one address. Each address that is generated in the keypool will have its own private key which is stored in the wallet file.

  Is there some way to determine how many keys are left in the current key pool?

bitcoin-cli getwalletinfo will tell you how many keys are left in the keypool. The keypool is automatically refilled when your wallet is unlocked.

  The Bitcoin documentation says that this feature is actively being phased out. When will this happen and what will the new system be?

This system with the keypool is still in use and making periodic backups is still recommended as the wallet contains transaction data that is not backed up by deterministic wallets. The "new system" is to use BIP 32 Hierarchical Deterministic key derivation instead of randomly generated private keys. A seed is first randomly generated and then all private keys are derived from that seed. This means that only one backup is necessary in order to backup all of your private keys, but periodic backups are still recommended as stated above.

This feature was added to Bitcoin Core in Bitcoin Core 0.13.0. Most other modern wallets use BIP 32 HD wallets.


Would this alternative to Proof of Work work? I'm fairly new to the subject, but I've read enough to figure out that Proof of Work has a problem concerning mining pools, and other alternatives don't seem to convince me either. I thought of my own, but since I'm new I wanted advice to see if it could be implemented/improved or if its just garbage. So instead of having everyone mine, I thought 3 random "validators" could be picked to do the hash-math. Only if all 3 get the same result, it is stored to a "temporary" blockchain. And only if say the next 3 blocks worked with that result, it will be placed in the actual Blockchain. If 1 of 3 gets a different hash, 3 other random people are selected to validate. I thought this could help with problems of the 51% and energy consumption. I guess I could call it Proof if Three. It was just a thought experiment. Any feedback is welcome.

I thought 3 random "validators" could be picked to do the hash-math. Only if all 3 get the same result, it is stored to a "temporary" blockchain. And only if say the next 3 blocks worked with that result, it will be placed in the actual Blockchain. If 1 of 3 gets a different hash, 3 other random people are selected to validate.

The devil is in the details! How does the network agree on three random validators? Unless all participants are agreeing on the same quorum, the  network will not converge. How do you ensure that each network participant becomes aware of the chosen quorum? What happens when one of the quorum participants just simply never responds. Is there a timeout? How do you ensure that a distributed system without a shared clock agrees when the timeout comes into effect?
I'm afraid you are back to the start: now you need a consensus system to bootstrap your consensus system.
Even worse, Bitcoin attempts to achieve consensus under adversarial conditions. E.g. someone could be flooding the network with numerous entities (a "sybil attack") giving them a greater chance at providing all members of the quorum, which gives them authorship of the next block. Or some participant could attempt to actively sabotage the process by disseminating contradictory information. So, not only do we need to achieve consensus, but the network must also be Byzantine fault tolerant.
Either way, it's not trivial to come up with a consensus system that is stable, much less with one that has more attractive trade-offs than Bitcoin's proof-of-work.
You may find these related questions interesting as well:

Why doesn't Bitcoin migrate to proof-of-stake?
Is there a way to set up proof-of-work systems so they would be even more useful?


Is it possible generate three public key( address ) by only one private key? I hear that each address has one private key.
Is it possible generate three public key address by only one private key?

What do you mean by "public key address" ?

From one private key, you can generate:

A pay-to-pubkey hash address that uses the uncompressed form of the public key.
Pay-to-script hash address, where the script is (1)
Pay-to-script hash address, with a  OP_CHECKSIG script
Pay-to-script hash addresses, paying to 1-of-1 OP_CHECKMULTISIG with uncompressed pubkey.

And all of the above could use the compressed form of the pubkey to get another 4 addresses.

So one private key can be represented by eight different addresses.


Does any exchange provide API to call callback function on each transaction? Does any exchange provide API to call callback function on each transaction?

I would like to build a auto trade platform based on the tick event, but instead of pulling the price, I would like to use the push mechanism.

It is not common to have Push APIs for Exchange sites. However Poloniex has WAMP (Web Application Messaging Protocol) over WebSocket for ticker:

https://poloniex.com/support/api/


bitcoin difficulty determination Given the bitcoin difficulty information in https://bitcoinwisdom.com/bitcoin/difficulty, determine the bitcoin difficulty on April 1, 2019 and April 1, 2020. State any assumptions made in this determination.

Bitcoin difficulty as per today is 6,379,265,451,411 which is calculated on March 24th
. It is said
that the difficulty of hashing in bitcoin is calculated every 2 weeks and each block will take 10
minutes to get generated (which is 9.9 as per the given link). So, the next hash will only be
calculated on April 7 i.e., 2 weeks from the previous difficulty. Hence, the current difficulty will be
continuing until April 1st, 2019 and it will be the same. The formula for calculating bitcoin difficulty
is Next difficulty = (previous difficulty*20160)/(time in minutes to mine last 2016 blocks). But the calculating difficulty for a year is not possible as the difficulty can only be estimated for every 2
week


How does the GreenAddress refill (relock) work when its nLockTime expires? Ok, I understand that GreenAddress wallet uses a nLockTime transaction to put the funds in a 2of2 wallet, to give the user the peace of mind that, in the case their server disappears, they can still have access to the funds.

Now I'm interested to know how does the refill work exactly? I've read somewhere that if you make a transaction before the nLockTime expires, your transaction is automatically re-locking funds? How is this possible technically?

Thanks

For every bitcoin transaction you make or receive in a 2of2 wallet the platform sends you an email with an encrypted zip file containing all relevant transactions (spending all your utxo, unspent transaction output) with nlocktime set and partially signed (by GreenAddress).

When you normally spend on the platform, you will make some of these presigned transactions invalid by  virtue of spending those utxo (this is because when you spend you spend the entire amount and if there's any change left this is sent back to yourself, in our specific case to a new address) and when this happens you get a new zip with an nlocktime starting from when the zip was generated for the new transactions.


Correlation between business cycle and BTC price I would like to know if there is a correlation between business cycle and Bitcoin price, whether it is negative or positive.

I am wondering because Bitcoin is deemed as commodity in my country's law, and commodity prices tend to have strong correlations with business cycles. (i.e. gold, oil, ...)

Any suggestions or evidence?

There was an article a while ago, probably CoinDesk but I can't find it at the moment. Basically the study concluded that Bitcoin never sleeps. Overall trading volume doesn't correlate with open/close times in any particular timezones. If volume doesn't change with the time of day I don't think the price will either.


ZMQ Raw TX doesn't include all transactions I'm running a Bitcore.io node and using their ZMQ hook but I've noticed that on livenet not all transactions are actually being sent. I've been comparing it to https://blockchain.info/unconfirmed-transactions and my realtime logs and can see that some don't appear.

I've also tried creating a transaction to a output address and notifying us of this when it occurs and it hasn't appeared indicating my suspicions are correct.

This only happens on livenet, ran all our tests on testnet and it worked perfectly. Could this have something to do with maxconnections? I've tried increasing it to 250

There is a limit of how many messages can be in the ZMQ:

http://api.zeromq.org/2-1:zmq-setsockopt

  The ZMQ_HWM option shall set the high water mark for the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with.

So you might need to specify the option -zmqpubrawtxhwm to something that is larger than the default of 1000.


this transaction spends an input which is unconfirmed ~ 2 hours now So i've been waiting 2 hours for this;
https://blockchain.info/tx/df1d61ba4248d502bec5ff542c19eee6cbe7c88d607af89ff5ab485ec1f3800f?currency=BTC

I bought something with blockchain wallet via a site that had bitpay and when i sent it said success but its not confirming its been 2 hours now? i

Looks like it was included in block #441,569 and currently has 126 confirmations.


Transaction flagged as having a non-standard input A few hours ago I've sent a transaction which is not being added to a block, and on blockchain.info it flagged as "non-standard input".

I've used pybitcointools to create the TX.

What is wrong with the TX?

I believe it is non-standard because you include an OP code in your input script, specifically, OP_FALSE.  It should not be necessary to include OP codes in input scripts; only literals.  The only way input scripts (scriptSig's) intereact with the output scripts they are spending (scriptPubKey's) is by placing values on the stack.  Therefore, there is never any need to run an operation, since you could simply place the values on the stack.

From the docs for OP_FALSE:

  An empty array of bytes is pushed onto the stack. (This is not a
  no-op: an item is added to the stack.)

Becasue there is an operation and not just a literals in your script, it is non-standard.

That said, I'm not sure how to write an input script that places an empty array of bytes on the stack without using OP_FALSE.  I don't know why such a thing would be necessary for redeeming an output.

EDIT:  I just realized that you are using a standard Multisig input script (which I forgot is an exception to the "no op codes in input scripts" rule) to redeem a standard P2SH output script.  Technically, your redeem script is standard, because it matches one of the standard transactions, but it doesn't match the output script it is spending.  Your redeem script should probably be in the form of <sig> [sig] [sig...] <redeemScript> if it is going to spend an output script that looks like OP_HASH160 <Hash160(redeemScript)> OP_EQUAL.


Question about Python library coincurve/libsecp256k I am a noob with cryptography, just trying to learn using python and the library Coincurve ( https://github.com/ofek/coincurve ) which is a mature Python binding for libsecp256k1.

The following code creates a private key and produces a signature of the string "Hello world!".

pk = coincurve.PrivateKey()
message = b"this is a test!"
s = pk.sign_recoverable(message)

The signature s is a sequence 65 bytes.

The signature is recoverable: i can extract the public key of pk from s.

pub = pk.public_key
pub2 = coincurve.PublicKey.from_signature_and_message(s,message)
assert(pub == pub2)

So far all good! However I can't understand how to use the verify method. The following code

valid = coincurve.verify_signature(s,message,pub)

gives the following error:

ValueError: The DER-encoded signature could not be parsed.

So the problem is that the method verify_signature expects a signature in DER format. This is normally produced using the sign method, as opposed to the sign_recoverable method:

t = pk.sign(message)
valid = coincurve.verify_signature(t,message,pub.format())

which works fine.

So my question is:

QUESTION: How do I move back and forth from the "DER" format to the "recoverable" format in the Python library coincurve?

THANKS!

Recoverable -> DER

Use recoverable_convert. (which calls secp256k1_ecdsa_sign_recoverable)

DER -> Recoverable

Use sign_recoverable. (which calls secp256k1_ecdsa_recoverable_signature_convert)

^^I couldn't find an easier way.


ECDSA Signature and the "z" value The following link contains details on how to reverse the ECDSA signature if given two identical "R" values.

http://www.nilsschneider.net/2013/01/28/recovering-bitcoin-private-keys.html

I have read over this and there's one part I don't understand; how he got the "z" values.

Does a copy and paste of
"OP_DUP OP_HASH160 70792fb74a5df745bac07df6fe020f871cbb293b OP_EQUALVERIFY OP_CHECKSIG" (minus the quotations) into a ripemod-160 hashing function produce that result?

Did he have to essentially copy and paste some other string?  Did he just ripemod or sha 256d?  Did he have to do it more than once?

I've read up on these things but I just cannot decipher their programming description of how to do it.  The non-programming descriptions don't show "hey this 'xyzx' is what I'm referring to when I say 'message to be signed'" or whatever.  Many things on that page and on the

https://blockchain.info/tx/9ec4bc49e828d924af1d1029cacf709431abbde46d59554b62bc270e3b29c4b1

Seem as though they could adequately be described as the "message to be signed" besides the fact I don't know what type of hash is being applied to even compare my calculations with the ones shown on the first link.

note: what Nils Schneider calls 'z',  i call 'm'.

this gist implements all this: https://gist.github.com/nlitsme/dda36eeef541de37d996

the calculation

ecdsa signing is done as follows:

given a message 'm', a sign-secret 'k', a private key 'x'

 R = G*k  (elliptic curve scalar multiplication)
 r = xcoordinate(R)
 s = (m + x * r) / k     (mod q)

q = the group order of secp256k1 = 2^256 - 432420386565659656852420866394968145599

now if we have 2 signatures with identical k, we can write this as follows:

 s1 * k = ( m1 + x * r ) (mod q)
 s2 * k = ( m2 + x * r ) (mod q)

substract these two equations, leading to:

(s1-s2)*k = (m1-m2)      (mod q)

so the sign-secret 'k'  can now be calculated like this:

k = (m1-m2)/(s1-s2)      (mod q)

and given k, the private key can be calculated like this:

x = (s1*k-m1) / r        (mod q)

practical example

the original transaction

the lines below represent:

the version field
the nr of inputs (02)
the 2 inputs
the nr of outputs (01)
the output
the locktime field

01 00 00 00
02
 f6 4c 60 3e 2f 9f 4d af 70 c2 f4 25 2b 2d cd b0 7c c0 19 2b 72 38 bc 9c 3d ac ba e5 55 ba f7 01 01 00 00 00  8a 47 30 44 02 20 d4 7c e4 c0 25 c3 5e c4 40 bc 81 d9 98 34 a6 24 87 51 61 a2 6b f5 6e f7 fd c0 f5 d5 2f 84 3a d1 02 20 44 e1 ff 2d fd 81 02 cf 7a 47 c2 1d 5c 9f d5 70 16 10 d0 49 53 c6 83 65 96 b4 fe 9d d2 f5 3e 3e 01 41 04 db d0 c6 15 32 27 9c f7 29 81 c3 58 4f c3 22 16 e0 12 76 99 63 5c 27 89 f5 49 e0 73 0c 05 9b 81 ae 13 30 16 a6 9c 21 e2 3f 18 59 a9 5f 06 d5 2b 7b f1 49 a8 f2 fe 4e 85 35 c8 a8 29 b4 49 c5 ff  ff ff ff ff
 29 f8 41 db 2b a0 ca fa 3a 2a 89 3c d1 d8 c3 e9 62 e8 67 8f c6 1e be 89 f4 15 a4 6b c8 d9 85 4a 01 00 00 00  8a 47 30 44 02 20 d4 7c e4 c0 25 c3 5e c4 40 bc 81 d9 98 34 a6 24 87 51 61 a2 6b f5 6e f7 fd c0 f5 d5 2f 84 3a d1 02 20 9a 5f 1c 75 e4 61 d7 ce b1 cf 3c ab 90 13 eb 2d c8 5b 6d 0d a8 c3 c6 e2 7e 3a 5a 5b 3f aa 5b ab 01 41 04 db d0 c6 15 32 27 9c f7 29 81 c3 58 4f c3 22 16 e0 12 76 99 63 5c 27 89 f5 49 e0 73 0c 05 9b 81 ae 13 30 16 a6 9c 21 e2 3f 18 59 a9 5f 06 d5 2b 7b f1 49 a8 f2 fe 4e 85 35 c8 a8 29 b4 49 c5 ff  ff ff ff ff
01
 a0 86 01 00 00 00 00 00 19 76 a9 14 70 79 2f b7 4a 5d f7 45 ba c0 7d f6 fe 02 0f 87 1c bb 29 3b 88 ac
00 00 00 00

the input scripts

the input script consists of:
 * the total length (8a)
 * the signature
 * the public key

8a
  47  30 44 02 20 d4 7c e4 c0 25 c3 5e c4 40 bc 81 d9 98 34 a6 24 87 51 61 a2 6b f5 6e f7 fd c0 f5 d5 2f 84 3a d1 02 20 44 e1 ff 2d fd 81 02 cf 7a 47 c2 1d 5c 9f d5 70 16 10 d0 49 53 c6 83 65 96 b4 fe 9d d2 f5 3e 3e 01
  41  04 db d0 c6 15 32 27 9c f7 29 81 c3 58 4f c3 22 16 e0 12 76 99 63 5c 27 89 f5 49 e0 73 0c 05 9b 81 ae 13 30 16 a6 9c 21 e2 3f 18 59 a9 5f 06 d5 2b 7b f1 49 a8 f2 fe 4e 85 35 c8 a8 29 b4 49 c5 ff

the signature is an asn1 encoded r+s value + a hashtype indicator (01)

30 44
    02 20  d4 7c e4 c0 25 c3 5e c4 40 bc 81 d9 98 34 a6 24 87 51 61 a2 6b f5 6e f7 fd c0 f5 d5 2f 84 3a d1
    02 20  44 e1 ff 2d fd 81 02 cf 7a 47 c2 1d 5c 9f d5 70 16 10 d0 49 53 c6 83 65 96 b4 fe 9d d2 f5 3e 3e
01

so now we can extract these values from the transaction:

pk 04dbd0c61532279cf72981c3584fc32216e0127699635c2789f549e0730c059b81ae133016a69c21e23f1859a95f06d52b7bf149a8f2fe4e8535c8a829b449c5ff
r  d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1
s1 44e1ff2dfd8102cf7a47c21d5c9fd5701610d04953c6836596b4fe9dd2f53e3e
s2 9a5f1c75e461d7ceb1cf3cab9013eb2dc85b6d0da8c3c6e27e3a5a5b3faa5bab

next we need to calculate the message hashes.

prepare

Strip the input scripts, and add the hashtype

01 00 00 00
02
 f6 4c 60 3e 2f 9f 4d af 70 c2 f4 25 2b 2d cd b0 7c c0 19 2b 72 38 bc 9c 3d ac ba e5 55 ba f7 01 01 00 00 00  00  ff ff ff ff
 29 f8 41 db 2b a0 ca fa 3a 2a 89 3c d1 d8 c3 e9 62 e8 67 8f c6 1e be 89 f4 15 a4 6b c8 d9 85 4a 01 00 00 00  00  ff ff ff ff
01
 a0 86 01 00 00 00 00 00 19 76 a9 14 70 79 2f b7 4a 5d f7 45 ba c0 7d f6 fe 02 0f 87 1c bb 29 3b 88 ac
00 00 00 00
01 00 00 00   <<< hashtype

calculating m1

replace the first input with the corresponding output script

01 00 00 00
02
 f6 4c 60 3e 2f 9f 4d af 70 c2 f4 25 2b 2d cd b0 7c c0 19 2b 72 38 bc 9c 3d ac ba e5 55 ba f7 01 01 00 00 00  19 76 a9 14 70 79 2f b7 4a 5d f7 45 ba c0 7d f6 fe 02 0f 87 1c bb 29 3b 88 ac  ff ff ff ff
 29 f8 41 db 2b a0 ca fa 3a 2a 89 3c d1 d8 c3 e9 62 e8 67 8f c6 1e be 89 f4 15 a4 6b c8 d9 85 4a 01 00 00 00  00  ff ff ff ff
01
 a0 86 01 00 00 00 00 00 19 76 a9 14 70 79 2f b7 4a 5d f7 45 ba c0 7d f6 fe 02 0f 87 1c bb 29 3b 88 ac
00 00 00 00
01 00 00 00

then do sha256(sha256(modified transaction))

this will result in : c0e2d0a89a348de88fda08211c70d1d7e52ccef2eb9459911bf977d587784c6e

calculating m2

replace the second input with the corresponding output script

01 00 00 00
02
 f6 4c 60 3e 2f 9f 4d af 70 c2 f4 25 2b 2d cd b0 7c c0 19 2b 72 38 bc 9c 3d ac ba e5 55 ba f7 01 01 00 00 00  00  ff ff ff ff
 29 f8 41 db 2b a0 ca fa 3a 2a 89 3c d1 d8 c3 e9 62 e8 67 8f c6 1e be 89 f4 15 a4 6b c8 d9 85 4a 01 00 00 00  19 76 a9 14 70 79 2f b7 4a 5d f7 45 ba c0 7d f6 fe 02 0f 87 1c bb 29 3b 88 ac  ff ff ff ff
01
 a0 86 01 00 00 00 00 00 19 76 a9 14 70 79 2f b7 4a 5d f7 45 ba c0 7d f6 fe 02 0f 87 1c bb 29 3b 88 ac
00 00 00 00
01 00 00 00

then do sha256(sha256(modified transaction))

this will result in : 17b0f41c8c337ac1e18c98759e83a8cccbc368dd9d89e5f03cb633c265fd0ddc

Note that the redeemed output scripts and the output script of this transaction are all identical in this case. That is not usually so.

so our message hashes are:

m1 c0e2d0a89a348de88fda08211c70d1d7e52ccef2eb9459911bf977d587784c6e
m2 17b0f41c8c337ac1e18c98759e83a8cccbc368dd9d89e5f03cb633c265fd0ddc
s1 44e1ff2dfd8102cf7a47c21d5c9fd5701610d04953c6836596b4fe9dd2f53e3e
s2 9a5f1c75e461d7ceb1cf3cab9013eb2dc85b6d0da8c3c6e27e3a5a5b3faa5bab

m1-m2 = 0xA931DC8C0E011326AE4D6FAB7DED290B196966154E0A73A0DF434413217B3E92
s1-s2 = 0xAA82E2B8191F2B00C8788571CC8BEA41086440225A4B5CBED84D02CF638123D4

modulare inverse of s1-s2 = 0xf7d5417b3844fd8f4b3d909979fa7480ce094fb233d759274fd6c3aa6cf86593

so our secret 'k' value is:

-> (m1-m2)/(s1-s2) = 0x7a1a7e52797fc8caaa435d2a4dace39158504bf204fbe19f14dbb427faee50ae

the private key can then be calculated :

s1*k-m1 = 0x797035d79964e4b74fbbef4460379c410261cd01de43278bc2a7efaa541dd8e9 - 0xc0e2d0a89a348de88fda08211c70d1d7e52ccef2eb9459911bf977d587784c6e
        = 0xB88D652EFF3056CEBFE1E72343C6CA67D7E3DAF5A1F76E366680D6619CDBCDBC

(s1*k-m1)/r = 0xc477f9f65c22cce20657faa5b2d1d8122336f851a508a1ed04e479c34985bf96

Explanation of Transaction Contents

A transaction consists of a number of inputs, and a number of outputs.

An input refers to one of the outputs from another transaction, and contains a script which proofs that this transaction is allowed to redeem that output.

An output consists of a BTC value, and a script which will be used to validate the proof presented in the input script at the time this output will be redeemed.

When an output is redeemed, the input and output scripts are concatenated, and evaluated by the bitcoin client. the result must be 'TRUE'.

The script language is a very simple, non-turing complete, stack based language.

The most common script looks like this:

---- input script ( aka scriptSig )
PUSH signature
PUSH publickey
---- output script ( aka scriptPubKey )
DUP
HASH160
PUSH pubkeyhash
EQUALVERIFY
CHECKSIG

Note that the 'PUSH' is not explicitly labeled as PUSH in the bitcoin script description.

In the output script, first it is verified that the addresshash ( which is the bitcoin address in binary format ) corresponds to the public key from the input.
Then with CHECKSIG it is verified that the specified signature is valid for this transaction.


In Getwork, how does one calculate the value of Hash1? (I know the hash1 and midstate are eventually going to be deprecated, but I'm a little curious about them)

In Getwork there is a field hash1. From a sample call to bitcoind I received its value as:

'hash1': '00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000'

How exactly is hash1's value calculated?


What wallet / e-wallet is the most convenient for new casual Bitcoin users? I'd like to make small payments for business purposes through Bitcoin, so would like to know what the easiest method of getting setup to accept a Bitcoin payment is for a regular person, so that I can recommend it to those I want to pay.

Some options I see are:

Standard Bitcoin client
BitcoinJ
Instawallet
Flexcoin

These people will only be holding a few Bitcoin at most in their wallet, so security is not as high a priority as in other cases, but I would still like to avoid a Mybitcoin type fiasco where every one I pay loses their money.

Which method has the best combination of convenience in getting setup and security?

Sorry to dig up and old question but I just wanted to add a link to My Wallet provided by blockchain.info

I guess the thing that separates My Wallet from other e-wallet providers is that the site aims to feel more like an actually bitcoin client rather providing disposable addresses. I tried to design the site to be easy to use and it should seem familiar to anyone that has used PayPal or online banking. I will be adding more features soon which should be familiar to novice users such as invoices and monthly statements.

You can generate up to 200 different bitcoin addresses and are free to export the private keys at anytime. In fact if you already have an existing bitcoin address you don't even need to add your private keys at all. For more information about how the site works try the faq or browse the code.


Paper wallet imported to blockchain.info with private keys Recently I added my paper wallet address and private key to my blockchain.info account. Now I cannot find an option in the app or in the website to delete the imported private key, does that mean that blockchain.info now holds my private key? In that case, I won't be able to add my wallet into another similar app because it's already synced with blockchain.info with my private keys! I am new to this whole bitcoin thing so I am still trying to figure things out.
Regards,
Bince

does that mean that blockchain.info now holds my private key?

Yes, but not exclusively. You still have your private key on paper, so you still hold it. If you don't (i.e. you lost your paper wallet or destroyed it), you can still get your private key from blockchain.info.

  In that case, I won't be able to add my wallet into another similar app because it's already synced with blockchain.info with my private keys!

No, that is not how Bitcoin works. Anyone who holds the private key can spend your Bitcoin. You also hold it on your paper wallet, so you can still import it into another wallet software. There is nothing that prevents you from doing that; it's not like something that can only be imported once.

If you don't want blockchain.info to have your private key, just make a new paper wallet and send your Bitcoin there from blockchain.info. If you want to access your Bitcoin from a different wallet than blockchain.info, then just import your private key into a different wallet.