Importing BTC/BCH into Ledger Nano S

Can and how does one import a paper wallet (private key) that contained BTC before the hardfork and now BCH as well into a ledger nano s to split them? Or do they have to be split in another wallet first and then tranfered separately? I’ve contacted Ledger support but it takes weeks to get a response.

Bitcoin library vs script to develop application

I’m curious about the development of application of Identity management in Blockchain platform, but I’m a bit confused about the technologies to use.

In short words, when is more convenient to develop an application coding in script and when is it better to use a high-level library like BitcoinJ or a service as Blockchain.info API?

I’m a Java developer and I’m more confortable using a Java Library like bitcoinJ, but I don’t understand if, in this way, I can lose something in performance or expressivity or "semantic power" in regard to most raw-level scripting system of Bitcoin (that is a kind of assembler).

Thanks you in advance

What are the trust assumptions in –assumed-valid in bitcoin core 0.14?

Please help me understand and distinguish the trust assumptions in the following three cases shown below. Specifically, please elaborate the attacks possible (even though completely theoretical) and trust sacrificed to get the functionality.

Case 1: Bitcoin Core before 0.14 without assumed-valid and where each node does complete signature verification.

Case 2: Bitcoin Core 0.14 with the assumed-valid blocks with signature validation skipped for blocks prior to release. This means that the block signatures are correct because bitcoin-core devs signed on it.

Case 3: (Hypothetical) : Bitcoin Core 0.14 with UTXO set which has the snapshot of UTXO database. This would be done in a similar way as assumed-valid. This would skip the complete IBD and be really useful for quickstart-pruned node.

I would like to know answers to the following 2 questions:

Q1) What are the possible attacks (even though completely theoretical) which are possible in case 2 but not in case 1. Please elaborate security-model change required to shift from Case 1 to Case 2.

Q2) What are the possible attacks (even though completely theoretical) which are possible in case 3 but not in case 2.
It appears to me that security model in Case 3 is same as that of Case 2. If I trusting core devs with signature-validation, might as well trust they give the correct UTXO set.

bitcoin.rpc python library problem

I am working through Master Bitcoin. I got the bitcoin client up and running. I am now trying to access the client from python. In the example, there is a line that says from bitcoin.rpc import Rawproxy.

I get the error message no module named rpc. When I run pip freeze, I have python-bitcoinrpc==1.0 listed. Why can’t this module be found?

Store Bitcoins offline

I have some bitcoins and ether at Blockchain.info and I am really scared of losing them.

How do I best secure them? Right now I have a paper with the code to restore my wallet, but my coins are still stored at Blockchain.info.

Wouldn’t it be better to store them completely offline? How do I do this? What is the difference of storing them at Blockchain.info and keep a paper with the code to restore the wallet?

I guess if I store my coins at Blockchain.info, I have to trust that they don’t go bankrupt, they don’t steal my coins, and no one hacks their servers and steal my coins.

Therefore, I guess it’s more safe to store them physically, but I don’t understand how they are stored physically. From my understanding, I just create a code that can validate that I am the owner of the coins. So if I in the future want to see my coins, I can create an online wallet using the physically stored code?

What I basically want is to store my coins offline but have a wallet where I can see exactly how many coins I can access with the offline stored code (without giving the code to an online wallet).

I have also looked at Ledger, but they are very pricey and I don’t really see the value in them, since I still have to store a code on a physically printed paper to be sure I can still access the coins in case I break or lose the Ledger.

How to produce a Hash160 bitcoin address?

tl;dr
How should one perform Hash160, using most basic tools?

====================================================

Hi,

I’m trying to figure out, how transactions work in bitcoin.

When I choose inputs for a new tx I want to make sure they belong to a specific address. However, existing txs do not specify previous outputs’ addresses, but instead they contain address’ hashes.

e.g.:

>> bx fetch-tx 11a1b7ac0a65bd50b7094c720aecd77cfd83d84b1707960fd00dd82a888aab5c --config /home/theo/Desktop/bx-testnet.cfg

{
    hash 11a1b7ac0a65bd50b7094c720aecd77cfd83d84b1707960fd00dd82a888aab5c
    inputs
    {
        input
        {
            address_hash f3b7278583827a049d6be894bf7f516178a0c8e6
            previous_output
            {
                hash 4a3532061d43086299ae9b2409a456bb9638dff32e0858c4ccda27203fb2e4f6
                index 1
            }
            script "[30440220146b8b5b014245a9e27e21122d4dded04c3f39c3a49ac2494743d6f6ae8efff602206d417a4be9c7431ea69699132438510ade1cf8d746607f77d114907762ed1eb301] [023dd2e892290e41bb78efce6ea30a97015ef13eaaa9ebb7b0514485fc365cc391]"
            sequence 4294967295
        }
    }
    lock_time 0
    outputs
    {
        output
        {
            address_hash a73706385fffbf18855f2aee2a6168f29dbb597e
            script "dup hash160 [a73706385fffbf18855f2aee2a6168f29dbb597e] equalverify checksig"
            value 130000000
        }
        output
        {
            address_hash ad6e80394af99ece5d7701bf2f457480b93965b7
            script "dup hash160 [ad6e80394af99ece5d7701bf2f457480b93965b7] equalverify checksig"
            value 49525957813
        }
    }
    version 1
}

Say, I want to check which of the outputs can be sent from address mvm74FACaagz94rjWbNmW2EmhJdmEGcxpa
So I take its Hash160 in Python:

>> hashlib.new('ripemd160', hashlib.sha256("mvm74FACaagz94rjWbNmW2EmhJdmEGcxpa".encode('utf-8')).digest()).hexdigest()
'748598cd9b004aecf8a2d97464fb1f2a90562ffe'

That is not the result I expected: a73706385fffbf18855f2aee2a6168f29dbb597e

Meanwhile, this online service calculates hash correctly.

How do I Hash160 a bitcoin address, preferably in Python?

opening an old wallet.dat

I had about $8 USD worth of bitcoin in a wallet, and I backed up the wallet.dat to my dropbox. According to the modified date of the file this was in April 2013, so it was probaby from bitcoin qt version 0.8.1, or maybe a little earlier.

I basically left it there and haven’t done anything with bitcoin since then. Since it is worth probably at least $100 now I decided to check the exact amount.

I downloaded the latest version of bitcoin core, added the wallet.dat file to the data directory, started it with -rescan, and waited almost a month (!) for the blockchain data to get up to date. The balance showed as 0 the whole time. I thought it would update once the blockchain was totally downloaded, but it still just says 0.

Is this a problem with old vs new versions? Did I do something wrong? Next time, should I expect the balance to show a non-zero amount even if I haven’t downloaded the whole blockchain yet?

mSigna: Signed, send, but 0 confs despite high fee (0.001 BTC)

Tried to send my first tx from mSigna today. Receiving was painless, but the send does not get included into a block since half a day, and dozens of blocks passed.

I unlocked the account, created the tx, signed and sent it. The confirmation count for my receiving tx still rises (as more blocks arrive), but the one for the sending tx stays 0. Sounds like enough support to me…

I feel I am missing important information, like I need to do some step in addition?

The only calculation for the fees I found is at bitcoinfees, but it’s based on average tx size. It currently recommends 0.0002712 BTC, which is well below the fee I payed.

blockchain.info says “Transaction not found”. Looking at the adress at blockchain.info, it says “0 transactions”.

I’m running mSigna 0.10.6 with Bitcoin Core QT 0.14.2 (64bit) locally.

EDIT: As I read somewhere that transactions based on unconfirmed payments take longer than usual, I wanted to add that my receiving transaction is shown with over 6000 confirmations (again up from yesterday).