texts:
Suppose Alice has 1 BTC, Bob has 1 LTC, and Carol has 1 NMC. Alice wants NMC for BTC, Bob wants BTC for LTC, and Carol wants LTC for NMC. Assume each cryptocurrency has the same value and can be 1-to-1 transferred. They need to make a three-way swap: Alice will transfer BTC to Bob, Bob will transfer LTC to Carol, and Carol will transfer NMC to Alice. However, there is no trusted authority/intermediary.
Preliminary:

H is a cryptographic hash function. Hashlock h indicates that if A sends the contract a value s, (i.e., a secret) such that h = H(s), then the contract irrevocably transfers ownership of those altcoins from B to A. Timelock T indicates that if A fails to produce that secret before time T elapses, then the escrowed altcoins are refunded to B. Here, T is the enough time for one user to publish a smart contract on any blockchain, and for the other user to detect that the contract has been published.

Detailed swap is as follows.

Step 1: Alice creates a secret s, such that h = H(s). Then, she publishes a contract on the BTC blockchain with hashlock h (timelock 6T in the future), to transfer her BTC to Bob.

Step 2: Bob first confirms whether Alice’s contract has been published on the BTC blockchain or not. If true, he publishes a contract on the LTC blockchain with the same hashlock h (with timelock 5T in the future), to transfer his LTC to Carol.

Step 3: Carol first confirms whether Bob’s contract has been published on the LTC blockchain or not. If true, she publishes a contract on the NMC blockchain with the same hashlock h (timeout 4T in the future), to transfer her NMC to Alice.

Step 4: Alice first confirms whether Carol’s contract has been published on the title blockchain or not. If true, she sends the secret s to Carol’s contract, while acquiring 1 NMC and revealing s to Carol.

Step 5: Carol then sends s to Bob’s contract, while acquiring 1 LTC and revealing the secret s to Bob.

Step 6: Bob finally sends s to Alice’s contract, while acquiring the 1 BTC. The swap is completed.

Questions:

a) If Bot halts in Step 2, what is the result?

b) If Carol halts in Step 5, what is the result?

c) If Carol posts her contract with Alice before Bob posts his contract with Carol, what is the result?

d) If Carol’s contract with Bob were to expire at the same time as Bob’s contract with Alice, what is the result?

e) If Alice reveals the secret s before Step 3 completes, what is the result?


texts: Find all transactions for a bitcoin address

texts:
I'm looking for a way to query all transactions related to a particular bitcoin address - I periodically need to find all transactions for numerous addresses.

I've seen info about bitcoind searchrawtransactions, although it looks like this may no longer be supported?

Any recommendations?


texts: Solving a block and share relationship [pool mining]

texts: I have a somewhat odd question. I am currently pool mining and it is telling me my best share and the difficulty (this is an altcoin but same question applies). My miner is telling me my best share was 16.7K and the difficulty is a little over 100, does it matter what my 'best share' is for that round? How do I know when I solve a block in the pool? I hope this made sense


texts: I keep seeing references to destroying bitcoins by sending them to addresses that nobody can own (e.g., addresses derived from impossible public keys). What would be the reason for doing this? It's discussed in such a cavalier manner in various posts that I'm assuming it's not an attempt to undermine the currency.


texts: Recently I got in a discussion with my brother over what bitcoin is and what mining is. He had never heard of it so I had to do my best to explain it all from the beginning. I had trouble explaining certain aspects of mining though. He only understood Bitcoin from the standpoint of it being disruptive and undermining or potentially destroying the US economy. He saw my actions of mining crypto currency as printing money at home and artificially inflating the US economy. I tried to explain that essentially it is the US economy and other fiat currencies that are the ones printing money and causing massive inflation and that Bitcoin in the long term does not suffer from that problem. I am having difficultly still though understanding the best way to explain to him where the money comes from when I mine, how it is different from printing money. Anyone else out there have a similar experience or know the best way to explain this?


texts: Buy bitcoins with my vef (bolivares) in Venezuela without wire transfer

texts:
I want to buy bitcoins with my vef (bolivares) from my account in Venezuela.
How can I go about it?, we don't have a way of sending a wire transfer overseas in our currency.


texts: What does 'signal' and 'lock-in' mean in a BIP?

texts: I have a vague idea about the jargon used over there, but what exactly do 'signal' and 'lock-in' mean specifically?


texts: coin selection - why selecting transactions with confirmations first better

texts:
I know that selecting transactions with confirmations first are much better than spending transactions with 0 confirmations direct.

But why is that?


texts:
I had a wallet which had approx $660 worth of bitcoin somewhere around 0.05 BTC and all of a sudden it has vanished and my transaction tab shows nothing.

I have put my receiving address into the block chain and it shows that a transaction sometime in March of 2019 was made and I didn't make any transactions in March of this year. How odd. Anyway this has blown my mind and I don't know who to ask for help or what to do ?

Any ideas or can someone be of assistance? I really don't know what to do. In addition, I was thinking that maybe bitcoin had plummeted on the market and maybe it lost value and that's why maybe I have none but to be fair there was enough bitcoin in my wallet but no nothing.

Am I doing something wrong and it is safe for me to paste my receving address here for someone to take a look or is that a bad move ?

I only use my bitcoin to pay for VPN and it does show that I renewed my VPN in august which is when I did make a transaction so why it is showing a transaction in March 2019 makes no sense whatsoever.

I've read that something does cause bitcoin to appear as vanished but to be fair I've re-synced which took over 24 hours and I created new receiving addresses which I read can sometimes re-gig the system and your available bitcoins appear.

Nothing?

Any ideas ?
Thanks
KC


texts: Can I recover btc sent to an incorrect address? (electrum)

texts: So I have an electrum wallet and I sent about $150 in btc to it. That all worked but when I tried to send it to another address, it didn't go through. Looking at the transaction, the btc went to an address similar (3F***...) to the one I entered, but not exactly the same (3D***...). I realize now that I had a malware copy of electrum, but I've taken care of that. What I'm worried about is recovering the funds sent to that address. When I look at it on a blockchain explorer, I can see that it started at 0, I sent 0.009 btc to it, and nothing has been done with it since. I read somewhere something about "restoring" a read-only wallet from the transaction ID and then getting the address' private key from the send address and sweeping it into my main wallet, but I haven't figured out how to do that with electrum yet. Does anybody know how to do that or something else to get those funds back?


texts: Get a programmatical notification when an address receives a transaction

texts:
I am experimenting building an in-house Bitcoin payment system.

What is currently the recommended practice to get notifications to your web server when a certain Bitcoin address receives a transaction? E.g. trigger an action from somewhere which results a HTTP call made to a web server.

Are there any better alternatives than polling bitcoind?

External systems (blockchain.info) are good to go too for me.

Any way to filter for certain confirmation threshold (e.g. need 6 confirmations)?


texts: What Is the difference between the testnet and the mainnet?

texts: I have been seeing some questions about the testnet but what is the testnet?  Is the mainnet the one we normally use? What is the difference?


texts: Tracking transactions in both directions

texts:
I have an example of a transaction. I deleted some fields which don't play any role for my question. Also I reduced large hashes and IDs.

{
 "txid": "8d554",
  "vin": [
    {
      "txid": "d3117",
      "vout": 0
    }
  ],
  "vout": [
    {
      "value": 1.99995000,"address":"mrL8SS",
      "n": 0
    },
    {
      "value": 3.00000000, "address":"mtK8r",
      "n": 1
    }
  ]
}

From this transaction I can find out which transaction was used for paying outputs of this transaction. Because those transaction is in vin field. Its txID is d3117. So if I want i will be able to find this transaction by using bitcoin client RPC API: bitcoin-cli gettransaction d3117.
  But what if i want to find out, which transaction used THIS transaction as input? Could you guys please tell me, if it's possible or not?


texts: getnewaddress (RPC) on encrypted bitcoin wallet without wallet password?

texts:
Say for example an encrypted wallet has 5000 addresses already pre-generated in the keypool.

Can getnewaddress be called via RPC command without knowing the actual wallet password?

I envisage a shopping cart script which calls getnewaddress to provide a customer with an address to spend to. The shopping cart would know the RPC password, but not the wallet password. The shopping cart never needs to spend funds.

If the shopping cart was hacked, can bitcoin be stolen?


texts:
When I execute bitcoind on CentOS 7 I get this error:

Unable to start HTTP server. See debug log for details.
 bitcoind: scheduler.cpp:19: CScheduler::~CScheduler(): Assertion `nThreadsServicingQueue == 0' failed.


texts: Bitcoin core has been stuck syncing to the network

texts:
This keeps repeating in the log file:

2020-04-16T23:59:53Z ERROR: AcceptBlockHeader: block 0000000000000000000fb8b3828b04c17205ffcdedddc8be1d400d132d336460 is marked invalid


texts: Tried to do a BCC transaction ended in a BTC transaction

texts:
I have a local BTC wallet. Which holds coins from pre-fork times.

So I tried to get my BCC amount sent to a wallet on bitfinex. So I used my local wallet with the BitcoinABC client to access the BCCs.

But that ended up in sending my BTCs to this address. The address indeed exists as BTC as well, so the transaction was successful. But i don't even have access to this BTC wallet (only the BCC wallet).

Why did the BitcoinABC client sent my BTCs (which are much higher in value...)? It says BCC everywhere. I was not even aware, that Bitcoin ABC is capable of performing BTC transactions. What did I do wrong?


texts:
bitcoin noob but here goes. I have a bitcoin address (obviously) and someone has sent me bitcoins. Now I don't have a wallet just the address (public and private) in order to withdraw from an ATM or maybe even purchase stuff? Do
I have to create a bitcoin wallet as well? Sorry if that is a REALLY dumb question but I don't know too much about this stuff. Thanks guys


texts: Can a Finney Attack make SatoshiDice betting profitable? If you perform a Finney Attack whenever your bet fails (by replacing it with a transaction to yourself), then would it make betting profitable, even though the Finney attack won't always work? How much mining power would you need to break even on profitability?


texts: Retrieve BCC/BCH but now have 0. Was i Hacked?

texts:
hey guys i followed an instruction from reddit and exodus chat and both had similar instructions to retieve Bitcoin Cash. I followed the instructions and it seemed like i received the coins though it took hours to confirm.
I started by stransfering my BTC from Exodus to Jaxx, then use the Exodus private key to retrieve BCC with Electron Cash.
I opened it yesterday and it said i had the balance i expected. today i open it it says 0 BCC.
take a look:

I havnt sent any of my BCC to anyone. I was trying to send to my exchange when the app said "insufficient funds". Was i hacked or something?
Help!


texts: Restricting a wallet to a specific destination address

texts:
I have an idea for a tool I'd like to build, but first I need to understand the Bitcoin protocol a little better.

Is there any way, hypothetically, to ensure that a given wallet or address can only transmit to a restricted address or set of addresses?


texts: A complete bitcoin implementation in Python?

texts: I recently became aware that python-bitcoinlib is not a full bitcoin node implementation, but rather a set of tools to work with bitcoin-core cpp. I would like to know whether there are some fundamental issues with implementing a complete bitcoin node using python? Also if it were to be tried as a code-golf exercise (the shortest code to get the full node running) how many lines of code will it amount to in python ??


texts: Can somebody really tell how many BTC I have from a receive address?

texts:
I bought a small number of BTC in 2013.
Although it's not true, let's say for simplicity that I never moved them from my wallet.dat where I first received them.
Now, in 2020, I generate a new receive address in Bitcoin Core, loaded with that same wallet.dat.
Then I put this receive address in public.
Can anyone now somehow determine how many Bitcoin I own, based on that receive address?
Or is that receive address now as "opaque" and "pristine" as any receive address which has not received any coins yet?
I've been trying to understand exactly HOW Bitcoin is "not anonymous" for over a decade, but it's very difficult for me to grasp. For all practical purposes, it seems to be anonymous if actually used correctly. That is, never reuse receive addresses.
But I'm probably missing something.


texts: I set maxconnections=125 in bitcoin.conf but still has only 8 connections in nodelist. Please tell why?


texts: Why did BitcoinEXpress plan a 51% attack on Namecoin?

texts:
I don't understand this post.

What is "ArtForz modified exploit"?

What does "Gavin's patch will not work for the exchanges" mean?

Any more important details I'm missing?


texts: Who implemented BitcoinPayment at the Bitcoin wiki?

texts: Who was the technical person who implement/integrated BitcoinPayment at the Bitcoin wiki? How can he be contacted?


texts: Where does "Included in Block" value comes from?

texts:
I was exploring transactions inside of a blockchain using  this site, and inside of a transaction I noticed there is attribute called Included in Block and its description is: block this transaction is mined and confirmed in.
(I don't know does it matter but, transaction I was looking is this one)

I was wondering, how is this attribute populated? The reason of my question is that I was exploring how can you, by looking at transaction inside of your UTXO, check in which block transaction was included (and then I found this attribute). Is this the right way?
Thank you!


texts: How are the prefixes for EXT_PUBLIC_KEY and EXT_PRIVATE_KEY derived?

texts:
I want to know how the prefixes for EXT_PUBLIC_KEY and EXT_PRIVATE_KEY are derived. For example in bitcoin you have:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

And I another cryptocurrency has:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,25);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
base58Prefixes[SECRET_KEY]     = std::vector<unsigned char>(1,153); // 25 + 128
base58Prefixes[SECRET_KEY_OLD] = std::vector<unsigned char>(1,151);
base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x1E)(0x56)(0x2D)(0x9A).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = list_of(0x1E)(0x56)(0x31)(0xBC).convert_to_container<std::vector<unsigned char> >();

Im trying to make a server that generates addresses from the Extended public key without exposing the private key on the latter cryptocurrency but I've been running into some problems. I want to understand how the EXT_PUBLIC_KEY is derived as for the development and how it is used  to generate addresses. I'm trying to implement it into pywallet (https://github.com/ranaroussi/pywallet) but it seems to not support this kind of EXT_PUBLIC_KEY


texts:
I'm trying to restore an old wallet, using bitcoin-qt 0.21 but I'm getting the following error on startup: wallet.dat corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup
What tool is this? I have tried googling it. Thanks!


texts: What concerns arise from the heavy miner concentration in China?

texts: As per an Business Insider article last year, approximately 73% of the hash power comes from China. Over 50% just by the top 3. If coordinated, they could cause havoc. Is that a concern to anyone?


texts: How do wallets know that address is not duplicated if I'm going to make one?

texts:
Let's assume that I'm going to make a wallet through Electrum that has some Bitcoin address.

So then, How Electrum do know that is not duplicated(Already owned by another person)?

Are we just relying on big numbers(2^160)? or Does Bitcoin system has some function to prevent duplicate?

Thank you for listening my question. No offense! Just curious about the function or how it works!


texts: Previous block hash on first Bitcoin block?

texts:
The bitcoin-explorer command bx fetch-header -t 1 fetches the first Bitcoin block and shows the block header.
If I check the "first" block header, where does "previous block hash" come from?


texts: testnet3 - unable to post txn using blockr or webbtc but can do using blockcypher. Also, transactions not getting confirmed. Why?

texts:
Tried to use blockr's Api to push transaction - using both online and shell tool - but I get this error:

There was an error pushing your transaction to network!

Did you sign your transaction? Is this double spend? Have you already sent this transaction?

Using webbtc relay api curl http://test.webbtc.com/relay_tx.json -X POST -d "wait=10&tx=RAWTXN" also gives me error:

{
  "error": "Request took too long."
}

However I am able to successfully push transactions using Blockcypher's API.

But here, my transactions have stayed unconfirmed for over 12 hours now :(
Even when I have left a decently large miner fee as seen here.

Worse, I can't find these unconfirmed transactions on blockr. you can find two transactions made to this address: mrZn18QS3Q4LWiyAHt2HtVkJvkEooqXn6G. They can be seen on blockcypher but not on blockr.

Can anyone help me understand what's going on? I thought I should be able to see published transactions, even if unconfirmed from any explorer that explores bitcoin testnet3?

TIA.


texts: How to check if the block chain is up to date using bitcoind or json-rpc?

texts:
I read the full api method list and did not seem to find one.

I suppose there is no command specifically for that purpose, so what is the general way of doing this?

I would consider checking the time stamp of the last generated block, but the getblock method is not really explained in much detail.

EDIT:

Some people answer that I should compare the block count with one of an online block chain monitor. That is not really a practical solution. The Bitcoin-Qt client has a way of knowing when syncing is done (the V-sign vs the syncing icon), so why doesn't bitcoind? How does the Bitcoin-Qt get this information?


texts:
I installed the bitcoin program and now it's synchronising, and although I installed it on my very large D: disk it's moving all of the stuff on my little C: disk.
It's now around 6 GB in size with 45 weeks to go and I'm out of room. Is there a way I can safely move it to my D: or make it synchronise onto my D: instead?


texts: How to get the addr from this transaction

texts:
https://www.blockchain.com/btc/tx/2ccc3f59d28c709770a8bc478b112e10feda4bf55197c2e48deaa0eb6bca0311?show_adv=true

The SCRIPT in the transaction is:

DUP HASH160 PUSHDATA(20)[482f0027662731277fdfa3b7f639c976a3bab11e] EQUALVERIFY CHECKSIG

What is 482f0027662731277fdfa3b7f639c976a3bab11e ?

It is not a pubKey.
RIPEMD160(SHA256(482f0027662731277fdfa3b7f639c976a3bab11e)=146sN8tLxV2xueQXQgMJkMZi2hFazEuV8F.

The result is not the address(17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM) in the blockchain.info either.

How we convert the 482f0027662731277fdfa3b7f639c976a3bab11e to it's addr？


texts:
So it's a known problem that blockchain.info's api only allows a gap of 20 unpaid addresses, which sucks and makes their api almost completely worthless. But I was thinking how could I make my own receive payments method with their other not so restricting API's. and I came up with this Idea but I'm not sure if it'll work and I need someone who has expierance with their api to tell if it will.
so here's my idea:

First I create a new address for when a user creates an account
I save the new deposit address to the users database entry
when the user views the deposit address the user is able to press a refresh    button to check if the transaction is arrived with the needed confirmations.
or the client sends a request to the server every 10mins to see if the transaction was sent and confirmed.
if it arrived we create a new address and save this as the new deposit address and add the amount sent to the balance.
the loop continues without any gap problems!

will this work or am I missing something. thank you.


texts:
I have a hard time understanding how mixed transactions can be recongnized on the blockchain.

Is this type of transaction a mixed one ?

https://www.blockchain.com/fr/btc/tx/cf903272cac49e28ff0e5fa109758954ed403480f68224e8ca5ccce7fcabccaa

Thank you for your attention


texts:
I am trying to bring up stratum mining on a pool and get this error -> exceptions.Exception: There is no shares table. Have you imported the schema?   Obviously my database is empty but no package I have download from git has a single .sql file to populate the db.  How do you populate the schema?

https://github.com/MPOS/php-mpos/wiki/Quick-Start-Guide
https://github.com/ahmedbodi/stratum-mining/issues/97

gentoo001 stratum-mining # locate .sql
/usr/portage/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql
/usr/portage/mail-filter/gld/files/tables.sql
/usr/share/doc/mysql-5.1.70/scripts/mysql_fix_privilege_tables.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_system_tables.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_system_tables_data.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_system_tables_fix.sql.bz2
/usr/share/doc/mysql-5.1.70/scripts/mysql_test_data_timezone.sql.bz2
/usr/share/mysql/fill_help_tables.sql
/usr/share/mysql/mysql_fix_privilege_tables.sql
/usr/share/mysql/mysql_system_tables.sql
/usr/share/mysql/mysql_system_tables_data.sql
/usr/share/mysql/mysql_test_data_timezone.sql


texts:
I got bitcoind working in the cmd prompt;
Then I closed it and opened bitcoin-qt and that is now running in server mode; (bitcoinf server=1)

Then I run some simple .php on my localhost (using xampp apache engine) and this line of code is not working :

  $bitcoin = new
  jsonRPCClient('https://user:password@192.168.0.2:8333/');

I get this error :

>  Notice:  fopen(): send of 24 bytes failed with errno=10053 An
> established connection was aborted by the software in your host
> machine.  in C:\xampp\htdocs\xampp\jsonRPCClient.php on line 132
>
> Fatal error:  Uncaught exception 'Exception' with message 'Incorrect
> response id (request id: 1, response id: )' in
> C:\xampp\htdocs\xampp\jsonRPCClient.php:152 Stack trace:
> #0 C:\xampp\htdocs\xampp\hello.php(14): jsonRPCClient->__call('getinfo', Array)
> #1 C:\xampp\htdocs\xampp\hello.php(14): jsonRPCClient->getinfo()
> #2 {main}   thrown in C:\xampp\htdocs\xampp\jsonRPCClient.php on line 152

and here is my port status :

I am running bitcoin-qt in server mode (=1) and the port status for 8333 is "sent"

my XAMPP Netstat also shows that the port is properly open :

I also tried this line

  jsonRPCClient('https://bitcoinrpc:12345@192.168.0.2:8333/');

because my bitcoin.conf is

  server=1 rpcuser=bitcoinrpc rpcpassword=12345 listen=1 rpcssl=1

still no joy - get the same error !

WHAT MORE CAN I DO to get it to work !!!!

Any help much appreciated !


texts: Using the main Bitcoin-Qt Client, can you change where it stores the block chain?

texts: I don't want 12 gigabytes stored on my boot drive.  Can I change where the  Bitcoin-Qt stores the block chain?


texts: Are there already several ways to do "smart contracts" with cryptocurrencies?

texts:
I have heard a lot of "buzz" about Ethereum, but apparently its 1.0 version won't be released for a while yet.

I have heard a lot of talk about "smart contracts" from people who admire Szabo, but I haven't seen many implementations.

I notice that Ripple lists "contracts" under "future" features, which seems to imply that they are not ready for use yet.

https://ripple.com/wiki/Main_Page

The one implementation I have seen is at :

http://erights.org/

Are there any other, more popular ways to implement "smart contracts" that are already in use?

Thanks


texts:
I need any help you can provide me regarding the transaction ea36f903db582e5b87c3618208cae2b28957521b8567f5d7934fc8b47a663bd8

It has been unconfirmed for more than 6 hours and I don't know what to do.

Thanks in advance to anyone who can help me.


texts: Is there anything preventing Lightning Network from passing embedded data in OP_RETURN?

texts:
As long as you pay a BTC fee for all the routing node incentives and the last layer in the onion routing includes a transaction with OP_RETURN, wouldn't that allow using OP_RETURN for various applications?

I realize the current implementations don't do this, but am I missing if there's anything that prevents it fundamentally?

Thanks!

(If the issue is that the local channel at the end won't keep track of OP_RETURN on next update, couldn't the last transaction include virtually opening a channel to the original node (the person who sent it originally) that is OP_RETURN-aware and thus would keep updating it?)


texts: How to secure one's Bitcoin Client from packet sniffing?

texts: Potential packet sniffing weakness has been described on the Weakness Wiki page. It states that an attacker that can see all of our internet traffic can pick up which transactions originate from our machine, thus figure out what Addresses we have in our Wallet. What are the ways one can secure one's Bitcoin Client from such an attack?


texts: When do you need to run bitcoin-qt -rescan?

texts: I was under the impression that the -rescan flag was no longer needed for some time now. Can someone document precisely, when does one need to run bitcoin-qt -rescan? How has this changed throughout the versions of bitcoin-qt?


texts:
The Metamask extension enables the user to send and receive funds (ETH, ERC20s) to external addresses, and thus it is very easy to integrate in current dapps thanks to web3 injection.
Are there any similar solutions that also allow trading of non-ethereum tokens? In particular, I would be interested in integrating a BTC-wallet into an existing dapp, already connected with Metamask, to allow the user to send/receive BTCs to the platform.
Thanks


texts: LND Security best practices? Disaster recovery?

texts:
Can anyone share a knowledge how to

_ secure LND node

_ backup node with all Channels

I think only a seed will not be sufficient.
What is your plan B in case of disaster? How to do an  Emergency restore, migration to other server, or set up high availability solution?
thanks


texts: Where is a broadcasted TX located at before it's nLocktime reached? in mempool or not? I have tried a lot can't figure out. Help please.


texts: what is the latest required hash rate to mine a block?

texts:
What is the latest required hash rate to mine a block of bitcoin ?

How much power do you need to mine a block in a day ?
Thank you


texts: Calculating Z value in a tx with 1 input and 2 outputs

texts:
After reading this:
ECDSA Signature and the "z" value

I'm still confused about the 'Z' value, for this transaction:
 https://blockchain.info/tx/ea6aa5d49b8e351e307bf9220f2d7cd31d41e640683539e00580e17cb4cf3e36?show_adv=true

  the signature is in the input script, and uses the output script of it's source transaction when calculating the message hash. So the nr of outputs to the transaction does not matter, they are always hashed unmodified into the messagehash for each input. – Willem Hengeveld

I find the above quote confusing, sorry!

This is what I hashed:

01000000
01
e3dbc4fada0034ad8581cb429af4953d7d092b137ebd9e193344db376314ab65000000001976a9147e7fe35e49f0e8a920780c00d40b7171d880811988ac1976a914942920e041353162b0d8bd006d09c2ca25cdc27888acffffffff
02
1004df02000000001976a9147e7fe35e49f0e8a920780c00d40b7171d880811988ac
c05f3b04000000001976a914942920e041353162b0d8bd006d09c2ca25cdc27888ac
00000000
01000000

And got this:

0x76041b6949563e76d77012f9723bec3c7a1a21fd84c74bb58df47087cef056d7

Is it correct? Is there a way to verify it?


texts:
I'm noticing that the Bittrex API (both v1.1 and v2.0) have a 3 to 4 minute delay when getting data, i.e. GetLatestTick:
https://bittrex.com/api/v2.0/pub/market/GetLatestTick?marketName=BTC-NEO&tickInterval=hour

So if you make a request say at 8:00PM, it will not bring the 7:00 to 8:00PM candle data until 8:03PM, some times 8:04PM ...

I thought about constructing my own candles querying the API every few seconds with /getticker - but for a few cryptos it will get lengthy and might get banned for the amount of requests per second ...

Anyone knows any other method to get candle data sooner?

Thanks!


texts: How can merchants accept Bitcoins while keeping it in line with the original USD value?

texts:
I mean, if a pizza costs $25 and a BTC is $500, the pizza store should be announcing a pizza for 0.05 BTC. However, if tomorrow the USD value of a BTC doubles or halves, that announced price for the pizza is no longer adequate.

How do merchants balance this?


texts: Simplest way of obtaining MtGox exchange rate via an API?

texts:
I want to do a simple app that refreshes every minute to tell me the current exchange rate by Mtgox but I have a problem interpreting the JSON that some APIs return:

Mtgox's fast ticker returns this JSON. The question is, what's the value that I have to retrieve? There are a lot and I don't understand them, and I don't find proper docs.
Bitcoincharts' API has the Markets Data endpoint, and it returns the market I want under the symbol "mtgoxUSD", however it tells me the date time of latest trade, the last buy/ask, but doesn't tell me the exchange rate of the latest trade.

Am I missing something?


texts: Transfert d'adresse BTC Segwit vers adresse BTC non segwit

texts: Bonjour, je viens de faire un transfert de BTC segwits vers une adresse BTC non segwit, pensez vous que cela pose un problèmes ???


texts: Long term cost of using cryptocurrencies

texts:
I'm not an economist but....

What are some way of determining whether cryptocurrencies will be a cost effective way of trading compared to some established fiat currency like USD?

In other words, might the cost of computing power and other costs necessary to trade cryptocurrency exceed the overhead costs of trading in say dollars?

What are some economics vocab words that are useful in this question?


texts: If the reward is actually a made up transaction with no inputs,  what's blocking miners from awarding themselves more than 25 bitcoins?


texts: How to combine separately signed inputs from different users?

texts:
With two separate signed raw transactions from two users, how would one go about 'batching' these manually (combining the inputs and outputs into a single transaction)?

Is this a viable solution for groups of users attempting to save on fees, or would the extended length of the resulting transaction negate any real savings?


texts: Given the recent <0.8 bug, when can we safely have larger block sizes?

texts:
Given the <0.8 bug and subsequent fork happened because of a particularly large block, does this mean that large blocks can not be used until the large majority of the community switches to 0.8?

Also why was the solution to push the 0.7 chain instead of 0.8?


texts: My first experiences with bitcoin: I downloaded Multibit and then went to the CoinbitGet website. I copied and pasted my address at the site as they instructed and after verifying that it was the correct address, I did some tasks where I earned 240 ubtc. I did all that yesterday. Then this morning on the Coinbitget site it said I was paid - but nothing was shown on multibit. So the Multibit help said I should "reset blockchain and transactions" so I did that and let it run for about 13 hours. But still nothing. (I know Multibit is connected to the internet because it always shows the current bitcoin to dollar price in the upper right - even though it always says "connecting" rather than "connected" In the lower left). So I checked at http://blockexplorer.com/. and it says - "(2014-03-28 04:27:08) Received transactions: 1 Received BTC: 0.00024" - which was 16 hours ago but I still see nothing in Multibit. I read that Multibit is fast since it doesn't keep the blockchain on the disk. So what might I be missing? It is not a lot of money so I am not worried but would like to learn and am not sure what to do now. The address was correct. Any help would be appreciated. Thank you all.


texts: Is it possible to buy stocks online with bitcoin.. the stocks listed on  NYSE, NASDAQ and London Stock Exchange among others ?


texts: Is there a service to withdraw dollars by wire transfer with small fees?

texts:
I need to make a bank transfer to a US bank account and found out that MTGOX is asking for 2000 CNY fee. That is too much since the amount of money I want to transfer is smaller than that.

Is there any exchange service with smaller fees?


texts: How to get Electrum 3.1.3 on bitcoin testnet?

texts: I'm building an application on bitcoin and want to use testnet instead of using real bitcoins to do my test. I'm mainly using Electrum-3.1.3 to do sweeping of addresses. But how can I switch this to be on the testnet chain instead?


texts: What if all transactions are off-chain in Bitcoin?

texts:
As we know, there are several off-chain solutions called payment channels in Bitcoin. The users can move off-chain their transactions and maintain a local ledger themselves. They only need to turn to the global chain when a dispute happens or some channel is exhausted. And moreover, the payment network can organize the payment channels together so that users with no direct channels can also perform off-chain payment. The network also brings the opportunity to recover the exhausted channels with off-chain method by adjusting the balance among the channels.
So I have the following questions:
(1) Is it possible to move all transactions off-chain? I think it is possible for the following reasons. Firstly, no one will cheat from the perspective of game theory, so no dispute will happen. Secondly, no channel will exhaust with the off-chain recovering method.
(2) If not, what prevents it from happenning?
(3) If it is possible, what if all transactions move off-chain? I can imagine that if no transactions are on the blockchain, the the blockchain will disappear even when it is still exists. We no longer need to maintain it. Then what it brings to this world?


texts:
I am considering the VPN service Privateinternetaccess. One of it's payment methods is bitcoins. As described on this page paying with bitcoins strengthens anonymity. In contradiction, this page claims bitcoin is not normally anonymous. To what degree is bitcoin anonymous? How does this anonymity differ compared to paying by other means such as credit card, Paypal or through Amazon?

Since the steps described in the second link are only for the U.S. I would have to find an alternative way to exchange my dollar to bitcoins. I'm wondering is it worth the effort? Is the worse privacy compromise if I didn't use bitcoin that it could be known I am a user of Privateinternetaccess? Any advice is greatly appreciated.


texts:
Can someone explain the context of what Nakamoto exactly meant with: "To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-
of-work system..."? I don't quite get the importance of the time aspect, since the timestamp header field seems not to be very important. Maybe someone can clearly outline, with real use cases and thought experiments, which exact problems we want to avoid to run into. Solana's proposed proof of history method (with Verifiable Delay functions) tries to exactly solve that problem.
What I don't get: why is the passing of time the only thing we really want to prove? Concise problem descriptions are essential to understand the solution and caveats associated with it.


texts:
In the sourcecode of PPCoin/SRC/MAIN.CPP line 1433 I read: fees are destroyed to compensate the entire network.

I want to turn it off that fees are destroyed, if I change this code will it work?

// ppcoin: fees are not collected by miners as in bitcoin
// ppcoin: fees are destroyed to compensate the entire network
if (fDebug && GetBoolArg("-printcreation"))
    printf("ConnectBlock() : destroy=%s nFees=%"PRI64d"\n", FormatMoney(nFees).c_str(), nFees);

If I change destroy=%s to destroy=%$$$, will it stop destroying fees?


texts:
I'm implementing the bitcoin sending API using blockchain.info for my website and have a couple questions.

Let's start with address A with an input of 10 BTC. I use API and pay Alice for 9BTC.

Q1: The 1 BTC will return to my change address and unusable until the transaction is confirmed, correct?
Q2: How the change address is managed on blockchain.info?
Q3: If I turn on HD functionality, the change address is the HD generated address?

My plan is to use the input until it's almost run out, and then manually top-up from cold wallet.

Q4: So the transaction I sent to Alice or anyone else will always have 1 input, and 2 inputs (when I top up from cold wallet), is this correct?

Thank you


texts: Listtransactions in v. 0.4.0 - different behavior?

texts:
I upgraded to Bitcoin v. 0.4.0, and I think the way "listtransactions" works is different now.

Let's assume I have 10 transactions on my account.

Old behavior:

When I call

listtransactions account='', 1, 10

I get an empty list, and then when I call

listtransactions account='', 1, 11

it would wrap around and give me the first transaction

listtransactions account='', 1, 12

would give me the 2nd one, etc.

New behavior:

When I request a non-existent transaction (i.e. the "from" parameter is more than 10), I always get the first transaction.

Does anybody know if this is by design?


texts:
According to the https://en.bitcoin.it/wiki/Address site, it states that "most" addresses have a private key.  Here is the relavent text:

  Most addresses have a "private key"

  For most addresses, there is a corresponding secret number known as a private  key that is required to spend funds previously sent to an address.
  When using a Bitcoin client, private keys are typically stored in the wallet file. The private key has a special purpose - it is mathematically needed to create valid transactions that spend the funds originally sent to the address. If the private key to an address is lost (for example, in a hard drive crash, fire or other natural disaster), any associated Bitcoins are effectively lost forever.

I have always assumed that Bitcoin worked in such a way that all addresses must have a matching private key due to the public/private key encryption on which it is based.  In what cases would a bitcoin address not have a private key?


texts: What happens when a fork/network split occurs on the Stellar network?

texts:
Say some country decides to somehow block all outgoing Stellar connections for 30 minutes. With a voting based consensus that Stellar has chains in both networks progress with a similar speed. After the network split is over there will be two Stellar networks with a diverged history.

How would such an outcome be resolved/avoided with the new consensus changes? Is there some way to determine which network state is correct after the split? Can the smaller split network know that it's split and pause accepting transactions?


texts: Reindexing of blockchain using bitcoin qt v8.5 using 427% of Macbook CPU

texts:
My bitcoin qt client v8.5 crashed last week (I had already got full blockchain indexed a long time ago) and I had to force quit it. It's now re-indexing the blockchain but using sometimes up to 427% of Macbook CPU and the fans are on at 6000 revs for hours... It never did this when I first synced up so what is wrong this time round?

Thanks
Bard


texts: How to run a bitcoin server with automatic restart and backup?

texts: What would be the best way to start writing a script to automatically run a bitcoind server on an Ubuntu startup, make regular backups and restart from a backup on error. Would this normally be done through a cron job?


texts: How to send bitcoins from an online wallet to a blockchain.info wallet?

texts:
I bought a small amount of bitcoin. They are in an online wallet. I would like to send them to a more secure wallet, my blockchain.info wallet. I have a few questions about the process.

From the online sending wallet. I must enter my blockchain.info receiving address. Enter the bitcoin amount. Then hit send. Am I missing any steps? Do I need to do anything with private keys or will that be done automatically?

From the receiving blockchain.info wallet. After the bitcoin balance shows up in my wallet, am I required to do anything? Do I need to do anything with private keys? Should I back up the wallet afterwards?


texts: Can an attacker steal a very recent tx and alter it, broadcasting a new tx with his address on the output?

texts:
I'm reading the technical FAQs on the wiki, and what I don't see is, if I create a transaction with signed prev_outs and new outputs, do I also sign the ENTIRE new tx before broadcasting? I don't see any field in the spec for a final overall signature.

So what I'm asking is, if I receive a tx from a peer, what is stopping me from altering that tx message so the output is now my own address, and trying to broadcast my new fraudulent tx to the network faster and to more peers than the original honest tx?


texts:
I am trying to spend from a branched Simplicity program, but I don't wanna supply the signatures in the untaken branch, so I am trying to prune the program by hand. I have verified that I can take the commitmentRoot of a checkSig with the signature set to undefined.

To make a valid spend, I think I need to construct a pruned program that has the same CommitmentRoot that the full program has. So I boiled by program down to a single case expression:

u :: CommitmentRoot () ()
u = unit

full :: CommitmentRoot (Bit, ()) ()
full = cond u unit

pruned :: CommitmentRoot (Bit, ()) ()
pruned = assertr (commitmentRoot u) unit

But the CommitmentRoots do not have the same hash:

*Main> (encode.fromShort.hash256.commitmentRoot) pruned
"7b4082aaae5e289f29855ede047b2b6598805b153324aa3a5fd4fec5b1a86053"
*Main> (encode.fromShort.hash256.commitmentRoot) full
"dded2b0938bb9f58f20324ab1f699e7006ffd8e9251b3ddd0f551de1d66fe119"

What gives? Is my understanding that I need a matching CommitmentRoot incorrect? If it is not correct, how do I prune a case expression correctly?

Furthermore, section "4.3.2.1 Pruning Unused case Branches" of the Simplicity Technical Report claims that "We can effectively replace any unused branch in a case expression with its commitment Merkle root." But if I do that, I cannot run the Simplicity program with runKleisli. So how is this supposed to work?


texts: When does a node start mining the next block?

texts:
Will a particular node on the Bitcoin network begin mining the next block after it has successfully been mined?

Mine right away.

When the node with the best computation power among the nodes participating in the bit coin network is mined, the next block is also considered to have a higher probability of mining than the other nodes. Do you have a penalty for this?

Do not mined immediately.

If you are waiting for the next block without doing so, can you verify that the blocks are propagating to all nodes participating in the bitcoin network?


texts: What happens when more transactions are created than confirmed?

texts:
I am surprised that there are 220k unconfirmed transactions in the blockchain. And more transactions are getting queued in every minute. If 6 blocks are mined in every hour then in an hour only 12000 transactions will be confirmed. But it seems in every second 3-10 transactions are added. So in an hour, approximate 21600 new transactions will be created.

So what will happen to the unconfirmed transactions, if they lose that money or the transaction will be canceled?

See one transaction (Transaction Details) made by one of my friends but not confirmed. So he is thinking to way out from bitcoin. I am so sad that no one will accept this currency if this cannot be solved.

Update: Please consider that I am new to Bitcoin, I just want to know what will happen to the transactions if it is expired?. Also if there is an address change in the transaction then to which address the refund will go (if it happen)


texts: Why did InstaWallet shut down, and what does this mean for Bitcoin?

texts: Title is pretty self-explanatory. Just went to InstaWallet's site and it is clearly shut down, probably for good...


texts: If I have 1 bitcoin now, do I end up having 1 bitcoin and 1 bitcoin cash after the BCC hard fork? If yes, how do I make sure I have these two in my wallets? Currently I control my private keys.


texts: Why does Ripple's consensus process have a 80% threshold?

texts:
A transaction is confirmed if 80% of the nodes in the UNL accept it. Where does this 80% number come from? Could it just as well have been 79% or 81%? What about 51%?

Can different nodes have different thresholds (for faster transactions, say), or must they all follow the same rule?


texts: Is there a JavaScript library for validating P2SH addresses?

texts:
I looked at coinstring.js but it looks like it only validates simple BTC addresses (1-prepended addresses).

  isValid(base58str, version)

  Validates whether the address string or wallet import format string is valid.

  base58str: A string that is either the wallet import format or public address.

  version: Is an integer representing the version or Buffer. See below for more information.

  Returns a true or false.

I'm looking for a JS library that can validate BIP16 P2SH addresses.


texts: Is Sharding a Good Alternative to MultiSig?

texts:
For security purposes, we require that each withdrawal be "approved" by multiple servers so that in the event a single server is compromised the attacker won't be able to siphon funds from the entire wallet. The typical approach to execute this concept is a MultiSig address where a transaction is only approved after it is signed by multiple entities.
However, the fees for a 2/3 MultiSig transaction are nearly twice as high as fees for a regular transaction. If we wanted 3/4 (or higher) MultiSig the fees would be even costlier. This got me thinking of a way to take advantage of the security benefits offered by MultiSig transactions without suffering from excessive fee consumption in the process.
The immediate solution that comes to mind is sharding. In short, instead of using MultiSig we can safely break up the PK using Shamir's Secret Sharing Scheme with unlimited schemes (such as 4-of-7 or 3-of-4 etc) and store the shards on separate servers thereby requiring multiple servers to "sign" a withdrawal request.
Does MultiSig provide any (security) benefit over sharding? Is sharding a viable alternative to MultiSig?
Update:
Perhaps the only problem with this proposal is that each server cannot independently "authorize" the transaction using its "shard". At some point, all shards would need to be known to "reassemble" the PK so the attacker could still use this as the "weakest link" to steal the PK? Is this correct?
Thanks


texts: How do i install bitcoind on my redhat linux server?

texts: I have recently created an api that runs the bitcoind commands. I had it running on another server, but it was setup by someone else. I have been searching for sensible instructions on how to install bitcoind on my new server, but can't find any.


texts:
I am creating a miner in C++ for solo mining, and am struggling to create the proper coinbase transaction.
Say I have a bc1 address, like bc1qfc7fameteuguetm0kfzypnvf2ju6wppdvj6tkc , what would be and example of a coinbase transaction with this, and how would I get to it?
https://developer.bitcoin.org/reference/transactions.html
01000000 .............................. Version

01 .................................... Number of inputs
| 00000000000000000000000000000000
| 00000000000000000000000000000000 ...  Previous outpoint TXID
| ffffffff ............................ Previous outpoint index
|
| 29 .................................. Bytes in coinbase // height+message below, byte length
| |
| | 03 ................................ Bytes in height
| | | 4e0105 .......................... Height: 328014
| |
| | 062f503253482f0472d35454085fffed
| | f2400000f90f54696d65202620486561
| | 6c74682021 ........................ Arbitrary data // custom data, include extranonce here
| 00000000 ............................ Sequence // i thought this was all Fs?

01 .................................... Output count
| 2c37449500000000 .................... // coinbase value
| ????????????????? ............. // here, how do i properly fill this part??
| 00000000 ............................ Locktime

These are the parts needed to create the data for the transaction.
Everything up to the output, i understand. but i dont know what to put between the coinbase value and locktime. how does the address convert to hex? what OP codes do i need? and is this transaction layout correct?
And then I would then hash it and input it as a new transaction into the block as like so,
tx = {
  "data" : "<hex string mentioned above>",
  "hash" : "<double sha256 of data above>",
}

is that the only data i need for the json?
Thanks in advance.


texts: Which transaction would get confirmed in an uncongested network?

texts:
Scenario:

Mallory sends some bitcoin with a $1 fee
Later, Mallory double spends her transaction with a $5 fee
A new block is found

In an uncongested network with an average transaction fee of ~20 cents, which transaction would most likely go through?


texts: Why are my profitability calculations for Litecoin mining with an Antminer off the chart?

texts:
Not exactly a Bitcoin question but it's about mining.

I wanted to step into crypto mining, but on a rather low budget. Unfortunately, it is hard to start with Bitcoin when you have a low budget, so I thought about going into Litecoin mining.

I looked up the current exchange rate, the current difficulty and found an affordable S5 Miner with 1155GH for about 250Euro. To calculate the expected reward I used the bitcoinwisdom.com calculator, who told me, with the current exchange rate and difficulty I could mine 46340USD a day, the calculator at litecoinpool.org said it's 23753.54USD a day.

Even though those number are completely different, I cannot trust any of them. What am I calculating wrong?

Thanks in advance!


texts: Where do wallets such as Exodus store the blockchain?

texts:
I recently installed Exodus and as soon as I configured my wallet it was ready to go. It did not appear to need to download gigabytes-large blockchain for any of the currencies I transferred into it. Other wallet apps—such as Bitcoin Core and similar—must download the blockchain for hours before presenting me with an accurate balance.

Where or how is the blockchain stored for wallets such as Exodus?


texts: In blockchain, particular bitcoin why is difficulty not part of the Block but merkleroothash is

texts:
After some consideration I came up with two assumptions, please correct me if I am way off here.

The merkleroot being part of the block information is a validation shortcut?
Difficulty not being part of the block information is due to the fact this can be derrived from the version header? (but this would require to have all difficulties being hardcoded forever into the code? This doesn't rhyme with dynamic difficulty, so basically I am wondering how a block can be validated without seemingly "knowing" its difficulty)


texts: How to recover deposit to incorrect address

texts: i need some guidance. I deposited Bitcoin from LUNO to an address in Gatehub. The Bitcoin has not arrived in my Gatehub wallet. I believe it went to an incorrect address. How do i trace it and recover it.


texts: How do I make Mulitbit show the exchange rate?

texts:
I recently started using Multibit and today when I opened it the app wouldn't load exchange rates on any of my wallets.

It shows my balance but not the value in dollars. I have it set to do so but it's not working.


texts: Is it possible to create batches of transactions in bitcoin blockchain?

texts:
Scenario:
Suppose that I have to make three transactions simultaneously to Alice, Bob and Claudia. Now the condition is if any one transaction fails the other two must also not go through.

Query:
How can I achieve this in BTC blockchain? Is there any feature that BTC provide to batch transactions as one so that it's atomicity is maintained?


texts: CGMiner settings so that Photoshop usage isn't slow

texts:
Currently I have two settings for CGMiner, using a Radeon 6850 for home usage.

One for casual work, and one for night-time (light and heavy).

However, even at the casual settings Photoshop is very slow to use, so I have to switch it off completely.

Are there are any settings that will give priority to Photoshop (and other applications), when CGMiner is running? That way I can leave it running all day, but the hash rate simply drops when other programs require the GPU.


texts: Confirming transactions in the Merkle root and SegWit

texts:
I'm trying to find out how exactly transactions are confirmed in a block.  I understand that to confirm a transaction, you hash it with its associated transaction and then the associated hashes until you get the Merkle root, and if the Merkle root is the same as that which is in the block, the transaction is legitimate.

But how would someone know which associated transaction is required to hash with your transaction to confirm its validity?  And where would you get it from?

Also, i'm a little confused about Segregated Witness.  As I understand it, the signatures are separated from the transactions and the signatures are hashed in the same manner as transactions.  This final signature hashed is either hashed with the final transaction hash to form a Merkle root, or it is contained as another Merkle root in a separate field in the block.  But if the Merkle root is always the same size (I assume) how does this save space?  If the Merkle root is always 256 bits, why does it matter if the signatures are hashed with the transactions or hashed separately?

I can't find clear answers to my questions so any help will be appreciated.


texts: Why was the bip32 fingerprint used for bip174 psbt?

texts:
The fingerprint is widely used across the bip174 psbt specification. This is done to speedup parsing for a signer such that he

  can observe whether the master fingerprint for the public key for that output belongs to itself (as quoted from BIP174).

BIP32 defined the fingerprint as the first 4 bytes of the hash160 of a public key. It also says that

  Note that the fingerprint of the parent only serves as a fast way to
  detect parent and child nodes in software, and software must be
  willing to deal with collisions. Internally, the full 160-bit
  identifier could be used.

Why was the fingerprint chosen for psbt instead of the full hash? Collisions aren't that rare for just 4 bytes of data and adding mitigations in the psbt transaction parsing for such a case seems unnecessarily complicated.

There is also the issue that if the chain code changes without the public keys changing, the fingerprint will remain the same. If this would be the case, the fingerprint would be identical between two identical public keys, but each would lead to differently derived child keys. This leaves even more work for collision detection and potentially even destroys the benefits of using the fingerprint for fast account ownership checks.


texts: What happens if an ISP isolates a portion of nodes?

texts:
I came to believe that an ISP can easily detect full nodes, BTC connections and isolate them from reaching any other nodes.

When and if an ISP decided to do so, could they easily perform a 51% attack and do everything they want?


texts: multisig without knowing one of the keys

texts:
I want to construct a 1-of-2 multisig script and I don't know one of the keys, I only know its address. Question is, is that possible?

So I was thinking if it is possible to construct a script that would have 2 branches, first branch would be allowing the first public key which I now to spend the money. And the 2nd branch would need a spending script to provide the public key which would then be duplicated on the stack, then hashed in order to get the address from it, this address would be compared to the address I know and if that matched, it would allow spending the coins.


texts: Any API to estimate the miner fee for a Bitcoin raw transaction?

texts: Coming from the ethereum development scene, I guess I'm kinda spoiled by the availability of the web3 library which has easy access to the eth.gasPrice and eth.estimateGas methods to get the default gas price and gas limit for raw transactions. I'm wondering if there are similar APIs from the bitcoin clients like Bitcoin Core? So that given a particular transaction, there will be a fast and easy way to calculate a suggested miner fee for it? Thanks.


texts: Who are the owner of bitfunder.com and btc trading corp?

texts:
Do we know who he is? How do we knows he won't run away with our money?

Currently, you can buy their shares both on BitFunder and BTC Trading Corp.

Okay cool. But can I trust those 2 companies? Bitfunder and BTC Trading Corp? What about if they run with my money. Who are they? Do we know their real name?

This is not distributed stock exchange. Some guys control it and that some guys may be assholes.


texts:
I would like to analyze bitcoin transactions based on the origin by country.

Is there a API or program (maybe like Datasploit, only the other way around) to cross reverence location and transactions. I prefer python to analyze but of course all input is welcome on tools used and reliability of the analytics.


texts: How to create a simple lightweight wallet (without mining) for an Altcoin

texts:
I am trying to create a wallet using electrum for an altcoin that uses the Scrypt algorithm. I am looking around for tutorials that can show a step by step process on how to create a simple wallet for this altcoin that simply sends, receives and stores your coin for windows, linux and android. Does anyone have any recommendations on how to do this or where I can look to build this myself?

I prefer using electrum because there are multiple clone repos for electrum and its pretty simple to use but I am open to other easier options.

Thank you again!


texts:
If one wanted to restore a lightning network node, what files have to be saved?

I read that saving hsm_secret is enough to restore private key(s), but I also read about a problem with channels. How channels are restored after a re-installation of lightningd and the "pasting" of hsm_secret file?

And, if it is impossible to restore channels, how to force the closure of them so that one can retrieve all locked funds?


texts: What does the sixth line in the output of the Bitcoin Core GUI RPC command "gettxoutsetinfo" mean?

texts:
An example of the output of this RPC command is as follows.
 1  "height":n,     (numeric) The current block height (index)
 2  "bestblock": "hex",   (string) The hash of the block at the tip of the chain
 3  "transactions": n,      (numeric) The number of transactions with unspent outputs
 4  "txouts": n,            (numeric) The number of unspent transaction outputs
 5  "bogosize": n,          (numeric) A meaningless metric for UTXO set size
 6  "hash_serialized_2": "hash", (string) The serialized hash
 7  "disk_size": n,         (numeric) The estimated size of the chainstate on disk
 8  "total_amount": x.xxx          (numeric) The total amount
}

What's the meaning of the sixth line "hash_serialized_2"? Whose hash is this referring to?


texts:
when I type
bitcoin-cli -regtest generate 101

in the powershell it gives me this error:
PS C:\Program Files\Bitcoin\daemon> ./bitcoin-cli -regtest generate 101
error code: -32601
error message:

I am running bitcoind in regtest too ,this is the last message that I got fom bitcoind:
Adding fixed seed nodes as DNS doesn't seem to be available.

please help


texts: bizarre transactions involving one address

texts:
Why would anyone spend $65 in fees to send 500+ outputs for .001BTC to the same address?https://blockchain.info/tx/0270a4af1269b52bf242390076faa460cfcffe2db74bc748163d8de94e9ce875
then clicking through to the input address, it has some really bizarre transactions. Tons of transactions that have undecodeable outputs, and also, blockchain.info shows that only .003 btc was transacted for many of them, when clearly more was transacted. Indeed, clicking through to the transaction itself shows the correct amount. What is going on here??
https://blockchain.info/address/1F89hmmrtonJfAQNAqDmeDadcw7AsZcvXG


texts: In the answer to this question it is stated the bitcoind filters doublespends. What is the reasoning behind this?


texts: Where can I find out which BIP (bitcoin improvement proposal) are going to be implemented or not?

texts: Is there a site where I can see which BIP's are going to be implemented or not?


texts:
Sent coins from one online wallet of mine to another
Coins were immediately credited from the first wallet which now has a balance of zero, but did not appear in the second wallet. Mt initial thought was that I stuffed up and entered the wrong address, but
There was no record whatsoever of the transaction OUT of Wallet 1 on the Blockchain, until
Finally, TWO DAYS later, a transaction record appeared on the Blockchain from Wallet 1 to dozens of different addresses, spread across 4 different payments approximately totalling my initial amount

Basically I would just like to know what happened, I'm confused as to whether this is my error or something else


texts: Why do websites such as satoshimines and bustabit generate new addresses every time?

texts:
Why a single address for each user not enough? Can't they just verify the incoming transactions?

If I want to mimic this practice, how can I generate unlimited addresses, from which transactions can be sent and received?

I am searching for an alternative to the Blockchain APIs...


texts: Why is a chain code needed for entropy in HD wallets?

texts:
In the documents and articles I have read, it is stated that the "chain code" in HD wallets exists to provide entropy to the derivation of child public/private keys. If I understand the process correctly, it is the following:

MyHash = HMAC-SHA512(Parent_PublicKey + Parent_ChainCode + Index)
Special_Integer = Leftmost256Bits(MyHash)
Child_ChainCode = Rightmost256Bits(MyHash)
Child_PublicKey = Parent_PublicKey + Special_Integer
Child_PrivateKey = Child_PrivateKey + Special_Integer

My question is why exactly the chain code is necessary. Even with just HMAC-SHA512(Parent_PublicKey + Index) the output should "look" very different for different indices, so is the problem that it's still mathematically close?

A couple of related questions:

I assume the goal is to prevent using a key to derive its children or siblings. Is that wrong and/or are there other security assurances that HD wallets seek to provide in their tree structure?
Is the chain code as "public" as the public key, or is it desirable to keep it private to the extent possible?


texts: View historic USD prices when transactions were made

texts: Currently when viewing blockchain.info transactions, all transaction values are quoted in today's price. But is there an option or service where you can see how much the value was at the time of the transaction? Example, Say I send Alice 1 BTC 2 years ago. At today's price it will look like I sent $4000, but 2 years ago it was sub $1000. Is there a blockexplorer that shows the historic price value?


texts: How miner makes sure that a transaction he picked up from mempool is actually valid?

texts:
I have read and searched enough about the roles and responsibilities of miners here;
For example:
Does the miner first validate transaction before doing POW or he does not validate at all ?

Does a node validates a transaction that comes with a block if it's already in its mempool?

But this part is still a bit unclear to me. If a miner confirms a block that has an invalid transaction then he will not only waste too many resources in doing the PoW but he may also get penalized for that, so he validates every transaction.
Does that mean that if mempool contains a transaction saying "A" gave "B" 0.1 BTC then miner is supposed to actually make sure that "A" has that much unspent BTC before he can select that transaction into a block to be mined? If a miner has to validate each and every transaction like this then it will mean too much work, because the only way you can get a confirmed balance for any account is to literally start from the genesis block all the way to the current block. I understand that there are WebServices that give you balance for any bitcoin address but in turn they must be traversing the whole blockchain. So the question is does the miner actually makes sure that "A" had enough unspent BTC before this transaction or does it perform some other simpler check, before selecting and transaction from the mempool.


texts: The app wrote incorrectly adress of bitcoin

texts: I can't send bitcoins becouse the system wrote inccorect adress


texts: The general principle of smart contracts for bitcoin

texts:
As far as I know, there is the possibility of realizing smart contracts using the Bitcoin blockchain. Explain how a smart contract works on the Bitcoin blockchain. I am interested in the general architecture: in what language is the contract written, what is and where is the machine that processes it, etc.
This is the most general question in order to understand and clarify the mechanism, for better immersion in development.точнения механизма, для лучшего погружения в разработку.


texts:
I am brand new to bitcoin and I only know the very basics of it. I have a few questions:

As the title says I am looking in ebay to buy bitcoins and there are some sellers are selling 5 bitcoins at opening of auctions for only 1 USD is it a scam I mean at the current exchange rate from my understanding 1 coin alone is valued at 900 USD which is a total value of 4500 USD is this a scam or is this legit I only ask this since should I place a bet and win for only like 10 USD the seller must be mad to take a massive loss like that
if it isn't a scam how does the seller deposit his coins into mine do I send him my wallet address
if I have to send him my address can he hack my wallet using my address or worse send my address to other hackers

Sorry to seem like such a noob but I had just learned about bitcoin recently and like I said previously I don't know much about it basically any information I found from bitcoins's website summarizes m=the extent of my knowledge on bitcoins


texts:
Ok, so I can mine BitCoins on my Mac... using my Windows Partition.

Like a lot of people I hate Windows.

I'd use Linux first (I have a WUBi partition), but I'd like a BitCoin miner for Mac that does not use OpenCL!

I'm using

a Mid 2012 MacBook Pro
with integrated Graphics,
2.5GHz processor Core i5
4GB RAM.

My laptop does not support OpenCL. I know of MacMiner, but I believe that needs OpenCL. Using my CPU to mine (on Windows) I get 1.7MHz, but on the GPU (on Windows) I get 4.7 and sometimes 5MHz.

I'm getting an iMac this Christmas, so maybe it'll be a little better for this.

So yeah, how can I start mining BitCoins on my Mac? Any software?


texts: How Create Bitcoin wallet from a private key works?

texts:
I'm trying to understand how i can create a pair of bitcoin private key and public key with : https://github.com/Destiner/blocksmith
for example :
 import blocksmith

 kg = blocksmith.KeyGenerator()

 kg.seed_input("(/sgroxa)n;[&1ox7fioqg4*v8")
 #seed is the private key ?

 key = kg.generate_key()
 #returned key : 7e659f56d6f20a64258b65445c825e62edf6b89219d4b3eb3ebec6ecb8f62859
 #this key is a formated "(/sgroxa)n;[&1ox7fioqg4*v8" version  ?

 address = blocksmith.BitcoinWallet.generate_address(key)
 #returned address : 112qrCJdHgudHmsKKKwvj3AM3aN2eN9wpP

i cant see how i cant key my pub key for import it into electrum wallet for example ?
Cant you help to understand my mistake  or if i confuse something?
Thanks


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


texts: Withdrawal transaction made 8 hours ago still has not had any confirmations

texts:
I made a deposit into a bitcoin exchange on 2018-09-11 06:57:41. The exchange then made a withdrawal transaction on 2018-09-11 13:19.

The time is now 2018-09-11 21:55 but the transaction still has not had any confirmations. The mempool size is currently 12 Mb which should not be large enough to cause such a delay.

The output for the withdrawal is a bech32 address. Has anyone else seen delays in withdrawal transactions, possibly to do with different address formats on the output?

https://blockchair.com/bitcoin/transaction/946d199348cdd21209e1c42f8df1700be9a238bb220d7e03ceff5b136e7cca2b

Thanks


texts: How to Obtain Bitcoin Gold Without Using Coinomi

texts:
I had some bitcoin on Electrum and some on Coinbase before the October fork. I assume I won't be able to claim Bitcoin gold for the amount that was on Coinbase.

Since the fork, I've moved all my Bitcoin to a Ledger Nano S. When I try to use their Split Tool, it doesn't show a balance. I've seen a number of how-tos that entail using a Coinomi which only works on an Android device (of which I do not own).

So my question it, how do I obtain my Bitcoin Gold now that my Bitcoin is on my Ledger Nano S?


texts: Are transactions still tamper-proof if blocks are hashed without nonces?

texts:
If an alt were to forgo difficulty and timed release of new supply by removing the nonce from blocks therefore the whole difficulty/target system, is hashing without nonces still providing the same blockchain anti-tampering security?

If not, how could the blockchain's integrity be maintained without hashing difficulty?

As I understand it, blocks have nonces to satisfy difficulty so that the hashing process is slowed for the purposes of controlling the rate new crypto supply is produced.

Please assume that supply will be produced through a multiplier as described here instead of as a reward for mining.  In this case, block generation doesn't need to be slowed for the purposes of crypto supply inflation, but the blockchain does need to be made tamper-proof.

Is it correct that simply hashing in particular ways make the transactions tamper-proof, or is noncing a hash also necessary?


texts: Transaction delayed >12 hours by Satoshi Bitcoin client

texts:
Yesterday I sent 20 BTC to 1Hj8kJ3rq4c4Hn9Prtw45Zue791f4Nc9L3 with a 0.0001 fee and transaction Id 30d1ef9aa05898b11b5ee4f5f5e703a822a821fb499c647b658fc3cb67a899b8.

My Satoshi client said today that is still unconfirmed. But when I search blockchain.info for the id of the transaction, it says that the transaction was sent today (>12 hours after I made it).

Is there any way, if a transaction isn't relayed, to force the satoshi client to send it another time (the same transaction).


texts: Can I detect a 51% attack as a developer

texts:
I am a developer building an application that accepts payments in cryptocurrencies.

Is it possible, in the occurence of a 51% attack, to build a script that detect this, so we can suspend withdrawals automatically?


texts: Would this scheme allow faster verification of transactions? (Multiple parallel block chains)

texts:
One issue with one block chain is that it needs to be globally synchronized. One way to elevate this would be to use multiblock chains.

Namely, we can imagine that there are N block chains, working in parallel. To make double spending impossible, a you can only spend a total of 1/N of your total money on each chain. (If they need to spend more, you can do so on multiple chains. This is slower, but hopefully you don't need to do that as often. If, for example, there 10 chains, you have 100 units, and you are buying something for 15 units, you would spend 10 on one chain and 5 on another.)

After about 10 blocks or so (specifically when it happens is unspecified for now), a meta-block is mined that ties the chains together. This resets the 1/N limit, and allows money earned on one block to spent on the others. Otherwise, it would just be N different currencies.

Each individual block chain can go faster, since they will involve only 1/N of the community. More total blocks also means miners are rewarded more often, and more spread out.

Would this work? Would it verify transactions more often? Do any currencies currently use this?


texts: What is a simple explanation for how the number of bitcoins in circulation is determined?

texts: Often times when I explain to someone that there is a limited supply of bitcoins available that need to be divided across all the people who want to have bitcoins, the people who are computer illiterate will ask how I know that the number of bitcoins in circulation can not be changed or manipulated. They usually just get a glossed over look on their face when I start talking about decentralized protocols. Has anyone come up with a good way of phrasing it or an good analogy to get people to understand how these limits are determined, enforced, and protected?


texts: I got a coinbase transaction and I don't know where it comes from

texts: I received a small payment from a coinbase transaction, but I haven't been mining nor I have signed up on a mining pool. Does this happen when someone accidentally sets my address instead of theirs when they mine? I think the probability for that to happen is pretty low.


texts:
I would like to know whether these statements are true.

"Say a Bitcoin market participant should choose to sell a large volume of the currency. Because each transaction is broadcast to a network that is — by design and necessity — public and publicly observable, the entire market could become privy to such an event."


texts: How do you generate a NXT / Ardor address using javascript only?

texts: I'm looking for a way to generate an nxt/ardor address using only a javascript library and without having to be online. Is there a js library that can generate a nxt/ardor account by passing in the secret passphrase as a parameter?


texts: Why does bitcoin-cli not show the correct TXID for this transaction?

texts:
I've been decoding some transactions on Testnet, and I've found one that bitcoin-cli decoderawtransaction seems to "fail" to decode correctly.

Here's the TXID: 400bb081cfea4802a1cdd8c365c886b9ccc0da59addd3d0b1f92cf0c04870738

For example:

1) You can retrieve the raw data as normal:

bitcoin-cli getrawtransaction 400bb081cfea4802a1cdd8c365c886b9ccc0da59addd3d0b1f92cf0c04870738

0200000000010129b0f742d41c6aad58dd0e779ca53b8bed1790465ed59ed20d2b6a3ecc6744920100000000ffffffff0178cdf5050000000016001443aac20a116e09ea4f7914be1c55e4c17aa600b702483045022100e8877e9351abcfc5dc20a9c9f55d7bcde8d64993d135a20568b5b8628ea3f7b102203801629aad6a7ec0960b4d830aedac673d620179753cc6f197eaed866a4959ba012103335134d7414e1d1a154600b124a96f5ef2c6ca21434d2622469a96bd5262fd5600000000

2) But when you decode that same raw data, you get this TXID:

{
  "txid": "ec4529406c0f8fb337114a3b8e270dd6e3ec9712299daa3eb17d1fc69aa58251",
  "hash": "ec4529406c0f8fb337114a3b8e270dd6e3ec9712299daa3eb17d1fc69aa58251",
  "size": 192,
  "vsize": 192,

Question:

Why is decoderawtransaction returning this TXID?

This is a segwit transaction, and it is returning the full hash for the TXID (including the witness data). Why?

Edit:

Here are some more:

a24cec50d5cf861d1af4b634f8ed1968c0e9484724bfef5af7f8c383605978c8 (testnet)
1f3f7e0543f4eeb88d2e04a2e4d04e4ef321ebc69e58e9bfd607c7d2b565ea66 (testnet)


texts: Import private keys from Multibit into Armory?

texts:
I am attempting to import a private key that was made in Multibit, into Armory. I am able to restore this key into other wallets, such as the Android Bitcoin Wallet, Mycelium and Electrum, but when I attempt to do so in Armory I get an error saying "The private key you have entered is actually not valid for the elliptic curve used by Bitcoin (secp256k1). Almost any 64-character hex is a valid private key except for those greater than fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"

Is my key is the wrong format or something?


texts: Transaction from bitcoin core is different from the explorer


texts:
Reading the following BIPs: 68, 112, 125, I got a few questions about the sematics of sequence numbers. As far as I understood, in version 1 transactions, sequence numbers have the following meaning:

If any input has a sequence less than 0xfffffffe, than the whole transaction is signalling replaceability

On the other hand, in version >=2 transactions, the above rule applies, plus:

If a sequence number has the disable flag (1 << 31) set to 1, then the sequence has no additional meaning (but can still be used to signal replaceability, right?)
If the disable flag is not set, then the sequence number is interpreted as a relative locktime with the format specified in BIP68. This means that transaction will not be included in a block until the output it spends reaches the specified age.

So, putting it all together, if one wants to signal replaceability in a version >=2 transaction, one can just use a sequence number which is less than 0xfffffffe but has an active disable flag (i.e. is greater than 0x80000000), on the other hand, how should one set the sequence number if one wants to both signal replaceability and also spend a relative timelocked output? Would it be ok to use a sequence number according to BIP68 and increase the bits that have no meaning in that format to replace the transaction? (i.e. changing all bits except 1 << 31, 1 << 22 and 0xffff)


texts: How do I specify in which directory Bitcoin blocks and other data should be stored?

texts: I am on Windows and installed the Bitcoin wallet. The block folder seems to grow bigger everyday and is stored on my C drive in the roaming directory. I would like to set this to some other folder on another drive, which has more place. How would I go about doing this?


texts: Why are coin miners (such as GUIMiner) a "threat" in Windows Defender?

texts:
I opened up my GUIMiner and I got a rather unfriendly "Win32/CoinMiner" threat of "Medium."

I installed this program knowingly, so should I be concerned? Is this just a problem because people have been installing miners on people's machine unknowingly (which would be a bad thing)?


texts: What are we trying to predict in fee estimation and why?

texts:
There are different estimations used in wallets, explorers and other Bitcoin projects. For example: estimatesmartfee in Bitcoin Core
This is the fee rate distribution right now according to https://btc.bitaps.com

Are different estimations misleading and affect the way fees are used in Bitcoin transactions? Will it be better if we just share mempool stats and user can decide the fee rate accordingly?
If I compare this with BTCUSD orderbook on any exchange, are we trying to estimate at what price buy order will get filled in certain time? Does that make sense?

In Bitcoin, block space is the supply, fee bidding to get the transaction included in a block is demand, miners are sellers who will fill the limit orders however they can include any transactions (not necessary it will be prioritized based on fee rate) so what exactly are we trying to estimate and why?
Market buy orders that fill the sell orders on exchanges can be compared to a transaction using fee rate 310 sat/vByte when highest bid in mempool is 300 sat/vByte. Although things are not instant in Bitcoin and there is a time gap between broadcasting with a certain fee rate and transaction being included in block. There are few other differences like if I try to buy 0.01 BTC right now on Bitfinex at 70,000 it will be executed at 53,450 and in Bitcoin there is no such thing, you can decide any fee rate and even if I use 1000 sat/vByte right now, same will be used and accepted by miners unless there is something that avoids such errors in wallet being used but overall picture looks similar and all this makes estimation even more difficult.
I consider it misleading because lot of users think a transaction with fee rate 1-5 sat/vByte will be included in 1 week or maybe a transaction with X sat/VByte will be included in Y time which is not true. User decide the fee rate and can do bidding, transaction will be included based on demand, supply and miners.
Will it be better if the wallets used this approach?

Show mempool stats
Leave the fee rate for user to decide
RBF every transaction and follow different algorithms for automated bidding

A simple algorithm for automated bidding can be:


texts: Is it possible to combine multi-sig and locktime?

texts: Is it possible to create a 1 of 2 multi-sig address in which only one of the keys is time-locked and the other can sign any time?


texts: Is it possible to have a shared access bitcoin wallet?

texts:
I'm trying to get my Rugby Club involved in Bitcoin.

I'm really looking for ideas on the easiest way to integrate BTC at the bar. Is it possible to have a single wallet for the Club accessible from multiple devices?

I would need bar payments to go into one overall account or wallet somehow, as the responsibility for running the bar falls to different people every weekend.

I dont want to risk 20 different wallets being used, and some people not forwarding the relevant bitcoins on to a central wallet at the end of night.

Any ideas on a work around?

Many thanks,
Kate


texts: bitcoind json-rpc interface specification

texts:
Is there any document out there on the internet describing how access the json-rpc interface of the bitcoind daemon? In my case, my application is written with C++, and I want access this interface with this language. In my Kubuntu system, I have run bitcoin-qt and it's listenning on port 8333. I create a bitcoin.conf file on my data directory setting an username and a password. Now I want to know how access this interface using C++.

ps.: I should note that I know about libbitcoin library. I ask for the specification because I am trying find a simplest approach, maybe allowing me write my code in only one or two source code files.


texts: call to bip39_mnemonic_from_bytes in libwally-core returns NULL

texts:
what am I doing wrong? it always returns with error -2... I included libwallycore to my project and my IDE tells me it it is available after I also did include <wally_bib39.h>

I tried mainting a wordlist myself but then I run into even more mistakes so I guess I am missusing the API. Ca anyone help out pls?

static void display_mnemonic_word_list(void){
    char **mnemonic_secret=NULL;
    //wordlist_init(bip39_wordlist)
    const unsigned char myArray[] = { 0x00, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22,  0x33 };
    int ret = bip39_mnemonic_from_bytes(NULL,myArray,32,mnemonic_secret);
    if (ret!=WALLY_OK){
        printf("mnemonic did not work. error: %d",ret);
    }
    printf("HSM: your should remember / write down the following words do recover your funds!");
    if (mnemonic_secret){
        int i = 0;
        while ( *mnemonic_secret )
            printf( "%d. %s", ++i, *mnemonic_secret++ );
    }
}


texts:
I just uploaded the BitWasp code into /var/www but when I tried to install using extension BitWasp-master/install/index.php the installation page that I need to make config.php, database.php, and bitcoin.php files writable. And when done I should press F5.

How do I make these files writeable? I don't have permissions to view the contents of those files.

Please help! Thank you


texts:
I am trying to debug an issue where i believe i might have a bad signature but i am trying to figure out how to approach it.

What is this a signature of. Private key + what (redeem script? entire raw hex?)
How can i verify that this is a correct partial signature (N 2 of 3) P2SH transaction.

I have 3 signatures. I want to test each signature separately to see which are bad or good. How would one approach that? I have read through many posts here but i have not found any solutions.


texts: Is the hash of the coinbase transaction needed for the merkle root?

texts:
first time posting here.

I was interested on how mining software works down to the bytes. I came across this well written article right here:

http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html

Under "Notes and References", he provides a python program that generates the merkle root from a list of transaction hashes. What I don't understand however is, why or how the hash of the coinbase transaction is included in that list.

Lets say you are in the process of mining a new block. You make your list of transaction hashes(without the coinbase transaction, as you haven't mined the block), create the merkle root and guess the nonce until you create a block. Now the coinbase transaction takes place and you get your bitcoins, the coinbase transaction hash now has to be included in the list of transaction hashes. But that changes the merkle root and thus the entire block, which would make it unvalid.

How is this solved? Do you know the hash of the coinbase transaction in advance? Or do you not include the coinbase transaction for the new block and the python code is not correct?

Also a side question is, in the python code this part confuses me a bit:

 h = hashlib.sha256(hashlib.sha256(a1+b1).digest()).digest()

Does a1+b1 mean that you perform addition of the hash values or that you just append the two hashes together?

Thanks in advance,

Fihdi


texts: Which release fixed CVE-2010-5141 (attacker can spend any coin)

texts:
This post by Mike Hearn relates an interesting bit of history:

  When Bitcoin was first released, it contained two completely fatal bugs that made the entire system worthless. Fortunately, they were found and fixed before Bitcoin  actually had any serious value.

  The first bug was that scripts were concatenated before being run instead of just using a shared stack. This meant that anyone could write a scriptSig that always evaluated to true and claim anyone elses coins. Fixed here in v0.3.2:

  https://github.com/bitcoin/bitcoin/commit/73aa262647ff9948eaf95e83236ec323347e95d0

However, the link appears to point to the 0.3.7 update.

Looking at the diff, this update does appear to change the script interpreter in the way Mike outlined.

A search turned up very little on the 0.3.7 update. One hit was this question, which generated no responses:

  I noticed that 0.3.7 is released on the website, but after searching the forums I can't find any information on what the changes are.  Never mind that the changes from version to version should be packaged with the download....

  anyone care to clue me in on this one?

The CVE page, however, makes this claim:

  On July 28 2010, two bugs were discovered and demonstrated on the test network. One exploited a bug in the transaction handling code and allowed an attacker to spend coins that they did not own. This was never exploited on the main network, and was fixed by Bitcoin version 0.3.5.

So, depending on the source you use, the release that fixed the bug was 0.3.2, 0.3.5, or 0.3.7.

Given that this was one of the worst bugs in Bitcoin's history, it seems like the documentation should be more consistent. Can someone point me to other sources that might help clear things up?


texts:
I did use the Make to build bitcoin source  [https://github.com/bitcoin/bitcoin].
every thing went ok.

then I have changed one of file bitcoind.cpp , and issue the Make command again, but this time Make has tried to build all bitcoin source again.

my question is how to do Incremental build for  bitcoin?

my system is ubuntu, and g++ is Ubuntu 5.4.0-6ubuntu1~16.04.6


texts:
I'm new to bitcoin and just learned that most (or maybe all) of the exchanges are working off-block, meaning that they don't really push data to blockchain most of the time.

Is there any altcoins or exchanges that store data in blockchains ? I'm doing researched project on the matter and trying to find exchange that have some of it's trading public.

As I understood from this outdated article, Kraken might been on-block exchange in the past.

BitSquare might be something I'm looking for, but I'm not sure exactly how does it work.


texts:
How does one create a brain wallet from a seed using SHA256? Is this possible?

Could you please explain using the example seed "coinbase is awesome" (no apostrophes)? What is the resulting address?


texts:
i am trying to convert the

  URI into BIP21

currently i am generating URI from bitcoinj library, but i want it to be on BIP21 Standard. i have read many articles but didn't found any solution


texts: Is there a Bitcoin wallet that has French language support?

texts:
Which Bitcoin app has a language option that can be changed from English to French?

I have tried few applications but they seem to be no language option.


texts: What's the point of the "clean jobs" parameter in Stratum's "mining.notify" protocol?

texts: As I learn about the Stratum protocol, which allows a mining pool to coordinate work with its workers, I was curious what the "clean jobs" param in the mining.notify method means.  Per the spec -- https://en.bitcoin.it/wiki/Stratum_mining_protocol , it can be either true or false.  What I don't understand is why would it be false.  The wiki says if its false, "If false, they can still use the current job but should move to the new one after exhausting the current nonce range".  My question is what logical reason would a pool give to a miner to do this?  I'm assuming if new work comes in it means someone on the network has hashed the block and therefore there's no more potential for rewards.  So why have a worker waste his time continuing with a job that someone else has already completed?


texts: blockchain webgame - use api or actual blockchain to build database?

texts:
I am currently designing a blockchain based web game, and part of the game is to display data from the blockchain in table format on the site. The data will be updated peroidically, or in short intervals.

For example, the table will say for btc address A there have been x transactions sent for a total of y btc. For btc address B etc etc

My query is whether you think I shoukd be running these queries to build a website database using an api call, or running my own copy of the blockchain on the web server.

Thanks for any advice.


texts: How do I keep my miners from doing duplicate work?

texts:
Someone has n machines to mine for bitcoins. What's the simplest way to ensure that mining work isn't duplicated?

(Will separate machines naturally work on different hashes even with the same recipient of rewards, or will there need to be some sort of pool software running organising nodes? Would having each new node create a wallet first be sufficent?)


texts: Questions about bitcoin(or other crytocurrency) to satisfy my feeble mind

texts:
After a few days of research and reading about bitcoin and ethereum, I got interested on investing in these. Just small amounts to try it out.. maybe $30 - $50 for starters. I'm from a 3rd World Country and want to earn some sort of passive income.

Still after all these research. I still got a lot questions about it.
These ones are one of the most important to me.

Is it worth it to invest in a BitCoin/Ethereum Cloud Mining contract? Lets say i'd purchase a starter plan. because mining rigs are so expensive and I cant run it 24/7.
What are some of the potential risks of trading in Exchanges?
Can I start trading with $30 to $50 staring budget? can I get somewhere with this budget?


texts: What happens to the original bitcoin after a wallet restore?

texts:
I'm thinking of buying some bitcoins. Before I do I want to be sure that I can backup and restore my wallet - Bitcoin Core. This seemed to go ok, the bitcoin loaded into the new wallet which was on a different computer from the original.
The original bitcoin wallet still shows the old balance.

I'm sure it's unlikely, but what if someone stole my computer and I then restored my bitcoin to a new wallet - would the thief be able to spend from the original wallet after I'd done the restore?


texts:
Am I correct that addresses are hashed to compress a huge text-represented coprime into something of manageable size?

Am I also correct that transactions are hashed for the same reason and also because:

  To create RSA signature keys, generate an RSA key pair containing a modulus N
  that is the product of two large primes, along with integers e and d such that
  e d ≡ 1 (mod φ(N)), where φ is the Euler phi-function. The signer's public key
  consists of N and e, and the signer's secret key contains d.

  To sign a message m, the signer computes σ ≡ md (mod N). To verify, the
  receiver checks that σe ≡ m (mod N).

  As noted earlier, this basic scheme is not very secure. To prevent attacks,
  one can first apply a cryptographic hash function to the message m and then
  apply the RSA algorithm described above to the result.

?

I cannot find a reason for blocks being hashed except to slow the rate that transactions are verified thus new supply is mined.  Is this correct?  If not, why are blocks hashed?


texts:
I'm trying to make a simple peer connection using Python.

If I understand correctly communication begins by sending a "version" packet to the receiving node. The node then sends back a "verack" packet, afterwards you may begin querying for data/pushing txs.

Ken Shirriff's blog has proved invaluable in getting me this far but I'm unable to get his code examples working, possibly because they're dated?

In particular, when running:

https://github.com/shirriff/bitcoin-code/blob/master/minimalPeerConnection.py

the socket closes immediately. I fail to receive back a "verack" and am unable to proceed with pushing my tx. Note that I've replaced his hard-coded IP with a currently operating node (124.248.237.178:8333).

I've attempted to construct a more "up to date" version packet (70002) referencing these docs but run into the same issue:

import struct
import socket
import time
import hashlib
import binascii

magic = 0xd9b4bef9

def makeMessage(magic,command,payload):
    checksum = hashlib.sha256(hashlib.sha256(payload).digest()).digest()[0:4]
    return struct.pack('L12sL4s',magic,command,len(payload),checksum).encode("hex")+payload
def makeVersionPayload():
    version = 70002
    services = 1
    timestamp = int(time.time())

    adr_u = "::ffff:127.0.0.1"
    services_u = 1
    port_u = 8333

    adr_me = "::ffff:127.0.0.1"
    services_me = 1
    port_me = 8333

    nonce = 0

    user_agent_bytes = 0
    start_height = 0
    relay = 0

    #https://bitcoin.org/en/developer-reference#version
    payload_hex = "";
    payload_hex += struct.pack("<L",version).encode("hex")
    payload_hex += struct.pack("<Q",services).encode("hex")
    payload_hex += struct.pack("<Q",timestamp).encode("hex")
    payload_hex += struct.pack("<Q",services_u).encode("hex")
    payload_hex += struct.pack(">16s",adr_u).encode("hex")
    payload_hex += struct.pack(">H",port_u).encode("hex")
    payload_hex += struct.pack("<Q",services_me).encode("hex")
    payload_hex += struct.pack(">16s",adr_me).encode("hex")
    payload_hex += struct.pack(">H",port_me).encode("hex")
    payload_hex += struct.pack("<Q",nonce).encode("hex")
    payload_hex += struct.pack("<B",user_agent_bytes).encode("hex")
    payload_hex += struct.pack("<L",start_height).encode("hex")
    payload_hex += struct.pack("<B",relay).encode("hex")
    return payload_hex

ip = socket.gethostbyname("124.248.237.178")
port = 8333
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "connected to node..."
sock.connect((ip,port))

hex_msg = makeMessage(magic,"version",makeVersionPayload())
print "sending version packet"
sock.send(binascii.unhexlify(hex_msg))

while 1:
    msg = sock.recv(4096)
    if not msg:
        print "disconnected"
        exit()
    else:
        #expecting verack?
        print "response: ",msg

Can anyone point me in the right direction?


texts: how make own gitian-sigs end detached sigs?

texts: How make own gitian-sigs end detached-sigs. I cannot find any useful info. Where i try see it's always start with "you  already have .assert and .sig . but how they create ?