text:
Can I use the Bitcoin Core command line to confirm that the bitcoin I sent to an external address was confirmed and arrived? If so, how?
I understand that one can use a node to ensure that transactions have been confirmed. If I sent bitcoin from my wallet to a friend living in another country, how can I use the command line on the Bitcore Core software to confirm that my transaction was confirmed by the bitcoin protocol and was received by my friend?

bitcoin-cli gettransaction {txid} will tell you the number of confirmations.
If the number of confirmations is greater than zero, the recipient has received the money. Even if their wallet is on a device that is turned off. Even if their wallet has been deleted. Recipients play no role in receiving money. There is no time between confirmation and arrival of money.
Sometimes recipients don't yet know they have received money because their wallets have not yet found out they have received money. Nevertheless, they have already received money. It is under their control and no-one else's.
See answer to

I sent Bitcoin to an address but the recipient hasn't yet received it

Is the gettransaction method mentioned above conditional on me enabling the txindex=1? Otherwise, I think it only works as long as I used Bitcoin Core as my wallet, no?


text:
Is it accurate to talk about a bitcoin inflation rate?
I have recently seen many news articles refer to Bitcoin's inflation.
For example: "Bitcoin's inflation rate, calculated as the percentage of new coins issued divided by the current supply" Source
This seems to be an incorrect usage of inflation, at least relative to how it is used within economics. I also have no clue if there is a unified definition of inflation in the context of bitcoin.

There is monetary inflation (growth of coins in circulation), and price inflation (the rise of price of goods and services expressed in some currency).
These are distinct but related concepts. The quote you're citing is about monetary inflation, which is - ignoring lost coins - well defined and measurable. Price inflation is a very different concept.

Thanks for this. It's interesting that in economics, 'inflation' usually refers to what you're saying is 'price inflation'. While in the context of bitcoin, 'inflation' usually refers to 'monetary inflation'.
Is there a reason discussions in bitcoin are not more specific in terms of terminology around 'inflation'?

@StatsScared "inflation" as such just means "expansion of things". In the context of macro-economy one mostly cares about controlling prices, so it's natural in that context inflation without qualifying refers to that. In the context of Bitcoin, one cares about stable monetary policy and prices are beyond anyone's control, so that's what it means there. In the context of chess ratings, "inflation" means ratings growing for a given skill level. It's very natural in specialized domains that common words get different, specific meanings, depending on context.

source: Stack Exchange

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

sort: votes


text:
I am running Bitcoin core, how can I tell if my node is a 'full' validating node or a 'listening' node?
I understand there is a difference between the two. But how can I tell?

A full node is a node that validates all network rules, regardless of whether it listens for incoming connections or not. Bitcoin Core is full node software which always does this.
To see whether you can be reached by others, look at the network view and see if you have any incoming connections. Note that it may takes hours to days before your IP address is sufficiently well known to others on the network to make connections to you.

Thank you. I marked it as 'answered' as you effectively answered my question. I do wonder though, how then does one run a 'listening node'. Is that even possible with Bitcoin Core?

Bitcoin Core will listen for other connections, yes. Whether that works depends on whether you have a publicly-reachable IP (not behind a NAT, or a NAT that can be configured to forward), and whether connections can get through (e.g. firewall settings).

Thanks again. One last question, is there any benefit of running a 'listening node'? I guess to explore transactions without the need to validate anything?

Bitcoin Core always validates everything. Listening means that other nodes can connect to you. To explore transactions you need an explorer (software or website); Bitcoin Core doesn't offer this, but it is entirely independent from whether you accept connections from other nodes or not. All nodes learn everything.

"Bitcoin Core doesn't offer this". But doesn't Bitcoin Core fulfill the functions of a Bitcoin blockchain explorer website? You can check the balance associated with an address, know what the current fees are without trusting a web site, etc.

It functions as a wallet, it does not function as an explorer (in the sense that explorers allow you to quickly browse any transactions or address). In fact, it doesn't have any "address balance" functionality at all - it only offers a wallet balance, for your own wallet. It does offer fee estimation too.

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


text:
How do transactions get into the mempool?
I was tracking a transaction using a Bitcoin Core command. I was able to extract info on whether the transaction had entered the mempool.
Among the information I got were details such as "the block height when the transaction entered the mempool".
Does this mean that blocks 'carry' unvalidated/unverified, but unconfirmed, transactions?

Blocks don't "carry" any unconfirmed transactions. By definition, a transaction is confirmed when it's included in a block.
Importantly, the block height when the transaction entered the mempool might be different from one mempool to another, as transactions take time to propagate through the network and a new block might be mined while it's propagating. It will also be different for transactions that your node receives from its peers when it's starting again after a downtime, since those transactions may have been in their mempool for many blocks already.

Thanks for this. Understood, blocks don't "carry" any unconfirmed transactions. But how then do transactions enter the mempool? I guess I am particularly confused by the mention of "the block height" when discussing transactions entering the mempool.

@StatsScared Nodes relay transactions through the peer-to-peer network. To emphasize a point from my answer, there's no such thing as "the mempool", every node maintains its own mempool for storing received transactions that are waiting to be confirmed, and two mempools don't necessarily have the same transactions.

Thanks, @VojtěchStrnad. But I guess this make me wonder then. What is ‘the’ mempool references in sites like these: https://mempool.space/?

@StatsScared Mempool explorers simply run their own Bitcoin node and offer its mempool for inspection. (mempool.space in particular is open source and you can easily run it over your own node, which removes trust and increases privacy.) Calling it 'the' mempool is just a simplification stemming from the fact that two nodes running the default mempool options and standardness policy will have very similar mempools.

I accepted this answer. But upon re-reading I can't help but notice that you said "By definition, a transaction is confirmed when it's included in a block." Isn't a confirmed transaction one that has been included in a block and added to the blockchain. Meaning that being included in a block is not sufficient to deem a transaction 'confirmed'?

@StatsScared Yes, by "block" I don't mean just any block but specifically a block that is a part of the longest chain.


text:
What is an inflationary bug in the context of bitcoin?
I often hear that the worst bug that could impact bitcoin is an inflationary bug.
But what exactly is meant by 'inflationary bug'?

An inflation bug is one which allows an attacker to print new money, beyond what is permitted by the subsidy rule (50 BTC per block during the first 210000 blocks, 25 BTC the next 210000 blocks, 12.5 BTC in the 210000 blocks after that, etc.).
This may take several shapes:

Allowing a malicious miner to introduce more coins than the subsidy rule allows in a block.
Allowing an attacker to construct a transaction that is unbalanced (has more in output values than in input value).
Any bug that would permit an attacker to construct UTXOs out of nothing.


text:
What stage of the bitcoin protocol deals (or 'solves') the double-spend problem?
I understand that a key innovation in bitcoin is that it solves a key problem faced by previous attempts at a digital currency: the double-spend problem.
In addition, I also understand that the bitcoin protocol involves several steps, from the moment a transaction is broadcasted to when the transaction has been included in a valid block of the bitcoin blockchain.
At what stage does the bitcoin protocol tacked the double-spend problem? E.g., can the 'solution' be attributed to the proof-of-work mechanism or is it tackle by several elements?
EDIT: I am thinking of the bitcoin protocol in 'stages'. But do correct me if this is the wrong framing.

There are multiple parts of the protocol that play together to concert a solution to the doublespend problem.
Transactions generally have first-party mutability: just like Mallory can promise the same $10-bill to both Alice and Bob, a sender of bitcoins can create multiple conflicting versions of a transaction.
Bitcoin is a distributed system with transmission delays: we cannot guarantee that every participant sees the same messages at the same time. It follows that we cannot prevent a sender from submitting conflicting transactions to different network participants. However, a monetary system's purpose is to track ownership of funds—just like Mallory can promise both, but finally only hand the bill to either Alice or Bob, we want bitcoins to only be transferred to one recipient.
So, if we cannot prevent the network from having conflicting information, how do we converge every participant on a single shared truth?
We need a mechanism that produces a canonical order of the events in the network.
To that end, we hold a lottery. Each participant submits their recount of the events as block candidates. Eventually, we draw a winning lot. Naturally, we require that a block must be a legitimate continuation of our shared journal: transactions must be valid, and the block cannot contain any conflicting instructions. Invalid block candidates just get discarded, but a winning block is promptly announced to all; by randomly promoting a single author's point-of-view to the shared truth, we break the tie.
Bitcoin's proof-of-work mechanism takes here the role of the lottery. Every hashing attempt by miners is the submission of a lot. Since miners have real-world costs for hardware investments and energy, they're incentivized to build on each other's blocks rather than paying to enter a separate lottery to write a diverging history. Over time, as more blocks are found, transactions get buried under a heap of proof-of-work and they become probabilistically immutable.
As the emerging blockchain is single-file and each block may not contain conflicting transactions, bitcoins can now only be spent once.
So, who was responsible? Every node on the network enforces the rules, guaranteeing that blocks don't create new money or spend it twice. The miners take the role of authoring block candidates, and they must not include double-spends lest they get rejected by the nodes. However, the proof-of-work mechanism regulates the frequency with which blocks are found and induces the economic incentives for collaboration and convergence.

So, as I see it. The primary purpose of the bitcoin protocol is precisely to solve the double-spend problem in a trustless manner (i.e., without the needed of a trusted intermediary)?

Do we expend all this effort just to create a trustless, censorship-resistant transaction ordering mechanism to solve the double-spending problem? Yes, exactly: because we don't know of a way to do this without sacrificing some of the properties we look for.


text:
How do I know if the Bitcoin Core software on my computer is running taproot, segwit or something else?
I would like to check this.
I imagine there must be some command to verify the current version of node software Bitcoin I am running ('version' is probably not the correct name here. Maybe 'soft fork' is?), e.g. Segwit, Taproot, etc.

There are version numbers e.g. 0.16, 0.17...., 22.0, 23.0 and soft forks are only active on certain versions e.g. Taproot is only active on 0.21.1 and later versions. The zero was dropped from 22.0 onwards.

Until Bitcoin Core 23.0.0, the status of deployments of consensus changes can be listed with the getblockchaininfo command:

Returns an object containing various state info regarding blockchain
processing.
Result
{                                         (json object)
  "chain" : "str",                        (string) current network name (main, test, regtest)
  "blocks" : n,                           (numeric) the height of the most-work fully-validated chain. The genesis block has height 0
  "headers" : n,                          (numeric) the current number of headers we have validated
  "bestblockhash" : "str",                (string) the hash of the currently best block
  "difficulty" : n,                       (numeric) the current difficulty
  "mediantime" : n,                       (numeric) median time for the current best block
  "verificationprogress" : n,             (numeric) estimate of verification progress [0..1]
  "initialblockdownload" : true|false,    (boolean) (debug information) estimate of whether this node is in Initial Block Download mode
  "chainwork" : "hex",                    (string) total amount of work in active chain, in hexadecimal
  "size_on_disk" : n,                     (numeric) the estimated size of the block and undo files on disk
  "pruned" : true|false,                  (boolean) if the blocks are subject to pruning
  "pruneheight" : n,                      (numeric) lowest-height complete block stored (only present if pruning is enabled)
  "automatic_pruning" : true|false,       (boolean) whether automatic pruning is enabled (only present if pruning is enabled)
  "prune_target_size" : n,                (numeric) the target size used by pruning (only present if automatic pruning is enabled)
  "softforks" : {                         (json object) status of softforks
    "xxxx" : {                            (json object) name of the softfork
      "type" : "str",                     (string) one of "buried", "bip9"
      "bip9" : {                          (json object) status of bip9 softforks (only for "bip9" type)
        "status" : "str",                 (string) one of "defined", "started", "locked_in", "active", "failed"
        "bit" : n,                        (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status)
        "start_time" : xxx,               (numeric) the minimum median time past of a block at which the bit gains its meaning
        "timeout" : xxx,                  (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
        "since" : n,                      (numeric) height of the first block to which the status applies
        "statistics" : {                  (json object) numeric statistics about BIP9 signalling for a softfork (only for "started" status)
          "period" : n,                   (numeric) the length in blocks of the BIP9 signalling period
          "threshold" : n,                (numeric) the number of blocks with the version bit set required to activate the feature
          "elapsed" : n,                  (numeric) the number of blocks elapsed since the beginning of the current period
          "count" : n,                    (numeric) the number of blocks with the version bit set in the current period
          "possible" : true|false         (boolean) returns false if there are not enough blocks left in this period to pass activation threshold
        }
      },
      "height" : n,                       (numeric) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
      "active" : true|false               (boolean) true if the rules are enforced for the mempool and the next block
    },
    ...
  },
  "warnings" : "str"                      (string) any network and blockchain warnings
}

In Bitcoin Core 23.0.0 this was moved into the getdeploymentinfo command:

Returns an object containing various state info regarding deployments of consensus changes.
Result
{                                       (json object)
  "hash" : "str",                       (string) requested block hash (or tip)
  "height" : n,                         (numeric) requested block height (or tip)
  "deployments" : {                     (json object)
    "xxxx" : {                          (json object) name of the deployment
      "type" : "str",                   (string) one of "buried", "bip9"
      "height" : n,                     (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status)
      "active" : true|false,            (boolean) true if the rules are enforced for the mempool and the next block
      "bip9" : {                        (json object, optional) status of bip9 softforks (only for "bip9" type)
        "bit" : n,                      (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status)
        "start_time" : xxx,             (numeric) the minimum median time past of a block at which the bit gains its meaning
        "timeout" : xxx,                (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in
        "min_activation_height" : n,    (numeric) minimum height of blocks for which the rules may be enforced
        "status" : "str",               (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed")
        "since" : n,                    (numeric) height of the first block to which the status applies
        "status_next" : "str",          (string) status of deployment at the next block
        "statistics" : {                (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status)
          "period" : n,                 (numeric) the length in blocks of the signalling period
          "threshold" : n,              (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status)
          "elapsed" : n,                (numeric) the number of blocks elapsed since the beginning of the current period
          "count" : n,                  (numeric) the number of blocks with the version bit set in the current period
          "possible" : true|false       (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status)
        },
        "signalling" : "str"            (string) indicates blocks that signalled with a # and blocks that did not with a -
      }
    }
  }
}

Example output of getdeploymentinfo:
{
  "hash": "00000000000000000009bd5a8aa82361c8daca42d241d0b1606d357579af35c5",
  "height": 732670,
  "deployments": {
    "bip34": {
      "type": "buried",
      "active": true,
      "height": 227931
    },
    "bip66": {
      "type": "buried",
      "active": true,
      "height": 363725
    },
    "bip65": {
      "type": "buried",
      "active": true,
      "height": 388381
    },
    "csv": {
      "type": "buried",
      "active": true,
      "height": 419328
    },
    "segwit": {
      "type": "buried",
      "active": true,
      "height": 481824
    },
    "taproot": {
      "type": "bip9",
      "height": 709632,
      "active": true,
      "bip9": {
        "start_time": 1619222400,
        "timeout": 1628640000,
        "min_activation_height": 709632,
        "status": "active",
        "since": 709632,
        "status_next": "active"
      }
    }
  }
}


text:
What is the point of confirming a bitcoin transaction more than once?
Given that the bitcoin blockchain is immutable, why is there a need to have more than six confirmations for the same transaction?
I was under the impression that a bitcoin transaction is 'official' and confirmed once it has a single confirmation in the bitcoin blockchain.

I'm going to elaborate a little on the answer by Bitcoin_1o1
The Bitcoin network is global and two miners can be on opposite sides of the planet. If those two miners happen, at roughly the same time, to independently mine a block containing different transactions, Bitcoin nodes (wallets etc) that are near (in terms of network topology and transaction times) will each have a copy of the replicated block-oriented transaction-journal we call the blockchain - but with a different latest-block at the head.
To resolve this, Bitcoin nodes perform reorganisations when they become aware of other alternative blocks. These alternatives are called blockchain forks. Each node chooses the fork that is longest in terms of a measure called "work". Sometimes forks differ by more than one block before they get reorganised. Because all nodes use the same rules for reorganising forks, all nodes eventually settle on the same view of the blockchain. These reorganisations are not especially rare but almost never exceed two blocks. I think the longest was 22 blocks, but that has only happened once in exceptional circumstances. A reorganisation of one or two blocks is routine and mostly unnoticed. Long reorganisations are a major event and exceedingly rare.
Because a block that is accepted now might be replaced by a better one in the next few minutes to hours, nodes generally wait until about six blocks have been added on top of the block containing the transaction before they assume the block containing the transaction is not going to be reorganised. There's probably also a good chance that both forks contain the transaction of interest, but just in different places - however this isn't really relevant to the process.

why is there a need to have more than six confirmations for the same transaction?

Approximately every ten minutes a block is added to the blockchain. Each time this happens we call it a confirmation of every transaction already in the blockchain. That is why older transactions may have tens of thousands of confirmations. They are old and buried deep in the blockchain. They don't have ten thousand confirmation because anyone needs ten thousand confirmations - it is just a consequence of the definition of a confirmation.
If it helps, think about driving licences. In some countries, you have to be at least sixteen years of age before you can obtain a driving licence. However you are also eligible to apply for a driving licence at age forty-six. No one needs to be forty-six but government officials don't stop counting your age after age sixteen. Similarly, no-one needs more than six confirmations but bitcoin doesn't stop counting at six.
Nakamoto presumably anticipated reorganisations of a handful of blocks but no more.
I guess Nakamoto chose six because it approximates to one hour, which is a nice round number.

I was under the impression that a bitcoin transaction is 'official' ...

Nothing is really official because Bitcoin has no officers to officiate.
It has no leaders, no owners, no one in charge.

Because the blockchain is a decentralized data structure, if two miners find a block at the same time, there could be block reorgs. This temporary discrepancy between chains is resolved by the independent selection of the greatest-cumulative-work chain by each node. The probability of any reorg diminishes with every new confirmation of the same transaction. The convention has been to use 6 confirmations as a way to eliminate any probability of a reorg.


text:
Change port 8333 to other. (Running multiple docker instances)
My question is:

can I change port 8333 on the network connection to any other port (8334 f.e.) without making my node "blind" to the other peers in the network? Will it still sync/push transaction data?

The core of this question is that I want to run multiple docker node instances on a single VM, with docker ports mapped to local ports.
node1 (:8333 -> :8333)
node2 (:8334 -> :8334)
...

Yes you can and the node will still sync and push transaction data.
Most of the nodes are behind NAT and not reachable anyway from the internet.
These nodes are initiating connection against random nodes and then the communication become bidirectional, allowing to receive blocks.
Nodes that are exposed to the internet are important, to bootstrap nodes behind NAT and for SPV clients.


text:
What is service or entity broadcasts transactions with OP_RETURN data starting with "LP..."?
There have been quite a few OP_RETURN transactions recently where OP_RETURN data in the scriptPubKey starts with 4c 50 which is LP as ASCII.
For example these transactions:
 - ccce20a2b4c79d80fe57bd4008c398c548cefc7f353e71044353432f434d8e6a
 - 2d02e75f6f72a1e633e4f1b36066428f1904ca5859bc6a711806961b8b6fbfd3
 - f85a0efd449f193605048b73dd7bb0287c7a331ab92755497b4d77806090849e
 - b193bb721f21e2efc9dcfd9bb8ab8753f9a70f6ff7ce8bbffb0a173a45adf6b0
 - ... and a lot more (6447 in the last two hours at the time of writing this)
Since the first bytes are usually used as an identifier (e.g. omni for OmniLayer) I'd be curious if anybody happens to know where this could originate from.

The starting bytes 4c 50 has nothing to do with ASCII encoding. 0x4c represents opcode OP_PUSHDATA1 which indicates that the next opcode bytes is data to be pushed onto the stack. So in the examples that you have given, 4c 50 will indicate pushing the next 0x50 bytes onto the stack which is 80 bytes in decimal. The question you should have been asking is why the data that has been encoded on the stack for all the transactions that you have listed starts with 00 06 4e


text:
What is the maximum, realistic P2P message payload size?
In Bitcoin Core, MAX_SIZE defines the maximum valid P2P message payload size to be 32MB. Is it realistic that a peer sends a message payload close to 32MB? What is the maximum, but still realistic message payload size?

Interesting question. I was thinking maybe the mempool message could get close to that when -peerbloomfilters is set, but it is limited by MAX_INV_SZ so it would not. Looking forward to read an answer!

AFAIK the mempool message (requesting unconfirmed transactions) has no payload. A node should respond with INVs to a mempool message. See also: https://developer.bitcoin.org/reference/p2p_networking.html#mempool. The resulting INV could have up to 50_000 entries with 4+32 byte each. 36 byte * 50_000 = 1.8 MB.

Yes, i meant the size of the INV returned when being sent a mempool message.

I observed a 0.5.0 node try to send a message that was 6 MB I think. IIRC it was a headers message and it was a significant portion of the blockchain. Also there is lower maximum of 4 MB, see MAX_PROTOCOL_MESSAGE_LENGTH.

Since Bitcoin Core pull request 5843, incoming messages larger than MAX_PROTOCOL_MESSAGE_LENGTH are rejected. This constant was initially set to 2 MiB, but later (as part of the segwit changes) increased to 4 MB.
Its purpose is memory DoS protection. An attacker that manages to open many connections to a victim node could otherwise e.g. start sending messages of 32 MiB (MAX_SIZE for all serialized objects), but never send the last byte. Those just-below-32MiB messages would need to be kept in memory before until the last byte arrives, before processing them. Limiting the maximum valid message size significantly reduces the impact of such an attack.


text:
Is there a Bitcoin mining library?
I write free software in my spare time. Some of my softwares are quite popular. Now i'm a thinking of a way to generate a little revenue. Using adware is not an option for me.
Is there a Bitcoin mining library ( maybe a .dll ) that i can bundle into my programs?

Trying to mine bitcoin on home PCs will generate you absolutely no income, to mine bitcoin you need a lot of hashpower which home PCs just don't have. So that isn't a viable way to generate revenue. But also, secretly mining bitcoin on peoples computers while they run your software is probably quite dishonest, if you tried such a thing you would need to ensure you let them know it was going to happen. And antivirus software would probably quarantine your file as a bitcoin mining trojan.

I wouldn't do it secretly and i'm aware about possible issues with antivirus softwares.
Would it be profitable enough (0.5 - 1 BC per year) when 10.000 PC users mine for 20 minutes per day?

Honestly you'd be lucky to make even $5 in a year, mining pools probably won't even pay out such low amounts that you'd be generating I'm afraid

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


text:
Is it possible to block bitcoin signal？
I heard that china gonna block bitcoin signal and shut down all the miners. Is it possible? if possible is there any way to bypass it？Will Core release new update to prevent this?

Well, there will be many ways to bypass using VPN, but the real question is who will be creating a pool, as mining alone won't be beneficiary, unless he have a big farm. I don't think core can release a new update on time to prevent this, but hope they do.

block bitcoin signal

What signalling? Do you mean mining?

Is it possible?

Maybe, for some pools. But it may not be possible for some pools. Here's a tweet from ViaBTC's CEO:

Source: https://twitter.com/yhaiyang/status/909309756220653570

Is there any way to bypass it?

Sure, they can set up VPNs on their US or other countries' servers.
But no one will do that. No one wants to go to jail for that.

Will Core release new update to prevent this?

Are you asking, that what is going happen to difficulty? Currently 70% of the hashrate comes from China, if they shut down at the same time, then the block will come every ~ 35 minutes, not 10, making the mempool bigger and transaction fees will go up.
Core can release an emergency update, that is scheduling a hard fork to lower the difficulty.

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


text:
What bitcoin is really easy to purchase and sale to the any person in cash?
If I purchase bitcoin and after a year I want to sale it with cash what I can sale it to any person? And for the same what I get cash or check?

When you say "what bitcoin" do you mean "what cryptocurrency" or "which exchange" or "which wallet"? Please clarify

There are millions of users of Bitcoin, who are interested in Bitcoin. If you want to sell your Bitcoin a year later, you will find a good buyer. When you want to sale it, maybe localbitcoins.com is a good choice. Millions of transactions are listed on this website. Buy some bitcoins, and then enjoy it. But first you need some knowledge about how to save your bitcoin by bitcoin-wallet. you can get started from here.
If you don't want use your own bitcoin-wallet, you can buy some bitcoin on a web exchange, like Poloniex or Bittrex, or you can choose a exchange by yourself, list of bitcoin-exchange.

authors: 0лег Рубленко


text:
BCC transferred to BTC wallet on trezor
i made transfer of BCCto my trezor walltet from an online exchange, but by mistake entered my BTC address of trezor, exchange shows transaction is completed. how to recover the same.

Following the steps from "How to claim your Bitcoin Cash (Bcash)" by Trezor Blog should do the trick.
https://blog.trezor.io/claim-bcash-bitcoin-cash-bch-bcc-trezor-wallet-f0a810d5864a
Steps:
1) Make sure Trezor uses latest firmware
2) Connect your Trezor
3) Go to Coin splitting tool
4) Receive your Bitcoin Cash


text:
How do exchanges handle fiat currencies?
I'm worried about my (non-BTC) money getting frozen in some company account so I want to minimize exposure and understand the transfer processes.
Main considerations are:

Do all exchanges require an account in some fiat currency if one wants to buy BTC?
Is it trivial to transfer funds from these 'prepaid' accounts to a real bank account?
I don't like those prepaid fiat accounts, is it possible to give creditcard details instead and let them charge per purchase?

These are all closely related so I think this one question can include them.

Theses answers are going to depend on a couple of factors:
1) The particular exchange you are working with.

Each exchange is going to have its own set of policies and different levels of transparency communicating these policies to customers. Look for exchanges with more transparency/details.

2) The country the exchange assigns to you when you open the account.

Exchanges are facing financial regulations imposed by governments.
Global exchanges can have different guarantees in different countries.
For example, Coinbase and GDAX state, "If you are a United States resident, your Coinbase USD Wallet is covered by FDIC insurance, up to a maximum of $250,000." Source: How is Coinbase insured? This link Supported Countries shows the supported countries for GDAX and the supported fiat payment methods.
I made this video discussing insurance policies at Coinbase and GDAX. It may help: GDAX and Coinbase - Insuring your crypto is safe

3) If the exchange is centralized or decentralized.

If you are working with a decentralized exchange, you are in control of your funds. The Waves platform is an example of this: https://wavesplatform.com/

Summary:

In general, it's not just the fiat that you have to worry about at centralized exchanges. If the government for example seized the assets of the company, they would also be able to control your crypto. If you are super worried about this, you can send your cryptos to a private wallet that you control. The downside to the private wallet is that you are totally responsible for security, backups, etc. There is no help if mistakes are made.
Most exchanges allow you to send crypto to them after you have opened your account. The crypto can then be used for trading. Additionally, many exchanges allow you to purchase using a credit card.

See this for details on exchange vetting:
How do I know which exchanges are serious actors?
I made this playlist that goes through policies of Coinbase and GDAX. It may help: GDAX Playlist

I read that coinbase isn't actually an exchange, but more like a broker for multiple exchanges?

@jiggunjer That is partly correct. The Coinbase brand is marketed towards regular consumers. The company has an exchange called GDAX. They market the exchange solution to traders. They say institutional/professional investors, but it's really just like a brokerage account. Think Interactive Brokers, Scottrade, TD Ameritrade, etc.

@jiggunjer Coinbase says "United States resident." That is referring the the USD protection. To use the exchange, check the supported countries: GDAX and Coinbase around the globle - Which countries are supported? Source

That is possible. However, you will have to provide banking information. This differs by country. If you use a credit card, that would probably work. However, when using credit cards, they lower the limits that you can deposit per week. The company doesn't want a barrier. They are restricted by government regulations. All of the id collection, country restriction, etc, is a result of complying with those regulations. Governments generally like to track flows of money.

Let us continue this discussion in chat.

You will still have to prove your identity before you can fund your account.
This will place you as a citizen of some country. Then, once you are ready to fund, if you choose bank account. You will have to use the banking system of your country. ACH transfers in US and SEPA in Europe.


text:
Address reuse, cold storage and private keys
I was going through some old posts regarding address reuse and came across a few remarks I wasn't aware of, and want to make sure I understood correctly.
I knew address reuse wasn't the best for privacy reasons, but I learned today that apparently it's also not good for security IF you've spend your bitcoins.
Let's consider the following situation: I have a brand new hardware wallet, generated a new seed with it, alongside a new address. I send from an exchange 1 BTC to it, and I decide to use this address as cold storage, meaning I'll regularly send BTC from exchanges to it, this specific address.
First of all, is it considered as address reuse if the address is only for cold storage, there's no transaction out but only UTXO's?
Now, let's say after a year of doing so this address has 50 UTXO's. I know this might cause an issue if the mempool gets full and tx fees rise, so I decide during a calm period to do some UTXO management and I do a "send all" to a new address that I generated from the same seed (so same private key). I effectively have a brand new address with only one UTXO.
My question: since i've used the same private key to both send a transaction (a big one, 50 utxo's) and generate a new address to send that to, does that expose me to security risks? (referring to this). If yes, how bad is it really and does that mean that to achieve full security I would need to generate a brand new seed on my hardware wallet and send once again the full balance to a new address?

The hardware wallets that I am aware of will all allow you to generate a new address to receive to every time you want to transfer in from an exchange (or any other reason). You don't need to generate a new seed, one seed can be used to generate an unfathomable amount of addresses. Even if your UTXO's are associated to different addresses on that wallet, you can still do a "send all".

Sure but that doesn't really answer my questions. I know I can do it, but since so many exchanges have address whitelisting nowadays, it's a little bit painful to do so (some exchanges require you to wait 48h / a week for each address whitelisted).
I'm still wondering about the security issue I raised too.

You may have already seen this, but this page may be helpful https://en.bitcoin.it/wiki/Address_reuse. My understanding is that address re-use is typically more associate with being a privacy issue, not a security issue. Though, privacy issues could lead to targeted attacks I suppose, if the amount of btc associated to your address was large.

But in short, yes that would count as “address reuse”

Here's the thing I read that lead me to make this thread:
https://bitcoin.stackexchange.com/a/42380/96844
A wallet that never performed a send has both its pubkey and private key secret to everyone. Not the case in my situation describe above.
https://bitcoin.stackexchange.com/a/42376/96844

@Solal I've commented on that first link; I think it's besides the point if you're asking about address reuse. The second one is a more common misconception (IMHO) I often see appear; I'll try to find the time to write a response about that.

I see. I wasn't sure if it was only related to software/hardware since this was a rather old thread. Thanks Pieter (grandmaster!) and Prince for your detailed responses.

Not sure if I got your question right.
If you pay to the same address multiple times that is address reuse. Even if you never spend from that address. But if you don't spend from that address the issue would "only" be privacy related not security related.
When you spend from an address the ECDSA public key becomes publicly known. As far as I know this is only a security issue if ECDSA breaks. So it would not really be a problem as of today but it migth be 10 years from now. Therefore it's not advised to do so.
A bitcoin address is only the hash value of the ecdsa public key. That leads to the fact that you could not sign a transaction from that address even if you could break ECDSA because you don't even know the ECDSA public key.
BUT in the scenario you described you would not reuse the address after sending from it. The way a seed works is that you generate an arbitrary amount of pairs of private keys and  corresponding addresses from it. So in your scenario you would generate privk_1 and address_1. Then you would make multiple payments to address_1. Later you would generate a second pair privk_2 and address_2 from the seed and send all your money from address_1 to address_2.
So if I got you right, I don't see any security problems with this. It's just that everyone would know that all the money belongs to a single entity. That is the afore mentioned privacy issue. I don't see the benefit of reusing that first address for receiving payments because you could simply generate a new address with your hardware wallet every time you want to receive bitcoin. Therefore I would not advice to receive everything on the same address.

Thank you for this very detailed response. I think I got something wrong from the start: for some reason, I thought that the seed was the private key, and all addresses were generated from the same private key. But from what I understood from your response (and after double checking online), a new private key is indeed generated for each address. Embarrassing mistake on my part.


text:
Would it be possible to not be able to send funds from a wallet?
I was reading this blog post by Jameson Lopp on the best practices to back up a seed phrase
https://blog.lopp.net/how-to-back-up-a-seed-phrase/
In the "Test your backup section", he wrote:
"Initialize the new wallet using your seed phrase backup, make sure the funds appear in the wallet, and that you can spend them."
I've always done the steps he describes, except the "make sure you can spend them". To me, if I possess the private key and managed to restore the wallet, there's no world that exists where I somehow cannot send the funds. So I'd like to know, is there any scenario where you create a wallet, sends fund to one of the addresses, delete and restore the wallet properly using the seed but can't send the bitcoin you have?

is there any scenario where you create a wallet, sends fund to one of the addresses, delete and restore the wallet properly using the seed but can't send the bitcoin you have?

For example, If you ever import a private key after creating the wallet, a wallet restored from the seed-phrase will not have that private key.
I've no idea whether this is what Lopp had in mind. One obvious point is that the addresses and money associated with the imported private key wouldn't show up in the recreated wallet. So the issue ought to be apparent before you get to the point of checking money is spendable.
Having money visible but unspendable is something I associate with importing addresses. This usually shows up as amounts marked "unspendable" or "watch-only". Again, imported addresses don't appear in wallets recreated from a seed address so the issue should be clear before you get to the point of checking spendability.
Some people might have both a cold wallet and a hot wallet. The hot wallet might have watch-only addresses for the cold-wallet's contents. If you accidentally recreated the hot wallet instead of the cold wallet, and did so from a backup rather than from seed-phrase, you could end up with a wallet that couldn't spend all the visible money.
You'd have to ask Lopp to clarify exactly what was meant if you need to be certain.

Best practice for a long time now has been to only use BIP39 HD Account-Wallets
not the Type-0 address/privkey based singleton wallets, like brain wallets, paper wallets, physical coins etc, all now deprecated.
Also, no Wallet-Client software running on any device capable of connecting to the internet should ever see any Seed, xprv private keys
aka like a Watch-Only wallet, the node tree derived using the Extended Master PUBLIC xPub key only.
The Account-Wallet secrets Seed, Xprv, private keys only handled by the HWW in order to spend, signing transactions that are then broadcast by the at-risk net-connected client wallet.
The point is, make sure all of these moving parts are thoroughly tested with small value transactions, before using that account wallet to store any significant assets.


text:
Can TREZOR sign transaction with input address beyond gap limit?
Suppose I use TREZOR with Electrum or Bitcoin Core HWI and significantly change the gap limit to, let's say, 100 000 addresses. I then receive BTC to my 999 999-th address and want to send them somewhere else. Will I be able to sign such transaction in TREZOR?
The question is, basically, does changing gap limit in Electrum or getting addresses beyond gap limit in Bitcoin Core HWI "getkeypool" generates extra private keys on TREZOR itself? And is such behaviour the same with all hardware wallets?

Yes, you can sign with that. Hardware wallets don't care about your gap limit, they aren't deriving individual keys when you setup the wallet. Rather they just store the master private key (or the seed used to derive the master private key) and then derive the individual keys needed on-the-fly. So if you tell it to sign with the 999,999th key, by giving it the correct derivation path, it will do so without complaint.

So Electrum just passes the derivation path corresponding to the input address to hardware wallet behind the scenes. I get it now, thanks a lot!


text:
lightning to lightning non custodial swaps
Do you know the way to freeze funds in lightning tx to implement atomic swap between two independent lightning networks?

Can you provide more clarity as to what exactly you are looking for?

lightning networks from different blockchains*. i mean non custody atomic swaps from one network to another, based on htlc

An HTLC always "freezes" funds. It is a smart contract that says "here is the balance and a hash. If you give me the preimage of that hash within time T, the balance is yours. Otherwise I can take it back.".
You can then use this functionality to achieve an atomic swap by going through a service node that is active in both networks and offers to swap currencies. Just route a payment from yourself to yourself via the swap service node, starting with currency X and ending with currency Y, switching currencies at the service node using the offered exchange rate.
Like every LN payment, this is trustless because it is atomic: Either all transfers take place or none. However, note that there is a free american option given to the service node here: For the time T, it can stall and observe the spot market and only do the trade if the exchange rate moves favorably for him, or otherwise just let it time out. This is why using LN for currency exchange might not be economically wise.

thanks for idea. american option is not problem, it can be resolved with dex access fees


text:
Is multisig wallet simply a combination of many singlesig wallets?
I’m trying to create a multisig wallet for the first time.
My pre-understanding is that multisig wallet is simply a combination of many singlesig address.
So for example I have 3 existing singlesig wallets:

electrum wallet
Bluewallet
Coldcard wallet

Can I just simply use the xpubs of the wallets to create a multisig wallet?
Is my understanding multisig correct?
If you have coldcard, you know that there is a multisig menu in coldcard. So if creating multisig is simply inserting the coldcard’s xpub to electrum (where the multisig is going to be created) then I don’t need to care about the multisig menu on coldcard? Same with bluewallet, I don’t need to create a vault wallet in there?

Unless tools actually support things explicitly, this sort of experimentation is a very good way to irreparably lose your money.

Thank you for your answer. So do you mean my understanding about multisig is wrong?

I didn't comment on that in particular. Just in general if you try to do unsupported things with wallets the chance of you losing money in a way nobody can recover is extremely high.

There seems to be some variation in the question on wallet vs address. In any event a multisig address is simply a script created by m-of-n public keys (not addresses or wallets). When you build a raw multisig address in the bitcoin core console or with a software library really all you need are the public keys and specify how many are required to spend.
Can these public keys come from different single sig wallets? Of course, it could come from anywhere including different brain wallets (don't do this though, please just an example to prove a point) but as one commenter already noted taking non-standard approaches is a good way to lose your funds if you're not an advanced user.
It's best to stick with what most wallets support where you'll be using a new xpub created with your multisig wallet rather than your single sig xpubs.

My pre-understanding is that multisig wallet is simply a combination of many singlesig address.
Is my understanding multisig correct?

Not exactly.
If we think of addresses as a locks a single-sig address is a lock that requires 1 key to unlock and a multi-sig address is a lock that requires multiple keys to unlock.
This "lock" is created using Bitcoin scripts and each address has a different type of script. So multi-sig is not "combination of single-sig addresses" but an entirely different script.
In a multi-sig script the evaluation requires from 0 to n signatures.
The problem with combining multiple wallet software is that since there is no universal way of implementing a wallet they usually don't behave the same.

One problem is derivation path which xpubs don't contain and wallets usually don't let you change it either. This means importing an xpub from wallet A to wallet B could result in two entirely different child keys.
Another problem I can think of is the order of public keys. Multi-sig [redeem] scripts look like m <pub1> <pub2> <pub3> n when this is hashed (to create the address) it will produce a different hash (and a different address) compared to m <pub2> <pub1> <pub3> n. This problem could be solved by lexicographic sorting but again wallet A may sort and wallet B may not.

Thank you for your explanation. So my understanding was wrong.. Simply put, a singlesig wallet cannot be one of the keys of a multisig wallet?
because the key for singlesig wallet is a different TYPE of keys from the key of multisig wallet?

Not the "keys" but the "scripts" are different.

what I meant by the "keys" was the "keys" that you gave as analogy.

Oh. In that analogy yes.

ok thank you for your clarification. but what will happen if you create a multisig wallet by importing multiple singlesig's xpub? Will it give you some error?

actually I just tried that on bluewallet, it gives me an error that the xpub is not from multisig wallet. wonder if it will give the same error in other wallets.

You have to consult with Bluewallet community about the error, but there shouldn't be any. The wallet should take multiple xpubs and ask for m (min number of signatures) and create the multi sig wallet.


text:
about a stuck bitcoin transaction
I sent 24mbtc over a week ago with the transaction number abef483d268dc61214fd5bf25c602256cf447aa65bec2e539fee42f59a3b90b3
the person i sent to still says, they have not received anything yet the transaction says in my wallet it is confirmed. What could be the problem?

there is no 24mbtc output in your transaction.

EDIT: while your transaction did go through (see below), you sent a different amount (~11 or ~19 mBTC depending on which is the change address) from what you said the recipient wanted.
Looking at https://blockchain.info/tx/abef483d268dc61214fd5bf25c602256cf447aa65bec2e539fee42f59a3b90b3, it seems that your transaction is not stuck at all. It has been confirmed over a thousand times as of today. So there's three possibilities here:
a) the recipient of the transaction doesn't know how his wallet works and is somehow unable to see the received transaction
b) they gave you a wrong address or you mistyped or mis-copypasted it (which would mean the coins were sent to an address somebody else owns, or nobody at all)
c) the recipient is lying to you.

the recipient has not received 24mbtc  because the sender did not send this amount in specified transaction

I seem to have been asleep


text:
Blockchain.info has a service to list all the transactions which involve a bitcoin addresses generated using a given xpub.How does this work?
As per my understanding, there could be infinite addresses which can be generated, so how does this work?
Link: https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz

BIP-44 specifies a limit to how a wallet should look for public keys. The implementation should consider there's no address with funds beyond 20 addresses without funds.


text:
What role does public-key cryptography play in bitcoin transaction?
Explain in one word and kindly tell what is it exactly that public-key cryptography does in bitcoin.

Please don't ask the same question twice (public-key cryptography is a synonym for asymmetric cryptography).

It is a different question, please answer it if possible. I am 17 yr old need it to work on my extended essay

I've already answered it in your other question.

Can you share your email id, it would be really helpful if you check my research and verify if it is correct or not.


text:
Sign a Partially Signed rawtransaction with bitcoinjs-lib
I was trying to figure out how to use the bitcoinjs-lib. I was thinking if I could sign a partially signed raw transaction in bitcoijs-lib.
For example - If I have a hex String whose input1 is unsigned but rest of the inputs are all signed, can i Sign this raw transaction using bitcoinjs-lib?

Sure, see https://github.com/bitcoinjs/bitcoinjs-lib/issues/1011. Give it a try and post your code if you need help.

@JBaczuk Oh by partially signed I meant, Given a hex raw transaction which has been partially signed by one party, i.e one party signs over its inputs and then sends the partially signed raw transaction, can the other party now take the hex raw transaction, and then sign over the remaining inputs?

@ShubhamSaxena they can as long as they have the required key to do so.


text:
Using the Proof of Reserves utility developed by blockstream
I was looking into the various methods that can be used to generate the proof of reserves and came across the open source version created by blockstream to generate the proof of reserves( https://github.com/ElementsProject/reserves ).
However I am unable to use the utility as is and need some guidance on how to use it. According to my little understanding I may have to install a few softwares in order to run the utility. Can someone help me out? Pardon me if it is a stupid mistake/question as I am very new to bitcoin and am at a very very basic level.


text:
What is the difference between signrawtransactionwithwallet vs signrawtransactionwithkey in signing unsigned raw transaction?
I have a bitcoin address generated in bitcoin-core (offline computer)
I imported that one address into electrum as a watch-only wallet (online computer)
From electrum I created an unsigned transaction scan it back using QR code to the offline computer.
Which one should I use to sign the unsigned transaction using bitcoin-core? signrawtransactionwithwallet or signrawtransactionwithkey? If possible please tell me the different cases of which one to use?
Please also tell me if there is any better way to sign unsigned transaction using bitcoin-core.


text:
How to create a signed transaction offline using electrum?
I remember that on Electrum, it used to have a Preview button inside the Send tab. By clicking the Preview button I could export the unsigned transaction, and then sign it.
I cannot find this button anymore, I can only see Pay button, and when I clicked it I got a "Not Enough Funds" error. This is because I am doing this in my offline desktop computer (offline wallet).
Is it still possible to create a signed transaction offline using electrum?

on the new version that export button is hidden somewhere. It seems that I need to click Pay and Advanced but I got an error when opening the Advanced window... I'm on Debian using the AppImage electrum 4.0.9

Official documentation says all:
https://electrum.readthedocs.io/en/latest/coldstorage.html
You can not prepare offline transaction on offline computer. You need to prepare it on online computer, sign on offline computer and then "Broadcast" on online computer.
Online computer wallet does not have to have private keys, and in this case it is the best to have "watch-only" wallet on online computer.

I hope that is not true, because I want this to be a completely offline wallet without any watch-only wallet on online computer. I'm also afraid to expose the master public key. (but is there any way to derive the master public key from the public address? if that is the case then there is no reason to hide the master public key)

Master Public Key can be used only to generate public addresses of your wallet (which you created offline). Even if someone steal your master public key, one can only see your balance and transactions, but can not spend it, because there is no way to find private keys from it.


text:
How to create a physical/paper backup for bitcoin-core wallet?
I am using bitcoin-core for my offline storage.
In electrum I can do a paper backup by writing down the mnemonics.
bitcoin-core seems to be using a different mechanism to generate the wallet.
What I am thinking now is that I can do a paper backup for each private key of the receiving addresses generated in the bitcoin-core wallet. So if I generated 100 addresses and transferred some BTC to all of them, I need to backup all the 100 addresses.
Is this the only way to do a paper backup for bitcoin-core wallet? If this is the only way. I think I should just generate 1-2 addresses only so it is easier to back up, and never forget to always put the change addresses back to those 1-2 addresses.

if I generated 100 addresses and transferred some BTC to all of them, I need to backup all the 100 addresses.

Bitcoin core is an HD wallet. So you should only need to backup the extended master private key shown at the top of dumpwallet.

# Wallet dump created by Bitcoin v0.21.0
# * Created on 2021-05-05T17:57:09Z
# * Best block at time of backup was 627544 (000000000000000000045a465b959072a715f47047141108ef14db64e2ee9049),
#   mined on 2020-04-25T08:34:02Z

# extended private masterkey:
xprv1x23XxXX456X7XXXXxxXx8Xxx9XxXxXxX01234X5xxX6XxX7xXxxXXXXxXxxXxx8X9Xx0XX1XxxX2XXx3x45xx6xxxXXXxxxxX7XXXxx8XX

etc
Obviously you should practice recovery from this , and check the recovered balance, on a different computer, before relying on it. At least check that the generated subsidiary keys/addresses are the same.
It may be easier to recreate the wallet from an extended master private key (xprv) by using wallet software like Electrum, which has some support for this. Bitcoin core expects you to backup the wallet.data file rather than write down a number on paper.

Related

How to restore Bitcoin Core HD wallet private keys by master key?
How do I retrieve my backed up wallet to Bitcoin Core?

thank you for your answer. it has a lot of texts and characters if I have 100 addresses, which can lead to mistakes if I write them all on paper. Is there any other ways like backing up mnemonics?

@bbnn: Like I wrote above, there's only one thing to write down, not 100.

I am curious about how to restore the wallet using that extended private masterkey @RedGrittyBrick. Could you also explain that?

@Luca : That's a good point. I haven't tried recovery from xprv using Bitcoin core, I expect it would be troublesome at least. However you can use other software. I've amended the answer to touch on this, taking into account the OP's familiarity with Electrum.

So there is actually a way to back up BIP32 like BIP39. I was hoping that there is no way to do that because I somehow agree with "Bitcoin core expects you to backup the wallet.data file rather than write down a number on paper." It is actually more secure as paper is easier to be exposed. and it is easier to create multiple backups with digital data.


text:
Bitcoin transaction query
I sent a bitcoin for exchange of etherium from blockchain
But not received anything from the buyer for the past 48 hours.
I am attaching the screenshot of two transactions where the second one is transfer from the my old btc to new btc account showing in green.
The next one is transfer from my new btc to seller account showing in red
see the vallets
1HZCArUVZJCKKwmRVQWh78v3vHZJ2bGPcY   is having nil balance
3HuQXaxerUujQw5kDbSyQLGERVTNvTBnn    is having balance of 0.0049
Is it possible to recover my money ?  Please advise

Hi,  I have not given the BTC address to seller.  I have given only etherium address to the seller.

Is it possible to recover my money?

No, Bitcoin transactions are irreversible.
You could try to contact the other party and either ask about the delay or request a refund.
If you believe the other party is committing a fraud, you can report the problem to your local police - but for small amounts it is unlikely that any action can be taken.

How you can expect Ethereum being sent on your BTC address?
The simplest method is to transfer BTC to some exchange (Poloniex, Bitrix ... ) and exchange your assets there.
I am afraid you may not get your money back.

0x0ebD1477697E086255992fAa2e530e42EcC20fd7    is my eth address


text:
Having trouble transfering private keys from Bitcoin Core to Electrum, for want of not having to wait for sync
This morning, I purchased some bitcoin for the first time on CEX.IO, and soon withdrew it to the Bitcoin Core wallet I had set up. What I did not realise was that I would have to download the blockchain data and store it, which is proving painfully slow on my lacklustre internet connection. I have since downloaded Electrum, obtained the private key from the Bitcoin core console, and imported this into my Electrum wallet. Although Electrum says it has imported, it does not read the correct public address that BC does, and my balance is still at zero. When I check the balance of the address online it still reads as it should. Can anyone help with this?

Redo the import. Start via file > new/restore, enter a unique filename and click next to begin the process. This time prepend one of the following to the private key:

p2wpkh: if the address in question begins with bc1
p2wpkh-p2sh: if the address in question begins with 3

For example:
p2wpkh-p2sh:Ky9mddDtaqcLC1vv6egmgQpiZh8Lgh111LnJSyJENxJs3oW93bjD
You can also click on the info button on the private key entry step to see further examples.


text:
What is the order in which UTXOs are sorted in a block?
Let's say, I am trying to do a double spend by creating two transactions almost immediately, is it possible that both the transactions are added in one block ? If yes, then which transaction is valid and which is invalid ? Also is there any specific order in which miners gather transactions in a block before starting to find proof of work ?

Addition to Bolton's answer: Transactions in a block can be in any order, given that if a transaction spends another's output, the parent transaction must come before the child tx and the coinbase transaction (collecting the block reward) comes first.

I would not mention the coinbase transaction, as its ordering is quite irrelevant to the question. tx3 can spend tx2's outputs but no tx can spend coinbase's outputs for another 100 blocks, so its position is kind of besides the point.

Bitcoin and other blockchain protocols enforce the constraint that any valid chain cannot have double spend UTXOs. If a miner were to include two transactions in a block both spending the same UTXO, the entire block would be invalid, and no other nodes in the network would accept it. If you were to create two transactions from the same UTXO and send them both out to the network, it would be up to the miners to choose which one to include. Some miners will prefer transactions that pay more fees, so those will tend to be included over the competing spend but most miners still adhere to "first seen safe", which means that unless a transaction signals being replaceable (replace by fee), it will get included over a later, higher fee version.

A lot of nodes and miners still manage their mempool by adhering to the "first seen" rule, so it's not necessarily the transaction with the highest fee rate but might just be the first version that gets included.

If you create two transactions that use some of the same UTXO as inputs, every node will perceive only one of them as valid. By default, this will be the one that nodes first see: once a node learns about a transaction, it considers the UTXO used in the inputs to be spent from the perspective of the mempool. When the node sees the second transaction, it considers the second transaction invalid for attempting to claim inputs that are already marked as used.
When replace-by-fee (rbf) was signaled in advance, the second may replace the first, but then the first is evicted from the node's mempool.
In any case, there will never be more than one transaction spending the same input considered for block inclusion at the same time.


text:
bitaddress.org paper wallet vs. single wallet
After generating a single wallet (at bitaddress.org), the paper wallet option at the top shows a different public address?  Why is the public address different?

bitaddress.org does not use the same private keys for paper wallet generation as for the single wallet. It uses the same initial entropy that you provide, but new private keys are generated for the paper wallet. Thus the addresses are different.


text:
Centos electrum public-key import
I have several bitcoin addresses (together with corresponding public keys) from Electrum wallet I've used previously. I moved to another CentOS server and now I need to import this addresses back.
But when I do:
electrum sweep [public key] [btc address] -w [path to wallet]

I get:
Traceback (most recent call last):
File "/usr/local/bin/electrum", line 384, in <module>
result = server.run_cmdline(config_options)
File "/usr/local/lib/python3.7/site-packages/jsonrpclib/jsonrpc.py", line 748, in __call__
return self.__send(self.__name, args)
File "/usr/local/lib/python3.7/site-packages/jsonrpclib/jsonrpc.py", line 630, in _request
check_for_errors(response)
File "/usr/local/lib/python3.7/site-packages/jsonrpclib/jsonrpc.py", line 1321, in check_for_errors
raise ProtocolError((code, message))
jsonrpclib.jsonrpc.ProtocolError: (-32603, 'Server error: File "/usr/local/lib/python3.7/site-packages/electrum/bitcoin.py", line 475, in deserialize_privkey | electrum.util.BitcoinException: cannot deserialize privkey 024..c0\n')

What am I doing wrong?

You need the private key not the public key to do a sweep.
Actually it'll be easier if you simply copied the wallet file to the new system. If you have access to the electrum gui then you can create a copy via file > save copy. If you don't then find the wallet file and copy it over.

I got private key. How do I pull several addresses in? I don't have old wallet anymore. I restored from seed

The command in the OP will work fine if you use your WIF private key. Here's a example of what that looks like.

@Bonfop I'd also like to point out that this site is not suitable for the back and forth conversation that you need. So if my comment above does not solve your problem I suggest asking for help on any one of the community forums.


text:
Access Kucoin OHLC data from API?
I need to access kucoin Open-high-low-close (OHLC) data from Kucoin API.
Looking in https://docs.kucoin.com/#get-trade-histories, I deduced that to access OHLC data (for instance BTC versus USDT, with hourly timestamp), the address should be something like this :
https://api.kucoin.com/api/v1/market/candles?symbol=BTC-USDT&type=1hour

Doing that, I get empty list for the data {'code': '200000', 'data': []}
(according to kucoin API doc, code 200000 correspond to a good request)
What I am doing wrong ?
ps : same method worked very well on kraken api (e.g. https://api.kraken.com/0/public/OHLC?pair=xbtusd )
ps2: this question was originally asked on https://stackoverflow.com/questions/56572249/how-to-access-kucoin-ohlc-data-from-api but with no response for the moment. Perhaps this bitcoin stackexchange is better adapted.
Thank you very much in advance for your help !

To obtain the information you seek:
I use the a variable called kline and a json formatted request.
It looks like this:
kline = requests.get(url + '/api/v1/market/candles?type=1min&symbol=
                     '+Cry+'&startAt=1566703297&endAt=1566789757')
# Then I convert it to json
kline = kline.json()
# turn that into a dataframe where I pull the data dictionary
kline = pd.DataFrame(kline['data'])
# Then I rename the columbs as so
kline = kline.rename({0:"Time",1:"Open",
                2:"Close",3:"High",4:"Low",5:"Amount",6:"Volume"}, axis='columns')
# Set the index as time
kline.set_index('Time', inplace=True)
# To assist I will call the head and and print for you
kline.head()
print(kline)

As you should know, once you have it as a dataframe you can manipulate it as you please.

Hi, thanks for your post! In the future, please edit your first post to update instead of posting another. I've deleted the obsolete prior answer, given that this seems to be an improved version of the same. Please let me know if I misunderstood that.


text:
My Wallet file got erased and I had a transaction done. Can I recover those bitcoins with transaction ID?
I am a first time user I had gotten a transaction done before but my pc suffered systwem failure and I had to reinstall windows, obviously had to reinstall my bitcoin wallet software, but I had some money in it and I dont know if there is any way to get that back, I do have the transaction Id for that, id there any way to recover thse bitcoins?

No, you cannot recover your Bitcoin with only the transaction ID.
If you are lucky, the data has not been overwritten yet and you can recover it with certain tools. It depends on the amount of Bitcoin you lost and if you think it's worth the try.
I hope this helps: https://www.easeus.com/resource/recover-files-after-reinstalling-windows.htm
Good luck. You'll need it...


text:
How does exchanges like bitrex exchange coins so fast ?
For example i transfer my bitcoin to bitrex. It will take mining fee and a huge time ( few hours ) to actually appear in bitrex wallet.
Now from bitrex i can transfer between Bitcoin -> Neo -> Bitcoin -> Eth -> Neo instantly without any mining fee.
How it actually does that ?
Here what i think:
After i transfer them my bitcoin to my online bitrex wallet, they transfer it to their own secret GLOBAL wallet of that coin.

Then we just do exchange on their database not in real.

Then when withdrawal they transfer it from their GLOBAL Neo wallet  -> my online neo wallet -> my offline neo wallet.

Thats just my thought i know its wrong but i need someone to explain me that.

Exchanges work with promises. If you deposit 100 USD, they promise to let you withdraw 100 USD later. If you trade for e.g. BTC, they only change this promise to letting you withdraw BTC. Exchanges accomplish this by swapping promises between users.
There are no actual transactions on the blockchain (except you deposit or withdraw to or from the exchange). That is why you e.g. can buy 0.5 NEO, where NEO on the blockchain is not divisible.
This is also why technically you do not own the BTC as long as they are on the exchange.


text:
can one verify with certainity that pool is not cheating?
Can miner validate with 100% certainty that pool operator is not cheating like claiming that your share is smaller compared to other participants? i.e. telling you that your share is smaller than what it actually is.
I'm not telling about big percentage. But lets say can 5% difference remain unnoticed?

Without knowing every share the other miners are mining, it would be impossible to know. Presumably only the pool knows who is connected and the shares they are submitting since it is their server.

I believe that in the simplest, "spherical cow" setup that you could indeed know if you're being defrauded.
In my answer, I'm assuming no variance, no blockchain reorgs, really I'm not considering any variables which might skew calculation.
I'm also assuming you do know your own true hashrate -- that is, you count your valid shares yourself and can figure out what percentage your own mining is relative to the rest of the network.
Suppose you know that you should constitute for 10% of the network's total hashrate (you can learn an approximation of the network's hashrate by looking at the rate which blocks are discovered, and the current difficulty), but then the pool pays you less than 10% of the total bitcoins minted during a timespan (minus pool fees), then it's likely that you're not getting paid for all your work done on the pool.
Again, when the percentages are very small, or when other factors come into play like reorgs, selfish mining and natural variance, it will be increasingly harder to determine.

Thank you. This was my understanding. That you can perform calculations but different factors make it rather hard to catch small percentage cheating.


text:
Hardfor and Bitcoin wallet balances
hardfork is coming. Is there any risk to use an application? I will have the same bitcoin balance after  fork's procedures are completed?

Can you clarify the meaning of "use an application"? Do you mean using a bitcoin wallet?

The balance of your Bitcoin holdings won't change. You will be able to use the same wallet on both chains, but note that both chains don't have replay protection, so transacting on either chain can lead to hijacked transactions in the other.
If you upgrade to the latest version of your applications, you should not encounter any problems with the hardfork, since the original chain will just continue. You might not be able to access your funds on the other chain though.


text:
Hashcash proof of work bitcoin sha256
I'm looking for a program or something to run from the terminal in mac.
That does the same thing as the program found here. http://www.blockchain-basics.com/HashPuzzle.html?nonce=221
What I'm looking for is the ability to check how many times a hash using the same hash- Noucing up has two leading zeros. I want to be able to list each hash for 20 hashing of two leading zeros.
Eg. "HI 183" hashed has two leading zeros
Eg. "HI 2121" hashed has two leading zeros.

This should produce identical output:
$ echo -n "HI 71592" | shasum -a 256
0000ca92719894f1444e485036aabed9f9223b6bb06928a3561567c821424a41


text:
Can a private key enumeration attack be used to steal bitcoins?
Let's consider the following algorithm

enumerate all of the private keys
for each of the enumerated private keys, generate the relative public key and verify whether there is any unspent coin associated with that public key
if there is any unspent coin, transfer those coins to an address owned by the attacker

Would an attack like this work?

Search on the internet about http://directory.io

I suggest to rephrase the question and spawn it as a new one. Try the following "What are possible mass private key attacks hardware wise in 2017-2018". Or in other words, provide me with a decent hardware funding and ill show that more is possible than expected , may others outline whats possible in detail, for example how many keys could a multi raid cluster with top notch hardware import / vanitygen, scan existing adresses with bitcoin-abe for example. - guess those who could arent bored enough to write here but write their own code :)


text:
Bitcoin Signature Verification
I am trying to implement the OP_CHECKSIG opcode of Bitcoin and verify whether a signature is valid or not. I have the signature that I recieve from the transaction data and the public key(the hex field of a P2PKH transaction should contain both). I am trying to figure out what is the message digest itself that is signed. From what I know these are the required items -
1.The version number(4 bytes)
2.The number of Inputs(1 byte)
3.Transaction hash of the input being redeemed
4.Index of the output being redeemed (4 bytes)
5.ScriptPubKey of the output being redeemed prepended with the length of the script
6.Sequence Number(4 bytes)
7.No of outputs we are signing over(1 byte)
8.Total value of the output(8 bytes)
9.ScriptSig for the output prepended with the length
10.locktime field(4 bytes)
11.hashcode type(4 bytes)
So If I hash this data in byte format twice using the SHA256 Algorithm would my signature verification pass? I am trying to implement this using Java and this is my code -
public static boolean verifyUsingSecp256k1(byte[] pub, byte[] dataForSigning,
    BigInteger[] rs) throws Exception {
ECDSASigner signer = new ECDSASigner();
X9ECParameters params = SECNamedCurves.getByName("secp256k1");
ECDomainParameters ecParams = new ECDomainParameters(params.getCurve(),
        params.getG(), params.getN(), params.getH());
ECPublicKeyParameters pubKeyParams = new ECPublicKeyParameters(ecParams
        .getCurve().decodePoint(pub), ecParams);
signer.init(false, pubKeyParams);

return signer.verifySignature(dataForSigning, rs[0].abs(), rs[1].abs());}

However when I try to verify my Signature it returns as false. Am I missing something over here?

Read this answer first. For verification you have to take the same first 14 steps.

@CodingEnthusiast I want the answer more on Verifying a transaction rather than signing a transaction.With the 1st 14 steps I have tried everything but doesn't seem to work.

Could you post the byte array (step 13) before you hash in step 14. Usually it is easy to miss endianness, CompactInt size of SignatureScript after you replace it with PubkeyScript,... As for verification, you have to check the code you are using, not sure what library that is.

@CodingEnthusiast Here is my byte array -
0200000001ce8310077e52959fc1046478629a1d7e522ba8445ff780d0229367ee48ac8146000000001976a9141c156160c943f58b30c1ff2be1cc225485f903bd88acffffffff01808900610d0000001976a914505ec67e233a71908713c500487307c59a6c5c1f88ac0000000081000000
I am using the Sighash type as - ALLL|ANYONE_CAN_PAY hence 81 at the end. I hope that is not a problem on how we capture the message data.

I don't see any problem with these bytes, and your hash (dataForSigning) should be double SHA256 of this, meaning c3b0386c0d990ab628ac505e8fb612f67d052c5f3cd0ac517854c2efc24ab3e7

@CodingEnthusiast I am using the Bouncy Castle library for the verification procedure! So I have to pass the double SHA-256 hashed message data to the function above!

All the above steps are correct although. The only catch over here is that except for the Scripts, everything else is captured in the Little Endian format (for whatever reasons). So except for Step 5  and Step 9 all other data is stored in the Little Endian format. Took me a while to get to this answer! Just a small tip to keep in mind when implementing!


text:
Creating my own script for proof of reserves
I recently came across the topic where exchanges have to constantly give a proof of solvency to prove that they hold enough bitcoin for it's clients. I was however intrigued by the way an exchange would give a proof of reserves. I was trying to build a script for generating the proof of reserves using the Invalid input scheme to prove the reserves of bitcoin a node holds. Are there any resources which I can refer to for the same?I have been struggling to find any. Any help would be very much appreciated.

A proof of reserve via invalid input is not necessarily constructable by regular means, due to a few reasons.

Proving you own all utxos in a single tx may result in a tx that is too large - while this isn't a problem for the proof, any sane wallet will refuse to construct such a tx
Using invalid inputs by definition requires you to sign an invalid tx - any sane wallet will also disallow this.
In trivial cases, a proof via invalid inputs is unnecessary - if all your coins reside in p2pkh addresses or simple multisig addresses, a single signed message signed with all the keys involved (along with appropriate redeemscripts) is sufficient.

That said, if you really do want to use a proof of reserve with invalid inputs, you can construct a raw transaction consuming all the inputs, add an invalid inputs (a utxo that doesn't exist, or has already been spent), and then sign it with any bitcoin signing tool or library - any tool that supports offline signing should have little trouble signing it (although you may still get hit by validation issues if the resulting tx is too large).

Can you suggest some good libraries for the same? @RaghavSood

That depends entirely on the language you wish to use, but most BTC-related libraries (btcsuite for go, bitcoin-js for javascript, etc). support signing arbitrary txs offline.


text:
My passphrase doesn't work and I can't send any bitcoins from my wallet
When I encrypted my wallet, I created a passphrase and wrote it down very carefully. Now, when I try to make a payment to an address, I received the following message:
"Wallet unlock failed: The passphrase entered for the wallet was incorrect".
I copied and pasted the passphrase so I know it's correct, and yet I'm receiving the above message. Does this mean I lost all the bitcoin in my wallet? Any help appreciated.

Did you try reverse caps as if you used CAPS LOCK in your keyboard ? If you got different keyboard layout like your native language and en perhaps it has switched etc... Indeed your passphrase is mandatory to recover your fund unless you backup your wallet before encrypting it. If you really take care during the process then it's probably something "obvious"

Does this mean I lost all the bitcoin in my wallet?

Possibly.

Try typing your passphrase into a text editor (notepad, vim, emacs, whatever) - If your caps-lock or keyboard settings are wrong you will see it.
If you are typing your wallet passphrase correctly and it is not accepted by your wallet then you almost certainly wrote it down wrong. You might be invoking the wrong wallet I suppose - maybe you tried out several wallets? Maybe on several devices?
In that case you should recreate your wallet on a different (but secure) computer using one of

your earlier backups of the wallet.dat or equivalent file
your safely written down private key
your safely written down wallet recovery phrase (not applicable to bitcoin core)

The snark is unnecessary.


text:
P2WPKH - which private key is used to generate signature?
I am looking at the BIP143 P2WPKH example. I am kind of following until the generation of the sigHash: c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670 but then that is used to generate the signature 304402203609e17b84f6a7d30c80bfa610b5b4542f32a8a0d5447a12fb1366d7f01cc44a0220573a954c4518331561406f90300e8f3358f51928d43c212a8caed02de67eebee. Given that this transaction comprises two inputs I would somehow expect both corresponding private keys to generate a signature. So how is that signature in the example obtained?

Only the private key for the second input is used in this signature as this signature is only for the second input. The first input is P2PK and is ignored in this example as it is non-segwit so the standard non-segwit sighash algorithm is used for it.


text:
Are non-SegWit transactions still malleable?
SegWit was (amongst other improvements) introduced to fix malleability issues. Does that mean that non-SegWit transactions are still malleable? If so, what types of malleability could still happen in practice?

It's important to point out that segwit doesn't prevent malleability: in many ways the actual transaction data can still be changed by third parties. It just makes it harmless for the purposes of dependant transactions/higher level protocols, because when malleated, the resulting transaction will still have the same txid as the original.
To get this protection however, all transaction inputs must be segwit. As old style inputs by definition must be compatible with non-segwit software, their signature will contribute to the txid just as before.

Does that mean that non-SegWit transactions are still malleable?

Yes. Segwit does not change non-segwit inputs so the malleability fixes it introduces only apply to segwit inputs.

If so, what types of malleability could still happen in practice?

All of them (except the ones where the sender modifies the transaction himself). None of these are consensus rules so a miner could malleate a transaction in any of these ways.


text:
How to manually rebalance Lightning Network channels?
I'm running an LND node that has a few dozen channels open to various relevant vendors/routing nodes. There are a couple specific channels that are open with stores that are getting used with most of the balance being on the remote side. I'm unsure how to manually rebalance these specific channels without closing them.
Is it possible to manually rebalance the channels from within my own LND node using the command line or some other way?

related: https://bitcoin.stackexchange.com/q/87297/5406

@murch I tried my best to find a related question but I failed. Thanks!
It's a bit disappointing that there's not a lot of responses.

Lnd itself does as far as I remember not provide an api for rebalancing channels.
However there is the lndmanage repository that uses the lnd api to provide a pretty strong rebalancing tool
https://github.com/bitromortac/lndmanage
Such rebalancing will cost you routing fees as they are regular (circular) payments.
That being said it is not clear why you would want to rebalance your channels before an onion on them actually fails. There is currently the discussion about JIT routing (which rebalance just in time if a channel such should be used can't be used) and fee free rebalancing taking place on the lightning-dev Mailinglist.

Thanks for your response Rene. It doesn't appear I'm sophisticated enough to run this tool in the short run or really make real use out of the theoretical things you're talking on the Lightning-dev mailinglist. I'm just curious if there was anything that I could do as a relative newbie to be able to continue to make fees from these specific channels.

Hey Rene, I was wondering if this answer is still up-to-date?

In addition to lndmanage you can also use this script (I'm the author):
https://github.com/C-Otto/rebalance-lnd
Using the -f parameter you can select a channel with more than 50% of the funds on the remote side. The script then sends funds to one of your channels (with at most 50% of the funds on the local side, after receiving the transaction), resulting in a 50-50 balance on the channel you specified.
There are some tweaks (channel selection, amount absolute/percentage, ...) that you may want to look into.

Create an invoice for yourself: lncli addinvoice <amt>
Pay the invoice specifying the outgoing channel and the last hop to take before paying you: lncli payinvoice --allow_self_payment --outgoing_chan_id <outgoing_chan> --last_hop <last_hop> <payreq_from_1>

To get the outgoing channel id use lncli listchannels --active_only. I usually have to grep for the remote_pubkey that I get from Zeus interface and then look for the chan_id string.
The last hop is the remote_pubkey of the node associated with the channel you want to increase the local balance on.
I learned this from this pull request documentation: https://github.com/lightningnetwork/lnd/pull/3736
Good luck rebalancing!


text:
getblocktemplate request that omits transactions?
Is there a way to make a getblocktemplate request that returns only the bits/target, or at least omits all of the pending transactions?
I am interested in tracking the coin difficulty in real time. This requires a call to getblocktemplate and looking at the bits or the target. I make the call from a remote machine. This call can become very inefficient if there are a significant number of transactions in the blocktemplate, especially if I make the request every few seconds and there are megabytes of pending transactions.
getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.

getmininginfo or getdifficulty are useless as they return the difficulty of the most recently mined block, not the block that is currently being mined.

The network difficulty is adjusted every 2016 blocks (~2 weeks), so to accomplish your goal (track the network difficulty) there is no need to continuously return the difficulty of every new block. It will only change once every 2016 blocks, so getmininginfo should do the trick.


text:
getmininginfo vs getblocktemplate
I am interested in the difficulty right now. That is, the miners are working a block right now and they have a target. Both of the RPC commands "getmininginfo" (or "getdifficulty") and "getblocktemplate" can be used to get a number that represents a "difficulty".
"getmininginfo" (or "getdifficulty") gives a difficulty value directly. "getblocktemplate" gives the "target" and the "bits", both of which can be used to derive a difficulty value. I understand that miners work according to a "target." But, which target?
I list two possibilities below. Which (if either) is the correct case?
1) "getmininginfo" gives the difficulty right now, and "getblocktemplate" gives the difficulty for the next block under the assumption that this block will be solved within the next second.
2) "getblocktemplate" gives the difficulty right now (through the "bits" or "target"), and "getmininginfo" gives what the difficulty was for the most recently solved block.
If both of these are wrong, what exactly do the difficulties given by the two commands really represent?

1) "getmininginfo" gives the difficulty right now, and "getblocktemplate" gives the difficulty for the next block

That is correct. getmininginfo gives the diffculty of the block at the current blockchain tip, and getblocktemplate gives the target for the block to be mined on top of the current tip, i.e. the next block.

under the assumption that this block will be solved within the next second.

There is no such assumption. The difficulty doesn't change by the second, it only changes at the end of each difficulty adjustment interval. If you are fully synced, you will always know what the difficulty of the next block will be. The calculation is completely deterministic and any block that has your current tip as its previous block will have the exact same target.

so the target that the miners are working on right now is or is not the one given by "getblocktemplate" ?

Miners are always working on the next block. So they want to meet the target of the next block, which is given by getblocktemplate.


text:
My bitcoint-qt client is crashing due to insufficient file descriptors repeatedly even after I set the ulimits to 65535
What are the exact resource requirements for a bitcoin-qt client.
this is important and hard to find information.
In virtualization world those things need to be understood. :)
I am running a KDE 18.04 Vbox on a mounted 1TB SSD share with 4GB Ram 4 cores.
Cheers :)

Can you maybe edit your question and provide a concrete log message from e.g. the debug.log or your system log?

and the answer is....
if you use a shared folder on a VM the linux open file desc spec is irrelevant.
So I created a diskimage directly mounted in the host...
and voilà problem solved by avoiding the vbox host shared folder service indirection.
maybe playing with the vbox host config and system config would have helped as well.....


text:
Error after reindex
Hello after I got an db error.. I try to reindex my db. But I got this error:
ERROR: ReadBlockFromDisk: Errors in block header at FlatFilePos(nFile=75, nPos=117947311)
So what can I do to fix it ?
System:
4 cores
2 GB RAM
500GB ISCI Storage

The db error was that: https://throwbitcoins.blogspot.com/2018/11/exception-15dbwrappererror.html   Also no idea to fix it ;)

I think this is an error caused a file blk corrupt, try to resincronize the bircoin core

Now I got these: 2019-08-07T05:26:28Z ERROR: ReadBlockFromDisk: Deserialize or I/O error - ReadCompactSize(): size too large: iostream error at FlatFilePos(nFile=68, nPos=64215124)
2019-08-07T05:26:28Z *** Failed to read block
2019-08-07T05:26:28Z Error: A fatal internal error occurred, see debug.log for details
2019-08-07T05:26:28Z Failed to connect best block (Failed to read block (code 0))  Please Help

The error persists, This line ReadBlockFromDisk: Deserialize or I/O error - ReadCompactSize() confirmed my thesis on the persistent file corrupt. Try to resynchronize directory with another location. Your file blk are downloaded with bitcoin core node or you downloaded it with another mode (an example torrent)

Your blockchain is corrupted. In Bitcoin Core's datadir, go to the blocks folder. Delete the file named blk0075.dat and ever blk*.dat file with a higher number. Also delete rev0075.dat and every rev*.dat file with a higher number. Start Bitcoin Core, it will need to reindex. At this point, it should begin building the block databases, and it will then download the blocks that you deleted once it gets to that point.

If he deletes block files corresponding to already active blocks, he'll need a reindex from scratch anyway.

Why is it necessary to delete the following files? I have this error on my first file after moving them from SSD to HDD. However, I have the error at height 255, not at height 0. So part of the first file seems correct. I thought I just move this one file from another backup I have and it could work without reloading all the others.

Deleting the files is necessary if one or more blocks stored in the files are corrupted. Either your backup is corrupted, or the file was corrupted in transit. Typically there isn't any need to delete anything or to reindex.


text:
Is there a way to broadcast a bitcoin transaction without internet access?
I am trying to understand if there are ways to do this.

Yes. An offline device can create transactions as long as it knows about the funds it can spend and has the corresponding private key. Once it's signed, the transaction cannot be changed without invalidating it. Most transactions are fairly small, usually less than 1 kB, but any standard transaction will not exceed 100 kB.
You basically just need to find a way to get it to anyone else with internet access. You could e.g.:

put it on a USB stick, and carry it to a computer with internet
print it on a QR-code, have someone with internet scan and submit it
send it via SMS
send it via ham radio
…

You can even synchronize an offline computer: there is a satellite that streams the blockchain. So if you have a satellite kit linked up to your computer, you can keep your node synchronized with the network without internet.

Seems nitpicky, but I'm going to distinguish between

the Signing wallet client,
which can be fully "cold", offline and from a security POV should be
air-gapped e.g. a hardware wallet, since it was likely exposed to the original seed, and certainly holds the private keys, and
the Broadcast wallet client,
which by definition needs to be "hot" or Online in order to communicate the signed transactions out onto the peer-to-peer BTC network of participating nodes.

Now, you may be running your own full node instance, but your signed raw transaction is not really "broadcast" in any sense, until it has reached many nodes around the internet, until it gets incorporated into a block.
The mode of transportation of that transaction data string between those two wallet-clients may be via data storage device, USB or SD card. It may use a QR code, which is probably most secure, or a Bluetooth or NFC channel, or indeed satellite, ham radio or SMS, but that data getting put out to the peer-to-peer Bitcoin node network requires connecting to the internet—that is from a practical POV intrinsic to the definition of the broadcasting step.

Thanks for the improvements Murch!