text:
Is 3D acceleration needed for GPU mining
I'm new to the mining world and want to start with a typical mining motherboard + GPUs rig setup. I plan to use a 100% FLOSS, GNU/Linux based, operating system (Parabola, from which I'm a dev). The thing is that I'm not sure if the convenient GPUs I may use will work with 3D acceleration (due to the lack of free and open source firmware/drivers), although the rest of the features will. AFAIK, the GPUs are used for computing, calculations, etc., but nothing that would require 3D hardware acceleration, right? I think that's only needed for games and 3D modeling, although I'm not very sure about it. Is it necessary for mining?
Thanks in advanced.

First of all, let's make costs clear. If power is extremely cheap for you (perhaps you make your own or have surplus from self-generated solar/wind), and you properly cool your GPU so that it does not burn itself out, then you MIGHT get a tiny amount of BTC from mining with a rig.
Nice Hash gives you about $1.78 per day for renting out an Nvidia 1080 Ti, so you would get $1.78 per day if your electricity costs are zero. A 1080 Ti is about $1125 and uses 250W. (2190 kWh per year, if ran 24h/day). IF you have free electricity, and given that the Bitcoin difficulty does not go up, this means you get about a 57% yearly RoI, and from this you must pay the 22MWh of electricity.
Now that the return rate is clear, the vast majority of GPU miners use a GPGPU language such as CUDA or OpenCL. You do not need 3D acceleration, "only" GPGPU.
But GPGPUs allow accelerating more general computation than 3D, so chances are it's a more difficult challenge to implement as free software. If you don't have drivers for 3D acceleration, it's even harder to have GPGPU drivers.
Here is the Nouveau feature matrix for reverse-engineered nVidia drivers. Note the "WIP" in the last row - the "Compute" one. That is GPGPU support.
I share your frustration, I wish to sometime use GPUs as neural network accelerators, but I refuse to use nVidia's proprietary drivers which offer me little control. I could not even get the temperature of the GPU from the proprietary driver, let alone throttle the card to prevent it from melting itself.

To mine Bitcoin you need to spend a few thousand dollars on the latest Bitcoin ASICs, join a pool and have nearly-free electricity. You can't mine Bitcoin with GPUs - this has not been feasible for many many years now.

Footnote: the mining of altcoins is off-topic on bitcoin.stackexchange.com although there are other coin-specific stackexchange websites where you could ask this sort of question for a specific altcoin.

Well, if I ask in the Bitcoin StackExchange it's because I ask for BTC. I just wonder why there's still ppl doing BTC GPU mining. I assume I'll have to mine another crypto if I'll use GPU, right? at least to feasibly mine a feasible one

There are no people GPU mining BTC, except perhaps for educational purposes. It is a completely pointless waste of money.


text:
Remove noisy log messages like AcceptBlockHeader
is there a way to suppress outputting those kind of logs?
2019-11-07T00:32:02Z ERROR: AcceptBlockHeader: prev block not found
2019-11-07T01:02:36Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000000000014219120d5167a4281437fc379129d4ba6f6e956ca1db77f5fa, bad-diffbits, incorrect proof of work
2019-11-07T01:08:55Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000004bfb561102f5f04d4bab0cc70a403da70b82ce33657e10ed46b9000f, bad-diffbits, incorrect proof of work
2019-11-07T04:16:24Z ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000000000001daed8bac77bdf571441649e51732e91bec984cf97a39005a1, bad-diffbits, incorrect proof of work
2019-11-07T04:22:01Z ERROR: AcceptBlockHeader: Consensus::CheckBlockHeader: 0fd7ab36246daf61802e10a0316cc2b0f17a1d6404bfdd53878ba34e158b4680, high-hash, proof of work failed
2019-11-07T10:12:22Z ERROR: AcceptBlockHeader: Consensus::CheckBlockHeader: 0fd7ab36246daf61802e10a0316cc2b0f17a1d6404bfdd53878ba34e158b4680, high-hash, proof of work failed
2019-11-07T23:10:53Z ERROR: AcceptBlockHeader: prev block not found

They are kind of noisy and I would like to drop them from my log.
I saw that there was an issue opened in 2019 but it doesn't seem to have been pursued:
https://github.com/bitcoin/bitcoin/issues/17421

source: Stack Exchange

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

sort: votes


text:
How do I withdraw from an address
I made a Crypto purchase from Shapeshift yesterday, which was fulfilled by one of their partners called BANXA. I just received an email saying "Your order has been fulfilled and you will receive your bitcoin shortly in the address provided" with a link opening to Block explorer. With a QR code and two buttons "Payment request" and "Donation". And a Bech32 (P2WPKH) 42 Alphanumerical code that I got no clue how to use.
I have contacted their support. Opened wallets in Portis, Electrum, Blockchain and Coinomi but with no idea how to receive that 42 code to one of my wallets. How do I get it to move?
Thank you :)

How do I withdraw from an address

You don't.
You can withdraw cash, denominated in a currency such as Bitcoin, from an account you have as a customer of an official or unofficial financial institution like a bank, currency-exchange or financial-trading broker etc. You can arrange that the withdrawn amount be paid to a Bitcoin "address" you previously obtained from a Bitcoin wallet you already had.

a Bech32 (P2WPKH) 42 Alphanumerical code that I got no clue how to use.

Yes a Bech32 address is a type of Bitcoin address that can have 42 characters.
It is the sort of address that you can get your Bitcoin wallet to create, typically by clicking on a "Receive" button or similar.
If you didn't create that Bech32 Bitcoin address from a wallet you own, prior to arranging the withdrawal of money from the exchange, then the money wasn't paid to you.

fulfilled by one of their partners called BANXA.

I'm not familiar with Shapeshift and Banxa but it appears that Banxa is a kind of payment processor that can receive fiat payment, exchange fiat for Bitcoin and pay that Bitcoin amount to a provided Bitcoin address. I don't know what value is provided by Shapeshift here but that probably doesn't matter.
Banxa's website, worded for potential partner businesses, says

The customer enters the amount they’d wish to purchase, in either fiat or crypto. The customers enters their email address and mobile. By default, the customer’s wallet is set to your business’s wallet.

So it is possible that instead of paying into a normal Bitcoin wallet you previsouly set up, you left the default "wallet" and Banxa paid your money to Shapeshift. If this is true, you probably have a "custodial-wallet" (the least safe kind) where someone else (e.g. Shapeshift) is looking after your money for you and you just have a kind of IOU. As far as the Bitcoin network is concerned that money belongs to Shapeshift not to you. You should be able to log in to Shapeshift and see if you have an account with a non-zero balance.

When you set up a trade on Shapeshift, you presumably pick which currency you wish to purchase, and what currency you pay with. You would then provide your withdrawal address to be credited in the purchase. Given that you have received an email that tells you that your purchase went through, I would expect that the bitcoin were sent to the bitcoin address that you provided when you set up the purchase. Check whichever wallet you copied your address from.

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


text:
Can we drive the bitcoin transaction fee arbitrarily close to zero by keep increasing the block size limit?
Can the bitcoin scalability problem be solved in the long run by increasing the block size limit (either dynamically or statically)?

Welcome to Bitcoin.SE! You can help the site by marking answers as accepted if they are correct and address your question so that the question does not remain as "unanswered".

No. The fees are the incentive for the miners to continue their work, verifying transactions and including them in blocks. Mining is expensive. Eventually, the block reward will reduce to zero and the fees will be the only payment that the miners will receive.
Whatever may change with Bitcoin in the future, the fees must be able to float to the market and that must be protected, although, I do disagree that the current auction model for limited bandwidth is the optimum model for Bitcoin to be using as it is nowhere near scalable.

No. Bitcoin as it is used to day is not capable of replacing traditional use of paper-based or even electronic cash systems.
Increasing the block size would lead to a faster confirmation rate over all, but the requirements of storage space are just not practical enough for really large amounts of payments.
This would buy some time, but not solve the underlying problem of bandwidth and storage space.

No. Miners have operational costs including the computational work required to produce block hashes, internet bandwidth, storage space for maintaining a local copy of the whole blockchain and rent. Transaction fees will have to cover these costs.
Further to this, larger blocks do not solve the scalability problem faced by Bitcoin and other blockchains. This is because larger blocks place greater resource requirements on full nodes (i.e. increased internet bandwidth usage, increased storage space for maintaining a local copy of the whole blockchain and increased CPU usage for validating more and larger transactions).
Higher resource requirements entail higher running costs. The higher the cost of running full nodes, the less people shall run them (some potentially won't even have access to the resources required to run a node with larger blocks).
Ultimately, larger blocks will lead to increased centralization of the network as less and less people run full nodes. This makes Bitcoin less secure and more vulnerable to attacks.

Thanks for your answer. I still have some follow up questions.
As long as the cost of block mining increases sub-linearly with the block size, why can't you drive down the transaction fee as much as you want?
Also, in the long run, as long as the technology improvement rate is higher than the rate of increase of the number of transactions in demand, anyone can still run a full node. Why is the scalability still a problem?

It is the cost to full node operators that do not mine which is a concern. They are not compensated for the expenses which they incur. Miners receive block rewards and transactions fees. Non-mining full node operators do not. There is no guarantee that the rate of improvement of networking, hard drive, RAM and CPU technology will outpace the resource requirements of increasing transactions in demand.

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


text:
What should I do with my crippled Bitcoin Core? How can it be this unstable still after 10+ years?
Recently, I've had serious issues with my Bitcoin Core. I've installed old versions and reinstalled the new version and done everything to debug it, but it's just crippled.
It either gets stuck forever with a "Done loading" text (never starting), or it does get into the "sync mode" but shows "12 days behind" even though it was 8 hours from being fully synced yesterday, etc.
Basically, I can no longer trust anything it displays, and I'm utterly unable to make any payments.
Luckily for me, I don't currently have a need to make Bitcoin transactions, but that's only because I have nothing going on in my life and am desperately trying to find a way to start making money (Bitcoin). What if I had actually been doing business? Then I'd be entirely helpless now. Or if my VPN expires now, I'd have to make a new yearly Bitcoin payment, but Bitcoin Core doesn't let me.
It seems to suddenly have decided to be forever stuck in sync mode. With everything that I've tested, and the discussions I've read with others having similar issues, I frankly no longer have the energy to specify in detail everything I've tried. I'm just wondering how this situation can arise at all.
I consider Bitcoin Core to be critical software; just one step away from "life-supporting systems". It must be rock-solid and just work. Of course, my wallet.dat is well backed up on external, encrypted drives inside a fireproof safe, so I don't think I'll lose any coins or even that Bitcoin Core will corrupt the "live" wallet.dat file. I just mean that it's in an unusable state and this is not the first time this (or similar things) has happened.
Right now, it doesn't even let me bring up the GUI at all. And a minute ago, it let me, but was 100% blank. As in, nothing drawn inside the window.
If there are still intelligent people out there who believe in Bitcoin and want to get rid of the suffocating tentacles of the "traditional banks", I wish they would step up and at least fix this basic software to be far more stable and reliable.
I truly don't know what to do other than "wait and pray" for it to sync itself (again) and then maybe it will allow me to actually use it.
I'm a "poweruser". Imagine what the average person would think and behave in a situation like this.

As the other user commented, almost all performance and instability complaints with Bitcoin Core come down to underlying hardware concerns. Using VPN services will have a detrimental effect on your sync speed, as they are usually extremely bandwidth constrained.

What should I do with my crippled Bitcoin Core?

I would buy a new computer, and download and install a fresh copy of Bitcoin-core onto it, then replace the wallet.dat file using your backup copy and let Bitcoin core fully sync.

How can it be this unstable still after 10+ years?

I'd suspect something on your existing PC is causing issues. I'd remove the wallet from that PC and just use the PC for other things. I'd consider wiping the PC clean and doing a fresh install of the operating system and applications.


text:
ElectrumX returning 0 balance
I have a running full bitcoin node (txindex=1). I also setup electrumx and it has fully synced with current blockchain state.
Here's the log :
    INFO:LocalRPC:[2] RPC 127.0.0.1:44806, 0 total
    INFO:BlockProcessor:our height: 505,932 daemon: 648,872 UTXOs 826MB hist 236MB
    INFO:BlockProcessor:our height: 505,941 daemon: 648,872 UTXOs 831MB hist 245MB
    INFO:DB:flushed filesystem data in 0.13s
    INFO:History:flushed history in 3.9s for 1,249,360 addrs
    INFO:DB:flush #470 took 4.1s.  Height 505,941 txs: 295,160,913 (+337,771)
    INFO:DB:tx/sec since genesis: 1,976, since last flush: 226
    INFO:DB:sync time: 1d 17h 29m  ETA: 11d 10h 54m
    INFO:BlockProcessor:our height: 505,959 daemon: 648,872 UTXOs 838MB hist 18MB
    INFO:BlockProcessor:our height: 505,967 daemon: 648,872 UTXOs 842MB hist 26MB

But when i run electrumx_rpc query , its returning like this :
  No history found
  No UTXOs found
  Balance: 0 BTC

But I have balance in that address. How to fix this?
I installed electrumx using this repo.

It doesn't look like you are fully synced - ETA seems to be 11 days, with about 140k blocks to go

@RaghavSood Oh! I didn't notice that.


text:
The complete indifference by Bitcoin people is making me lose my enthusiasm for Bitcoin
I've been eagerly trying to spread the word about Bitcoin and running "Bitcoin Core" for a decade now. Every day, I hold on to this hope that it's going to explode "any day now"... but it never happens.
Other than the sheer lack of adoption, I also can sense a horrible indifference by the Bitcoin developers. My Bitcoin Core is yet again in some bizarre state where it says "5 days left" (to sync) every day after it's already fully synced and got ready yesterday, and remained "fully synced" until I went to bed. Looking at the clock, I wasn't even asleep for five hours until I came back, started the machine up and yet again: "5 days left"...
The main program, Bitcoin Core, the core (no pun intended) of Bitcoin, is just falling apart and never seems to reach a point of being "ready for the masses". Hell, the "masses" at this point barely know what a computer even is. All they have now are these surveillance devices ("smartphones") which are even more fundamentally compromised than our PC hardware and OS (Windows in practice).
I haven't heard a good Bitcoin news in forever. The price remains absurdly low (compared to what should have happened by now), but that's not the main point. I don't know how much longer I can hold on to this hollow, faint hope.
Much like I don't see any enthusiasm for anything else anymore, both developers and users seem to just "chug along" and see this as some kind of "fun little theoretical hobby", whereas I view it as a fight literally between life and death. If I didn't like the banks before, I certainly don't have any more love for them now that they have made it impossible to even view the account balance in a programmatic manner. They just keep crippling me, while Bitcoin (my savior) goes nowhere.
I want for Bitcoin Core to be stable. I want for Bitcoin to be adopted and used. I want to never have to use "fiat" money again. But it's not happening. I can't help but feel completely disillusioned at this point. "Let down" by the community; by people overall.
Instead of a wonderful, exciting new future of opportunities, all I see is tumbleweed and indifference from the few walking ghosts from the past who still retain any kind of knowledge of privacy and freedom. Scammers and scumbags have destroyed the reputation of Bitcoin and the "altcoins" are so obscure it's not even meaningful to mention them at all.
What can I possibly do at this point other than sitting around and hoping for people to start caring and not remain slaves? They most certainly don't listen to me, that's for damn sure...

"What can I possibly do at this point other than sitting around and hoping" -- Don't talk about what you've tried and failed at. Don't argue. Pick one small well-defined area where a tiny incremental improvement can be made. Put in the personal time and effort to learn how to make that tiny improvement. Make it. Don't expect other busy people to dance to your tune. Be positive in your interactions with people you hope to influence?

I could write an essay addressing each of your points but I don't think it is worth my time.
If you want price to go up just wait for the next bull market. The market doesn't care about software improvements in the short term.
If you want to learn about all the software improvements that are happening every day on Bitcoin Core subscribe to Bitcoin Optech, attend the Bitcoin Core PR review club, check out transcripts or videos of recent presentations from Bitcoin developers. Your commentary is extremely misinformed.

What exactly is your concern? If you need to troubleshoot your Core software focus on that either here, on IRC, or by opening a GitHub issue. To say Bitcoin Core is "falling apart" and developers are "chugging along" is absolute garbage.


text:
Bitcoin economic nodes, concensus, and historical nodes
With regards to the recent dos + inflation bug, and seeing that most nodes on the network have still not upgraded with the patch (lukedashjr's chart here: https://luke.dashjr.org/programs/bitcoin/files/charts/security.html), I think the least understood aspect of Bitcoin to me is this idea of economic majority.  Can you someone elaborate on the economic majority?  Suppose in a scenario, I have a node running following the rules of Bitcoin Core v0.17.0 and if I die, but I still want those rules to be enforced, can I do that?  Do ancestor nodes have any consensus role to play or only the ones being used today ("economic" nodes, i.e. exchanges, miners, merchants) matter?

the recent dos + inflation bug

That would be CVE-2018-17144

Can you someone elaborate on the economic majority?

A definition from Concensus as a service, Swanson, 2015

A consensus mechanism is the process in which a majority (or in some cases all) of
  network validators come to agreement on the state of a ledger.  It is a set of rules and procedures that allows maintaining coherent set of facts between multiple participating nodes.   In the case of Bitcoin, the “longest chain” – the  chain with the most
  proof-of-work – is  considered to be the valid ledger.

Active nodes reject transactions or blocks that don't meet the rules. If some nodes have a different set of rules, there can be effectively a fork in the blockchain.
Ultimately it is the longest version of the blockchain that prevails. This has the most proof-of-work embodied in it.
In the  case of the bug mentioned, as more nodes get upgraded, they will reject any blocks that contain transactions that attempt to exploit the bug. There will be invalidated blocks.
Only active nodes play any part in enforcing concensus rules. Nodes which are not currently propagating transactions or blocks play no part in this.


text:
How will Lightning Network nodes secure their hot wallets?
The success of the Lightning Network is dependent on payment routing. Successful payment routing will require online nodes with automated signing facilities. This entails online nodes with hot wallets.
Well known advice within the Bitcoin community is to not use hot wallets.
What can a Lightning Network node operator do to secure their nodes hot wallet and protect their private keys?

The signing requirements for nodes in the Lightning Network are limited to the ability to sign that transactions that make up the smart contracts of the open channels.  So first off, only the money in the channels is "hot", which by its very nature it has to be.  It would be wise to not keep more money in a lightning node than is required for the channels.  For example, keeping your savings on a lightning node would be foolish.
However, lightning nodes also will also earn fees (although how much is unclear), meaning that profit will be generated as the nodes run.  This profit, too, is initially locked up in the channels, but will eventually be settled by means of an on-chain transaction.  Nodes will likely have a mechanism to send funds from the closing of a channel to a more secure wallet for safe keeping.  Either that, or they will take those funds, and use them to fund new channels.

What can a Lightning Network node operator do to secure their nodes hot wallet and protect their private keys?

There is nothing special that lightning nodes will have to do.  All the advice is basic information security practices.  Don't open ports on your node that you don't have to.  Use a strong password to access your node. Disable remote logins if you have physical access.  Keep the software that is running patched and up to date.  Decrease your attack surface, and reduce the amount of liability (money) you have on any single node to a reasonable amount.
Remember that you put money into a node so that it can make more money.  Making money does not come without risks.  Mitigate those risks to an acceptable level.

There is nothing special that lightning nodes will have to do. All the
  advice is basic information security practices. Don't open ports on
  your node that you don't have to. Use a strong password to access your
  node. Disable remote logins if you have physical access. Keep the
  software that is running patched and up to date. Decrease your attack
  surface, and reduce the amount of liability (money) you have on any
  single node to a reasonable amount.
Remember that you put money into a node so that it can make more
  money. Making money does not come without risks. Mitigate those risks
  to an acceptable level.

LN is being pitched as a "counterparty risk free" method of earning interest on your BTC. Based on this not only is it not risk free but also comes with a pile of OpSec maintenance costs. Until a smarter way to do this comes along I'm out as there are lower risk, less pain-in-the-ass ways to grow your crypto holdings especially when compared to some of the new DeFi solutions coming onto the scene (i.e. Maker/DAI, Augur, WBTC, etc...).

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


text:
Import 256 bit private key
Can I import a 256 bit private key in a Wallet (binary format)?
Or do I have to convert it in another format?

It all depends on the wallet, sometimes it's not possible to directly import a private key, sometimes it uses some specific format (for example WIF for Bitcoin Core). I think you should be more specific or really we can't help much.

Most wallets (and by that, I mean almost all) will not accept a binary 256 bit private key, you will have to convert your 1's and 0's to a WIF format.
There are libraries in python and javascript (and I'm sure other languages too) available that can do this function conversion for you.


text:
Attacker Changing Address to Receive Block Reward
A miner creates a block B which contains address α, on which he wants to receive his rewards. An attacker changes block B, such that instead of α it defines a new address α’, which is controlled by the attacker. Will the attacker receive the rewards that the miner tries to claim and why (or why not)?
My idea was that first of all the attacker would have to redo the proof-of-work. Therefore it is unlikely that their blockchain would be the longest. However, is there any way that the attack could go through other than solving the proof-of-work faster than the rest of miners? What if the attacker changes the most recent block? Could the block then be on the longest chain?
I have also read that the Block Reward in a stale block is no longer spendable on the difficultywise-longest and well-formed blockchain; therefore whoever mined that block does not actually get the reward (or the transaction fees). So if the attacker's changed block becomes a stale block, does this mean the reward cannot be claimed by the original miner or the attacker?

Welcome to the site, and thank you for the well-written question. We actually have some questions about this topic already, so I closed it as a duplicate of those other topics. If you find that your question is not fully answered, please edit your post here to tell us what you'd still like to know and we'll reopen it.

Essentially, the relevant points are: if you even change a single byte of a block, you start from scratch, and there can only be a single block in the blockchain at every height. Since the reward is only spendable after 100 blocks have been appended to your block (see [tag:immature-coins]), stale blocks don't earn any money.


text:
How to add money
I'm trying to send money to an address but it keeps coming with error message.
Do I need to have money in my bitcoin wallet first before sending to someone and how do i add money please?

Hi, which wallet are you using? Where are you trying to send bitcoin? What is the error message? If you're not more specific, I'm afraid no one will be able to answer your questions.
And obviously you need to have some bitcoin to be able to send it to another address.

Bitcoin is like cash, you can only spend it if you have some already. Since the Bitcoin network doesn't transfer dollars or other government currencies, but sends bitcoins, you cannot just link up a card or bank account to start sending money. You first have to purchase bitcoins.
There are some wallets that offer an integrated service for purchasing bitcoins which you could use to both buy and then send, but this tends to come with a price of course. To learn more about getting bitcoins, you could check out for example: How do you obtain bitcoins?


text:
Crypto-Trader.com Shut down. Did I loose all my Coins?
The Exchange Crypto-Trader shut down sometime I believe in 2015. I was never notified by the shutdown. There are reports out there that they sent all their users an e-mail giving 48 hours to withdraw their coins however I never received shut e-mail and never withdrew. At this point is there anything I could do?

A similar type of event happened with Mt. Gox where users lost a total of 850 000 Bitcoins. Your Bitcoins are likely lost forever if the owner of the private keys does not agree to send them to you. However, you may be able to sue the exchange, but I am no legal advice. Take this as a lesson, to never keep a cryptocurrency on an exchange, it is very important to own your coins.

Letting your Bitcoins on an exchange means trusting the exchange. That's the reason why you should send them to an adress of your wallet.
You can't probably do anything to get them back.


text:
Bitcoin Core: Unit Test Failure: system_tests.cpp: Line 48 BOOST_AUTO_TEST(run_command)
I cloned the Bitcoin Core and did the build. But, I am experiencing a Unit Test Failure in system_tests.cpp, Line 48 BOOST_AUTO_TEST(run_command).
First, my environment:

Hardware:  Intel i7-8550U @1.80GHz 2001 Mhz, 4 Cores, 8 Logical Processors, x64.
OS:  Windows 10 Home
Toolchain:  Visual Studios 2019 v142, Configuration: Release, Platform x64.

The build completes without errors, but I do get the following message:

C:\Users\name\source\repos\bitcoin-first\build_msvc\test_bitcoin\test_bitcoin.vcxproj : warning  : Wildcards in project items are not supported in VC projects and can cause unexpected behavior, instability and performance degradation in the Visual Studio IDE. Please refer to https://aka.ms/cpp/projectwildcards for supported options.

Running test_bitcoin, all tests pass except run_command from source system_tests.cpp line 48.  I get the following error:

struct boost::process::process_error:  CreateProcess failed: The system cannot find the file specified.

VS Test Explorer gives additionally:

unknown location(0): exception in "run_command": struct boost::process::process_error:  CreateProcess failed: The system cannot find the file specified. system_tests.cpp(52): last checkpoint:

The relevant code from system_tests.cpp (Please disregard any spacing syntax issues after the line numbers.  I manually added them in and they are not at issue):
48 BOOST_AUTO_TEST_CASE(run_command)
49 {
50    {
51        const UniValue result = RunCommandParseJSON("");
52        BOOST_CHECK(result.isNull());
53    }
54    {
55 #ifdef WIN32
56       // Windows requires single quotes to prevent escaping double quotes from the JSON...
57       // const UniValue result = RunCommandParseJSON("cmd.exe /c echo '{\"success\": true}'");
58        const UniValue result = RunCommandParseJSON("echo '{\"success\": true}'");
59
60 #else
61        // ... but Linux and macOS echo a single quote if it's used
62        const UniValue result = RunCommandParseJSON("echo \"{\"success\": true}\"");
63 #endif
64        BOOST_CHECK(result.isObject());
65        const UniValue& success = find_value(result, "success");
66        BOOST_CHECK(!success.isNull());
67        BOOST_CHECK_EQUAL(success.getBool(), true);
68    }
69    {
70        // An invalid command is handled by Boost
71        BOOST_CHECK_EXCEPTION(RunCommandParseJSON("invalid_command"), boost::process::process_error, checkMessage); // Command failed
72    }
73    {
74        // Return non-zero exit code, no output to stderr
75        BOOST_CHECK_EXCEPTION(RunCommandParseJSON("false"), std::runtime_error, checkMessageFalse);
76    }
77    {
78        // Return non-zero exit code, with error message for stderr
79        BOOST_CHECK_EXCEPTION(RunCommandParseJSON("ls nosuchfile"), std::runtime_error, checkMessageStdErr);
80    }
81    {
82        BOOST_REQUIRE_THROW(RunCommandParseJSON("echo \"{\""), std::runtime_error); // Unable to parse JSON
83    }
84    // Test std::in, except for Windows
85 #ifndef WIN32
86    {
87        const UniValue result = RunCommandParseJSON("cat", "{\"success\": true}");
88        BOOST_CHECK(result.isObject());
89        const UniValue& success = find_value(result, "success");
90        BOOST_CHECK(!success.isNull());
91        BOOST_CHECK_EQUAL(success.getBool(), true);
92    }
93 #endif
94 }
95 #endif // HAVE_BOOST_PROCESS

Line 58 is failing.  Based on this https://stackoverflow.com/questions/47028660/boost-createprocess-failed, I commented out line 58 and added the following Line 57:
57  const UniValue result = RunCommandParseJSON("cmd.exe /c echo '{\"success\": true}'");

Running again the system_tests.cpp gets me past the CreateProcess failure, but produces the following failure in system_tests.cpp line 48, run_command():

class std::runtime_error: Unable to parse JSON: '{"success": true}'.

VS Test Explorer additionally states:

unknown location(0): exception in "run_command": class std::runtime_error: Unable to parse JSON: '{"success": true}'
system_tests.cpp(52): last checkpoint:

I'm having a hard time believing the test is incorrect--I've found nothing about this failure.  Instead, I suspect I didn’t correctly set some switch or option or configuration somewhere.
Any comments or help would be greatly appreciated.

Here is my work around.  I still have a hard time believing that the test code needs revision, but this is what I did and the tests now pass.
From the above, I changed the call of RunCommandParseJSON() to provide for the explicit call of the command window.  Apparently, this is needed for Windows.  The line became:
57  const UniValue result = RunCommandParseJSON("cmd.exe /c echo '{\"success\": true}'");
RunCommandParseJSON() is called from /src/util/system.cpp.  It takes a string input representing a child process, which it is to start.  In this case, start the command window and echo the string '{"success": true}'.
This produced a runtime error:
class std::runtime_error: Unable to parse JSON: '{"success": true}'
Note:  the string output from the echo command begins and ends with a single quote.  As noted in the original comments to the code, single quotes are needed to avoid Windows escaping the double quotes from the JSON.
RunCommandParseJSON() calls UniValue::read() from /src/univalue/lib/univalue_read.cpp.  UniValue::read(), does not seem to accommodate the case of a string input beginning and ending with single quotes.
Thus, I changed line 59 from:
while (raw < end && (json_isspace(*raw))) // skip whitespace
to:
while (raw < end && (json_isspace(*raw) || (*raw == '\''))) // skip whitespace and skip single quote to begin and end a json string
This allowed the for the
const UniValue result = RunCommandParseJSON("cmd.exe /c echo '{\"success\": true}'");
aspect of the run_command test to succeed.
Still, I was getting errors on run_command when further testing for throwing the proper errors:

No output to stderr

Error message to stderr

Unable to parse JSON error

The no output to stderr case tests for when you can start the command window process, but the command given is invalid.  This test was revised to allow for the proper calling of the Window’s command window, changing from:

BOOST_CHECK_EXCEPTION(RunCommandParseJSON("false"), std::runtime_error, checkMessageFalse);
to:
BOOST_CHECK_EXCEPTION(RunCommandParseJSON("cmd.exe /c false"), std::runtime_error, checkMessageFalse);
This produced the desired error, but not the exact error message called for by the test.  I changed the check to:
const std::string what(ex.what()); BOOST_CHECK(what.find("returned 1") != std::string::npos);

The Error Message to Stderr tests for being able to start the command window process, receive a valid command, but invalid input.  This was changed from:

BOOST_CHECK_EXCEPTION(RunCommandParseJSON("ls nosuchfile"), std::runtime_error, checkMessageStdErr);
to:
BOOST_CHECK_EXCEPTION(RunCommandParseJSON("cmd.exe /c dir nosuchfile"), std::runtime_error, checkMessageStdErr);
to replicate what I see as the Window’s version of the test.

The Unable to ParseJSON error tests for ability to start the command window process, send a valid command with valid input, but the string isn’t able to be parsed.  (This error was actually encountered early on.)  This was changed to:

BOOST_REQUIRE_THROW(RunCommandParseJSON("cmd.exe /c echo '{'"), std::runtime_error); // Unable to parse JSON
With these changes all unit tests now pass.
I don’t see that these changes changed the nature of the tests.  If someone notices that they do, I would definitely appreciate being told.

Perhaps the following will work.
RunCommandParseJSON("cmd.exe", "/c echo '{\"success\": true}'");

Thank you for the suggestion.  I ran it and got a similar runtime error :class std::runtime_error: Unable to parse JSON: Microsoft Windows [Version 10.0.19041.867].  Here it looks like the ehco command produced "Microsoft Windows [Version 10.0.19041.867]."  Whereas in the previous runtime error, it produced the desire string, '{"success": true}'.


text:
How can I cancel a pending transaction
https://blockchain.info/tx/d2aa8e971dd26a4f4598f57b55e921a62fa376dad1cf25e426b6ba7d79052466?show_adv=true. This transaction was made by some fraudsters on my wallet. I later recovered my wallet. How can I cancel this transaction

You can't "cancel" a transaction sent from a web wallet, and RBF/double-spend is also not possible from web wallet.
There is nothing you can do, your funds are lost.
Actutally there is one thing you can try, there is a slim chance that this might work though.
Export your private keys to Electrum and report back if the transaction and addresses show up in Electrum wallet.

It shows low fee

What? Do the transaction and addresses show up in Electrum?

Yes It does, every transaction I've done

Since the transaction is still unconfirmed, are you able to double spend from 1EmKvWN4NYs3Sx7WNz8ur44wpKqWRn1Gtj and 15tdaQ2vJpcJLFrYTW7QQJDmg4Nz9UhBUE to yourself? Here is a step-by-step . If this is possible, then you may be able to send the funds to yourself.

You can't cancel an unconfirmed transaction if RBF (replace-by-fee) enabled for this transaction you could replace the fee. but I guess you are using blockchain.info wallet which is not possible there.
What you can do is asking the receiver to send this transaction to another receiver with double fee. so the transaction gets confirmed.
or you can try to push this transaction manually.

Thetransaction was done illegally by some fraudsters


text:
Which API provides the website URL for a cryptocurrency?
I've been searching for an API that returns the website/URL for a cryptocurrency. Is there any public API which provides the website for a specific cryptocurrency?

"the website for a specific cryptocurrency" A lot of currencies like Bitcoin are decentralized and don't have ONE website. I don't understand why someone should write an API to provide links.

CryptoCompare's API has the website URLs if you use CoinSnapshopFullById:
CryptoCompare API


text:
Where Is My Deposit?
I deposited 300.00 into a bitcoin ATM. 222.00 showed up in my wallet. I sent what was in my wallet to DreamMarket. This transaction has been pending for 4 days. I entered both addresses into BlockChain.....nothing very helpful came from it. Please help.

Can you post the tx id or bitcoin public address you received from the ATM? That info may help someone figure out where your btc are

It went through! My deposit showed up.


text:
Can Undercutting attacks be Mitigated?
An Undercutting attack as described in this paper, is a mining strategy which involves producing new blocks not on the longest known chain, but instead 'undercutting' the longest chain by building a block, which collects less of the available transactions' fees, on a shorter chain. This behavior creates a direct incentive for another miner to now build new blocks on the 'undercutting' chain as there exist a higher sum of transactions' fees for them to collect.
In the paper, the authors describe how this can lead to a situation in which a 51% attack can be successfully carried out with less than 51% of the hashing power of the network. This is enabled due to the undercutters orphaning blocks and lowering the effective hashing power of the network (the 51% attackers have an advantage as they needn't orphan their own blocks, but the honest or undercutting miners work at a cumulatively lower hash rate due to the potential orphaning of higher value blocks).
Are there any solutions which disincentivize Undercutting behavior? Or, can the behavior be mitigated through a change to the protocol?

You might find this article informative: https://medium.com/@bergealex4/bitcoin-is-unstable-without-the-block-size-size-limit-70db07070a54

1. You will never be able to re-mine the previous block and get more fees.
The attack described in that paper consists on re-mining a block to claim less fees and incentivize other miners to continue it instead of mining in the honest chain. The threat of the opposite attack was addressed long time ago.
Since Bitcoin Core 0.11.0 (July 2015) transactions include a nLockTime to discourage fee sniping and ensure they can only be mined at a height greater than current head. Their fees can only be collected by moving forward and not by undercutting previous block. Although adoption is not widespread, you can expect it to be if this threat became credible. Also, a chain leaving less fees for the next miner will be less attractive for other miners to continue.
2. Mempool will not be shallow enough for consecutive blocks to have significantly different reward.
As demand of block space increases, or its supply decreases, it becomes more expensive. Bitcoin users will always face a trade-off between waiting a bit longer to get their transactions into blocks (until congestion subsides) and paying higher fees.
We can observe that the more transactions queued in the mempool, the higher is the price of block space and the flatter is the slope of the fee rate distribution. Thus, the lower will be the difference between contiguous block rewards. Abnormally high fees of high priority transactions published between blocks (that heap on the left of the charts) represent a smaller fraction of the total reward when the mempool is busy.
Check the clear cut at 250 sat/WU for most transactions of December 22, 2017. When fees become significantly high, many people show they are not in such a hurry for transaction confirmation after all, and you cannot expect them to be willing to pay much more for their transactions to be mined in 6 hours time instead of 7 hours.

Rewards immediately after a block is found are certainly NOT zero, "making it unprofitable for any miner to mine", as they claim.
3. Miners can always hedge undercutting risk.
Miners could include an anyone-can-spend output in their blocks, as a premium to mitigate the risk of other miners undercutting them, when their rewards are much more valuable than the fees remaining in the mempool (this can only happen if some transactions pay economically irrational amounts of fees). So, there is no need to alter transaction selection to make this possible, even in unlikely scenarios.

"Fee variability between contiguous blocks should be very small" does not seem obvious to me. Given that the block interval can vary substantially just that would create a variance in the block rewards, but then the blockspace demand is highly dependent on other market developments as well as daily and weekly cycles.

This tweet just repeats the point that rewards are flat but doesn't elaborate the thought process to substantiate the claim. Is there a write-up in longer form somewhere?

Thanks for the elaboration!

Yes, this is also known as fee sniping.
Most wallets I know of (*) set the nLockTime to the tip in order for the created transaction to only be allowed to be included in the next block (or the block would be rejected by all the verifying nodes and the miner would lose money : the nLockTime rule is a consensus one).
(*) Bitcoin-core, Electrum, C-lightning, Joinmarket


text:
bitcoind RPC methods missing on Debian
Originally I installed .bitcoind using --disable-wallet then I later recompiled it with wallet. Not sure if that's to blame or how to troubleshoot.
Commands like this work:
bitcoin-cli getbestblockhash

0000000000000000000a40b6716fdd46ba98e238c58d3d686c653eeeb94aa759

but several others do not:
bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"

error code: -32601
error message:
Method not found

bitcoin-cli getbalance
>error code: -32601
>error message:
>Method not found
Using curl, i.e.
curl --user bitcoinuser --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332
also results in "method not found".

1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d does not appear to be a valid transaction on either Bitcoin or Bitcoin Testnet. What happens when you look up a valid transaction?

Did you restart bitcoind after reinstalling? The Method not found error means that gettransaction is not a method built into the currently running instance of bitcoind.


text:
Difference between scrypt and sha-256 mining?
So in detail my question is:

are both these two algorithms different from each other?.
I read somewhere that this two algorithm is used for the different cryptocurrency. if that's true. then why?
which one is efficient as compared to another one.

that would be much appreciated if you give me answer with some example.

are both these two algorithms different from each other?

Yes. Different algorithms with different (invention) purposes: SHA256's goal was to be extremely hard to be collided, while Scrypt aimed to be a RAM and CPU heavy algorithm.

I read somewhere that this two algorithm is used for the different cryptocurrency. if that's true. then why?

Consider Bitcoin and Bitcoin Cash. Bitcoin Cash's hashrate is ~90% lower than Bitcoin's. However, profit maximizing miners switch to Bitcoin Cash when it's more profitable, and then jump back to Bitcoin. This causes Bitcoin Cash block times to be unstable, between 3 minutes and 60 minutes. If your coin uses a different kind of PoW, then that's not possible. Of course, you can improve the coin's difficulty algorithm to overcome these issues (DogeCoin is a little SHA256 coin, but its difficulty algorithm "DigiShield" is pretty great), however Litecoin prefers to use a different solution: to have a different PoW.

which one is efficient as compared to another one.

SHA256 in terms of energy and Hash / unit time.

PoW stand for     ?

Proof Of Work, the job miners do to make their block accepted to the network. E.g. for Bitcoin, the hash of the block should be lower than the network difficulty.


text:
How to get bitcoin Unconfirmed Transactions
I want to built a platform for mining bitcoin.
So i want to know how to get all performed transactions for bitcoin and also all unconfirmed transaction like (blockchain.info).

You can use blockcypher api to check bitcoin address transaction.
http://api.blockcypher.com/v1/btc/main/addrs/{{YOUR_ADDRESS}}
For ex :
http://api.blockcypher.com/v1/btc/main/addrs/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD

Thank you.
But these works only when we got the address. So how can we get all unresolved transactions/block

for that, u need to use https://github.com/bitpay/insight-api


text:
Bitcoin withdrawal issue
I have withdrawn BTC from an exchange to be sent to another. However, I haven't receieved it. When I check it with the transaction hash, it shows as it took so many confirmations. Can anybody tell me where the problem is? Please check my Tx hash : 1db23c2bdc95d1b889ae0489103a0d0041bd5e046c07ebefdffd81abab343978

Have you confirmed that the deposit address you sent the money to appears in the transaction https://blockchain.info/tx/1db23c2bdc95d1b889ae0489103a0d0041bd5e046c07ebefdffd81abab343978?  It needs to be exactly correct, so could be a copy/paste error etc?

Thank you for the reply, yes I did confirm that. It is exist and correct. Actually I am curious about, maybe my problem is about I didn't pay enough for mining fee?

Double check to make sure you didn't send your coins to the address of another coin. Sending BTC to BCH (BCC) is a very common mistake.
If you sent the coins to the wrong address, you'll need to contact the exchange and ask them to import that private key into your BTC wallet. Whether or not they will comply depends on the exchange.


text:
Digibyte Wallet Hash

I recently invested in digibyte.
As someone of IT-security field, I'd love to know how the passphrase is stored in digibytes wallet.dat.
The Bitcoin2John doesn't work on it and hashcat, too, has no support for the wallet.
I couldn't find any information on how storage is done, so I'm asking you.
Best wishes and thanks in advance

I am not familiar with digibyte's wallet implementation specifically, but I can probably shed some general light:
Your passphrase is not stored in the wallet.dat - the passphrase is the encryption key that can be used to decrypt the wallet.dat. The wallet.dat itself stores private keys that can be used to sign transactions with the associated addresses.
When you run JTR or hashcat on the wallet.dat, you are brute forcing the passphrase itself to gain access to the private keys inside the wallet (trying to find a passphrase that when used as a decryption key is successfully able to decrypt the wallet)
Briefly looking at the digibyte core wallet, the wallet.dat appears to be in a standard format just like for any other wallet based on Bitcoin Core. You should start here if you want to know more about what information is stored inside the wallet.dat and how (look under Bitcoin Core): https://en.bitcoin.it/wiki/Wallet
If Bitcoin2John and hashcat don't work on the wallet.dat, this is probably due to minor differences in storage, but it should be fundamentally the same.


text:
Watch only wallet
I'm having this message:
"Your wallet does not have private key for this address. You cannot spend coins received unless you have the private key elsewhere."
How can I move my coins from watch only account to account with the private key?
P.S. I am using Mycelium Wallet App.
Thank you in advance,
Milan

definition of a watch only wallet: An address or pubkey script stored in the wallet without the corresponding private key, allowing the wallet to watch for outputs but not spend them.

Possible duplicate of I need to recover private key?,

You can't spend bitcoin from a watch only address unless you have the corresponding private key which generated that address.

Yes, I believe I have it... I mean, I have two accounts, one of them has the private key and the other one doesn't... Could be that it's the same private key? Thanks

What dates were the addresses generated on?

Sorry, I am not sure how can I find out the date of generation? I'm pretty new in this. Thank you for your time

When you start Mycelium, is there a 'Cold Storage' option?

Yes, there is. But, I can't find any date there

I asked for dates because of the possibility of your private key being encode in an older WIF. You should be able to import your private key in the Cold Storage section of Mycelium.

To receive the bitcoins originally you should have had a “key pair” meaning a public and private key pair. Online wallets automatically generate the private key with your public address. Imported public addresses to your wallet will be a “watch” address that won’t allow you to spend your bitcoin if you don’t import your private key. If you import your private key to your wallet it will no longer be a watch address and you can spend your bitcoin. Just import your private key for your public address and you should have full control to transact.


text:
How do you change rpc password?
I'm trying to run bitcoind with a changed conf file, but for some reason the password it thinks is incorrect. Is there a way I can change the rpc username and password?

Can you include in your question the exact content of the file (with password masked out if needed), the command you run, the output you expect, the output you see, entries in debug.log that may be relevant? It's very hard to help based on vague observations.

bitcoin-cli stop
Then edit your bitcoin.conf with nano bitcoin.conf
Then edit or add the entry rpcpassword=yourpassword and rpcusername=yourusername
Save it
Restart bitcoind

If you try to stop the bitcoind using bitcoin-cli then try edit the bitcoin.conf file to change the login and if that do not work then reboot then change the login (not sure if bitcoind can stop the server)

I already tried changing the rpcuser and rpcpassword in bitcoin.conf and restarting the server with the new config file

Ok then try to stop the daemon and simplely change the password and username to what you want and start the daemon again

No the problem is when trying to restart daemon with new config, it says invalid credentials

Ik but you have to stop the daemon with the same credentials then change it or else it won't work


text:
How do nodes reach consensus on when the target is recalculated?
Due to network latencies, some nodes may think they are at a different block height than the rest of the network. How then does a node decide if the target has been recalculated since that changes every 2016 blocks.

The target recalculation is not something that is broadcast or something that is announced to nodes. Rather nodes calculate the targets for each block according to a specific algorithm that only requires the blockchain data. It is based on the previous block's target, the block height, and the block timestamps. So each block's target is done completely independently from the network with the only information required being the the blockchain.
Since the algorithm for calculating the target is deterministic, each node will calculate the same difficulty for the same block heights given the same blockchain data.

A node will recalculate the difficulty itself every 2016 blocks, and it does so in a deterministic fashion, based upon the previous 2016 blocks.
So each node will, given the same 2016 previous blocks, arrive at the same result for the new network difficulty. We know that all the nodes will indeed have the same 2016 previous blocks, since the network remains in consensus.
If a node is not well connected to the network, and experiences high latency in receiving new blocks, this would not affect that node's ability to compute the new difficulty, once it receives the new block(s). Until the node receives the 2016th block in that period, it would continue to function just fine, even if it is a block behind the rest of the network.


text:
decompressing Multibit wallet private key in another wallet
I have some bitcoin amount in my Multibit wallet. unfortunately i can not figure the password I put on it for transferring coins for the life of me despite trying all possible passwords i could think of. But i do have a back up copy of my private key and if you are familiar with multibit wallet you know upon backing private key it asks you to password protect your backup and i do have that password. so how can i impart this private key in another wallet and decompress it there? is there any wallet that can do it?
I do appreciate your help and comment.

Check out https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md#btcrecover-tutorial to brute-force the password, however, you will need many CPUs. If you need help, contact me.


text:
Privacy: How should I handle UTXO's?
We know that, for security and anonymity, we shouldn't reuse addresses. Also, there is the idea of change avoidance to protect ourselves from any number of change detection heuristics.
But I find that unspent change addresses ("UTXO's") are often unavoidable. Especially when using other privacy-enhancing techniques, such as equal-output CoinJoins, where you end up with many source addresses.
Is there a good technique to be able to spend these UTXO's without compromising privacy?

I don't see the problem, or what compromises privacy exactly?
Say you have UTXO A1 and B1 of 0.001, (I've never used Coinjoin so i'm just assuming here.)
Now you put both A1 and B1 through Coinjoin, Now you have A2 and B2.
How would combining the outputs of A2 and B2 compromise the privacy of outputs A1 and B1?
You used CoinJoin to break exactly that chain right?

Put the balance of the change adresses all individually through coinjoin mixing sessions and then combine the outputs? That way the chain is broken, and due to them being linked only after the chain was broken, privacy isn't compromised?

If they're too low of an amount to be send to Coinjoin, i'm afraid it's just dust, and they should be frozen to prevent them from accidently being spent  in the future when tx fees might be lower again.


text:
How to connect my mobile wallet to a full node via a TOR hidden service address?
I would like to configure a mobile (Android) wallet to connect to a TOR-enabled full node (Bitcoin Core), via its onion address. I haven't decided which wallet to use yet. It will depend, of course, on the answer to this question :)
Is it possible to do this? I realize I would need to keep the onion address static, or at least reconfigure my wallet if it changes. Also, I assume I'd need some kind of Android TOR application...
If I can't do it using TOR, I understand that the standard method is to install an Electrum Server on the full node, then use a compatible wallet to connect to it. This may be old information, however. I have also seen some wallets that can connect directly to a full node by IP address. I'd rather not set up port forwarding on that router if there is a better way.
A few wallets claim TOR support (Sparrow, Wasabi, Mycelium, etc), but I believe these are all desktop wallets without an Android version.
My research is confounded by the difficulty of knowing which web resources are out of date and which are current.
So, as of now (early 2023), what are some good methods to accomplish this?

I make the assumption that you have already gone through the steps of installing a bitcoin node that operate, exclusively or not, on the tor network.
Here is a resume of a proposed solution :
You have to install first the tor bundle if not yet.
So as to the remote connection to this node by onion service, you can set up an electrum server on your local machine, and create a hidden service (see in /etc/tor/torrc) to instruct your system so that it will pass the incoming connections on the tor proxy to the working port of your electrum server (default 50001).
Don't forget to open port 50001 if you have a running firewall on your bitocin server. But don't worry about opening a specific port on your router in ths case, because tor proxy service don't need that (remind the term 'hidden').
If you want much of a complete installation, you can set up a reverse proxy server such as nginx over your electrum server. On the outside of your server it will exchange paquets with on ssl mode, and transmit them securely on the localhost to  electrum server. Create a hidden service for this proxy server too, and you'll be able to remote connect your node on your server over tor service, via port 50001 (no ssl but tor's already encrypted) or 50002 (tor over ssl encryption, at your choice. And you need to open neither 50001 nor 50002 port on your router.
Lastly, install electrum mobile wallet + Orbot (some type of tor bundle for androïd) on your mobile phone to enable electrum wallet (and other apps) to connect through tor.
For tips on the server set up :
setting up electrum server
setting up proxy server nginx


text:
I inverted 2 digits to a wallet in a transfer
Is there anyway to contact the wallet owner to retrieve the coins?  If the wallet doesn't exist, can the transaction be reversed?  Is there anything that can be done?

What produce or service were you using the make the transfer? Do you mean two digits in the receiver's bitcoin address?

Normally a Bitcoin address is in the Base58Check or Bech32 format. Both of these formats have a checksum incorporated specifically designed so that wallets can detect if there is a typo in the address. It is strange that the wallet allowed you to submit the transaction.

There is no way to contact the owner of a wallet that can spend a specific Transaction Output (coins)

Transactions cannot be reversed. Under no circumstances. Even if you can proove that you are the owner.

BUT!!!
As we speak, October 30, 2020
The mempool is full, allegedly because miners in China are moving due to the rainy season. So the hash power has dropped and many low fee transactions have not been processed yet.
So, use a blockchain explorer to check if your transaction has been processed.
If not, then you can try to double-spend it by providing a higher fee for miners.
Higher fee transactions are processed first.

Most of your response is at best completely irrelevant.


text:
Will Upgrading Ram on Low End PC Make Core Sync faster?
I am a newbie to bitcoin. I am trying to sync a full node on my low end PC: 2g RAM, dual-core 2ghz, 250 gb regular HDD. It is in pruned mode. The initial 15% synced in a few days but now the process is fluctuating wildly around 2-7 weeks. Suffice to say it is very slow.
My main question is: how much will adding some RAM improve the syncing speed? And will adding new RAM reset the blockchain download?
I have already adjusted these settings: dbcach=900, banscore=10, listen=0
I am worried that putting in the RAM will "reset" the blockchain download and I will have to start syncing from 0% again. This already happened to me when I was tinkering with the dbcache setting - Which I will have to do again in order to take advantage of any new RAM(right?).
Anyway I hope that was a coherent question. Any response is very appreciated. :)

I suspect network bandwidth is the limiting factor for many people.

Your HDD is most likely the limiting factor. What operating system do you use? Changing dbcache does not require starting download all over again. Something else happen there. You might want to take a look into debug.log which can be found in your datadir.

The initial 15% synced in a few days but now the process is fluctuating wildly around 2-7 weeks. Suffice to say it is very slow.

This happens because the very first blocks were pretty munch empty, so it's easy to verify.

I am worried that putting in the RAM will "reset" the blockchain download and I will have to start syncing from 0% again.

No, it doesn't.
There are numerous things that impact how fast your Bitcoin Core will sync, your HD speed, internet bandwidth, RAM, how good is your CPU… That said, -dbcache changes how many things we cache, cached things = less disk access, so it should increase performance, BUT it's not a linear thing; more RAM not necessarily means faster sync.


text:
Why Is it not possible to truncate the blockchain after Corruption detected
After running bitcoind (as part of myNode) for 6 monhths with no issue, I got this error:

Fatal LevelDB error: Corruption: checksum mismatch:
/home/bitcoin/.bitcoin/indexes/txindex/257701.log

At that point it would have been great to truncate the blockchain to some previously known good block and start loading blocks from that point (instead of starting from scratch which takes nearly a week). Since the integrity of the blockchain is maintained continuously from the genesis block on, I don't see that there would be any risk (or too great of a difficulty) in doing this. Yet it does not appear that there is any tool available to do such a truncation -- is this simply because no one has bothered to create and release such a tool, or would truncating the blockchain create some security risk that I'm not aware of?

There is no need to truncate it. You can just start Bitcoin Core with the -reindex option. If you do, it'll throw away the UTXO set and other databases, and rebuild it from the blocks you have on disk (which will be kept), up to the point where they're corrupt. It'll take a while (possibly nearly as long as synchronizing in the first place), but it won't redownload valid blocks you already have.

thanks, that makes sense, but it doesn't fit my scenario. When I tried -reindex I would get another error message asking me to to -reindex -- stuck in an infinte loop more or less. So it seems there must be something about the LevelDB corruption that I experienced that prevented -reindex from working. (At that point I used the 'Reset Blockchain' command on myNode which wiped out the entire installation and started the Initial Block Download. That was painful, but better than being stuck in that error loop.) I wonder if there was some other way to deal with the situation...

If you're getting repeated errors, your hardware is most likely broken (overheating, memory errors, disk issues, ... Bitcoin fulls nodes tend to stress hardware far more than most applications).

I'm hoping it was not permanently broken, but temporarily overheated -- I guess time will tell...

Well if you get the problem again after a reindex, it's not a one-time thing.


text:
Is this scheme for multisig audit of Trezor + Coldcard ok?
My plan is to make a multisig between coldcard and trezor. I want to audit and verify that I indeed own the 2 keys of these wallets, using a raspberry pi zero (no wifi/bluetooth by definition) on a very old HDMI tv with no internet either, and using a virtual keyboard and simply a mouse on the pi zero.
These are the possible risks I want to mitigate:

The wallets can have a malicious random number generator.

The wallets can generate address for keys that are not mine

To eliminate the risk of the trezor generating a private key I don't own, I'm gonna put its key on the raspberry pi zero and see that it generates the same master pubkey and shown in trezor. This proves I own this key, but it might be a kew that someone already owns. No problem, that's why I'm doing multisig.
On the coldcard, I'll generate a seed using dices, and then verify on the raspberry pi that those dice rolls indeed generate the private key shown by coldcard. This proves that I own a private key that no one owns, because it was generated using dices.
Now that I have 2 private keys that I own, and at least one of them I'm the only owner, I can create a multisig wallet on Electrum or maybe BlueWallet. I'll annotate the first 10 addresses generated by the software wallet, and verify if they match on the coldcard and on the trezor. If the 3 show the same 10 set of addresses, I can consider these addresses safe for receiving Bitcoin.
I'll then receive some Bitcoin on one address, erase both wallets, restore them with the private keys, and then try to spend this Bitcoin, just to make sure I really owned the coins.
What are the possible problems I can encounter? Am I forgetting something important?
PS: I know that if the trezor has a malicious random number generator and it creates a private key that not only myself own, this is a privacy leak, but not a problem. And it's a privacy leak only when I spend from this address, revealing the public key on the blockchain.
I also plan to use just PBST air-gapped transactions on Coldcard, and a trusted computer to broadcast.

The wallets can have a malicious random number generator.

There are several ways to be malicious. Typically random number generators are considered malicious when they are
somehow predictable, so if you use them someone else can guess your "random number".
But that doesn't seem like what your plan protects you from.
What you verify with your procedure is that your hardware wallet do not give you a different seed (when you do the initial setup or ask to export it) from the one it used to generate the private keys and related addresses, that it uses when you receive or send funds with him.
In this meaning, the seed (from which private and public keys are derived in HD wallets) would not be yours but belong only to your hardware wallet: you can receive and send using the device, but if you import the seed elsewhere there are no associated funds, because it's different from the one used by Trezor.
However I have never heard of such a problem on any hardware wallet.

The wallets can generate address for keys that are not mine

This don't make sense to me, public addresses are derived from private keys, so the wallet need to have the private
keys to generate addresses  ... i'm not sure what you mean.
Furthermore, you can't verify that you are the sole owner of a seed or a private key, the most you can do is make
sure that this does not leak out, but if somehow someone manages to copy, predict or generate it randomly, you can't
notice until the money goes away.
So, all things considered, I think you can avoid having to verify the seeds that your wallets give you, because this
adds practically nothing to the security you already have using multisig addresses with 2 hardware wallets evaluated
as Trezor and Coldwallet, that are already heavily scrutinized, as you can see here for example.

PS: I know that if the trezor has a malicious random number generator and it creates a private key that not only myself own, this is a privacy leak, but not a problem. And it's a privacy leak only when I spend from this address, revealing the public key on the blockchain.

I'm not aware of troubles with Trezor rng (have you any reference for this?), but if your private keys are leaked you will lose your funds almost istantly, there is no need to wait you spend, as said before, public key and addresses derive from private key, so if you have this you don't need anything else

Yes but in the coldcard I'll generate my seed using dices, so I can be sure it's mine. I'll verify in a raspberry that the dices indeed generate that seed

how private keys cannot be your? if a wallet can generate an address it must have its private key... seems to me you have some misconceptions, can you provide any links to which threat you try to prevent?

I think the question assumes that firmware running in Hardware Wallet can actively try to display a different address than the one associated with the private key.

So if you have 2 wallets that generate different addresses for the same seed how do you know which is the correct one? there is no easy way to have consensus on which address is right if you don't trust your wallet and you can't read the code.

The reason because hardware wallet show address on its own display is exactly to avoid address tamper on an external software, but you need to trust at least your HW firmware and to do it, you are given the source code and its sign.

The difference is that it's 2 wallets generating the same multisig address. One I cannot trust to have generated a truly random private key, the one I can.

If you don't trust Trezor software why do you use it? use 2 Coldcard instead ... the rpi test is quite useless, if you can't trust the hardware wallet software you shouldn't trust the raspberry pi software also.
moreover there are more risk on using the wallet than on generating keys and addresses on it, as you can see here: https://thecharlatan.ch/List-Of-Hardware-Wallet-Hacks/
so you should address these risk as well, but multisig wallet are a good start :)


text:
Old wallet from old phone
I originally downloaded Bitcoin wallet app on an old phone that had broken, the incentive for downloading the app was one free Bitcoin. Is there any system files that I can find referencing the Bitcoin information from the app if I'm able to get back inside so I can transfer it?
Phone: Samsung Galaxy s2
App: Bitcoin wallet


text:
Why is the source code fee calculated higher than the current bitcoin fee amount?
In python bit (https://github.com/ofek/bit/), when sending a message, it is properly 80 bytes or less (https://developer.bitcoin.org/devguide/transactions.html) fee is If it is a 4-byte character string, it is about 0.03 $ / 140 = 21428 satoshi (https://mempool.space/ja/testnet), but it is often 80,000 or more.
Why is the source_code fee calculation result always higher than the actual testnet?
I thought about the cause as follows.
1: There is a possibility that the calculation method of source_code is wrong. (Target + min_change + estimated_fee is the calculation method of fee, but I don't understand why the limit(default 80) is multiplied in the next code part. )
output_size = [len(address_to_scriptpubkey(o[0])) + 9 for o in outputs]
    output_size.append(len(messages) * (MESSAGE_LIMIT + 9))
    output_size.append(len(address_to_scriptpubkey(leftover)) + 9)
    sum_outputs = sum(out[1] for out in outputs)
  (by transaction.py) ```

How can I send a transaction to testnet with the fee properly set below 80000?

OP_RETURN doesn't have any special fee rules. This looks like a result of the specific implementation in this library.
It looks like the library always pads out messages to 80 bytes. So when it does the fee calculation, it always uses the 80 byte maximum because that is how large the output will be when it is serialized.


text:
can Bitcoin transactions are included in multiple blocks?
Once the transactions published to blockchain and are included in blocks by miners. In that case there seems a high probability that a single transaction published can be included in multiple blocks created by different miners? is it true

Yes, theoretically, 2 blocks could be mined at (almost) the same time.
And then, it's also possible that one transaction could be included in those 2 blocks.
But then, there are 2 blockchains, but only one of them (the longest one) will finally be accepted by the network.
So your transaction could be in 2 blocks, but only one time in a blockchain.

I see.. one more follow up question, if same set of transactions in multiple blocks are being mined by 10 miners at a given time and two nodes published their solution to blockchain and as you mentioned only one solution will be attached to the chain based on which solution has more length ; but what about other 8 miners ? they still continue to mine it or just stop mining once the solution block is published ?

There effort will be wasted after block is mined by one minner and it has become part of blockchain.


text:
Can I save stuck bitcoins by creating a completely new transaction?
I tried to make a bitcoin payment but accidently set a too low transaction fee so it got stuck. By now the payment is cancelled so I don't want to do this transaction anymore.
Can I now instruct my bitcoin adress to send the bitcoins somewhere else (instead of the stuck transaction) by broadcasting a completely new transaction? I used Bitcoin Core for the initial transaction.
P.S. Nobodys waiting anymore for the initial paymant so I'm not trying to scam anyone here.

Welcome to Bitcoin.SE! Please see this question and possibly this answer for assistance.

You can't "unstick" a Bitcoin transaction. That transaction has already been sent to the new wallet, it's just not yet confirmed. Bitcoin transactions are inherently irreversible.
You can ask the owner of the receiving wallet to send the transaction onward to a wallet you own, and piggyback a new, additional fee on it to send it back to you. The sum of the two fees may attract a miner.
Although theoretically not allowed, you can attempt to "send the Bitcoins somewhere else," but that would effectively be a doublespend. You can try to doublespend the transaction with a higher fee back to a wallet that you own and hope some miner picks up the new, questionable transaction. The original spend would then be orphaned. See: Could any standard fee transaction be double spent by using a higher fee?

Of course you can do it as long as the previous transaction does not get confirmed.


text:
How to build escrow feature in my website like paxful.com
i am building an exchange bitcoin website,but i want to know how to make the website a 3rd party between buyer and a seller to be an escrow like paxful.com
any ideas about an API or a service that could be included in a website ?


text:
Difference in balance in my wallet and in btc explorer
I am coding a website to get BTC balance from explorer using the following url:
https://blockexplorer.com/api/addr/3CyZgGhkhE3z2WY8E5ztPMRYCDdg1hdD7g/balance

The problem is that the balance appeared using this url (explorer) is totally different from what in my wallet (nicehash).
Explorer balance for this address: 0.00946525 BTC

Wallet balance for this address: 0.01642334 BTC

What is the cause of this? and how to show the real balance in explorer exactly as in wallet?

The 3CyZ... address has a balance of 0.00946525 BTC, so it appears that your nicehash wallets includes some other addresses as well.
In general, a bitcoin wallet will include a collection of addresses: the more you use the wallet the more addresses it will generate. Best practices include only using each receiving address once (if you search 'address reuse' you'll find the reasoning behind this), so every time you send or receive a transaction the number of addresses you wallet controls will increase.
So to get an accurate account of your wallet balance, you'll need to sum the balance of all of the addresses the wallet controls, not just the 3CyZ.. address.

I know that Bitcoin wallet  is a hierarchical deterministic wallet,but i want to know how to get the exact balance(as in wallet that holds multiple addresses) from explorer for using one address only .

@MohamedAmin that is not possible, using one address will return the balance for that one address. A block explorer has no way of knowing which addresses are related by HD wallet derivation, as an HD-derived address is indistinguishable from any other address.


text:
Please help with Bitcoin Core. Password
All kind time of day. From the Internet I learned about Bitcoin. Decided to support this movement. Downloaded Bitcoin Core put 0.5 BTC to buy two S9. At the beginning of the habit to put password and when the time came to transfer the BTC realised that a password is forgotten. Attempts to recall were not successful. Waiting for the wise advice how to be and what to do to restore the wallet. Thanks in advance if you have understanding and support.

if you remember at least some characters of your password you could brute-force it.
watch this youtube video.

Спасибо за внимание к проблеме. Боюсь сам не осилю но пробовать буду. Мне интересно почему я со своего IP не могу зайти в настройки кошелька зайти за изменением пароля. Ведь он загружен на мой IP и изменять на нём тоже должно быть, иначе логика где? это же МОЙ кошелёк.

Sorry, i can't speak Russian and I'm afraid of google translation.

He afraid the Google translator so translate on Yandex, but he is naughty. And yet your opinion is important to me.

I myself am afraid of the Google translator so I translate it on Yandex, but he's naughty. And yet your opinion is important to me. Here is an experiment. google is better.

I am afraid, you can not recover your wallet without the password. That is the idea of the password: if someone steals your wallet, she can do nothing without the password.
So, try hard and do recall the password.


text:
Bitcoin deposit stuck 0 confirmations high confidence/low priority
hi i have a deposit stuck in the blockchain im not understanding why, its been stuck for 7 hours now without any confirmations, what is the explanation behind why the transaction is stuck?
https://live.blockcypher.com/btc/tx/e83922d98fc5f4a882e1ae04c3d1d56b1eee092a5e1caa2788f8a8fd5553460b/

Miners naturally select the  highest fee transactions to include in the blocks they create.  At 300 sat/byte, the fee you paid is too low for the transaction to be immediately included in a block.
See https://core.jochen-hoenicke.de/queue/#8h to visualize the current set of transactions waiting to clear.  As you can see, transactions at your fee level have not been reliably clearing since ~7h ago.

ok thanks is there a solution on how to fix this?

Seems it's gone through.  If it hadn't, you can speed it up by trying 'child pays for parent' (search for that).  Or easier is just to wait and the tx is dropped from the mempool after a few weeks.


text:
Why do altcoins vary so along with bitcoins?
Today bitcoin has dropped by 20%, so I looked for alternative cryptocoins with better performance. But, hey! Litecoin, Iota, Ripple, Ethereum, all of that has the roughly the same graph along time in USD, EUR or even BRL. See, for example (from https://www.coingecko.com/en):
Chart BTC/BRL:

Chart LTC/USD:

That does not make sense for me. "Oh, bitcoin is falling, I'll sell my litecoins" - I would buy altcoins.
Why altcoins (at least the ones listed above) are so related to bitcoin, instead of having independent variations?

The answer is that many altcoins are traded in BTC/ALTcoin pairs, not $$/ALT pairs.
So if an altcoin is trading 0.1 BTC/ALT, and the dollar price of bitcoin falls, then the $ price of the ALT will fall an equal amount.
Some altcoins trade against dollars as well, so their dollar price may be less coupled to the BTC dollar price. But for many of those alts, a large amount of the trading volume will still be from the BTC/ALT pair, and so the influence is still there.

I believe it all depends on consumer confidence. Bitcoin is the “Grand Daddy” of all crypto. It’s the original cryptocurrency and has the longest history. See this tweet by WhalePanda, a big player in the crypto world:  https://twitter.com/WhalePanda/status/953206219703050240?s=17. This asset class is highly speculative so when people lose confidence in Bitcoin for any reason (such as negative news from China cracking down on crypto) then people panic and sell, so in fact, I would argue, it makes perfect sense.  Confidence loss in Bitcoin affects all altcoins, as less established assets, for similar reasons. Cryptocurrency follows supply and demand economics so more people selling drives the price down. For those who have been in crypto for a long time, this is nothing new. Just look at the Bitcoin historical price chart. There has been several times of exponential price gains followed by significant drops.  This panic sell off will pass as well and could be a great time to buy. It’s just hard to tell how far the price will fall.  If you’re in Bitcoin you have to be able to stomach huge price swings.


text:
What key derivation function uses Electrum / how generates private key?
I know some brain wallets are using scrypt as the key derivation function and AFAIK scrypt is a good derivation function as it is deliberately slow and makes use of big amount of both CPU and Memory, difficulting brute force attacks.
But I couldn't find which derivation function is actually using Electrum wallet or how does it generate the private key.
Finally, how secure is to generate a wallet in Electrum style from 2048-word list compared to a brain wallet? Apparently to me, it looks like generating the key from a limited set of words would be less secure than doing it from a free-passphrase... how it really is?

Key derivation from seeds is standardised across wallets - Electrum specifically follows the BIP32 spec for key derivation.
Looking at the security aspect, a set of 12 words and 2048 words to choose from results in log2(2048^12) = 132 bits of entropy. If I've done my maths right, this is equivalent to a 22 character long completely random alphanumeric password.
A 256 bit bitcoin private key has 128 bits of entropy, so an electrum 12 word seed is about as secure - it is essentially impossible to crack through brute force.

Apparently to me, it looks like generating the key from a limited set of words would be less secure than doing it from a free-passphrase

I'm not sure of any wallets that use a passphrase to derive keys - usually a passphrase is used to encrypt a set of private keys, as opposed to deriving them from scratch. For example, in Bitcoin Core, the private keys are randomly generated and then the passphrase is simply used to encrypt the file storing them on disk.
The benefit of using a seed-based derivation approach (such as in Electrum) is that the seed is enough to restore all the associated private keys. Otherwise, every private key for every address would need to be backed up and kept secure.

I think these two are using scrypt (with salt) for key derivation: https://brainwallet.io/ and https://keybase.io/warp/
Anyway as you say an equivalnt of 22 length random password looks reasonable. It was curious to know if the slowliness and high memory requirements of scrypt was better or how BIP32 is it doing.

The key derivation standardisation is good for two reasons - firstly, support: you don't have to reply on some wallet provider still existing to access your coins, since every wallet uses the same thing. Also, BIP32 has been very rigorously checked and tested, knowing that it's been


text:
How does Proof of Stake prevents dishonest behaviour compared to PoW?
I know that in Proof of Work (PoW) once a node has found the solution (the nonce) they announce it to the network. Then the rest of the nodes can easily verify the correctness of the block hash and append it to the chain.
But in case the solution is not correctly verified, the block is finally not appended to the longest chain and therefore the dishonest block is discarded.
I know that in case of PoS, the dishonest node would lose the stake, but,
How does this procedure works in the case of Proof of Stake (PoS)?
I mean how is the validity of a block checked and how the bad node lose the stake?

First of all, proof of stake is not a single algorithm. There are many different implementations. For example, the algorithm that is used in Cardano is completely different from the one that is used in Peercoin, which is quite close but still different from e.g. Blackcoin algorithm, which has been derived from Peercoin. Qtum, for example uses Blackcoin algorithm. And again, all this is very different from what Ethereum plans to do.
So, your question cannot be answered in general. We can only talk about concrete implementations of proof of stake. The largest family of PoS coins is based on Peercoin, but many different modifications have been implemented.
So let's talk specifically about family derived from Peercoin. This includes coins like Qtum, Emercoin, Navcoin, Stratis, NovaCoin, Blackcoin, PIVX, Neblio, ABBC Coin, Particl, ...
As mentioned already, there are many different flavors of the algorithm among these coins. But in general, they work as follows.
They implement a special kind of transaction called coinstake (CS) transaction. This transaction is used to prove that the block was created correctly accordingly to the used PoS protocol. Just as with proof of work, in prove of stake there is the adjustable difficulty and the target that each block needs to satisfy. Just as in Bitcoin, the target is 256 bit number. The coinstake transaction's first input is called kernel. And usually the rule is something like this:
SHA256(SM || PT || KH || KN || T) <= WT

where

SM is StakeModifier - There are several flavours on how this is actually calculated. One example is that SM_n = SHA256(SM_(n-1) || KH), where n is block number (height);
PT is time of the block where the coin (UTXO) used as kernel in CS was created,
KH is prevout hash of the kernel,
KN is orevout N of the kernel,
T is block time,
WT is weighted target, calculated as WT = Target * (value of kernel UTXO).

So if you are PoS block producer, you have wallet with all your coins and what you do is that you periodically check whether one of your coins cannot satisfy the rule above. If you have such a coin, you are allowed to create a block. You can observe that is the time passes, T changes, so you get new and new hashes on the left side with every new coin, so eventually it happens that some coin on the network will pass the rule for the given target.
The longest chain concept is very similar to Bitcoin again. chain work is again sum of block difficulties, and the longest chain is the one with the most chain work. However, due to stake grinding attack, there are limits to the application of the longest chain rule. In some coins, so-called maximal reorganisation length is introduced, in others it is called dynamic checkpoints et cetera. This prevents a node to switch to a better chain if it would need to replace too many blocks from its currently best chain.
There are many other technical details and subtleties, but this is the basic concept. Note that in this family of PoS algorithms, you cannot lose the stake. I'm actually not aware of any finished implementation of PoS in which you could lose your stake. The idea here usually is that rather than taking the stake away from dishonest nodes, the protocol is attempted to be designed in a way that cheating is not possible. However, this attempt is very hard to meet perfectly because of certain properties such as nothing at stake.


text:
Unable to send bitcoin from bitcoin core wallet
Using bitcoin core wallet fully synchronized with the blockchain on ubuntu

I click on "send".  Nothing seems to happen.

You are sending to a bech32 address. The current release of Bitcoin Core does not support bech32 addresses. The address box highlighted in read indicates that the address is invalid to the wallet.

The next release of Bitcoin Core will support sending to bech32 addresse as well as full Segwit wallet support.


text:
Digital signature why it can't be used by other public key
Digital signature is made from private key of sender A.if only public key of B can use it then public key is available to everybody then why can anyone catch that digital signature and use it to his own public key ? Sorry for my bad english my native language is not english

in bitcoin the transaction is assembled by lots of data (verion,inputs,outputs,locktime). This transaction is hashed, and this hash is signed. So the signature only proofs, that you where signing this specific transaction hash. If you use it for another transaction, the output or the transaction id is different, which makes the hash different, hence when checking the signature, it would become invalid...

To spend bitcoin, you must know the private key of the address it sits in. The private key signs the transaction itself, so if someone else attempted to 'copy this signature onto a new transaction', it would not be a valid signature on that new transaction.
Importantly, there is a difference between a private key and a digital signature made by that private key. Knowing the digital signature does not allow you to figure out the private key.
A simplified example:

PrivKey A signs transaction B, which makes a digital signature B*. This transaction is broadcast to the network.
Someone takes digital signature B*, and adds it to transaction C (stealing the bitcoin).
The network can tell that transaction C has an invalid signature, and reject it. This happens because the signature was made for transaction B. If PrivKey A signed transaction C, it would make digital signature C*. So in order to steal the coins, the attacker must know PrivKey A, and use it to create digital signature C*; knowing B* will not help them do this.

For more info, read more about public-key cryptography.


text:
Transaction outputs with value 0
If I am correct, some transactions have outputs with "value" field equal to 0, and some even have all their output "value" fields equal to 0.
See for instance:
transaction 9173744691ac25f3cd94f35d4fc0e0a2b9d1ab17b4fe562acc07660552f95518
I wonder if this is a feature or a bug, and what it means to send 0. Any thoughts?

Outputs with 0 value are allowed by the protocol. It is a feature that allows for provably unspendable outputs to not have to have any value that then becomes burned. However 0 value outputs are not limited to just provably unspendable outputs, so transactions like the one that you have found are possible. It is also possible to spend those 0 value outputs, but this ends up just wasting money because there is a non-zero fee cost to spending them.


text:
Bitcoin core Recent Transactions seems Empty
I have setup bitcoin core 0.20.1.
Everything is set up correctly, I made a transaction on main net - but it is not showing under recent transactions. Though transaction is confirmed on blockchain.
Also when I am running command getblockinfo, block and header not matched.
Kindly give me a direction in to it.

Did you just start using Bitcoin Core? Has it finished the initial synchronization? Possibly related: https://bitcoin.stackexchange.com/q/2124/5406

Sounds like you are still syncing. Run command getblockcount to see what blockheight your node is at.


text:
SignatureHash description
SignatureHash takes in as input a scriptCode:
uint256 SignatureHash(
    const CScript& scriptCode,
    const CTransaction& txTo,
    unsigned int nIn,
    int nHashType,
    const CAmount& amount,
    SigVersion sigversion,
    const PrecomputedTransactionData* cache)

What is the scriptCode exactly?

In this particular case, the parameter script code refers to a public key script.
Usually, the function SignatureHash is invoked to either sign a transaction or to verify a signature. Thus it refers to a transaction input (this is either the transaction input for which we want to generate the signature that will then be placed in the signature script or the transaction input from which we have extracted the signature that we want to verify). This transaction input refers to an unspent (at the time of creating the transaction) transaction output, and this transaction output contains a script that should match the script in the input. It is this script that is passed as a parameter.
On my blog, I have a detailed post on the process of signing a bitcoin transaction which you might find helpful.


text:
Bitcoin full clients checks all the blockchain every time they receive bloom filter?
I assume that an spv client like bitcoinJ requested transactions related to the client one week before and the client has been offline for a week. When the spv client come online, does it just request new transactions which has been created while it was offline?
Also, does a full client which receives a bloom filter from the spv client check only the new transactions, or all the blockchain from the genesis block?

They will not do so automatically. When a peer sets a bloom filter, the node will not do any additional work except note that there is a bloom filter set for a given peer and begin matching things against the filter. It will not go back in history to match historical data against the filter and then relaying everything that matches. Doing so would be computationally expensive and a way to effectively DoS a node.
Instead of giving a node the historical data, the peer that set the filter must ask for it. They do so by sending getdata messages for historical blocks and the full node will pull up those blocks, match them against the filter, and then send a merkleblock message. This way it's easier to avoid being DoS'd and the receiving peer can specify where the full node should start and stop so that it can get the data it wants as quickly as possible.


text:
Sign PSBT for 2 of 3 multisig
Creating an unsigned PSBT:

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "walletcreatefundedpsbt",
    "params": [
        [
            {
                "txid": "8b7e8c1898d473fe0229d1adf58aca6299df781e0ff77622a6d6f73273322942",
                "vout": 1
            }
        ],
        [
            {
                "tb1qv49u5nkg3y3nma4jmhp8ppl5mj4vyyattlhfyh": 0.005
            }
        ],
        0,
        {
            "includeWatching": true,
            "changeAddress": "tb1q3lkrtkwnt0txka5te0gt02vuk47trssaaxvhml",
            "feeRate": 0.0001
        },
        true
    ]
}

Result:

{
    "result": {
        "psbt": "cHNidP8BAHECAAAAAUIpMnMy99amInb3Dx5435liyor1rdEpAv5z1JgYjH6LAQAAAAD/////AjaaBwAAAAAAFgAUj+w12dNb1mt2i8vQt6mctXyxwh0goQcAAAAAABYAFGVLyk7IiSM99rLdwnCH9NyqwhOrAAAAAAABAP0hAQIAAAAFLYKKRQsSgx1v3UqETLYL4JCJWenWEn1pB7w/Tz96TdMAAAAAAP3///8tgopFCxKDHW/dSoRMtgvgkIlZ6dYSfWkHvD9PP3pN0wIAAAAA/f///1v4E5Wd/iNzkoNsZsQFQPAj2iRHlmxxmnjaPdEa7TEtAQAAAAD9////LYKKRQsSgx1v3UqETLYL4JCJWenWEn1pB7w/Tz96TdMBAAAAAP3///8pCFtwy3cF4hAMEihbDo3FVncbOKOTqx/LaoVTo1y9hwEAAAAA/f///wLOgi4AAAAAABYAFAv2sYJ4ALY+wb56YP2cI99/Y5biQEIPAAAAAAAiACBdKDYRhxYlihF1dZCM7Kobi25NNKylHThp1cWjEjTxDnsVHQABAStAQg8AAAAAACIAIF0oNhGHFiWKEXV1kIzsqhuLbk00rKUdOGnVxaMSNPEOAQVpUiEDe68lJzJ5hEVUKScCjod3qtntXQ9gMg4qa6g2LDMwhVQhAlKXOTSX1IxzZ37WAglDONf6o41uMvUm2k/Oniqutlu6IQNs3xVmKT6xvTJLTc4jB+JwmQmnPSZFCX6JMkA+neL4Q1OuIgYCUpc5NJfUjHNnftYCCUM41/qjjW4y9SbaT86eKq62W7oEN8HtHCIGA2zfFWYpPrG9MktNziMH4nCZCac9JkUJfokyQD6d4vhDBCnQwHAiBgN7ryUnMnmERVQpJwKOh3eq2e1dD2AyDiprqDYsMzCFVARbIBXQACICAuNOa3WDX2adJy31UOYgFUi2M79B12ijzcvzjVTG0mbsEJGMV+YAAACAAAAAgAcAAIAAAA==",
        "fee": 0.00001770,
        "changepos": 0
    },
    "error": null,
    "id": "curltest"
}

The UTXO that I am trying to spend is 2 of 3 multisig address: tb1qt55rvyv8zcjc5yt4wkggem92rw9kunf54jj36wrf6hz6xy357y8qgpk8xa
I created multisig with this request:

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "createmultisig",
    "params": [
        2,
        [
            "037baf252732798445542927028e8777aad9ed5d0f60320e2a6ba8362c33308554",
            "025297393497d48c73677ed602094338d7faa38d6e32f526da4fce9e2aaeb65bba",
            "036cdf1566293eb1bd324b4dce2307e2709909a73d2645097e8932403e9de2f843"
        ]
    ]
}

Address was added to wallet using this request:

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "importmulti",
    "params": [
        [
            {
                "desc": "sh(multi(2,037baf252732798445542927028e8777aad9ed5d0f60320e2a6ba8362c33308554,025297393497d48c73677ed602094338d7faa38d6e32f526da4fce9e2aaeb65bba,036cdf1566293eb1bd324b4dce2307e2709909a73d2645097e8932403e9de2f843))#t9xkhn5c",
                "timestamp": "now",
                "label": "gg1936",
                "watchonly": true
            }
        ]
    ]
}

Now I want to use the unsigned PSBT and sign it. Which RPC call should be used for it and what should I mention in arguments?

The command you want to use is walletprocesspsbt. The only argument you need is the PSBT itself.

How will you do it if the 3 public keys are in different wallets? Will the same command be used 2 times in 2 different wallets?

Yes. For each wallet, you use the same RPC. Just each time use the PSBT given by the previous wallet.

@percy-g2 did it work for you?


text:
Is it possible to broadcast psbt in bitcoin core?
Is it possible to broadcast psbt in bitcoin core without converting to raw transaction?

No, it is not possible without using finalizepsbt first to get the raw transaction. This is intentional as PSBTs will primarily be incomplete and thus cannot be broadcast.