text:
Bitcoin-QT: which external memory (connected via USB2.0 + TrueCrypt) would work?
Background
I have Bitcoin-QT 0.9.3 (zip version). bitcoin-qt.exe sits on the internal HDD of my laptop. All of the other stuff (blockchain, wallet,...) on a 128GB USB drive, fully encrypted with TrueCrypt (AES encryption), connected via USB2.0 port. I have bootstrap.dat (21GB copy of blockchain) on the USB drive, too.
Problem
everything is slow via USB2.0 flashdrive. Import of bootstrap.dat  file is barely making progress. It's been 7 days and I'm getting older. The progress bar shows it's 1/3 ready. No other application reads/writes to the USB drive.
Question
I'm considering swapping my flash drive for an external hard drive, but keeping TrueCrypt. Would this help, or would the fact that I have no USB3.0 ports be more important? I'm looking for satisfactory speed results that other people are getting by using bootstrap.dat. As slow as it's going, I'll import the blockchain slower than it's generated.
I would prefer your experience over suggestions like "try this..." becase I don't have free HDD space to "experiment", I just want to buy some HDD and hook it up to USB, but I'm worried that USB2.0 port itself is a bottleneck and I would just waste money. Thus I'm here for clues.
I'd prefer an HDD instead of an SSD, but I will hear out both options. I'm not interested in thin clients.
(basically I'm looking for cheapest external memory that would work, because flash drives don't work with Bitcoin-QT).

TrueCrypt shoukd be able to encrypt/decrypt about 1GB/s, so I consider it unlikely that it's the speed limiter.

you are right about the TrueCrypt not being the problem: I was able to test import speed of bootstrap.dat file on BOTH TrueCrypt encrypted and non-encrypted USB2.0 flash drive and the result is the same, - they are both very slow (with no visible difference).
It looks like the flash drives are just a bad choice for storage device to run Bitcoin on. I assume the 3.0 USB flash drive would make no visible difference, because the problem seems to be with the flash drive itself.

The cheapest external memory that would work fast enough to be acceptable is SATA3 HDD via usb2.0 adapter. (I didn't tested SATA1 or 2 nor old IDE drives, if you have them with over 500GB capacity you can probably use them too. I couldn't find them for my test).
For comparison, here's the time was needed to import 21GB blockchain:

2.0 USB flashdrive: never finished. took 7 days non-stop for progress bar to reach 1/3. and then speed slowed down to the point that there was no noticeable progress.
SATA3 HDD via USB2.0 adapter: about 20 hours non-stop.

I'm using a USB 3.0 512 GB thumbdrive with a copy of the block chain, current as of 3 hours ago; bitcoin-qt ran, got about 50% synched, and hasn't moved in the last 12 hours.  files still being updated / written to thumb drive, but does not appear to be making progress..
so USB 3 wouldn't appear to help you.
Could the threading of version 0.11.1 could be negatively impacted by the thumb drive?  specs on the drive are read/write > 300 mb/sec.
I've had similar challenges running VMware virtual machines off thumb drives; running them from a USB 3 passport drive with the VM works fine, so i'll try that for the blockchain storage & see if that works.

This answer is weird. While it seems to address the question of the asker in some degree, it also seems to be asking new questions and speculating. In answers please focus on responding to the asker's question. If you have a new question, please create another topic.


text:
How do you derive the lambda and beta values for endomorphism on the secp256k1 curve?
You can see a little background about this on this bitcointalk post by the late Hal Finney.
Beta and lambda are the values on the secp256k1 curve where:
λ^3 (mod N) = 1
β^3 (mod P) = 1
As seen here, in hex, N and P are:
N = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141
P = FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F
The actual values of lambda and beta are easily verifiable and are:
λ = 5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72
β = 7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee
The question for me is, how do you derive this? Can someone show me step-by-step how you can figure out these values?
Also posted to the Cryptography Stack Exchange

You might be more likely to get an answer on the cryptography SE site.

Hal Finney says he found hints about how to compute it in pages 125-129 of the Guide to Elliptic Curve Cryptography, by Hankerson, Menezes and Vanstone. He found a PDF on a Russian website.

I've actually read that book and those particular pages multiple times and couldn't figure it out.

With a bit of reverse engineering, I think I was able to see how Hal was able to get to these results.
First, it's a pretty well known result of Fermat's little theorem that if p is a prime number and g is a generator for the field Z/pZ, then:
g ^ (p - 1) = 1

Note, don't confuse this abstract generator g with the generator for the secp256k1 group G. Now, given the above equation, it's not a big leap to see that:
(g ^ ((p - 1)/3)^3 = g ^ (p - 1) = 1

Thus, we can find λ and β by first finding generators for Z/NZ and Z/PZ (N and P being the parameters given in the original question), and then raising them to the (N-1)/3 and (P-1)/3 powers, respectively. You can check that both N-1 and P-1 are divisible by 3.
The generator that it seems Hal used for λ is 3, and for β is 2. I'm not sure why he picked those, there are plenty of other good generators to choose from. It was probably on a trial and error basis.
Using sage mathematics notebook, I was able to produce the same values for λ and β.

lambda and beta are non-trivial cube roots of 1 in the respective fields (mod n for lambda, mod p for beta). There are only two such values. Starting from a generator g and raising to the power (n-1)/3 resp. (p-1)/3 to find them is just one way of doing so. And it doesn't matter which g one starts with, one always finds one of the two valid solutions, or 1 (if the g started from wasn't a generator, but a cube).

Quoting cryptography.stackexchange.com:

Given that N and P are prime, one obvious way to do this is to select a random value g from [1,N−1], and compute g^((N−1)/3) mod N; assuming that N≡1(mod 3), this resulting value will either be 1, the displayed value of λ, or N−λ−1 (with equal probabilities of each). If N≢1(mod 3), then the only modular cube root of 1 will be 1.
And, to compute β, you do the same with P.

The reason this works is due to Fermat's little theorem which states:
g^(N-1) ≡ 1 (mod N)
which implies
(g^((N-1)/3))^3 ≡ 1 (mod N)
which implies
g^((N-1)/3) is our potential λ. If it's not 1, it'll work for the purposes of endomorphism.

I'm in the middle of writing the same thing up, basically, but with some more concrete numbers. :/

Python code to get beta and lambda values for p and n of secp256k1 curve
Getting beta of p
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
print "beta of p = 0x%x" % pow(2, (p-1)/3, p)

beta of p = 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee

Getting lambda of n
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
print "lambda of n = 0x%x" % pow(3, (n-1)/3 , n)

lambda of n = 0x5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72

More info
I experimented further with this by getting beta and lambda for both p and n and discovered that all the results generated become useful for finding the identical values for x or y in the equation y ^ 2 = x ^ 3 + 7 mod p
#beta and lambda for p
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
betaOfP = pow(2, (p-1)/3, p)
lambdaOfP = pow(3, (p-1)/3, p)
print "betaOfP \t= 0x%x " % betaOfP
print "lambdaOfP\t= 0x%x " % lambdaOfP
print

#beta and lambda for n
n = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
betaOfN = pow(2, (n-1)/3 , n)
lambdaOfN = pow(3, (n-1)/3 , n)
print "betaOfN \t= 0x%x" % betaOfN
print "lambdaOfN\t= 0x%x" % lambdaOfN

betaOfP         = 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee
lambdaOfP       = 0x851695d49a83f8ef919bb86153cbcb16630fb68aed0a766a3ec693d68e6afa40
betaOfN         = 0xac9c52b33fa3cf1f5ad9e3fd77ed9ba4a880b9fc8ec739c2e0cfc810b51283ce
lambdaOfN       = 0x5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72

source: Stack Exchange

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

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

sort: votes


text:
Sparrow Wallet only partially supports Taproot?
Sparrow 1.7.1
I decided to try out the Sparrow Wallet. Since Sparrow supports P2WPKH, P2WSH and P2TR I created one of each and verified that it was connecting to my Bitcoin Core node.
However, I only verified the connection to the node for the P2WPKH wallet. Since the connection parameters are the same regardless of which wallet I am using, I figured it would connect just as well no matter which wallet I use.
I sent a small amount of bitcoin to a P2TR Receive address. After a while I could see in a block explorer that the transaction succeeded. So I tried to refresh my Sparrow Taproot balance and it told me it could not connect to Bitcoin Core. It had been able to connect earlier, so I checked the log file.
The log file says:
Taproot wallets are not yet supported when connecting to Bitcoin Core

If I had known that earlier, I would have used a different transaction type.
So I tried to enter the same 24 words into the Wasabi Wallet, thinking I might be able to use the UTXO from there. But when I entered the 24 words into Wasabi, it told me the word list is not valid. I double checked it in Sparrow. It is the correct word list. [Edit: Apparently, I made two consecutive mistakes entering the word list into Wasabi. So they both do indeed use standard BIP39 word lists.]
Do Sparrow and Wasabi use different types of word lists?
How can I make these funds spendable if I only have the 24 word seed but the Sparrow Wallet that created the 24 words can't see the balance because the current version can't yet connect to a Bitcoin Core node?

I think it's great that you tell us what you have tried already to recover, but whether “Sparrow and Wasabi use different types of word lists” seems like a good question to ask as a separate topic. Sorry that you're forced to hodl. I'll see if I can ping Craig to take a look.

I can't reproduce the word list problem today. It happened twice with the same word list yesterday, so I must have made at least one mistake twice in a row. So it looks like both wallets do use standard BIP39 word lists. But the main question was answered below. This version of Sparrow can't use Bitcoin Core for Taproot wallets.

Yeah all good, looks like you got all your answers in one place after all :)

Correct, you cannot load a Taproot wallet when connecting to Bitcoin Core in Sparrow v1.7.1. Support is planned however. For now, you can load the wallet by connecting to any Electrum server, or wait for the upcoming release.
Sparrow supports entering BIP39 word lists as seeds.

On the Wasabi side, it supports BIP39. You can verify it by simply generating a random BIP39 word list here https://iancoleman.io/bip39/ and try to recover it in Wasabi.
I know you know but just in case: DO NOT USE THAT WALLET generated online.

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


text:
What is the difference between a hard fork and a soft fork?
A fork is a splitting of the blockchain. But what is the difference between a hard fork and a soft fork?

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


text:
Sending funds via routing number from bank
Is it possible to send funds from a bitcoin account via routing number to a trading account?

Not without an intermediary. Banks deal with traditional currencies like Euros or US Dollars, whereas Bitcoin is completely based on transactions involving bitcoins.
The only reason bitcoins have a value denominated in USD or Euros is that there are people willing to buy them for that value. Other than that bitcoins and traditional currencies are completely detached from each other.
So either your bank accepts bitcoins and allows you to trade them or, more likely, you'll have to find someone who buys bitcoins and then you transfer the money you received in exchange to your bank account.


text:
Does `importprivkey` need a rescan even in a txindex=1 node?
Documentation for importprivkey RPC command has an optional boolean argument called "rescan" which hints that the user may want to rescan the blockchain to be able to see previous deposits to this address.
Is the rescan needed if the node is configured as txindex=1?

Yes. txindex=1 is not related to the wallet and the wallet does not know about the txindex nor does it care. What the wallet really cares about is transaction output information and which transactions are related to addresses stored in the wallet. The txindex does not store any of that information, all it stores is the location of each transaction identified by transaction id. The actual contents of that transaction are not kept except in the raw transaction itself.

is there any explicit RPC command to trigger rescan? Say I want to import an address but only do rescans according to some schedule (i.e. when I expect the load on my Bitcoin node to be least in a give 24-hour interval)?

A rescan can be triggered using the rescanblockchain command.


text:
How to export an encrypted non-seedless electrum wallet into bitcoin-qt?
How to export an encrypted non-seedless electrum wallet into bitcoin-qt?
Is it even possible?
Cheers

Does this answer your question? Migrating from Electrum => Bitcoin core

You'll have to import the addresses. See electrum2core.


text:
How to enable replace-by-fee via command-line in bitcoin-core?
Alright, so I'm convinced replace-by-fee is a good thing. I've read it's opt-in, so how can I enable it in my bitcoin-core wallet? I don't find any flag to pass it when launching it. I want all my outgoing transaction have replace-by-fee enabled.

Bitcoin Core v0.14.0 introduced the startup option walletrbf=1 which causes any transactions sent from the wallet to opt into replaceability. Since Bitcoin Core v0.16.0 transactions created from the GUI would signal replaceability by default.
Bitcoin Core v24.0.1 changed the default value to walletrbf=1 which extended this behavior also to all transactions created via RPC.

According to bitcoin core version 0.12.0 release notes:

It is now possible to replace transactions in the transaction memory pool of Bitcoin Core 0.12 nodes.
Transaction replacement can be disabled with a new command line option, -mempoolreplacement=0.
Note that the wallet in Bitcoin Core 0.12 does not yet have support for creating transactions that would be replaceable under BIP 125.

So the mempool can be configured to accept/reject replacement transactions, but there is not support yet for creating replaceable transactions.
Bitcoin v0.12.1 release notes do not include any modification regarding RBF.
The functionality for the wallets is split in two:

Mark the transactions as RBF (pull request not merged yet).

Replace fee of transactions that were already sent using RBF (no code or pull request in Core yet, but some scripts by Peter Todd can be used).

so it's not implemented yet? what do you mean?

Yes, it's not implemented yet.

convenience functions to create replacement transactions are not implemented yet.

@renlord, ok but how to mark my outgoing transactions as replace-by-fee enabled?

http://bitcoin.stackexchange.com/questions/44510/what-wallets-currently-support-rbf/44524#44524


text:
Is it safe to install Bitcoin Core using a package manager?
For example, on macOS:
brew install --cask bitcoin-core

Or on Ubuntu:
snap install bitcoin-core

Etc.
In particular, what attack vectors might I be exposing myself to if I choose to install Bitcoin Core using a package manager?
Using Homebrew as an example:

I presume that download hashes are checked in Homebrew?
Are hash signatures checked?
Does Homebrew have a mechanism that ensures that only a Bitcoin Core maintainer can update a package on Homebrew?
Could I still be vulnerable to a malicious/compromised Homebrew maintainer who changes the download URL and hash?
Are there any other similar issues or risks?

(N.B.: If the only "safe" method is to build from source or to download Bitcoin Core directly, it's fine to note this and why, but I ask that you please keep answers focused on any risks associated with using a package manager instead.)
Thanks!

Homebrew checks download hashes to ensure the integrity of downloaded files. It does not natively support cryptographic signature verification for packages. There is a potential risk of a malicious or compromised Homebrew maintainer changing the download URL and hash for a package.

Thank you, @ManiT! It sounds like a more niche package manager is needed (and may eventually develop) that maintains an appropriate chain of verifiable trust for higher risk packages like various Bitcoin and LN implementations, etc, though I am likely underappreciating the complexities in this idea.


text:
How to use Bitcoinj to authenticate signed messages?
I'd like to authenticate from java code on a website that makes use of javascript/ajax authentication like below:
var key = new Bitcoin.ECKey(Crypto.util.hexToBytes(SHA256(password)));
var signed_challenge = Crypto.util.bytesToHex(key.sign(Crypto.util.hexToBytes(SHA256(challenge_key))));

I found that the library bitcoinj offers classes like ECKey, but I don't know what I might use as replacement for CryptoJS here?
Maybe you could help me translating the JS to Java?

Maybe reword the question to "How to use Bitcoinj to authenticate signed messages?"


text:
I want to use another wallet.dat file with bitcoin-qt. Is this possible?
my situation is the following: I have a laptop with not much space on disk and therefore using bitcoin on a stick (I start bitcoin-qt with the argument "-datadir=location/to/stick). Now I wanted to transfer some bitcoins from my mobile phone to that account. Accidentaly I typed in a wrong directory (which doesnt exist) and bitcoin-qt lead me to the standard bitcoin directory (which is ~/.bitcoin). I didn't realize this and transferred the bitcoins to that address.
Now I would like to change the wallet.dat file from the ~/.bitcoin/ directory with the wallet.dat file from the directory on my stick, because my stick has all the blockchain already loaded. Is this possible?
What I have tried so far:

simply changing the wallet.dat files: when I now start bitcoin-qt it goes in a very very long loop (probably even an endless-loop). It just says "Dursuche erneut..." (german), what means translated: "Researching..."
doing the above, but with the additional argument "-rescan" ("bitcoin-qt -rescan -datadir=/location/of/stick"): it happens the same as above
trying to backup the relevant wallet.dat file inside the console of bitcoin-qt: when trying to back it up i get the error: "Error: Wallet backup failed! (code: -4)"

Can someone help me with this problem? Thanks in advance!
Edit: I wanted to rewrite my problem in another (probably easier understandable) way: I would like to overwrite the wallet.dat file inside the ~/.bitcoin/ folder. But doing so, bitcoin-qt doesnt stop loading (it just says "Researching...". Is there another way to do what I want?

Could you raise an issue on Github with that stupid translation? It should say "rescanning" which would make a lot more sense.

»Durchsuche erneut« actually means »rescanning«. The translation is correct, I think.

You're on the right track -- in fact you're already using the correct command line switch, which is "-rescan".  But your mistake is thinking this is a quick solution.  It's not.  Rescanning the blockchain will take hours, depending on your processor speed.
This is a task you'll want to leave running overnight.  If the problem persists even then, record the error message you get once the rescanning has completed, and ask another question with that error message.
Your next option would probably be to actually transfer the Bitcoins using a tool like pywallet, but I'd wait until you've left this rescanning overnight before you try that, and seek guidance on how to use pywallet.

I just did this. It didn't finish overnight. And as stupid as I am, I stopped the rescanning right before I went to this site to see your answer... I will rescan again for a full day and will report back then.

It worked now, just as you said. I would upvote your answer, but I cannot yet, sorry :/


text:
bitcoin fork getblocktemplate keeps reporting downloading blocks
I got my own hard fork of bitcoin from forkgen.tech.
The fork has happened after block 506016.
I have 2 nodes running and after syncing up to block 506016, I want to run a pool server.
But the getblocktemplate command keeps returning:
error code: -10
error message:
MyCoin is downloading blocks...

Also getpeerinfo returns:
"id": 0,
"addr": "xxx.xxx.xxx.xxx:37912",
"addrlocal": "xxx.xxx.xxx.xxx:6703",
"addrbind": "xxx.xxx.xxx.xxx:6703",
"services": "000000000000000d",
"relaytxes": true,
"lastsend": 1517579099,
"lastrecv": 1517579099,
"bytessent": 1783,
"bytesrecv": 1807,
"conntime": 1517578379,
"timeoffset": 0,
"pingtime": 0.001438,
"minping": 0.000366,
"version": 70015,
"subver": "/MyCoin:0.15.0.1/",
"inbound": true,
"addnode": false,
"startingheight": 506016,
"banscore": 0,
"synced_headers": -1,
"synced_blocks": -1,
"inflight": [
],
  "whitelisted": false,
  "bytessent_per_msg": {
  "feefilter": 32,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
},
  "bytesrecv_per_msg": {
  "feefilter": 32,
  "getaddr": 24,
  "getheaders": 1021,
  "ping": 224,
  "pong": 224,
  "sendcmpct": 66,
  "sendheaders": 24,
  "verack": 24,
  "version": 168
}

Whereby the values synced_headers and synced_blocks should not be -1. The mining pool software complains about this and the blockTemplate and does not start but keeps on waiting for the synced headers and blocks.
Does anyone know what's going on and how to fix this?
Or what further checks I can do to confirm my fork is running correctly.
I am an experience programmer but have no knowledge of c++ but I do know C# and Javascript.
For reference here is the blockchaininfo:
{
  "chain": "main",
  "blocks": 506016,
  "headers": 506016,
  "bestblockhash":"shortened by OP because this value was too long",
  "difficulty": 2603077300218.593,
  "mediantime": 1516861026,
  "verificationprogress": 1,
  "chainwork": "shortened by OP because this value was too long",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 419328
    },
    "segwit": {
      "status": "active",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 481824
    }
  }
}

Because block 506016 happened ~1 week ago, when you start your node software, it thinks that it is still in the initial block syncing phase because the timestamps are off of real time by a lot. The only way around this is to mine a block now. You can modify the source code to bypass this warning so that you can mine a block.

Exactly the answer I was looking for. Instead of modifying code I don't fully understand in a language I don't master, I went for the easy solution to just increased the FORK_BLOCK variable to a value a little bit above the current block. I re-compiled the code and it's syncing the blocks now. I expect the mining pool code will run without complaints. Thanks Andrew.


text:
Reading Bitcoin Raw Transaction
I want to understand Bitcoin data structure. So i try to understand a raw transaction in json format.
When i checked the blockchain.info API documentation, i see that input structure is defined for transactions like this:
"prev_out":
{
    "hash":"a3e2bcc9a5f776112497a32b05f4b9e5b2405ed9",
    "value":"100000000",
    "tx_index":"12554260",
    "n":"2"
},
"script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac"

But when I query a transaction from blockchain.info, it seems differently:
"prev_out":
{
    "spent":true,
    "tx_index":8845778,
    "type":0,
    "addr":"1CfD77hupeUvFwBPxZ2fA8iyWmVwQY22oh",
    "value":10212000000,
    "n":1,
    "script":"76a9147fe34b97aeff4ab754770be5c8f12e2e95332fd488ac"
 }

Is there any document that clearly explains these data fields?
My current wonders:

What is the spent field?
There is no hash field at queried transaction, there must be i think?
What is type field?
Which fields are signed? The signature is generated by which fields hash?

Hey man, not an exact answer but here is a video where a similar transaction layout is described.

You should know that different transaction parsers often include their own fields that aren't directly included in the raw transaction. For example, the "address" would not be found in the raw transaction, but it can be inferred by looking at it. I'm not sure what the 'type' and 'n' fields refer to. You may want to have a look at these links:
dissecting transactions
create raw bitcoin tx
redeeming a raw tx
I'm not sure about your questions 1, 3, it'll be specific to the api. I'm not sure what you are referring to in question 2. For question 4, it depends on the type of transaction (non-segwit or segwit) and the type of signature (sighash_all, sighash_none, sighash_single).

I have been using this for a long time, and I always skipped the fields. Now that you mention it, here is a partial answer:
1.) I do not know.
2.) The transaction hash appears at the end of the list; it also appears in the link you provided.
3.) Another good question. I do not know.
4.) The fields which are signed come from the previous transaction where, basically, the whole data structure is signed with the exception that the "scriptSig" field is filled with the "pubkey" script.
There are three great sources of documentation on transaction structures:
1.) Bitcoin.org Developer Guide
2.) "Mastering Bitcoin" by Andreas Antonopoulos
3.) Bitcoins the hard way: Using the raw Bitcoin protocol
I hope this was beneficial.

Thanks for the response. I will look the link that hard way uslng raw bltcoin. The hash that you mentioned in the question 2 is the hash of all transaction. But I am looking for the hash of input transaction hash. It appears in the documention but lt does not exist in the real transaction json.

I see. The hash you are looking for does not appear in the tx. This is my answer 3, and indeed is the "tricky" part. An initial transaction is created, with inputs and outputs, and the output script is placed in the sigscript area. This whole structure is then hashed, and signed. Then the output script is removed, and the signature placed in there (and the length fields are adjusted). Quite a bit complicated, when starting, but then with "bitcoins-the-hard-way" fairly easy to understand. Also with Andreas book...

I guess "spent" tells you if it is an UTXO or not.
https://en.wikipedia.org/wiki/Unspent_transaction_output


text:
How does the network determine whether to replace a transaction?
Further to this question, how does the network determine whether to accept a new version of a transaction as a replacement transaction? Could an attacker replace transactions maliciously?

Each node in the network accepts any transactions with a higher sequence field (in TxIn) as long as the transaction isn't locked (lock time hasn't expired).
This can't be used as an attack because the client is aware the transaction is unlocked and thus could be modified.  The client (and thus any merchant) will/should treat the transaction as even less secure than an unconfirmed one.
To protect oneself the merchant just needs to wait until the lock time has expired (then transaction is similar to any other 0-confirm transaction) and for even more security wait for 1 to 6 confirmations.
Currently the client only supports lock time of 0 (lock as soon as created) and sequence of max UINT (no possible higher sequence) which prevents modifying transactions.


text:
Could speculation some day rise bitcoin to the moon?
I saw too many questions about bitcoin losing value.
But in my view, 21 million bitcoins is relatively less money (ie., units) than other currencies. Why wouldn't Bitcoin's value rise simply due to supply/demand when it is used more widely?

You say "speculation" but it seems that you are asking if the value of bitcoins will rise simply due to supply/demand when it is used more widely. It's not clear what you are asking, but anyway it seems to invite speculative answers so I'm voting to close this.

@ D.H. - Sorry about this. I'm foreign. Already edited. Should you please remove the vote if now it's good? Oh, sure. It's good for you now?

Could it be possible that you the verb in the title? :P

@D.H. - if this title was changed to "Why do some people believe Bitcoin's value could increase in the future", could this be reopened? I think the question with the new title is valid.

I actually downvoted it before, but I think it's important to explain why some people believe there's a chance for this. With the new title, the answers need not speculate, but just explain an objective fact - that some people believe some thing.

@ripper234: Your title would make it more objective, but it just seems like a very basic question to me. Why do people believe that anything will increase in value? Probably because there is something good about it, something that people want/need. It seems more like a question about what it is about Bitcoin that makes it better or more useful than other currencies. I think that we should just leave this closed. If we change the question too much the answers won't make sense anyway.

Because there is no guarantee that bitcoin will be in demand in the future.  Here's an example, in a recent Gawker article they put "(RIP)" when naming Bitcoin .. as if it had died. http://www.gizmodo.com.au/2011/09/is-digital-money-the-new-way-to-buy-drugs
Of course, the existing $35 million or so valuation of the currency come from those speculating that the value of the currency will at some point in the future buy more than it will today.
Whether or not this will be a stratospheric rise nobody knows but it isn't unprecedented, just not typical nor expected by most.  But there are those, such as Rick Falvinge, who believe it.  Rick describes his thoughts here:

http://falkvinge.net/2011/06/16/bitcoins-four-drivers-part-one-unlawful-trade
http://falkvinge.net/2011/06/18/bitcoins-four-drivers-part-two-international-trade
http://falkvinge.net/2011/07/03/bitcoins-four-drivers-part-3-merchant-trade
http://falkvinge.net/2011/07/05/bitcoins-four-drivers-part-4-investment

The value will definitely rise if Bitcoins are ever used widely. But there's no guarantee that will ever happen. Even if you think crytpo-currencies are awesome and that human beings will be using something like them for centuries, it' still entirely possible that it will not be Bitcoins but some similar crypto-currency.
It is likely that almost all of the current value of Bitcoins comes from speculation. In fact, the recent drop from around $11 to around $5 is likely due to people thinking the chances of Bitcoins becoming mainstream are lower.
The point is, widespread adoption of Bitcoin in the future is very far from a sure thing -- even if you think widespread adoption of crypto-currencies is a sure thing.


text:
How to build a wallet in my computer?

Possible Duplicate:
What software and skills do I need?

I have seen on the wiki, there are too many steps (hard steps for a non-geek person) to build a wallet. Is there a easy way for a new non-geek bitcoin user? (some kind of script?). Thanks.
EDIT: I want to build my first wallet.

Can you elaborate on the question, as it is not really clear on what you want to accomplish. Are you trying to create your first wallet to be used with the standard client, a wallet with new keys, or build a wallet in a different programming language, data structure or the like?

@H_7 , Please link the Wiki article that you referring to. Bitcoin client creates wallet automatically if it doesn't find one in designated directory.

@H_7, There is no "building" required.  Install the client it will make a wallet by default.  Done.

Seems like the question is simply about getting started with Bitcoin. This question will answer that for you: What software and skills do I need?. Should we even close this one as a duplicate?

I would tend to agree with D.H. - this question only sounds like it's not a dupe because the user wasn't familiar enough with Bitcoin to phrase it in a way that makes it more obvious. Closing as duplicate.

If you want to get your first wallet, just install the Bitcoin client and run it.
If you want to have a new wallet, backup your old wallet.dat and run the Bitcoin client again.
If you want to build a custom wallet with tailored structure and so forth, I don't think you're a non-geek user.

just install the Bitcoin client and run it.  It's that really simple like it sounds?

@H_7.  Yes it is that simple.  Download here http://bitcoin.org install like any other app and then launch the Bitcoin wallet.  I recommend you enable encryption.

@H_7: Yes, the basic client does pretty much everything you need to start using Bitcoins right out of the box. Note: it can take awhile to download the whole blockchain (you`ll see the number next to blocks on the bottom increasing up to about 151000).


text:
Solved: Need help setting up Bitcoin Core full node over Tor (solely) and Tor hidden service. Tried a bunch
Fetching getnetworkinfo should result in IPv4 and IPv6 flags set to false and Tor to true. This will ensure that I am operating my node privately. But this is not the case for me.
This is what I should get , but am not getting ( see below for more):
"name": "ipv4",
"limited": true,
"reachable": false,

  "name": "ipv6",
"limited": true,
"reachable": false,

I am trying to run a full node with Bitcoin Core over Tor (solely) in Ubuntu (no bitcoin-qt) but the steps I am following are from many sources and I feel like I have been missing steps in between, not to mention that my technical skills are fairly basic.
Here's where I'm at (Ubuntu 20.04 LTS ; bitcoind ; no bitcoin-qt).
I use a static IP address from my ISP .
I use an external SATA drive mounted at   /mnt/bitcoin    to store Bitcoin full node data.
..........
desktop:~$    bitcoin-cli getnetworkinfo
--- > Output extracts:
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "onion",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },

..........This is what is in my   ~/.bitcoin/bitcoin.conf
assumevalid=0

zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

debug=tor
onion=127.0.0.1:9050
listenonion=1
onlynet=onion
proxy=127.0.0.1:9050
bind=127.0.0.1
proxyrandomize=1

alertnotify=echo %s | mail -s "Bitcoin Alert" XXX@xxx.com

server=1
daemon=1
listen=1
rpcport=8332
rpcauth=.................XXXXXXXXXXX
datadir=/mnt/bitcoin
txindex=1
maxconnections=15
maxmempool=50
maxreceivebuffer=2500
maxsendbuffer=500
minrelaytxfee=0.0001

discover=0
torcontrol=127.0.0.1:9051

dbcache=100
maxorphantx=10
maxuploadtarget=5000

..........Running ubuntu and this is my   "/etc/tor/torrc"
SOCKSPort 9050
Log notice stdout
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
HiddenServiceDir /var/lib/tor/lnd/
HiddenServicePort 8080 127.0.0.1:8080

..........This is my    "/usr/share/tor/tor-service-defaults-torrc"
DataDirectory /var/lib/tor
PidFile /run/tor/tor.pid
RunAsDaemon 1
User debian-tor

ControlSocket /run/tor/control GroupWritable RelaxDirModeCheck
ControlSocketsGroupWritable 1
SocksPort unix:/run/tor/socks WorldWritable
SocksPort 9050

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /run/tor/control.authcookie

Log notice syslog

..........These seem to look good to me.
desktop:~$    cat /mnt/bitcoin/debug.log
--- > Output extracts:
2021-12-02T15:01:11Z Bitcoin Core version v22.0.0 (release build)

2021-12-02T15:01:11Z InitParameterInteraction: parameter interaction: -proxy set -> setting -upnp=0
2021-12-02T15:01:11Z InitParameterInteraction: parameter interaction: -proxy set -> setting -natpmp=0
2021-12-02T15:01:11Z InitParameterInteraction: parameter interaction: -proxy set -> setting -discover=0

2021-12-02T15:03:41Z loadblk thread start
2021-12-02T15:03:41Z torcontrol thread start
2021-12-02T15:03:41Z Bound to 127.0.0.1:8333
2021-12-02T15:03:41Z Bound to 127.0.0.1:8334
2021-12-02T15:03:41Z init message: Loading P2P addresses…
2021-12-02T15:03:41Z Leaving InitialBlockDownload (latching to false)
2021-12-02T15:03:41Z tor: Got service ID XXXXXXXXXXX, advertising service XXXXXXXXXXX.onion:8333
2021-12-02T15:03:41Z AddLocal(XXXXXXXXXXX.onion:8333,4)

..........
..........When I ran this , I get this. May be because my debug.log is at /mnt/bitcoin/debug.log    (see above):
desktop:~$    tail -f ~/.bitcoin/debug.log
2021-11-14T21:35:25Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2021-11-14T21:35:25Z Script verification uses 3 additional threads
2021-11-14T21:35:25Z scheduler thread start
2021-11-14T21:35:25Z Binding RPC on address ::1 port 8332 failed.
2021-11-14T21:35:25Z Binding RPC on address 127.0.0.1 port 8332 failed.
2021-11-14T21:35:25Z Unable to bind any endpoint for RPC server
2021-11-14T21:35:25Z Error: Unable to start HTTP server. See debug log for details.
2021-11-14T21:35:25Z Shutdown: In progress...
2021-11-14T21:35:25Z scheduler thread exit
2021-11-14T21:35:25Z Shutdown: done

..........The node seems fully synced
desktop:~$    bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "blocks": 712330,
  "headers": 712330,
  "bestblockhash": "XXXXXXXXXXX",
  "difficulty": 22335659268936.39,
  "mediantime": 1638500142,
  "verificationprogress": 0.9999986191151918,
  "initialblockdownload": false,

Thank you very much.
..........References consulted include , but not limited to:
https://www.youtube.com/watch?v=n2IUYL7hCOI
https://jlopp.github.io/bitcoin-core-config-generator/
https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service
https://stopanddecrypt.medium.com/running-bitcoin-lightning-nodes-over-the-tor-network-2021-edition-489180297d5
.......Solution:
I copied the contents in
~/.bitcoin/bitcoin.conf
to
/mnt/bitcoin/bitcoin.conf
Delete everything inside
~/.bitcoin/bitcoin.conf
except this line:
datadir=/mnt/bitcoin

Then I ran this command and it is a success in getting IPv4 and IPv6 flags set to false:
bitcoind -daemon -conf=/mnt/bitcoin/bitcoin.conf

Note that Tor is a centralised network, so not a good idea (your security is compromised) to be your only source of peers...


text:
Sign message with private key result is different than txinwitness
I'm studying segwit and I'm doing some experiment in regtest.
I create a raw transaction with P2SH address.
My Transaction data without signature is:
0200000001faf19017fe7e20747535ac41009922e4beb76e17a7fd5423bc60e75fbc8381c40000000000ffffffff01606b042a0100000017a914b63007b51b936175644dcf654f77c528e35f01178700000000

that's my message to sign, instead to use signrawtransactionwithkey I try to use signmessagewithprivkey and I expect the signature that I can find in txwitness field (first row).
signmessagewithprivkey return base64 signature then I convert it in hex.
result is:
20db4febb769c43c9072daf30934a345b2327b6107e701f21c7fe052a040180d4129dc3079dc7dad29db37c31fa6401013819e386beb9396e330b3b6e9f7fbcf5b

signrawtransactionwithkey return:
"txinwitness": [
      "3044022077f49ad0371ea5baf0ce60d3d15175c9bb5e37ff7f3bc023b76863b2a91d379e022073010deba5eef8619745cd79d94a73c4a4527391253731104fc734449322d85b01",            "02985586bf43d26229a97092f76086cfe6f9bf09d93bef16a92f65185c8f7f0b17"
      ],

I wonder, why the result of signmessagewithprivkey isn't equal at first raw of txwitness?

From Elliptic Curve Cryptography perspective everything you sign is a "message" but the term "message" in bitcoin context means a random string that user wants to sign with his key (usually used for proof of ownership or something similar).
This means when you use sign*message*withprivkey the code interprets the input as a string and signs it with a different method that generates and entirely different digest ("some_fixed_string" + UTF8.Decode("0200000001f...")). But when you use sign*rawtransaction*withkey the code interprets the given string as a transaction and signs it based on its input scripts with different methods ("Transaction.Decode("0200000001f...") then Serialize() based on BIP143 for SegWit).

Thanks for reply. If I understand correctly, before sign with sign*rawtransaction*withkey the string (transaction data) is altered by some serialization right?

That is correct. You can see the details of the process in BIP143 for SegWit and here for legacy transactions OP_CheckSig.

In legacy transaction if we use SIGHASH_NONE we will sign the whole transaction data (already serialized). If I Sign this transaction with method signmessagewithprivkey I didn't give the same digest. Where can I find in Github the code apply on transaction data before sign? I didn't find.

You will never be able to get the same signature from signmessagewithprivkey because a fixed string is being added to the "message" before hashing intentionally to make the result different. (not sure where the code is in bitcoin core project though).

https://github.com/bitcoin/bitcoin/blob/af05bd9e1e362c3148e3b434b7fac96a9a5155a1/src/util/validation.cpp#L25

In addition to the difference in the input data, txn sigs are in ASN.1 DER (variable) format plus a sighash byte at the end while msg sigs are in P1363/PKCS11 (fixed) format plus a recovery byte at the beginning; see https://bitcoin.stackexchange.com/questions/90799/difference-between-sign-message-and-sign-transaction


text:
Is txid a required field on all transactions?
I am writing a script that relies on txid to perform some tasks. I was wondering if it is possible for the txid to be missing from a transaction.

A txid is calculated from the transaction data by hashing the transaction (excluding the witness). It's not part of the transaction, but rather derived from the transaction. You can rely on it being available for every transaction.

Txid can’t be missing since it’s just a hash of the transaction data

Note that it isn't a "field" on the transaction either, it isn't explicitly given. You have to hash the transaction yourself to get the ID.


text:
What are the differences and similarities among Paymium, Bitpay, Coinbase, etc.?
Google news in recent months has turned up a story about a company in France called Paymium that has been licensed as a bank (without going into just what the company does), and another company that has moved to Atlanta, called Bitpay, which enables customers who have web sites to accept bitcoin payments.  The headlines about the latter seemed to be about the fact that they'd raised something over a half-million dollars from a small number of investors.  Google news didn't include anything about Coinbase, as far as I recall.  But a glance at websites makes it look as if they might all be in approximately the same business.
Can someone compare and contrast these companies, including, but not limited to, differences and similarities in what they do?  And are there other such companies that are notable and that I've missed here?

Paymium, operates Bitcoin-Central.net market exchange.  That exchange has partnered with a financial organization such that your EUR balance held at the exchange will be (once they go live with that) guaranteed by the government.  They will only be doing BTC/EUR when this goes live.  Currently they offer BTC/USD, BTC/GBP and BTC/EUR markets but no fiat balances are currently guaranteed.
BitPay is a payment processor for E-Commerce as well as for bricks and mortar / point-of-sale.  This allows a business to accept bitcoins for payment and the proceeds are delivered to the merchant as directed.  This could be 100% fiat (e.g., all bitcoin sales get converted to USDs immediately, or a mix, .. like 30% USD, 70% BTCs, etc.)   The currently can send payments to merchants in U.S., Mexico, Canada and several nations in Europe.
Coinbase account holders get a secure web-based bitcoin wallet, and by linking a U.S. bank account, the ability to buy/sell bitcoins directly from/to Coinbase at a USD conversion rate that is very close to the last price quoted from London based bitcoin exchange Bitstamp. Coinbase itself is not a crypto-currency exchange. Coinbase also offers bitcoin transaction processing services to merchants.
There are quite a few exchanges.  The bitcoin.it Wiki has Buying bitcoins and Selling bitcoins indexes that are fairly comprehensive as to the options available.

We're already live with the EUR balances being held under the actual customer's name. Our GBP and USD bank accounts will soon be closed and balances converted, we're just not rushing anything. This can easily be checked, our EUR account is at Crédit Mutuel Arkéa, and the other ones are at CIC. You still get an upvote :)

What does it mean when a balance is guaranteed? You will have access to your funds if the company goes bankrupt?


text:
What's the minimum age to join or use Bitcoin?
What is the minimum age a person must be to use the Bitcoin service?

I think you're missing the point of what Bitcoin is - it's not a product or a web site that has some kind of centralized rules like age restriction. Asking if Bitcoin has a minimum age is like asking if there are minimum ages for the internet, chairs, microphones, walls, blankets or aluminum - it's just a thing, it has no intrinsic restrictions.

Depends.... What is the minimum age a person must be to use money?

@Pacerier Is there a minimum age, in any country, for people to be legally using money? Never heard of that before. Could you please provide an example of such a draconian law? I'd say that age is defined on a case by case basis depending on each child's maturity - what's the problem of allowing a 6yr or even a 4yr old to buy some candy, if he/she fully understands the concept of money and knows when to expect change to be given back???

@JoePineda, Exactly. The Bitcoin protocol is like the money protocol, a law which restricts people access to it is draconian.

@JoePineda In Germany, children younger than 7 are legally incompetent i.e. they do not have the legal power to enter a contract including the act of purchasing something. However, they can act as messengers to declare the will of a legal guardian, i.e. buy something on behest of the parents.  Minors (7-17) are legally competent in limits: Contracts they enter are transitionally ineffective unless sanctioned by their guardian. The exception being pocket money which they may spend on anything they want (but pets). – Not kidding, it's part of the German Civil Code. ;)

@Murch At least in Mexico situation is the same regarding contracts - minors can't sign them and require approval of their tutors/legal guardians. But regarding physical money, there's no such law - just common sense. Say, if I go to Germany and give my younger-than-7 yo sons some euro-cents and let them wander in a candy-store and pay the clerk directly (as they always insist on doing "everything by myself"), would I be breaking the law???

No, that falls in the category "pocket money/allowance", money you give them to spend on what they want, they can spent on what they want.

@Murch that was exceptionally informative. I can say when I was very (very young, so laws may have changed) young that signing contracts for opening even a savings account without a guardian present was arduous or not possible. Ashesh Kumar I've never seen age limits put on bitcoin but the youngest individual I've met using bitcoin where more financially savy than some adults; but then again they develop apps too so they maybe ahead of the learning curve. Do be aware of the public nature of the blockchain if you're thinking of using it as your kids allowance payment method though.

There is no minimum age, my children have Bitcoins and have for years.
Service by service should implement whatever safety or age restrictions they need.
I am not aware of any work done on this front, perhaps somebody else can enlighten.

It's a great opportunity to allow your children to experience managing money since they can buy things online without needing an adult and can even work (say on design, translation, writing, programming) remotely and get paid in bitcoin without any age issues

Some merchants, exchanges or E-Wallets even may have age restrictions, but Bitcoin is a protocol and therefore there is no restrictions regarding how it is used.

Unless you are a miner, you do need to buy Bitcoins; and given the currently limited range of Bitcoin-only services, you do need to sell Bitcoins as well.
While neither buying or selling Bitcoins has an explicit age restriction any more than holding and spending pocket money at a car-boot sale does - if you buy or sell Bitcoins from a bank account you will be constrained by the age restrictions that may apply.


text:
My sync wont start, what can I do?
I have used Bitcoin previously via Windows GUI miners, but never faced an issue like this before. I am now running Ubuntu 12.04 amd64 and using an updated 0.7.1 Satoshi client.
The sync looks like it is working, but the first block never loads. I have had the wallet synchronizing, but it is forever stuck at zero. My Internet connection is fine and have cleared the bitcoin directory and rebooted with no change.
While I am writing this I am watching my other rig drop blocks fine and its running Mint 13 with about a third of the resources I have on the computer giving the issues.
Any help will be greatly appreciated. Thanks.
Specs:

UBUNTU 12.04 updated
AMD Phenom IIx4
4 GB ddr3
Nvidia EVGA 9800GTX

Can you telnet to a fallback node?
e.g., $ telnet 62.75.216.13 8333
If you get a connection then the problem is with Bitcoin.   If you don't then the problem is with your Ubuntu networking or your firewall.

http://bitcoin.it/wiki/Fallback_Nodes

Worst case scenario you could do -connect=  and connect to the other node, on your LAN.

Can you examine/post the log file? It's usually located in ~/.bitcoin/debug.log

Adding a -debug to the command line adds important information about what bitcoind does.

Do you have the exact same configuration on your other rig? If you do, copy the configuration exactly. Sometimes if you don't have long-polling turned on and using the correct port, in some rare cases you will keep going if you are using the wrong protocol for a said port.
In general, if you are doing Bitcoin mining on a Phenom of your type, and you are doing SHA256D hashes, you should wait around 5 minutes.
If it doesn't immediately say long-polling activated, you've got a problem and need to configure your mining application to do so.
From the time you get the Long-Polling started message, anywhere from 30 seconds to 5 minutes is normal.
I have my scan time set for 1 second, by default it's set for 5 seconds but depending on your hardware and the pool you're in they might tell you to set it for 10 to 30 seconds.
Are you using Slush's Mining Proxy too? I know that can stall out if you're not using the correct configuration for that too.


text:
Error while syncing with the blockchain on my Raspberry Pi
So I already have the node set up on my raspberry pi. This night the transfer of the Blockchain from my laptop to the raspi's hard disk finished. Now I am waiting for the blocks to match the headers
"blocks": 162064, "headers": 613982

The thing is that when I do bitcoin-cli getblockchaininfo to check if it is already complete, I get this error:
error: Could not connect to the server 127.0.0.1:8332
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

I check if bitcoind is running with systemctl status bitcoind.service and this shows up:
● bitcoind.service - Bitcoin daemon

Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled)

Active: activating (auto-restart) (Result: exit-code) since Wed 2020-01-22 11:59:12 CET; 15s ago

Process: 811 ExecStartPre=/bin/sh -c sleep 30 (code=exited, status=0/SUCCESS)

Process: 814 ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid (code=exited, status=0/SUCCESS)

Main PID: 815 (code=exited, status=1/FAILURE)

So I try to restart the bitcoin daemon with sudo systemctl stop bitcoind and sudo systemctl start bitcoind. And when I check its status it shows the following (which looks good):
bitcoind.service - Bitcoin daemon

Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled)

Active: active (running) since Wed 2020-01-22 12:01:01 CET; 5s ago

Process: 862 ExecStartPre=/bin/sh -c sleep 30 (code=exited, status=0/SUCCESS)

Process: 864 ExecStart=/usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid (code=exited, status=0/SUCCESS)

Main PID: 865 (bitcoind)

Tasks: 12 (limit: 2200)

Memory: 111.0M

CGroup: /system.slice/bitcoind.service

└─865 /usr/local/bin/bitcoind -daemon -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid

And when I do bitcoin-cli getblockchaininfo again, it doesn't show me an error, but the number of blocks synchronized is lower than before. And a few minutes later, when I go check again it all repeats itself.
What am I supposed to do here?
Thanks

How much memory (RAM) does you Raspberry Pi have?

No idea, it's a raspberry pi 3, not 3 B and surely not 4.

Look into the logs, which are written by the daemon.
Or try to run it in non-daemonized state and look at its output in realtime, may be this will give you some clues.

You can see your RAM with the free -h or the htop command.

As @MartinSolie noted, it might be helpful to look into the debug.log file.
Based on what you describe, it sounds like your Bitcoin Core node crashes at some point while synchronizing. You mentioned that you copied the chain from another device. Since you mentioned you are waiting for the blocks to match the headers, I'm not sure the transferred chain is correctly recognized by Bitcoin Core. Your Bitcoin Core is either re-indexing the whole chain or even downloading it. On a Raspberry 3 this can take quite a while (i.e. multiple weeks).
Bitcoin Core probably crashes, because it runs out of memory. One way of solving that would be to add a SWAP file on your HDD (don't do it on the SD Card! Swapping kills the SD card over time).


text:
Whatsminer event code E011
I have a whatsminer M3 working for the past 2 months with no problems at all, but yesterday it started acting strange since it is restarting every 15 minutes, all temperatures are fine between 80 to 85deg celsius, and I noticed that there is an event with the following data
Event: code E011
Event cause: Slot-0 Zero HS 1620 seconds
Event action: Zero HS warning
Event count: 3
Event source: System-monitor

I have searched everywhere but I couldn’t find anything, I also contacted Pangolinminer to no avail.
I really appreciate any help.
Thanks in anvance
Charles

i have the same problem
did you find anything about this problem on M3?

Since the Whatsminer models aren't as common as some miners you probably will have to contact the whatsminerd company and ask them.


text:
what does it mean to have >51% hashing power for mining a block?
Can someone please shine some light on this and how it links to the analogy between honest node and attacker ?
also can attacker start mining 2 blocks ahead ? or 3 or 4 blocks ahead ? In the white paper it has only 1 block ?

What does it mean to have > 51% hashing power for mining a block?

Having more than 50% of the hashing power in the total network means that you are likely to produce more that 50% of the blocks at current difficultly. This alone is not bad at first.

How does this link to the analogy between honest node and attacker ?

However with more than 50% of the blocks produced you could also start mining blocks on another private chain. While mining you could buy something from a merchant with bitcoin. On your private chain you don't include the transaction to the merchant.
Once the merchant has send you the bought goods you could broadcast the private chain. Since you have more blocks (with more hashing work put into) all honest nodes would accept your (previously private) chain as a valid chain. You'd have double spend the coins. The merchant wouldn't have received any coins for the send goods.

Also can attacker start mining 2 blocks ahead? or 3 or 4 blocks ahead?

It only makes sense to mine a block on top of another valid block. You need block A to mine block B. However you don't have to broadcast A to mine B.

thanks but this doesn't answer why the attacker cannot mine 2 blocks in advance. How else is double spending possible ?

You can mine block A but not broadcast it to the network, then mine B and have a two block advantage over the network.

hold on. block A is mined privately and not broadcasted and followed up by mining block B silently and broadcasted ... but what are the assumptions ? The assumption is that the block A depends on what ? so as to keep the advantage before the attempt can be discarded.

Block A depends on the current chain tip. With > 51% you might never lose the advantage over the other participants in the network, even if they mine a Block A'.

ok from a technical perspective u would have to get the 'timestamps' correct otherwise , mining ur own chain secretly would never be accepted by the network if u want to do the doublespend attack.

@peter each block’s header includes a reference to the previous block, so you can’t just start mining two (or more) blocks into the future. If we are currently at blockheight N, you must first find blockheight N+1 (referencing N in it), and then you can use N+1 as reference for N+2, etc. Timestamps are included, but are not really relevant to your question.


text:
Create a transaction from a wallet coins (UTXOs) with the bcoin library
I have a multisig setup where the signing is done through external HSM's.
I am using Bcoin and its wallet to receive funds.
What I am trying to do is to create a transaction and sign it with the HSMs.
There are 2 approaches:

Manually create the transaction using MTX.
Use the wallet to create the transaction.

Method #1 solves my problem. The code is even shown here.
However, this method has a big drawback. It requires that I create the Coins. That means, I need to manually create the VOuts and VIns. Meaning that I need to get my UTXO set and choose the ones I need for the transaction. This is very tedious and error prone.
Method #2 solves this issue. When using the wallet, createTx() will create the transaction for you, choosing the VOuts and VIns from the UTXO set for that wallet. However, the problem with this approach is that createTX() signs the transaction. I do not want this as the signing needs to be done by other sources.
So, is there a way for me to get the raw transaction from a wallet without it signing?
MTX has the method toRaw() which gives the raw transaction. Is there any way I can get the wallet to create the transaction, or at least create the VOut/Vin sets?
Thank you.

createTX() doesn't sign the transaction. That is performed by sign() in wallet.js. If your private keys are offline anyway, what kind of unexpected behavior are you getting from createTX()? It wouldn't be able to sign without the keys...?
New functionality was also recently merged to return the MTX before the input scripts are templated (when the public keys are serialized and added to the witness): https://github.com/bcoin-org/bcoin/pull/557 I'm not sure if this helps out your use-case though.
You also might be interested in our own multisig wallet, bmultisig: https://github.com/bcoin-org/bmultisig
This application "plugs in" to the standard bcoin wallet (and full node) and offers hardware support like signing transactions from a Ledger device. Each counterparty of course can sign with their own hardware device at their own convenience.

Thank you @pinhead. You are right, I forgot that the private key is not in the wallet. I was considering using an MTX and using fund() to get the coins from the wallet, but createTX() would be a better choice. Thank you for suggesting bmultisig. This is probably what we need. We are expecting to use AWS HSM for signing. If you have any references or material in this regard I would really appreciate if you can share them. Thanks so much again.


text:
Somalia follow-up
Almost two years ago I asked this question.
Now I'm wondering if anything has developed in the mean time.  In particular, are Somalia immigrants to the USA (of whom there are many in Minneapolis) now using bitcoins to send money to their relatives in Somalia?

Well the only thing that has really changed is the growth and exposure of Bitcoin. The biggest challenge I see in moving money like this is exchanging or use. How are the Somalia-based recipients going to use the Bitcoins if no in the community is using or exchanging them. For Bitcoin to be used in a money transmitting operation successfully, the community must accept it and use it to a certain degree in order for the Bitcoins to have any value for the Somalian-based receiver. Also you need an internet connection to at least one well known node, even the cheapest slowest internet will suffice if a thin-wallet is used.


text:
The "one block roughly every 10 min" does not match the median time stamp of consecutive blocks
When I check the time or mediantime fields recorded in bitcoin blocks, the delta between consecutive blocks is rarely the commonly known 10 min interval.
For instance,
Block   Median Time     Delta
------  -----------     -----
299996  1399700280
299997  1399700940      660
299998  1399700975      35
299999  1399701277      302
300000  1399701278      1

I am looking for references diving deep into mathematical proof of the differences.

This question is similar to: Why can the block production rate be as low as two per hour?. If you believe it’s different, please [edit] the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.

There are a few similar topics on this site already, e.g., Why was the time between these two blocks not approximately 10 minutes?, What keeps the average block time at 10 minutes?, and What is the expected time until the next block is found?. Does any of these answer your question? If not, could you please clarify how your question is different?

The time between two blocks, assuming the hashrate and difficulty match, follows an exponential distribution with mean 10 minutes.
The distribution has:

a mean of 10 minutes (600 seconds)
a median of 6 minutes and 56 seconds (600/ln(2) seconds).

The difference between the two is due to the long tail the distribution has: while 50% of blocks will be shorter than ~7 minutes, and 50% will be longer, the longer ones are spread out over a much larger range (up to infinity, even), driving the average up.

Thank you! Could you please point me to any resource explaining the details of the exponential distribution with a mean of 10? I am mainly looking for mathematical proof to know if there is a mathematical basis or if it is primarily based on an accepted consensus.

This is trivial to prove, and can readily be computed: https://www.wolframalpha.com/input?i=median+of+exponential+distribution+with+lambda%3D1%2F600 ?

That makes sense! Thanks! I wonder if there are any sources explaining why we think it follows the exponential/Poisson distribution. I found quite a few posts about how those distributions work, but it is unclear why we believe it follows those distributions.

It is a Poisson process (https://en.wikipedia.org/wiki/Poisson_point_process), which follows from the fact that every hashing attempt is independent. The time between events in a Poisson process is exponentially distributed.

Is there any reference for "The time between events in a Poisson process is exponentially distributed"?


text:
Couldn't Microsoft execute 51% attack?
There are billions of computers out there running Windows O.S., putting aside the reputation risks, technically, Microsoft could add a backdoor to force users hardware to mine BTC.
Is the combined computer power of those billions of PCs running Windows enough to conduct a 51% attack against bitcoin network?

at first I was thinking about how a botnet could conduct the attack, but then I realize a botnet would just mimic a fraction of the power these companies have.

If Microsoft or Google used their software to run unwanted computations on computers globally, how would that be something different than a botnet?

no difference at all, what I meant is that originally I was thinking about the idea of any random person attempting the attack, when I realized those companies could just do it right away

Microsoft's software runs on a very large number of PCs. However the computers in question generally don't have specialised hashing hardware - they only have typical central processing units (CPUs) that are far far slower at hashing than the ASICs used by miners. A million desktop PCs might have less hashing power than a single ASIC.
See Is the native Bitcoin client intended for mining?

According to Ycharts, the current bitcoin network hashrate is 202.17M TH/s for Dec 27 2022. That is 2 x 102 x 106 x 1012 = 2 x 1020
An Intel® Core™ i7-2600 / 8 / 3.40 GHz has a hashrate of 24 MH/s which is 2.4 x 107
So you probably need to subvert more than 1013 desktop PCs.
Worldometer reports

According to a report by Forrester Research, there were over one billion PCs in use worldwide by the end of 2008, and over 2 billion by the year 2015.

That's only 2 x 109 - If my sums are right, flat out they'd have no chance of making any noticeable impact whatsoever on Bitcoin hashrate.

I've omitted server-grade CPUs and high-end gaming GPUs to keep the answer simple and because there are probably a lot fewer of these. Even if there were a great many, I'd be surprised if it changed the answer significantly.

great answer! I edited (improved) the question based on your input, I guess the initial explanation is no longer required.

@pee-yay-2021: Done.

First they would need to build ASICs to have any hope of competing with the current network hash-rate, secondly it could inspire miners to turn on more ASICs to fight the increased hash-rate, and thirdly the nature of proof of work is such that you cannot guarantee yourself a block no matter how much hash power you really have, there is a huge RNG element involved not to mention networking speed and network uptime. Someone who has been mining their entire life is much more capable of keeping mining up consistently especially on PCs or GPUs than a corporation who is getting into the business just to attack it. There is really a lot going against the possibility.

the question was more like "can all the PCs running Windows around the world surpass the 51% computing power?" (assuming that Microsoft could add a "backdoor" in the O.S. to force your PC to mine btc. in secret, given the fact that there are billions of PCs running Windows) RedGrityBrick gave us the numbers and the answer is surprisingly nope.

It's unrealistic to expect them to use their back-doors that way, they do it in sneaky ways. Not to mention they flag all miners as malware.

that is out of the question


text:
Where is the BTC price "stored"?
If I want to know the price of bitcoin, I can go to coinmarketcap, but where do they take it from? Where does the coinmarketcap provider get it from, and what is the ultimate source of this value?
Everyone seems to agree upon roughly the same BTC to USD rate. an ignorant like me can naively think it's taken from a centralized database
Clarification: This is a technical question, coinmarketcap.com is ultimately a web page and regardless of the rules that govern the price, I'm trying to understand if there are some technical people able to edit a number in some databases affecting everyone's perception. "tamper with the price by selling/buying" is a way of playing by the rules imho, not the kind of answer I'm looking for.
Follow up question: What if an exchange reports false information?

"everyone seems to agree in roughly the same BTC to USD rate" – That's just how capitalism works. If they didn't agree, then you could make money by buying BTC for cheap at one exchange and selling it high at another exchange. This, in turn, will increase demand and reduce supply at the "cheap" exchange, thus increasing the price, and increase supply and reduce demand at the "expensive" exchange, thus decreasing the price, until the two prices meet. Note that this is no different from how money exchanges have worked for hundreds of years.

@JörgWMittag - Actually you can arbitrage bitcoin from one exchange to another. The current price BTC price on Binance is almost 12 dollars lower than the price on Coinbase. If I had the wherewithal and two accounts, I could buy on one, transfer to the other and then sell it.

@Jörg W Mittag
That is not my point, regardless of the rules that govern the price, coinmamrketcap is a web page with a huge influence on price perception, I'm asking where this value ultimately take it from. (from a technical standpoint maybe). I want to be aware if it is technically possible for a few players to easily tamper with the price.

@pee-yay-2021 Yes, even a single player can tamper with the price - that's what buying or selling bitcoin does.  The more you buy or sell the more you affect the price - same as any other commodity.  This is really an economics 101 question.

Possible duplicate of https://bitcoin.stackexchange.com/q/2566/5406, https://bitcoin.stackexchange.com/q/55219/5406, https://bitcoin.stackexchange.com/q/20383/5406

@J... first of all that is not the question, secondly, 101 questions are not prohibited.

If you want to know how a privately owned company produces a datapoint that it publishes, you'll have to ask them. We don't have insight into the operations of private companies, and they don't seem to offer a detailed explanation in their FAQ.

There is no "the" BTC price.
There are exchanges, where people offer to sell and buy BTC for USD and other currencies, at certain prices. Those exchanges generally report the last price at which some trade happened. Generally, prices will move in tandem across multiple exchanges, but there are always small deviations.
There are indexers which aggregate trade data from multiple exchanges, and compute weighted averages over them.

I see. is there an exhaustive list of those exchanges and maybe another list of those indexers ?, I presume there must be A LOT of them otherwise a few orgs get to decide the price isn't it? who gets to decide which reports are trustworthy?

fair, what I'm trying to understand is how are the majority not blindly accepting the price established by a few (but louder) "reporters"

I finally found that CoinMarketCap weigh exchange claims based on "confidence that the volume reported is legitimate" although it does not explain how to calculate "confidence".
https://support.coinmarketcap.com/hc/en-us/articles/360052030111-Exchange-Ranking

@pee-yay-2021: For background into that: wash-trading and spoofing.

@Nat You indeed understand my questions (very few do), Thanks!.

@pee-yay-2021 the majority are taking the quoted price on trust, more or less; on the basis that most of the time the exchange will execute trades at that price. Except when it doesn't.

(prices are statements about the past; quoted orders are promises about the future. You should be able to buy an offer or sell into a bid. Don't forget that there are two prices, bid/offer)

@pjc50 I'd say there are many more prices; there is the "latest" price (price of last trade, a statement about the past), there is a bid and ask price (which are a statement about the orderbook/future), there are weighed prices of historical data, ...

then how did the price go from $64k to $8k?

@Richard What are you talking about?

The price is the equilibrium between all buying and selling orders. People offer to buy or sell their Bitcoin with a positive or negative premium. When you consolidate all these prices (e.g. market information) you get the price that is currently displayed at coinmarketcap or an exchange of your choice.

I understand the reasons behind the price, I just want to understand what makes exchange claims trustworthy.

Although the effective price is the one that the buyer is willing to pay, I presume the price displayed by the exchanges has the greatest influence. and so far I understand it's based on third party claims.

@pee-yay-2021 Exchanges benefit when deals happen, and the price paid in the last deal is an excellent indicator of a price that the next buyer and seller will agree on as a price, so it benefits the exchange the publish accurate prices. Exchanges also benefit when buyers and sellers trust then enough to close deals on their exchange Since the history of sell prices is available, faking the current price is easily detectable.

This has been mentioned in other comments, but I thought it would be good to highlight it further: the answer to this question is exactly the same that for any other commodity.
Commodity means an asset that is highly fungible, i.e., you can replace two items of that type for one another entirely or almost entirely. Examples of fungible assets besides bitcoins include dollars, stocks of a given company, gold bars, crude oil or rice. Examples of non-fungible assets include houses, works of art and, unsurprisingly NFTs.
And as other answers mentioned, commodities are traded in exchanges, which are basically systems for matching buy bids (each of which sets a maximum buy price) to sell offers (each of which sets a minimum sell price). Exchanges tend to be few and large since the more buyers and sellers in a given system, the faster you are likely to get your sale through.
In any such exchange system, all we can know is what buy/sell offers people have made, and then try to come up with a decent "value" from this continuous stream of bids using some algorithm. A broker might then use such algorithm to set their price for a given commodity so that less specialized/smaller buyers can buy more conveniently, but ultimately the broker will be selling commodities they bought with that ever evolving offer system.
Of course, if someone buys too high, or sells too low, they will lose money so the price tends to be metastable around a given value in the short term, until other external factors alter the value perception. But there can also be a tradeoff, as buying high and selling low also mean you will get the trade faster in case you need the money urgently for something else, or if you've learned before others of some information that implies that the asset value will fall dramatically in the near future. A good example of that can be seen in the movie Margin Call about the 2007 financial crisis.
I think the only guarantee that traditional exchanges are not rigged by hiding/delaying information for someone's benefit is trust in their reputation and legal repercussions of doing so should they be caught. One thing that people who don't feel that this is enough could do is try to do create more decentralized systems, e.g. Ethereum based. The most notable one appears to be Uniswap (thanks to Boris in the comments). Wikipedia mentions that:

Uniswap’s average daily trading volume was US$220 million in October 2020

and their daily volumes are reported at: https://info.uniswap.org/#/

useful information thanks, my question is way simpler though, I added a clarification at the end.

Well decentralised exchanges definitely exist on smart contract chains, e.g. Uniswap on Ethereum. They utilise a concept called AMMs (automated market makers) to dynamically set the price through a formula, and this can be publicly queried on-chain. However, by definition, they can only be used for assets on that chain (e.g. different tokens on Ethereum); this does include USD by proxy of stablecoins (e.g. DAI) but nothing off-chain, so can't be used for e.g. BTC price, hence probably not useful as an answer.

@Boris thanks for the reference to Uniswap. Would you say such exchanges are widely used? Edit OK 220m month: https://en.wikipedia.org/wiki/Uniswap

@CiroSantilli新疆再教育营六四事件法轮功郝海东 Definitely; e.g. Uniswap had a $2bn trading volume in the last 24 hours: https://info.uniswap.org/#/ (edit: wikipedia lists last year's volume, the whole DeFi market has grown dramatically since).
In relative terms DeFi (decentralised finance, including decentralised exchanges as well as all kinds of other platforms for financial instruments like lending, options/futures, etc.) is much tinier than the traditional centralised market, but in absolute terms it's definitely quite big already.


text:
How would Bitcoin usage be affected within a country that severed its Internet connection?
Clearly this system depends upon data exchange.  What happens if national authorities in one or more countries decide there exists a "national emergency", "requiring" the shutdown of the internet in those nations?  How then does this system work?  Will commerce aboard this platform come to a halt, or is there a redundant communications method?

A government that shuts down its Internet to civilians is a government in crisis
The economic cost of shutting down all government regulated Internet connections within a developed country is enornmous. It is extremely unlikely that a first or second world government would take this step simply to block Bitcoin transactions. It may be that if Bitcoin rises to become an ISO recognised currency traded by governments the decision is made in order to somehow preserve sovereign wealth in the native currency that is now under threat from Bitcoin, but that is a long way off from today and would ultimately prove futile. It would also show very poor financial planning on behalf of the nation since they can simply continue their mandate that all taxes and fines must be paid in legal tender forcing a conversion out of Bitcoin to their native currency.
The question of how Bitcoin could respond to such a switch off is similar to how the Internet itself would route around the problem. There are a multitude of ways that ad hoc networks can be established. Bitcoin has been shown to be at least as resilient as the Internet in terms of the myriad of ways that transactions can be made to reach an Internet connected node. For example, Bitcoin transactions have been transmitted over HAM radio, NFC and Bluetooth. There are many alternative digital networks that can serve as backup routes to the wider Internet.
Even in the total absence of electricity, the Bitcoin network can survive through physical bitcoins. So long as trust is maintained in the security seal protecting the private key it is only necessary to conduct occasional verification checks that the amount displayed on the token represents the amount accessed by the key. Simplified pricing schemes (to allow accurate change) would enable invisible private key based trading. An occasional radio broadcast to co-ordinate the current bitcoin value against other currencies in use would be sufficient to allow merchants to price their goods accordingly.
Remember that in times of trouble people will seek to use whatever they can to get by. If bitcoins are perceived by most as being the best way to conduct trade as, say, the dollar enters hyperinflation, then they will use them. If something else provides a more stable medium that is more appropriate to their circumstances they will use that. However, Bitcoin is by far the most flexible form of money ever invented so it seems likely that it will survive better than others.

It's trivial to create physical Bitcoin. All that is necessary on the object is the public address and the private key. To fund it, some Internet would be required, but just enough to broadcast the transactions. It's feasible that this would be able to occur outside of the country, with the newly minted physical Bitcoin shipped into the country without Internet.
The way I understand it, a fork of the blockchain could survive in a walled garden. Assuming that the nodes within the country are still connected, they could continue to communicate and carry on without the support of the outside world. If one of those nodes connected to the outside world, the transactions would be broadcast. The outside nodes would likely reject the walled-in blocks, but the transactions would continue. The only folks who would be negatively affected in this model are the miners, and only if they spend BTC the the block reward they received when mining a block.
...that was a bit rambling.


text:
How can I best implement Bitcoin in my business?

Is there any good tutorial, discussion or implementation of bitcoind for business?
What's the best Bitcoin.conf?
How to expose the Bitcoind API to the internet?
How to guarantee confidentiality, integrity and availability?

Basically I'm looking for advices on how not to turn my small online shop into the new mybitcoin.com :)

I think the question should be closed, it's too broad for one Q&A, and you should try to separate it into several more specific questions.

I wish someone can come up with a link to a structured tutorial...

indeed, if there is not a walkthrough for this in existence, there should be. :)

Just some quick tips to get you started:

run with 'noirc=1' so that your node IP isn't discoverable via IRC
run with several 'connect=<sometrustednodeip>' so your node only connects to other specific nodes that you trust
do not expose the json api to the internet at large, confine it to localhost or specific ip only.
if you plan to hold a significant amount of bitcoins, then estimate how many you'll need for your daily float, and save the rest in an offline wallet (also generated on an offline computer - don't leave traces of your keys on any internet-connected disk)
do not accept 0-confirmation transactions, other than for really trivial amounts where speed of delivery is of the essence.
do use new bitcoin addresses for every new customer and order. address reuse makes it easier to track your customers.

There are probably a more items that could be added to the list, this is certainly not to be treated as comprehensive.


text:
How can I get my node listed on Blockchain.info's connected nodes list?
We are running bitcoind on our server and its blockchain is synchronized with the network. Do we automatically become a node and get listed on http://blockchain.info/connected-nodes, or is there something we have to do to be seen by the network?

Running BitcoinQT or bitcoind you are a full node in the Bitcoin Network - you receive and transmit Blocks and Transactions. Even better, if you have port 8333 open on your router and machine, other peers can connect to you which is also very useful for the Network.
To be listed as a node connected to blockchain.info, you need to connect to their client (with a specific runtime parameter for example, or by chance). I am not aware as to what IP they are using. However, you don't need to be connected to blockchain.info to be a node - being connected to anyone else on the Network using the standard client makes you a node.

A Swiss University became a supernode, and I think that was by actively connecting to a number of sources that also ran BitcoinQT on their servers. However I don't know how many connections would classify you as supernode. I don't think there is a specific definition. Just actively connect to a number of sources and it should show you as supernode in the stats.


text:
Why does Coinbase block SatoshiDice transactions?
I noticed that Coinbase won't allow you to make transactions to SatoshiDice. Is this due to SatoshiDice being blocked in the US due to online gambling regulations, or are there additional reasons for this restriction?
What other transactions have Coinbase known to have blocked, if any?

Unless coinbase decides to make a statement about this, all we can do is speculate.

Is Coinbase a hosted (shared) E-Wallet, or instead is it a hybrid E-Wallet in which all transaction addresses are associated with my account and my account only?

I think its because you are not supposed to play blockchain spam type dice games with online wallets. Since when you win, the winnings goto whatever address it was sent from. Therefore, it may not end up back in your wallet.
All the games are like this, most even have a list of "compatible wallets". I think the only online one that will work is the one ar blockchain.info
another rule of thumb, if you don't have access to the private key, you shouldn't use the address to gamble with


text:
Do transactions affect the discovery of a block?
When a miner creates blocks, do transactions in that block affect the result? For example, if a miner creates a block, but now a new transaction is broadcast on the network, will the miner stop current work, then add the new transaction as one of the inputs, then recreate the block?

You can't "recreate" a block. If it has different transactions, it's a totally different block. When a miner mines a block, they'll start on the next block, typically including all transactions that are valid for inclusion at that time.

There's no such thing as 'aborting'. It's all random anyway. The chance of solving a block on the first try is equal to the chance of solving one on the 1000th try.
It's like the difference between picking the same lottery numbers all your life or picking different ones each week. There is no difference.

The miner won't stop the hash generation of their block. Even with new transactions coming in, they'll add them to their block until the hash is found. It could happen with only 20 transactions or with 400. The difficulty is so large that it's pretty random. So it's not like they get a set of transactions aside and work on those. They keep on working as transactions come in until they find the hash.


text:
What's the risk of publicizing a Bitcoin address?
What's the risk of public Bitcoin address, except  person - account link is publically known. Or, is it preferable to have one such account?

Downside: People can see how much has been sent to you. Upside: Your transactions get confirmed faster because it's all coming from one address.

Bitcoin internally has no concept of addresses, and reasons in terms of "coins" that are consumed and produced by transactions. Whether those belong to the same address or not makes zero difference for confirmation time.

For privacy, Bitcoin relies on "pseudonymity", which means that the only way people can choose not to disclose their identity, is by making it hard to link addresses to people/businesses/....
Publishing an address publicly obviously makes you give up that privacy, but that's not a problem. everyone is free to choose so of course. The problem is that it also makes it easier to trace the identity of others, by linking addresses after following transactions in the block chain. Publishing addresses may in this way decrease the privacy of many people using the system, including people who are unrelated to you.
Even just reusing the same address for multiple receiving transactions is already bad for the network in this sense, as it increases the ability to link transactions and addresses.
The general advice is to use each receiving address just once. This also makes it easier to distinguish incoming transactions, for example.


text:
Can I buy or sell with bitcoins offline?
Is it possible to buy or sell something using Bitcoin, in an offline mode?
In other words, if I had my wallet on my mobile phone and I wanted to send or receive money from another Bitcoin user who also has their wallet on a mobile phone, can we send/receive bitcoins offline to each other and then later re-sync the transaction to the network?
I find offline mode critical for this currency to progress beyond a simple crypto-currency experiment because relying on the network means that if network access is unavailable, your wallet is useless.

There is such a thing as an SMS wallet (Coinapult offers this) and LocalBitcoins has "LocalBitcoins Transactions" which can be released via an SMS/text message.  Are those close enough?

Take a look at Bitcoin apps available for your mobile phone. Several are recommended in answers to question Can I send bitcoins with my mobile phone?. Look for apps that offer some kind of offline mode.
For instance, the highly recommended Bitcoin Wallet app for Android mentions in its feature list, "Enter transactions while offline, will be executed when online".

Technically it is possible: the sender creates transaction to payee's wallet, signs it, payee verifies it, then broadcasts it to the network when able.
But in terms of security it is even worse than accepting zero-confirmation transacrions: the payer can create another transaction transfering all his money to some other address and broadcast it before payee broadcast "honest" transaction, thus invalidating "honest" transaction since coins are already spent.
As an option, there are Casascius's physical bitcoins. This option, however, requires trust to 3rd party (coin issuer), which is somewhat against bitcoin ideology, in my opinion.
P.S. Most modern terminals for plastic cards require network access to function, and it rarely causes any complications. The bigger problem with bitcoin is requirement for verification, which can take quite a long time. It could be lifted (decreasing security).

If you trust your counterparty not to double-spend on you, certainly this is possible.
Create a raw transaction (available with bitcoind, or through other methods) and then instead of broadcasting it you simply share it with your counterparty.  Then when connectivity is re-established the transaction is broadcast and confirmed (presuming the counterparty didn't double-spend the funds on you.)
The transaction can be inspected using BrainWallet.org (which is a static web page that can be copied and used when offline).
This is something along the lines of writing a check though.   Without connectivity there's no knowing if there were funds available to begin with though.  So there's not a whole lot of an advantage to doing this other than how the recipient of the funds has the technical ability to broadcast the transaction at a later time to obtain access to the funds (if the transaction was legit to begin with and the payer didn't double spend after.)

Analogous to writing a check... but one where you can verify the check... and even funds availability offline, provided the funds were in the account the last time you were online.


text:
Why is the Bitcoin Wiki protected against editing?
I recently found an error on the Bitcoin Wiki, when I noticed that I could not edit it.
I made an account a long time ago, so I logged into it, but still I am not able to edit pages.
Why is this? A wiki is supposed to be community-driven.
Who does have access to the wiki pages?

To prevent vandalism and spam. You can gain edit access by making a payment (in bitcoins, of course).
The payment required is (at least) 0.001 BTC, which is actually no longer trivially small in my opinion.

BitcoinPayment is a MediaWiki extension to limit spam, by requiring a
  small one-time bitcoin payment before a user is allowed to edit or
  create pages.
While the payment is deliberately trivially small for a normal user,
  it presents a barrier to a mass-spammer.
Funds sent to this wiki will be used to keep the wiki online (cost of
  domain name and hosting), and remaining funds will be donated to the
  Bitcoin Foundation.

I prefer a captcha.

It's probably a good idea to let people know about this when they click the edit button.

Note that the payment system for unlocking is both outdated (0.01 BTC is not a trivial amount anymore) and defunct (it used MtGox as payment processopr). I believe it is being worked on (as of march 2014) but don't know the state.

You can also get edit rights by coming to IRC channel #bitcoin-wiki on Freenode, ask  and stay there until someone adds you to the editors stay.


text:
How to check if node is on TestNet or MainNet via `bitcoin-cli`?
Is there a way, by using bitcoin-cli using RPC querying, if the node I'm querying is running on MainNet or TestNet?
Thanks

Since version 0.16.0
$ bitcoin-cli getblockchaininfo

{
  "chain": "main",
  "blocks": 525663,
  "headers": 525663,
  .
  .
  .

}

Reference:
https://developer.bitcoin.org/reference/rpc/getblockchaininfo.html

Before version 0.16.0:

$ bitcoin-cli getinfo
{
  "version": 120100,
  "protocolversion": 70012,
  "walletversion": 60000,
  "balance": 0.00000000,
  "blocks": 414105,
  "timeoffset": -165,
  "connections": 9,
  "proxy": "",
  "difficulty": 199312067531.243,
  "testnet": false,
  "keypoololdest": 1466689642,
  "keypoolsize": 101,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "errors": ""
}

the getinfo command deprecated in Bitcoin Core 0.16 onwards. you'll get the message the method not found on later versions.

good to know, any replacement?

as @Kerem atam said, you can use getblockchaininfo as well as getnetworkinfo and getwalletinfo for some more information.