Are lightweight LN wallets vulnerable to transaction withholding?

There is no substitute in terms of security and trust for running a full node.

There are different "lightweight client" concepts. Some of them are...

BIP37 (bloom filter):

[minus] With current used false-positive rates, peers may learn all wallet addresses
[minus] Usually done over an unencrypted channel (p2p 8333), ISPs, etc. learn also all your addresses
[plus] client can validate if the transaction(s) were in a block (merkleblock)
[plus] clients keep a blockchain with headers only can at least check PoW
[plus] uses only little bandwidth
[minus] Hiding back transactions are possible
[plus]"Impossible" to fake a transaction

Neutrino (Compact Block Filters BIP158):

[plus] fewer privacy implications then BIP37 since filtering happens locally
[minus] needs more resources (basic filters from the genesis block up to block 560000 require ~3.5GB space/bandwidth)
[minus] more bandwidth consumption because full blocks must be downloaded (rather then Merkle-"blocks" in BIP37)
[minus] Hiding back transactions are still possible (though more complicated) because the block filters are not committed to the blocks (would require a soft-fork). Not committed means, peers can fake filters and make you miss relevant transactions (can be [partially] mitigated by comparing filters from different peers)
[minus] No solution for mempool filtering (can't show "incoming transactions" reliable)
[plus] "Impossible" to fake a transaction

Centralized Validation (Bitpay, Samourai, etc.)

[minus] Full trust in the company/server (they know all your addresses)
[minus] Can hide back transactions
[minus] Can artificially create transactions
[plus] Minimal bandwidth consumption

Some application mix different approaches (like Electrum does Merkle-tree checks and keeps a headers-only-chain to mitigate the "can artificially create transactions" problem).

Conclusion

If you want to watch the blockchain without trusted third parties, you must run a full node (could be pruned though <10GB space requirement, but lightning implementations are not fully compatible yet).

If (and only if) BIP158 block filters get committed (though a soft fork, hash in blocks coinbase of similar), hiding transactions through peers, providing filters, would no longer be possible.

Recommended practical approach

Buy a tiny computer (Raspberry, Odroid, Pine64)
Buy a >500GB SSD (USB3 SSD, ~100USD in 2019)

NO,.. don't use your old HDD (your sync time will be 20 times slower).

Install Bitcoin Core (there are pre-build ARM64 binaries)
Run with a large -dbcache (if you have 2GB+ RAM)
Sync the chain
zzzZZZ (takes maybe a week)
enjoy being a real Bitcoiner (by avoiding all trusted third parties)


What does a comparison of Bitcoin Days Destroyed say about Bitcoin vs Namecoin vs SolidCoin?

While Bitcoin DD% is lower it is a lower % on a larger base.  Converted to a standard unit say USD Bitcoin transactions are a magnitude higher than other coins.  The lower DD% doesn't tell us anything about the nominal amount of transactions but rather the relative days destroyed between currencies.

The lower DD% simply means that less of the older coins are moving in the bitcoin economy than other economies.  Other economies are much newer thus they don't have very old coins which due to their extreme age can skew the stat donward.    If the oldest SolidCoin miners simply mine and hold they at most can prevent a 14 days from being destroyed.  For early bitcoin miners holding onto a single coin can prevent hundreds of days from being destroyed.

As for reason why older coins may not have the same velocity as newer coins.  Some of that may be loss.  For a long time bitcoin was worth less than a cent.  Someone with 10,000 coins (a huge sum tody) may not have taken very many precautions against it and lost coins in data losses or system formats.

Some early miners may have done it simply for academic reasons rather than any investment and when they stopped they deleted (intentionally or accidentally) their wallets.

In the early years of bitcoin there wasn't much value or reason to quickly sell coins.  Now the miner may no longer even be mining and just holding the coins as a speculative investment.  Newer chains usually have an exchange open from day one.  Checking the alternative cryptography forums and exchange chats will indicate a large number of miners aren't mining alt coins for long term appreciation (which would result in low DD%) but instead are quickly selling on exchanges for other currencies including fiat.


Is it possible to handle BCH transactions on Bitcoin Core wallet?

If your BTC addresses aren't SegWit addresses, you can use dumpprivkey to extract your private keys and use them in a BCH wallet. You can import them to Electron Cash, which is a wallet software, or Bitcoin Unlimited/Bitcoin ABC, which are equivalents of Bitcoin Core. I'd advise against using BU/ABC and Core on the same machine, because both of them use the incoming port 8333. Besides, you might need to set datadir option otherwise they'd corrupt Core's blockchain and wallet databases.


How long would it take for all the Bitcoin Key pairs to be calculated?

No, you shouldn't worry about it.

3Blue1Brown has made a great video explaining how large 256 bit is, check it out


Bitcoin Miner Profit using 600 GH/s Monarch from Butterflylabs

The part you are missing is that it is a preorder and the current estimate is that if you ordered now, you would likely not receive your mining hardware until April 2014.

This site shows a good calculator and I have configured it to show the (lack of) profits you would make if you started mining with this miner starting in April:

http://mining.thegenesisblock.com/a/7141b8c779


As stated by the configuration page, you set

network: testnet

In your bcoin.conf file.


How does the Smart Contracts work in a blockchain

when it comes to bitcoin world, smart contracts are usually some kind of escrow service. A good reference is in the book from Andreas: "Mastering Bitcoin". Both editions can be found in the net. The second edition has chapter "7. Advanced Transactions and Scripting". It explains the use of multisig, escrow, timelocks and more.

When you say integration in blockchain technology, then in this case it is bitcoin and its scripting. One of the several use case examples from the book is this:

  ... The participants in the multisig scheme are Mohammed, his two
  partners Saeed and Zaira, and their company lawyer Abdul. The three
  partners make decisions based on a majority rule, so two of the three
  must agree. However, in the case of a problem with their keys, they
  want their lawyer to be able to recover the funds with one of the
  three partner signatures. Finally, if all partners are unavailable or
  incapacitated for a while, they want the lawyer to be able to manage
  the account directly.

I would also like to mention, that the logic behind these scripts is the secret to the lightning network.
Have a good reading :-)


Create unsigned tx (PSBT) in a watch-only wallet using bitcoin core, sign it in electrum and broadcast using bitcoin core

Run the below commands in electrum console:

>> getaddresshistory('tb1qu2l4n8st9w3hhsxstd8muaxgnu63fql9rkylmd')
[
    {
        "height": 1807710,
        "tx_hash": "727707cced87f9bc2a1ca3ed28df39588e9881fd50c272e78bc76a5bb1ffde9c"
    }
]
>> deserialize(gettransaction('727707cced87f9bc2a1ca3ed28df39588e9881fd50c272e78bc76a5bb1ffde9c'))
{
    "inputs": [
        {
            "coinbase": false,
            "nsequence": 4294967295,
            "prevout_hash": "99ebe2d047c545a50cf86f0ff5f4c0648437cb8724137f1a33c2f06eb06ef35a",
            "prevout_n": 1,
            "scriptSig": "",
            "witness": "0247304402206379d344d75fbee07f54213378f95e44dc757872d59a35efbc14ec7e1ca7dfd102207a47f9c1be39cafa8f9ac8a879e2b968e2359bead23a1f6598478ed7d141c73d012103ee169045615c663c0204472f86e3c2b2ae43e574146d30607c42fe6d670ac7be"
        }
    ],
    "locktime": 0,
    "outputs": [
        {
            "address": "tb1qu2l4n8st9w3hhsxstd8muaxgnu63fql9rkylmd",
            "scriptpubkey": "0014e2bf599e0b2ba37bc0d05b4fbe74c89f351483e5",
            "value_sats": 3000000
        },
        {
            "address": "tb1q7sx47sra5w7kw8we5xeusl4089ryverhjcft6q",
            "scriptpubkey": "0014f40d5f407da3bd671dd9a1b3c87eaf3946466477",
            "value_sats": 61797954
        }
    ],
    "version": 2
}

You get the scriptPubKey in above output which can be used in importmulti command in bitcoin core:
"address": "tb1qu2l4n8st9w3hhsxstd8muaxgnu63fql9rkylmd",
"scriptpubkey": "0014e2bf599e0b2ba37bc0d05b4fbe74c89f351483e5"
Get the public key of the address from details:

If you are using bitcoin core wallet instead of electrum in this example, you can run the getaddressinfo command in console to get scriptPubKey and pubkey of the address.
Run the below command in bitcoin core console to import the address with the details copied from electrum:
importmulti '[{"scriptPubKey" : "0014e2bf599e0b2ba37bc0d05b4fbe74c89f351483e5","pubkeys" : ["0304c5184085eea27a072628de03fbb953f5fdd99fb526f097fdd4c6968d165f1a"],"timestamp" : "now","label" : "watch-address-test", "watchonly": true}
You can ignore the steps mentioned above for scriptPubKey and only use the "Public Key" of an address by using descriptor:
We need checksum in importmulti which is returned in descriptorinfo for the public key mentioned

Next, we can run importmulti command (I have used public key for a different address in this command):

importmulti '[{"desc" : "wpkh(026641b79d7ffa40ddf994f0277c2649f3ddcbd871194ba6ef87687daea22ca503)#zl4yt8hu","timestamp" : "now","label" : "watch-address-test", "watchonly": true}]'

rescanblockchain 1800000 1835099
I can see available inputs in GUI:

We still get an error if trying to create an unsigned tx which involves sending some amount to change address because we aren't trying to spend the whole balance.

Add a change address for creating unsigned tx:

Option to copy PSBT:

Load transaction using the copied text in electrum:

Copy the hex of signed tx and run the below command in bitcoin core:

sendrawtransaction 020000000001019cdeffb15b6ac78be772c250fd81988e5839df28eda31c2abcf987edcc0777720000000000fdffffff02b3410f0000000000160014112c8ecb9e0876a645e7b8e89eed83bd61096e2c80841e00000000001600145f24e8fbfe65840c27dad3b053855de4cee843820247304402200d7cc29a8588c180e6a460e0eb88ea830db76dbb040a875d45fe8c64c9509a80022060879365af1c6d19e7c47bdbfa402a053ed42809c52db6816cd249dff46529b001210304c5184085eea27a072628de03fbb953f5fdd99fb526f097fdd4c6968d165f1a5f001c00

It returns the transaction id: 4890c14e7635a3e72320046645686052339e443eba56e5a62849a48b3f67f419
You can check the details in a block explorer: https://blockstream.info/testnet/tx/4890c14e7635a3e72320046645686052339e443eba56e5a62849a48b3f67f419
Related questions:
How to create unsigned tx in a watch-only wallet?
How to move/sweep your Bitcoin Core bitcoins safely and air-gapped to your new fancy cold storage?
Related issues:
https://github.com/bitcoin-core/gui/issues/94


What is the ecological impact of the crypto endgame

Proof of work allows the history of transactions on the network to be considered secure (ie, immutable).
When measuring the security of any thing, what we are ultimately asking is how much energy will it take to defeat the security system? The more value being stored, the more security we will desire.
The bitcoin network consumes energy in a very quantifiable way, at least compared to the traditional financial networks. As a miner, a large portion of your overall costs would be electricity, and this electricity is converted into security with increasing efficiency (each generation of ASIC chip has been more energy-efficient than the last, in terms of hashes/kilowatt hour). So it is easy to at least roughly quantify how much energy the bitcoin network is consuming.
On the other hand, it isn't really easy to quantify how much energy is used to uphold the traditional financial system. What do we even include in that calculation? How much digital infrastructure is required to support that system, and what does that infrastructure cost to run and maintain? How many humans are diverting their skills and attention to building and maintaining that system? Should we include the energy expenditure of things like the US military, when considering the ongoing security of the US dollar system? There is no clear answer here.
But this helps to reframe the question: given that a large portion of the security cost to maintain the bitcoin network is very directly and efficiently used to create security (ie, it is used to compute SHA256 hashes), we might start to wonder which system is actually more efficient than the other. The relative ease of quantifying bitcoin's security costs make it look terrifyingly inefficient at first glance.. but is it really? How can we make such a proclamation, without having a good idea of what we're comparing it to?
Consider: If we have some finite amount of energy to use, would it be more efficient to use it to hash some data for security, or use it to nurture a human being, who can then spend their life working to maintain the traditional financial system? How much of that input energy is actually going to create security in each case? With proof-of-work, it is a very quantifiable, large portion of the net energy, but with a human, there is going to be a lot of inefficiency and loss! It seems to me that using that energy directly for computation is going to be more efficient - despite the obvious issues that we'll encounter when trying to exactly quantify this relationship.
At this point it is probably also worth mentioning that the cost of this security is ultimately measured in the opportunity cost of that energy. Given the above question of 'energy spent on computation vs nurturing a human', we need to consider the opportunity cost of not having this human work on other projects that could benefit society (and likewise, the opportunity cost of using the energy for something other than proof-of-work mining).
If this idea of 'quantifying the energy cost of a human' seems strange or contentious to you, realize that only furthers the point about the how hard it is to quantify the energy costs of the traditional financial system. Where do we draw the line on what costs are included? The answer to that is certainly not clear, and the validity of the entire question really does depend on it.

A few other related remarks:

Bitcoin allows for permission-less financial innovation, so we should expect to see more and more novel financial constructions created upon it in the future. Being a digital asset, friction for economic activity using it is supremely low (it is as simple as communicating data to your counterparty over the lightning network, for example), and so we can likely expect to see entirely new economies arise, as users are capable of transacting value in ways they never were before. This would allow users to better capitalize the things which they already value-- which is to say it will 'unlock' value, growing what we might call the 'GDP' of humankind. With the potential to unlock value in this way, it is interesting to revisit OPs question, as that value would not otherwise be realized. To put it differently: what is the opportunity cost of not seeing bitcoin enable this expansion of economy?

Over time, humanity as a whole has consumed more and more energy, and there is no reason to believe this trend will reverse. There are of course better and worse ways to consume this energy, but it seems strange to just regard all increases in energy use as 'bad'. It seems very unlikely that humanity will stop this trend of increasing energy-consumption.

A lot of content you'll find from the 'pro-bitcoin' side of this question likes to highlight how much renewable energy bitcoin is using. I think this kind of misses the point, its great to not use energy that incurs negative externalities (ie global warming, etc), but more importantly we should consider the opportunity cost of using said energy in whatever way.

This thread by @nothingmuch on the topic of mining effeciency is really interesting! To quote from it:

the payoff from consuming finality is positive sum in this regime (higher velocity of money => more subjective value created) and the cost of a 51% attack increases even if the energy consumed decreases. since mining is zero sum and is in competition with all other uses of energy, that implies that as demand increases because of a need for higher efficiency, the relative fraction of energy expended on PoW can decrease without necessarily compromising finality.

tl;dr because money has positive utility even though it has no intrinsic value, if finality of transactions with that money needs PoW then the more useful that money is, the smaller the relative share of energy must be expended on PoW for a fixed level of finality assurance.

As reply to a few of your points:

An answer should probably be based on a guess what the proof-of-work/proof-of-stake/proof-of-solvency/etc. ratio will likely be in the future. How much would a change of this ratio affect the ecological impact of cryptocurrency?

I don't believe that proof-of-stake/etc offers the same security guarantees that proof-of-work does, and thus it cannot be used to secure systems in an equivalent manner. Without these security guarantees, we cannot realize the same benefits that we can with bitcoin (proof of work), and so in my opinion it becomes an uninteresting question to compare the two. There is a lot written about the deficiencies of proof-of-stake, this article is perhaps a good starting point.

This answer has become quite long, so I'll include a TL;DR:
Bitcoin mining consumes energy to create security in a very quantifiable manner, but the legacy system is hard to quantify in the same way. Considering the efficiency of computation, we may actually conclude that the bitcoin network is a more efficient system of attaining transaction finality, but I have not provided a rigorous proof of this by any means.
So what is the 'ecological endgame'? I think it is that the bitcoin network continues to use a large amount of energy to secure the history of the network, and it enables a huge amount of new economy in doing so, thus justifying the opportunity costs of the energy expenditure.


When does Blockchain.info show 127.0.0.1 as "first relayed by" for a transaction?

Yes, It means blockchain.info broadcast the transaction itself. So it was either created using My Wallet, the merchant API or submitted through /pushtx. A live list can be seen here http://blockchain.info/ip-address/127.0.0.1

Mixer transactions are broadcast through separate nodes.


Bitcoin core v0.19.0.1 automatically prunes?

No, the default behavior of bitcoin core v0.19.0.1 is still the non pruning mod.

You should check your bitcoin.conf file depending on your operating system there is a line about pruning which should be something likeprune=550 in your case, just put a # to deactivate it again like #prune=550.


You can start it from the command-line using:

open Bitcoin-Qt.app --args -server

I think the --args option to open is OSX 10.6 and later; if you are running an older OSX put server=1 in your ~/Library/Application Support/Bitcoin/bitcoin.conf file. In fact, to use the -server command you must set a -rpcuser/-rpcpassword, so I'd suggest creating a bitcoin.conf that contains:

server=1
rpcuser=yourname
rpcpassword=...something else

We don't ship a bitcoind for the Mac, but you can use curl (for example) to send commands to the running Bitcoin-Qt:

curl --user yourname --data-binary '{"id":"t0", "method": "getinfo", "params": [] }' http://127.0.0.1:8332/

The bitcoin source tree also contains python code that uses the free 'jsonrpc' library to communicate with a running Bitcoin-Qt (see contrib/bitrpc/).


Is it possible to make an output only spendable to a specific address?

As far as I know, the answer is no.

What you are suggesting would imply that an UTXO could affect the conditions in which the output of a transaction spending it would be built, but it can only affect how the input is built.

UTXOs can define how they should be spent, but no how the resulting UTXO spending it will be created.


How to setup https ssl letsencrypt for NXT / Ardor public nodes?

As stated here: https://nxtforum.org/public-nodes-vpss/method-to-configure-https-for-nxt-public-nodes/

Requirements

1) A Linux server running Nxt, and configured for public API access. This should only require creating a nxt.properties under nxt/conf similar to this:

nxt.apiServerCORS=true
nxt.uiServerCORS=true
nxt.myAddress=SERVER_IP_ADDRESS
nxt.allowedBotHosts=*
nxt.allowedUserHosts=127.0.0.1; localhost; SERVER_IP_ADDRESS; 0:0:0:0:0:0:0:1;
nxt.enableAPIserver=true
nxt.apiServerHost=0.0.0.0

2) A subdomain (or domain) to access your node. This is required to use an SSL certificate. The subdomain should be included in the domain nameservers configuration as an A record pointing to your server IP.

Procedure

In this example, setup was done using root account. If you're using a non-root account, it needs to be in the sudo group and commands need to be run using sudo.

1) *Turn off Apache if you have it installed already first* Install letsencrypt (certbot) and generate the SSL certificate for your (sub)domain.

wget https://dl.eff.org/certbot-auto
chmod a+x ./certbot-auto
./certbot-auto certonly --standalone --email admin@example.com -d sub.example.com

2) Install apache webserver if you dont have it already and enable the modules for ssl and reverse proxy. If you have it installed, just enable proxy_http

apt-get install apache2
a2enmod ssl proxy_http

3) Configure the default apache configuration file.

nano /etc/apache2/sites-available/000-default.conf

Replace the default configuration lines with the following, replacing the strings in red with your (sub)domain. Just comment out the existing one and copy the entire thing below and adjust to your site/directories:

<VirtualHost *:80>
        ServerName sub.example.com
        Redirect permanent / https://sub.example.com/
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName sub.example.com
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/sub.example.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/sub.example.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/sub.example.com/chain.pem
        SSLProxyEngine On
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass / http://localhost:7876/
        ProxyPassReverse / http://localhost:7876/
</VirtualHost>
</IfModule>

4) Finally, restart the apache webserver.

service apache2 restart

If you run into 404 errors during install, you'll have to remove those packages like this: https://askubuntu.com/questions/896603/trying-to-install-letsencrypt-on-ubuntu-12-04-using-certbot-auto-program-but-ge/896614#896614

Remember to change your port if your going to use testnet 6876 or mainnet 7876.

Also be sure to open up your ports 7874 for peer connetions.

Ardor ports are testnet 26876 and live 27876

The above also works when making a public Ardor node.

Below is the output after a successful certbot-auto download:

MAKE SURE YOU TURN OFF APACHE BEFORE YOU DO THIS

root@localh:~# ./certbot-auto certonly --standalone --email info@xxxx.com -d ardor.xxxxx.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for ardor.xxxx.com
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/ardor.xxxx.com/fullchain.pem. Your
   cert will expire on 2017-09-20. To obtain a new or tweaked version
   of this certificate in the future, simply run certbot-auto again.
   To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le


I have free energy; good idea to mine BTC/LTC?

Mining on both Bitcoin and Litecoin is now dominated by ASICs. Even with Litecoin, you'd only mine at best about US$0.45 worth in a year.

You should have better luck if you can find a cryptocoin based on something besides SHA-256 or scrypt, for which there is no GPU or ASIC mining, such as Riecoin or Darkcoin. http://cpucoinlist.com/ lists some more CPU-friendly coins.


How can SPV nodes trust received Open Assets?

You can't trust pure SPV for any Bitcoin 2.0 protocols, because of the 'metadata faking' issue that you outline. You have a few options:

Accept you need to run a full node to backtrack through transactions. (Though note that this will not scale well anyway for popular assets.)
Use a blockchain that has native support for assets, like Sidechain Elements or MultiChain.
Use some kind of external service to track assets, like the CoinPrism API for Open Assets or CoinSpark's federated asset tracking model.


Law / country specifics to start Ripple Gateway

According to Ripple the url https://ripple.com/wiki/Gateway_Integration_Manual for the Gateway Integration Manual is "DEPRECATED". Ripple says "This page has been replaced with the new Gateway Guide on ripple.com. Please refer to that document instead."

Here is their newer doc: https://ripple.com/build/gateway-guide/

Ripple does not prohibit those who are not "banks, funds or other financial institutes" from building a gateway. Just the opposite. It is in Ripples' best interest if widespread (Ripple compliant) adoption is made. In their example Ripple uses "a fictional online currency exchange named “ACME” and its users as examples, to show how ACME can expand its business to include being a Ripple gateway".

Businesses that link the Ripple network to the rest of the world such as "online financial services, such as payment systems and digital currency exchange" are businesses which could build a ripple gateway.

Looking at the list of Ripple Popular Gateways shows some of the types of businesses which could become gateways:

https://ripple.com/knowledge_center/gateway-information/

These include Panama Bitcoins (http://ptycoin.com/ripple), SnapSwap (https://snapswap.us/ and https://snapswap.eu/), and LakeBTC (https://www.lakebtc.com/) amongst many others.

To answer your query about "AML policies and require KYC information" the specific compliance regimes for this depend on the jurisdiction your ripple gateway lies within, and where your customers reside. For example if your theoretical Ripple Gateway was physically located within the USA then American AML KYC legislation would apply to your business. The same would apply if your gateway was outside of the US, but traded with US citizens residing in the USA. Other jurisdictions will have other legislation. Many crypto businesses have implemented their own brand of AML KYC specific to their own jurisdictional requirements.

There are more countries which do not have definitive crypto legislation than countries which do, so the applicability of traditional legislation itself is even in question for example the lack of a definition of what bitcoin is in each country can create a situation in which it is not clear whether or not legislation including AML or KYC applies to cryptocurrency, or even more undefined internationally, Ripples' legal financial exposure in transferring value globally in affected countries. This will be different in each country.

To answer your question "what is the minimum starters level of capital need to make own gateway?" the level of capital required would depend on the nature of the market you intended to serve. Different markets would require varying levels of financial commitment, the depth of the trust line you wanted to maintain would affect this, and the scope and geolocation of your organizational and technology infrastructure would also come into play.

Overall, it is highly beneficial to understand the law in each jurisdiction your Ripple Gateway will do business in. The opposite is also true.


Debugging OP_EQUALVERIFY: non-equal data: how to get uncompressed public key and address from scriptSig

This answer provides a good description of a task similar to what you are trying to accomplish.

This wiki page shows how scripts are serialized and deserialized. It's actually not very hard to extract the raw opcodes from the script by hand, especially if you know it's a standard type of script.

But, you may use https://chainquery.com/bitcoin-api/decodescript and paste in the raw hex of the scriptSig for a more automated solution. The parsed opcodes will be in the result.asm field, including any raw data (such as signatures and pubkeys) separated by spaces. If you look for the element(s) of the script that start with 02/03/04, that will be the public key.


The issue is this output:

  {
     "script_string":"OP_DUP OP_HASH160 98ac2448db3e1a08cce87052513280cb20bafbf5 OP_EQUALVERIFY OP_CHECKSIG",
     "address":"1EvFvmzhiFWhaRfvvZupxxQvTMHJ79GGdb",
     "value":1,
     "script":"76a91498ac2448db3e1a08cce87052513280cb20bafbf588ac"
  },

See the "value":1? That means that the output is worth 1 satoshi. It's worthless, because it would cost more to spend this than it's worth. See this answer for more.

To solve this, remove that output.


[...] how to found a company and deal with tax issues and other related human resources issues like payroll.

I don't think such sources are currently available for one simple reason: up to now the bitcoin space is mainly unregulated (including the issue of payroll).

The debate of bitcoin in the legal system is just in the beginning. It's not even that clear (worldwide) whether bitcoin is legally consider money or not. On 2014, Andreas Antonopoulos spoke in front of the Banking, Trade and Commerce committee of the Senate of Canada to address such issues of regulations. I strongly recommend you to watch the full 2hr video.

  Guides/books on how to start a Bitcoin-accepting online business?

Supposing that you are already familiar with the basics of Bitcoin, I guess the next step would be deciding how you are gonna accept Bitcoin payments. There are several ways to accept Bitcoin for small businesses. Probably, the most popular ones are Coinbase and BitPay.

If you are still looking for ideas for businesses with bitcoin, an interesting place to start is the Million Killer Apps series of James D'Angelo (Part 1 and Part 2). You might also find useful to subscribe his channel.


I have the phrase words but I donot know which words shall i insert to get my wallet back , what shall I do?

You insert all of them in the order you wrote them down - assuming that is the same as the order they were shown to you by the wallet when you wrote them down.
See https://community.trustwallet.com/t/how-to-restore-a-multi-coin-wallet/43

Step 1 - Launch Trust Wallet
Open Trust Wallet and then tap on Settings.
Step 2 - Access Wallets
In the Settings screen, you will find here Wallets. Tap on it to display the wallets that you currently have. Tap on the “+” sign on the upper right to access the Import Screen.
Step 3 - Access Wallet Import Screen
Since we are trying to restore a wallet, select I already have a wallet. Then, tap on Multi-Coin Wallet.

If you don't want a multi-coin wallet it appears you can just select Bitcoin.

Step 4 - Input the Recovery Phrase
Almost done. Carefully type the recovery phrase, put in the name of the wallet. Tap on Import.


Node - This is a node.js implementation of a full node, it is different from the original, Bitcoin Core, which is written in C++. A full node downloads every block and transaction and check them against Bitcoin's consensus rules. The Bitcoin network is made up primarily of nodes and miners, which don't all have to run the same exact software, provided they follow the same consensus rules (such as determine which transactions and blocks are valid).
Insight API - This is a blockchain browser/explorer, which is an application that reads the data from the blocks and prepares it in a searchable database. Usually one of the main features is that you can query any block or transaction by id. You can also query any address, and it will return a balance and transaction history for that address. These features are not very user friendly with most node implementations.
Insight UI - This is just the front end for the block explorer.
Wallet Service - This is an application that exposes an API for wallet operations such as creating and receiving Bitcoin. This will submit transactions to a full node (which could be a Bitcore node).
Wallet Client - A client for the wallet service that consumes the API.


getrawtransaction does not return the time, because it only gives you the raw transaction itself, which does not include a timestamp.

However, you can use the getmempoolentry RPC to get mempool metadata about a transaction, which includes the time at which time it entered the mempool.


Upper bound on transaction confirmation time

So, the question: with current Script language, is it possible to create a transaction that becomes invalid if not included in a block before a certain time (or before a certain block height)?

No, by design this is not possible.

The problem is that such a output would be very hard to assess the value of, when the timeout is close to being reached. Is the transaction going to be included, or become invalid? Even after it's confirmed, there are chances of it being reorganized out, and becoming invalid.

So by design no script features exist which depend on the context. A transaction is valid, or invalid. To deal with timing transactions can specify an nLockTime field which specifies the earliest possible time or height the transaction can be included in the chain at. The script language can introspect the nLockTime value, but not the actual time.


Should a casino manage its own Bitcoin wallet?

Integrating your casino with a 3rd party payments processor translates to much easier bootstrapping for your casino but also higher operating costs. Higher operating costs in turn means that your are by definition less competitive, as you will not be able to provide your users with a smaller over-round and also you won't be able to control the deposit and withdrawal costs.

Another thing to consider is security; having a 3rd part service deal with your money means that if they fail, you fail; if they vanish, your money vanishes with them.


What is the meaning of 'change' and 'reserve' in a Bitcoin Core wallet dump?

what is exactly the meaning of reserve and change? My guess is that reserve are normal reception addresses and change are, well, change, but I'm still wondering if there's some meaning more specific to Bitcoin Core.

reserve means that the key is in the keypool and has not been used yet. This is used for both change and receiving addresses as there are keypools for both.
change means that the key is used for change addresses.

I thought that change addresses were derived with a different path, like the reception addresses all end with ../0/{index} and change with ../1/{index}, or is Bitcoin Core doing things differently of say Electrum?

They are. Bitcoin Core uses m/0'/0'/i' for receiving addresses and m/0'/1'/i' for change. However if you have an older Bitcoin Core wallet, this split doesn't exist and there's only one keypool. But if you are using sethdseed, that shouldn't effect you.

Besides I wonder how to generate 2 different key pairs with the same master key and path, could I have generate the change address with libwally too?

There aren't 2 different key pairs with the same master key and path. Bitcoin Core doesn't do this, and that is not possible with BIP 32 (or any BIP).


Transferring Money from China to another Country Using Bitcoin

All you need to do is find someone to sell the amount you are looking for of bitcoins. After the bitcoins get to your address, you can spend them the way you like, anywhere in the globe (as long as you have internet access). So, if you wanna send them to someone abroad, all you need is get the bitcoin address of this person and transfer the amount you choose.

The main difficulty for you in China is, probably, find someone to sell the bitcoins in the first place. For that matter, you will have to do some searching in your local area.

Very simple!


Difference between transaction chain vs blockchain

The blockchain consists of blocks which are collections of transactions. The blockchain is a linked list; each block has 0 or 1 previous blocks and 0 or 1 following blocks.

A transaction chain is a chain of transactions which is completely independent of the blockchain. A transaction chain is a directed acyclic graph; each transaction must have one or more previous transactions and zero or more following transactions.


A double spend occurs when someone sends a bitcoin tx, and then quickly sends another transaction using the same coins, but to a different receiving address. The network will ultimately only confirm one of the two transactions by adding it into a new block, so one of the receivers of a double-spent transactoin is at risk of not having their payment confirmed.

Some wallet software will watch for potential double spends, and issue a warning if one is detected. If you sent this transaction and know you did not double spend, then its probably just a false positive from the software, and you have nothing to worry about.

If you are the receiver of this transaction, do not release whatever goods/services you are trading the btc for until after this transaction has enough confirmations. Usually, 6 blocks is safe, but this number varies with the total value transacted (it is smart to wait longer for large transactions. Each block after the transaction has been mined is considered '1 confirmation').


I've read that bitcoin addresses are never destroyed, but do they get recycled/reassigned?

What happens to old bitcoin addresses? I've read that they never get destroyed, but do they get reassigned?

Bitcoin addresses are not reused or reassigned to anybody under any circumstances.

The story is I sent some bitcoin to an exchange using an address I've used with them before, but then found out that they had just retired/stopped using that address.

This is almost certainly a scam. There is no reason to ever "stop using" an address, especially as the one you're referencing contains over half a million dollars of value. If they had lost access to their own funds that's not really your responsibility, but that seems like a highly unlikely story.

Is there an official network that manages bitcoin addresses?

No.


See https://en.bitcoin.it/wiki/Transaction.

Transaction Format

Here's an example from my regtest network:

0200000000010111b6e0460bb810b05744f8d38262f95fbab02b168b070598a6f31fad438fced4000000001716001427c106013c0042da165c082b3870c31fb3ab4683feffffff0200ca9a3b0000000017a914d8b6fcc85a383261df05423ddf068a8987bf0287873067a3fa0100000017a914d5df0b9ca6c0e1ba60a9ff29359d2600d9c6659d870247304402203b85cb05b43cc68df72e2e54c6cb508aa324a5de0c53f1bbfe997cbd7509774d022041e1b1823bdaddcd6581d7cde6e6a4c4dbef483e42e59e04dbacbaf537c3e3e8012103fbbdb3b3fc3abbbd983b20a557445fb041d6f21cc5977d2121971cb1ce5298978c000000

From left to right:

Version: 02000000
Flag: 0001 (if present, indicates segwit)
Input Count: 01
Input 1 Previous Output Hash: 11b6e0460bb810b05744f8d38262f95fbab02b168b070598a6f31fad438fced4
Input 1 Previous Output Index: 00000000
Input 1 script length: 0x17 (23 bytes)
Input 1 signature script: 16001427c106013c0042da165c082b3870c31fb3ab4683
Input 1 sequence: feffffff
Output Count: 02
Output 1 Value: 00ca9a3b00000000 (1B satoshis / 10 BTC)
Output 1 public key script length: 0x17 (23 bytes)
Output 1 public key script: a914d8b6fcc85a383261df05423ddf068a8987bf028787
Output 2 Value: 3067a3fa01000000 (8499980080 sats / 84.9998008 BTC)
Output 2 public key script length: 0x17 (23 bytes)
Output 2 public key script: a914d5df0b9ca6c0e1ba60a9ff29359d2600d9c6659d87
Witness Count: 02
Witness 1 length: 0x47 (71 bytes)
Witness 1: 304402203b85cb05b43cc68df72e2e54c6cb508aa324a5de0c53f1bbfe997cbd7509774d022041e1b1823bdaddcd6581d7cde6e6a4c4dbef483e42e59e04dbacbaf537c3e3e801
Witness 2 length: 0x21 (33 bytes)
Witness 2: 03fbbdb3b3fc3abbbd983b20a557445fb041d6f21cc5977d2121971cb1ce529897
Locktime: 8c000000 (block 140)

Note: all values are little endian. Here is a description of all of the fields:


Bitcoin core trying to sign a transaction loaded from psbt file, but getting "could not sign any more inputs" error

I changed my passphrase of bitcoin-core before I did the second try. Does it matter?

Yes. Entering the passphrase in console using walletpassphrase should resolve the issue


Can a miner only receive a reward by finishing the latest block?

Do all miners immediately drop work on mining the current block &
  begin work on adding a new block?

When someone mines the block on height N (the current head) and a miner receives that information he stops working on that height and moves to next height N+1 (on top of the block he just received). Although it can happen, because of network delay that miner receives some other block on height N before the block mentioned before. This will cause the fork in the blockchain, but again miner stopped mining on current height and go  mine on top of the block he received first.

  If one miner has a machine that guarantees he is the fastest to
  complete a block, will he always receive 100% of the rewards in the
  network?

The miner will (on average) mine percentage of blocks proportionally to his processing power comparing to power of all miners' power combined (=miners_power/total_mining_power_of_all_miners). The principle is same as in regular lottery: your chances of winning are proportional to the number of tickets you buy, if you have largest number of tickets, other players also can win, but your chances are biggest.


Check if an address is new or has been used already

maybe be a bit more specific, which client you use... I assume bitcoin core? In bitcoin core there is the command line interface (bitcoin-cli), that allows to send requests to the client. Specifications here:
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

"getreceivedbyaccount" or "getreceivedbyaddress" could do the jobe here.

Also, there are many blockchain "service" companies, which provide a web interface to look at the blockchain. For example:
https://blockchain.info/

On the top right you can enter an address, and see if you have already transactions used with it.


Any blocks built on top of an invalid block are also invalid. If a chain with more work overtakes the one with the invalid block on it, the block on top is still invalid and is ignored by all other nodes.


How to prove bitcoin ownership without revealing amount?

Dagher et al. Provisions privacy-preserving proofs of solvency may be what you are looking for:

  The objective of Provisions is to enable an exchange E to publicly
  prove that it owns enough bitcoin to cover all its customers’ balances
  such that (1) all customer accounts remain fully confidential, (2) no
  account contains a negative balance, (3) the exchange does not
  reveal its total liabilities or total assets, and (4) the exchange
  does not reveal its Bitcoin addresses.

Full version of the paper available in J. Bonneau's web page.


You haven't said whether your bitcoins are in your bitstamp account (risky over the long term!) or at an address in your own personal wallet, so I shall assume the latter.

When you log in to your bitstamp account, you should be able to find
a "deposit" page with instructions for various ways of depositing
into your bitstamp account. On of those ways will be “bitcoin” —
the “bitcoin deposit” page will tell you what bitcoin address you
need to send your bitcoins to in order for them to be credited to
your bitstamp account (they give you the address as a string of text
and as a QR code).
Having found out your bitstamp deposit address, you then go to
your own wallet (you haven't said exactly which wallet you're using,
but I mean the thing that you're calling your “blockchain wallet”).
You instruct your wallet to send your bitcoins to your bitstamp
deposit address.
Some time later, your bitcoins will be credited to your bitstamp
account (could take a few hours for them to show up). Keep an eye on
the BTC balance of your bitstamp account.
Once your bitcoins have appeared at bitstamp, you can sell them for
Euros or US Dollars. Bitstamp don't support GBP. I tentatively
suggest you sell for Euros because a SEPA transfer into a British
bank account is usually cheaper than a USD wire transfer (but check
what fees/exchange rate your bank charges!). You can either use
a market trade to sell them at the going rate, or use a limit
trade to offer them for sale at a price that you hope someone will
be willing to pay.
Having sold your bitcoins (on bitstamp) for Euros (or perhaps US $), you then have
to go to bitstamp's "withdrawal" page and tell bitstamp where to
send your money (i.e. the details of your GBP bank account).
Obviously, you need to follow bitstamp's SEPA instructions if you
sold for Euros, or their USD wire instructions if you sold for USD.

If your bitcoins have been sitting in your bitstamp account all along, then you can omits steps (1) to (3) above — your should be able to figure out from your bitstamp balance if this is the case.

EDIT: If you bought your bitcoin before the hard fork, don't forget that you should now also own a BCH (especially if you kept your bitcoin in your own wallet),


The difference is that the private keys that allow you to move your Bitcoin are stored on the hardware wallet itself.
Bitcoin uses asymmetric cryptography. This means that a "key" has two components: the private key, and the public key. The public key is computed from the private key and can be shared publicly. The private key is randomly generated and needs to be kept private.
Hardware wallets store the private keys and provide a way for software to communicate with the device. Software will create transactions (and other data) and ask the hardware wallet to sign it with its private keys. Furthermore, those hardware wallets also allow the software to ask for its public keys.
So your software wallet on your computer (like ledger live) asks the hardware wallet for a public key. It then saves that public key on your computer and generates the address for it. Then it can search the blockchain for your transactions and be able to see your balance. In order to spend your Bitcoin, you need to plug in your hardware wallet so that the software can request it to sign transactions.
Software only wallets (such as a default Electrum wallet. Note that Electrum can work with hardware wallets.) save the private keys on your computer. You don't need a separate device to sign transactions; the private keys are stored on your computer and everything happens on your computer.
What this means is that if your computer is compromised with malware, with a software wallet, that malware can steal your private keys. With a hardware wallet, because the private keys cannot be retrieved from the hardware wallet and because the keys are stored on the hardware wallet, the malware cannot steal your private keys. In this way, your funds will be safe.

The 24 word recovery phrase is a BIP 39 mnemonic. It is a representation of the private keys in your wallet. Modern wallets use this and BIP 32 Hierarchical Deterministic wallets. BIP 32 allows for many private keys to be deterministically generated from a single randomly generated seed. So BIP 39 provides the seed and BIP 32 generates the actual private keys that you use.
In this way a wallet can store generate and store a single random seed and derive the actual private keys and public keys on the fly. BIP 32 also allows public keys to be derived from public keys. So for hardware wallets, they will export a single public key and the software can derive further public keys from that.
Both software and hardware wallets use things like BIP 39 and BIP 32 (Electrum has an alternative mnemonic scheme, but they still use BIP 32). The difference is where the seed is actually stored.


No transactions are showing on my Blockchain page

If you had money in the wallet, and it was sent out of the wallet (not by you), then it sounds like the wallet is compromised. Do not use it anymore. You can easily create a new one, but be mindful of security.

Receiving a payment is as simple as sharing one of your wallet's addresses with the person paying you. Once they send a transaction it will automatically show in your wallet, you don't need to do anything else for it to work.


No, they would not. In Bitcoin, wallet is an abstract concept as it is just a software that manages your private keys and addresses. The addresses generated from the private key in your wallet bear no resemblance to others. Unless you explicitly mention it to them that it is your address, there is no way of knowing whether it is you who has sent the bitcoins to your client. From their perspective it might be as they received a 'donation' of bitcoins from some random person.


No you cannot recover Bitcoin sent to the wrong address.

Many people and businesses use HD wallets that generate a new address each time. If the recipient has provided you with a new address but you send Bitcoin to their old one, it is very likely they will be able to recover your payment.

https://bitcoin.org/en/glossary/hd-protocol

Privacy is the primary reason to generate a new address for each new payment received.


Mining software generally do not work like that. They don't have any idea of what is in the Bitcoin blockchain nor know how to construct a block (i.e. selecting transactions). Rather these mining software must connect to a server that will give it the pieces for the next block that the server wants the mining hardware to solve. So in order to mine at a specific block height, you must connect to and configure a server which provides the block data for the block that you want.

The easiest way to do this would be to use Bitcoin Core and reset its blockchain at a certain block height. To do so, you would use the invalidateblock command so that the blockchain's tip is the block prior to the height that you want to mine at. Then just point your mining software at Bitcoin Core and it will work on mining that next block which you want.


Is it possible to accurately map hashing power to network size?

There is no correlation between hash-power and number of validating full-nodes in the network.

Consider the following:

Hashrate is necessarily anonymous. Therefore, there is no way to determine how many miners are operating on the network. Furthermore, a miner may operate an arbitrary number of full-validation nodes, from which it creates its candidate blocks.

It is possible to approximate the global hash-rate from recent block intervals/difficulty, but this only captures hash rate that was working on the current strong-chain, not hash rate working on another branch (e.g. selfish mining). Even if we could approximate global hash-rate, it has no relation to the number of full-validating nodes.

Hash-rate is proportional to the demand for Bitcoin transactions. Higher confirmation demand will lead to higher fees in the fee market, resulting in new hash rate joining the market. One may assume that that higher confirmation demand may lead to higher full-validating node count, but that too is not guaranteed, if the node-validation is too costly (big blocks) and becomes centralised (custodial services).


As of Bitcoin Core 0.9.0 the block maturity is 101 blocks. This means that the reference bitcoin implementation considers it safe to spend bitcoins that were generated more than 101 blocks ago. The reason for the wait time is because soon after a block is generated there is the possibility that it will lose the race to become widely recognized as the next valid block by the network. (All miners are competing to add the next block to the blockchain, and sometimes two parties find the next block within a very short time. If this happens a race to propagate the block will ensue.) When a block loses the race, it is an "orphan" and the new bitcoins that were created (and awarded to a miner) become null and void. If these bitcoins had been spent, that transaction and all subsequent transactions based on those new bitcoins would be invalid. Bad news if you just mailed someone a new TV in exchange for these "immature" bitcoins.

Transaction maturity is different. Each time a transaction is included in a block, it has been confirmed to be valid by the network, and is then distributed to all the nodes on the network. Now would be the earliest you should ever mail the new TV. However, just like in the case of block maturity, this block could potentially lose the race to become widely recognized as the next valid block. If it were to be orphaned, the confirmation for a given transaction would be lost. Under normal circumstances, this is not a big deal - the next block (or next few blocks) will contain all of the transactions from the orphaned block. However, an attacking party could be actively trying to attach its own blocks to the blockchain which might contain double-spent coins or other non-kosher transactions. Conventional wisdom is that a transaction that is included in a block that has at least five more on top of it (6 confirmations) is not likely to be the result of an attacking party. This is because the hashing power required to rewrite a transaction that already happened and then consistently outpace the "honest" miners for 6 straight blocks would be too great.


Does, or will, Bitcoin Core support Lightning?

A sketch of Lightning Network support was previously proposed to Bitcoin Core.
Conceptually, most contributors think it is outside of the scope of the Bitcoin Core project which should be limited to be a robust backbone for the Bitcoin network.
Lightning Network implementations "on top" of Bitcoin Core already exist, the three most mature ones being C-lightning, LND and Eclair.
Given the complexity of the Lightning Network, specialized softwares are in my opinion required.


I realize this question is a couple years old, but a proper tutorial has never been written until now. The tutorial is somewhat large, so I won't re-post it here, but I wrote a step-by-step guide for setting up a DNS seeder that you can find permanently hosted here: https://github.com/team-exor/generic-seeder/blob/master/SETUP.md.

The instructions are written for a clone of the original bitcoin-seeder called the generic-seeder, which is a modified clone of the bitcoin-seeder that makes it easier to set up a DNS seed for virtually any alt coin by using a config file.

As far as why your seeder isn't working, part of it seems to be because you may not have created the proper DNS records. You say that you created:

dnsseed.example.com -> IP

but it should look more like this:

dnsseed.example.com -> vps.example.com -> IP

vps.example.com: "A" record that points to your server IP address
dnsseed.example.com: NS record that points to your "A" record (vps.example.com)

Once your two DNS entries are created, you can run the seeder app like this:

./dnsseed -h dnsseed.example.com -n vps.example.com -m test@example.com

test@example.com: this can be any email address and is only used to serve SOA record data from the local DNS server that the DNS seeder app is creating.

Full disclosure if it wasn't already obvious: I am the author of the generic-seeder.


What is the best way to restore an old Multibit wallet to the new version (and also different OS)?

Open a wallet on the block chain.com site and use your private keys there to restore your wallet


Bitcore explorer insight testnet initialisation

Try this

const bitcore = require("bitcore-lib");
const Insight = require("bitcore-explorers").Insight;
insight = new Insight(bitcore.Networks.testnet);

then do the rest.


Tramsaction taking long, 1 part is spent

Some exchanges combine many transactions into a single transaction when withdrawing, to save fees and be more efficient with space. It will likely confirm eventually, you'll just have to wait for a miner to put it in a block. One output could be spent already because it is possible to spend from unconfirmed outputs, just slightly more risky.

See also: Why is my transaction not getting confirmed and what can I do about it?


Can you inherit bitcoins without the private key?

Y can't spend the Bitcoins. You need the private key for an address to spend the Bitcoins from that address. There's no way around it.


How long would it take for a transaction with 0 fees to be confirmed six times?

Dont worry about that. If you check blockchain.info at your transaction you will see it has medium-priority, which is the reason why it was send without transaction fees:

https://en.bitcoin.it/wiki/Transaction_fees

I normaly send transactions without fees, it can take some time. For me it was no longer than 6-12 hour until it got included into a block. If it got inlcuded (1 confirmation) it will get confirmed again every block. So after it was included in the chain you only need to wait 60 minutes for you 6 confirmations.

If your transactions need to be send quickly you should add some optional fees on them, which can be set in the options of bitcoin-qt (if that is your wallet).


Other server wallets than bitcoind recommended for a ubuntu server

The easiest solution would be to upgrade to the recently released version 0.12.0 which allows running a wallet while in pruning mode (which was not possible with 0.11.2). That way you can limit the required diskspace, still have a fully validating node, and don't need to do update your integration.

After the upgrade to 0.12.0 you just start bitcoind with -prune=<n> where <n> gives the amount of MiB of blockchain data you want to store. Be sure to leave some more diskspace for other data, the other files in the bitcoin directory don't count toward the limit.


Well, it's probably not an intended function of the block chain, but I wouldn't call it "unfriendly" because you're not really harming anybody (by reducing the total amount of bitcoins available you're in fact increasing the value of all other bitcoins a little).

  [...] future versions of the protocol may prevent this type of transaction
  from being accepted into the blockchain?

No, because it's not possible. The transaction encoding the document hash looks exactly like any other normal pay-to-address transaction. The only difference is the address which is a representation of the document hash instead of a hashed public key, and therefore there is no private key associated with it (that's why it is unspendable). You can't go back from a hash to it's origin though, so you will never know whether it's spendable or not.


Assuming you have a Bitcoin node to execute RPC calls against (i.e. you're running bitcoind with the RPC turned on), you can do this rather simply with pyjsonrpc:

#!/usr/bin/env python
from pyjsonrpc import ServiceProxy

bitcoin = ServiceProxy("http://127.0.0.1:8332")  # this is your bitcoind node and RPC port
bitcoin.username = 'testuser'  # rpcuser
bitcoin.password = 'testpass'  # rpcpassword
print(bitcoin.getbalance())


Yes. If you use a 12V/2A power supply rather than a 12V/5A supply, the voltage will drop, causing hardware errors. You will effectively be undervolting the chips.


If I intend to hold Bitcoin long term & the stocks drop below my invested amount do I lose the money or can I still hold it in hope it goes back?

If you buy $500 worth of bitcoin when the price is $4000, then you would own 0.125 bitcoin. If the price drops to $3200, then you still own 0.125 bitcoin, which you could sell for $400. You do not "lose" your $500 investment, it just becomes worth less (in some sense you "lost" $100, but your loss is only realized if you sell your bitcoin at the $3200 price). If you do nothing and the price goes up again, you could then sell it for more.


Name of attack where you pay a high fee to block others

It's a flood attack. Or just specifically "transaction spamming".
It's rather theoretical vulnerability, blockspace market is open to everyone  and proceeding with this attack is a waste of money. It's not vulnerability in terms of being malicious and preventing parties from sending transactions with higher fees/ rbf.


How to see highest available block number in "Bitcoin Wallet" app for Android (Schildbach wallet)?

At the main screen tap the menu icon (three dots at top right) and choose "Network Monitor" from the available options.

Then swipe left to switch from the "Peers" tab to the "Blocks" tab.

The top of this list shows the highest block number that the app knows about.


Introduction

AsicBoost speeds up Bitcoin mining in general (for ASICs and CPUs alike) by reducing the frequency of computing one part of the SHA-256 calculation.

A Bitcoin block header is 80 bytes long. It fits in 2 blocks for SHA-256 hashing. It gets hashed into a 32-byte value, then hashed again (1 block) to get the final value that is compared to the threshold.

Pseudocode

The conventional way to do Bitcoin mining looks like this:

while True:
    blockHeader = ...  # based on Merkle root and other fields
    sha256Block0 = sha256Expand(blockHeader[0 : 64])
    midState = sh256Compress(sha256InitVector, sha256Block0)

    for i in range(2**32):  # Try nonces
        blockHeader.nonce = i
        sha256Block1 = padAndExpand(blockHeader[64 : 80])
        singleSha = sh256Compress(midState, sha256Block1)

        sha256Block2 = padAndExpand(singleSha)
        doubleSha = sh256Compress(sha256InitVector, sha256Block2)
        if doubleSha < target:
            miningSuccessful(blockHeader)  # Jackpot!

Notice above that the inner loop has 2 calculations of block expansion and 2 calculations of block compression.

Now what AsicBoost proposes is that we somehow find a bunch of blockHeader values where sha256Block0 is different but sha256Block1 is the same. Because the Merkle root field straddles both hashing blocks, it means we need to group candidates by the last 4 bytes of the Merkle hash. Now the mining algorithm looks like this:

while True:
    blockHeader = ...  # based on various fields
    candidates = dict()  # 4 bytes -> sets of blocks
    for i in range(...):  # Generate the more the merrier
        tempBh = blockHeader.randomizeMerkle()
        sha256Block0 = sha256Expand(tempBh[0 : 64])
        tempBh.midState = sh256Compress(sha256InitVector, sha256Block0)
        candidates[tempBh.merkleRoot[28 : 32]].add(tempBh)

    for i in range(2**32):  # Try nonces
        for key in candidates:
            tempBh = candidates[key][0]
            tempBh.nonce = i
            sha256Block1 = padAndExpand(tempBh[64 : 80])

            for tempBh in candidates[key]:
                singleSha = sh256Compress(tempBh.midState, sha256Block1)
                sha256Block2 = padAndExpand(singleSha)
                doubleSha = sh256Compress(sha256InitVector, sha256Block2)
                if doubleSha < target:
                    miningSuccessful(blockHeader)  # Jackpot!

Now notice that the inner loop performs 1 calculation of block expansion per candidate group, and then 1 calculation of block expansion plus 2 calculations of block compression per candidate block header.

Thus the technique wins over conventional mining when most candidate groups have more than one candidate, and that the overhead of generating and sorting candidates exceeds the gains from saving at most one calculation of block expansion per candidate.


If each miner has a different share difficulty in a PPS pool, how should I calculate and reward the relative effort of each?

You should count each share as valuable as the difficulty of the pre-determined target for that miner. If you count the actual value of the hash it found itself, either the math won't work, or you'll introduce massive variance instead of reducing it (which a pool is intended to do).

When you choose a particular share difficulty D, you are restricting the set of valid hashes to a set that is D times smaller than the set of valid hashes for difficulty 1. Given that each of such results is D times less likely to be found, it is fair to count it as D shares of difficulty. However, each hash is either good or not good, and each has a fixed probability of being good.

If you're going to use the actual hash value obtained to calculate share value, most hashes won't be valid, but those that do will introduce extra variance: some (unlikely) ones will result in a very high score, and some won't. There is no need for this: just giving each hash the same score is just as well a way of measuring their hash rate, which is what this is all about.

Of course, you can't let a miner choose its share difficulty after finding one: that would allow them to cheat.


Depending on your requirements, you can run in prune mode:

$ bitcoind -prune <max-MiB>

  -prune= Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete
  specific blocks, and enables automatic pruning of old blocks if a
  target size in MiB is provided. This mode is incompatible with
  -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning
  blocks, 1 = allow manual pruning via RPC, 550 = automatically prune
  block files to stay under the specified target size in MiB)

see https://bitcoin.stackexchange.com/a/37497/60443


How to pass password with special characters to RPC API via curl?

It seems that this is a bug in Bitcoin Core. I will take a look at it.

Edit:
I see the problem now. You have # in your password. The config file parse will interpret # as the beginning of a comment. So this means that it thinks the rest of your password is considered a comment by the config file. You cannot use # anywhere in the config file or everything after it will be interpreted as a comment.

In your example, the rpcpassword that Core is using is !@. To have # in your rpcpassword, I think you will actually need to use the rpcauth option which uses hashes instead of putting the password string in the config file.


Does Bitcoin's SHA256 proof make a 51% attack more likely?

I think what most people making the 51% attack argument for memory hardness miss is that the base unit is meaningless when you're talking about percentages. Whether your mining algorithm is implemented with ASICs, consumer hardware or well-trained Rhesus monkeys it matters little - to launch a 51% attack you must amass enough ASICs, consumer hardware or Rhesus monkeys to represent 51% or more of the available power. This, in turn, becomes an economics problem and is far more affected by the scale of mining operations as a whole than by the specifics of how that mining is done. If three networks are mining using $1,000,000 worth of ASICs, CPUs and Rhesus monkeys, including those you control, your portion needs to exceed $500,000 worth of the underlying resource regardless of its nature.

The fear that this will occur automatically as one manufacturer comes to dominate the space is perhaps slightly more realistic, but it's a real fear in memory-hard altcoins as well since most of that consumer hardware is also made by a mere two companies: Intel and AMD. These companies may not care much about the coin you're mining today, but in the sort of world where ASIC manufacturers represent a threat to Bitcoin CPU manufacturers would represent an identical threat.

The article also dismisses the "botnet mining" argument by saying that the botnets would likely not be used to attack the coins and completely ignores the crux of the argument: That people are mining on botnets. If someone is stealing CPU cycles from my system I'm not particularly concerned with the ends, I'm more upset about the means. That Bitcoin's ASIC acceleration has made botnet mining all but impossible is, in this sysadmin's view, a positive thing.

Finally, the entire democratization argument hinges on the entirely false premise that if mining only uses general purpose hardware that people will only mine with the hardware they already have. It also neglects to account for the decreased lifespan of that already-existing hardware due to mining's extraordinarily heavy use of the resource. People can and do build additional computers for the sole purpose of mining and every computer used for mining lives a shorter lifespan than one used for casual browsing and office tasks. Mining power will still centralize because this is the nature of our economy, not of our technology - those with more money will always buy more hardware. Also, Bitcoin ASICs are only expensive because they are new. ASIC cost is almost entirely in the R&D process, which leads to a price curve whereby products become dramatically cheaper with time. The image processing chip that runs the camera in every cell phone was once new, expensive and high-tech too. Give it time.

But in the end, it is the economics, not the technology, that makes a mining algorithm secure. The nature of the hashing algorithm chosen has some interesting effects, certainly, but assuming neither algorithm has an exploitable flaw (which is less likely with widely-implemented algorithms like SHA256) the question inherently boils down to "how much would it cost me to become 51% of this network" and the resulting answer is the same whether you're mining with ASICs, CPUs or GPUs... Or Rhesus monkeys: To represent more than half of the network you must more than match the existing power of all equipment (or primates) used to mine it. If the mining equipment currently on-network is worth a million dollars, you have to spend at least a million and one.


How does bitcoin handle unspent outputs from fresh transactions?

Bitcoin protocol doesn't care how many confirmations a transaction has. A user can choose any number of blocks that has to be mined on top of the transaction before considering it confirmed, or in case of Satoshidice it simply doesn't care.

Bitcoin protocol does care that source addresses of a transaction has all required coins to transfer to destination addresses, in other words a transaction has to have all it's inputs to be valid and the number of coins those inputs have must be greater or equal to number of coins in outputs. Therefore if an attacker successfully double spends his transaction to Satoshidice it will also invalidate winning transaction from Sathoshidice, because one of the inputs of winning transaction is the original transaction from the attacker to Sathoshidice.

To answer the question why bitcoin protocol allows it, consider two transactions

From address A to address B
From address B to address C

To think about second transaction as confirmed you need to wait a certain number of block to be mined on top of it and it doesn't matter how many block were mined on top of the first transaction because it doesn't make second transaction any more secure. Therefore both transactions can appear in the same block and that's completely fine.


Is blockchain the only technology for p2p decentralised global network?

One may also note that Blockchain is not a P2P technology per se, but rather just a  data-structure designed to reach global consensus provided with transactions acquired from a P2P network. Validation rules which govern the updates to this data-structure are consensus rules.

The actual Bitcoin P2P layer is similar to other P2P protocols(Gnutella, IPFS etc.), and is a messaging protocol designed to acquire and propagate public data with peers. Theoretically, a validating Bitcoin full-node may acquire its transaction/block updates from another channel/P2P protocol and still be in consensus.


I’ll start this off by saying I’m not a tax professional, so take this advice as you will...

At the time you purchase your bitcoin, your purchase price becomes your cost basis. This means if you bought 1 bitcoin for $10,000 then this is the price you will compare your capital gain/losses to.

For example let’s say you buy 1 bitcoin at $10,000. A week later the price of 1 bitcoin is $12,000. You decide to sell half your bitcoin due to the price hike and you receive $6,000 for the sale. Your tax liability would be $1,000 in capital gains (sale price of half a bitcoin is $6,000 minus original price of half a bitcoin is $5,000). I believe the in the US the tax on short term capital gains is whatever income tax bracket you fall into, so you would pay a X% capital gain tax on the $1000 profit you made from selling half your bitcoin.

Again I’m not a tax professional, but this is my understanding of how it all works based on lots of research.


Why doesn't Bitcoin use a DHT for choosing peers?

DHTs are built so that nodes keep only a small portion of other nodes addresses in their routing table (the closest ones). This means that when you send a message to a DHT to put("foo", "bar"), only specific peers are going to see it (in fact as little as possible) and even fewer are going to store it. So if you want to do "peer lookup" using DHTs, it wouldn't work because nodes aren't programmed to send messages through a path to all nodes.

Also I think you may be confused with BitTorrent's DHT. They store IP addressed of peers downloading torrents as values of keys in the DHT. So in that sense, they do use the DHT to "lookup peers" downloading a specific torrent. BitTorrent is a different system than Bitcoin, which is not a file-transfer protocol, and therefore I don't see how a DHT can be useful to Bitcoin's design.


BFL Single averages 800 Mhps on BitMinter Client. Advertised rate is 832. What explains the difference?

According to Butterfly Labs' customer service department, their chief operating officer, and their vice president of product development, the speeds they claim for their BitForce products are all nominal speeds and a variance of +/-10% is permitted. As of this writing, they say speed claims are based on a combination of synthetic benchmarks and averaged real-world data, with real-world figures tending to be slightly lower. The hashrate you see may be affected by high network traffic, speed at which your pool provides work, whether other people's equipment has supplied enough confirmations that your unit's current work is no longer relevant, and luck.

You can compare results with different mining programs--such as bfgminer, cgminer, and Ufasoft Miner--to what you're getting with BitMinter to check for software inefficiencies.

If the front LED is flashing slowly, the device has overheated and has disabled its processors until they cool down. This is called throttling; the unit does no work while this is happening. Their FPGA units can be loaded with different firmware to select an operating speed that will work without throttling. Butterfly Labs provides software called EasyMiner (on their Drivers page) for loading firmware manually, or through a process they call autotuning.

Their FPGA-based units are highly sensitive to temperature at the air inlets  which, depending on arrangement of nearby items and and other heat sources, can be significantly warmer than the ambient temperature of the room. A core temperature of 51.2 degrees Celsius is a little high, but not inherently bad as long as the unit isn't throttling. Their FPGA units also exhibit significant variation in contact of the heatspreader to the MPU cores, heat tolerance of the MPU cores, and application of thermal interface material (TIM). Some of their fans have been shown to operate at lower or higher speeds, as well. Examination of some early units has shown partial or complete separation of the primary heatsink, possibly during shipping. In the case of partial separation, the primary heatsink normally reseats itself (due to spring loading) but this can cause air cavities to form in the TIM. Air cavities will prevent proper contact and cause premature overheating. Later units use nylon bolts instead of spring-loaded pins to secure the main heatsink.

(Note that one of the webpage screenshots provided above shows a claimed speed of 832 MH/s, NOT the "850" originally mentioned in the question's title. I don't remember whether I saw any ads that claimed higher speeds.)


Is it possible to extract legacy address from segwit address?

While technically it is possible to generate one address from another, after all they are simply representations of public keys, it is strongly discouraged to do so, if you are not the owner of the address (at which point the wallet should provide you with an option to use either format). The problem is that if you send a transaction to a segwit address, that the recipient is not expecting/supporting then they will not recognize the payment.

Now for the apparent aliasing you mention above: the recipient address of the transaction you link to is a P2WSH (pay-to-witness-script-hash) address. cdbf909e935c855d3e8d1b61aeb9c5e3c03ae8021b286839b1a72f2e48fdba70 is the hash of a script that currently only the owner knows (until an output to that address has been spent). The bc1... representation is the bech32 encoded BIP142 address, which includes a checksum and a human readable currency identifier bc. It contains exactly the same information, i.e., a P2WSH script of the form `0 .


Have there been attempts at a Bitcoin-powered general purpose database?

This is it - the CryptoSphere.

It uses some Bitcoin concepts, and might support paying for storage using Bitcoins. I believe that "merge-mining it" using the Bitcoin blockchain would be possible (it's too soon to tell, the design is preliminary).


How do I use mSIGNA without the standard Bitcoin client?

Yes there is a way, you need a way to connect to someone running BitcoinQT and who has made their node public. BitcoinQT runs as a node, but to make it discoverable to any but other BitcoinQT wallet users you have to go a step further.

So you need a list of such BitcoinQT "servers", and I found one earlier and in searching for that list of open Bitcoin-QT "servers" someone had published I found this.

If I manage to find it again, I am trying to solve my problem with sending from mSIGNA, I will post a link and more complete answer here.


Working with the Bitcoin network protocol

This is a good start point to understand better the code related to peers discovery and management: https://github.com/bitcoin/bitcoin/blob/master/src/net.cpp
I can't help you directly writing such a code for you but Bitcoin p2p is very similar to bittorrent one or similar. The greatness in Bitcoin is properly the fact that it has such (crypto)currency functionalities, so why should you use the Bitcoin protocol to create a p2p app which has no interest of using the main feature of the original code?
I think there are different code bases more suitable for your research.


Do blockchain.info wallets correspond to a single wallet on the blockchain?

It's normal . Your blockchain.info wallet change the address in every transaction. You can learn more by google " bitcoin hd wallet".


Have the security vulnerabilities found in Bitcoin been fixed in other altcoins?

Generally not. It's very difficult to audit the state of most altcoins just due to the ridiculous number of them in existence, and the fact that many of them intentionally sever the history by rebuilding the Bitcoin repo from the files rather than properly forking the Git repository.

A large number of Proof of Stake altcoins were forked from 0.6 source code and remain using BerkeleyDB for block chain state storage rather than the LevelDB UTXO used in modern Bitcoin Core. Most Litecoin forks seem to have been made around Bitcoin 0.7 and maintain some of its eccentricities as well. Some more popular forks have back ported fixes or brought their forks to be somewhat level to Bitcoin, but these are the underwhelming majority. It's unclear if they have applied all the security patches they should have, or if they did them correctly given the differing source and histories.

From a quick glance at a small sample of some of the most popular forks listed on coinkmarketcap:

Litecoin - mostly in line with Bitcoin Core, with some patches cherry picked from upstream
DarkCoin - forked from Litecoin but does not appear to backport any patches.
DogeCoin - forked from Litecoin, with some patches cherry picked from upstream.
PeerCoin - appears to be a 0.6 or 0.7 vintage fork of Bitcoin, limited backported patches.
NameCoin - ancient fork of Bitcoin 0.3, very limited back porting of patches.

Most other altcoins will be the same or worse in terms of security updates of known bugs. It's a very real risk forking Bitcoin if you are unable to maintain it, and many of the people creating forks are completely ill equipped for the task.


Provide Services to many Lightweigh Nodes (SPVs) and Save The Communication History

First, I want to make sure that a sufficient number of lightweight wallets are connected to the node.

There's very little use of BIP37 today, and it's not even served by default by modern versions of Bitcoin Core. The chance that anybody would even connect to you and supply filters to you is extremely low. It was always a terrible idea to begin with, giving poor performance for users, poor privacy, and exposing the software to a denial of service hole the size of Norway.

Second I want to save the communication history of each session between the full node and an SPV node. Specifically, filterload, filteradd, transactions, merkleblock, etc. (According to bip-0037)

This is trivial with basic development skills, if a little frowned upon. The software naturally doesn't support anything of the sort out of the box, even when bloom filters are manually enabled in the configuration.


How many bytes does a Bitcoin address weight?

Addresses don't get registered anywhere. You can create as many as you want without having impact on any other network participant.
Addresses only get tracked by others once funds get sent to them. Needing to tie up funds for each address suffices to curb the proposed attack.


An online wallets that sends transaction change back to the original address

If you don't want the client to generate any private keys for you, it seems what you need is a javascript client that builds and propogates transactions.

http://brainwallet.org/#tx

This is a hosted javascript client (everything happens on the client side so there is no security concerns) allows you to provide a private key and build a transaction that way.


24 Word Mnemonic Seed Phrase for Ledger Nano S usable on Trezor?

You can use them, but you need to ensure that the hardware wallets use the same address derivation paths. For the hardware wallets you mentioned (Trezor and Ledger) both of them use the BIP 39/BIP 44 derivation paths, so that should work, especially in the case of Bitcoin. However care has to be taken for certain coins (ETH or any other ERC-20 for example) where these wallets do not use the same derivation paths.


Does the program I downloaded (bitcoin-qt) mine bitcoins?

Yes, but not efficiently. In fact, CPU's are so bad at mining bitcoin that the option was removed from the user interface. However, the code is still there (though mostly as a reference implementation), and you can go to Help > Debug Window > Console and type in "setgenerate true" to turn it on.  Type "setgenerate false" to stop.

You can also give bitcoin the option -gen at the command line.


can i use one Mnemonic Code to create both(TestNet and MainNet) wallets

Yes. You can create Mainnet and Testnet wallets using one Mnemonic Code.
Here is an example to switch networks.

> java HelloWorld testnet
> mrbZfHK4MuJYEH98w7gENLsrfnY1e4Lq8B

> java HelloWorld mainnet
> 1C5cNEE5YssHTAfXDYhrYRfXonwJe2u1Wf

.

public class HelloWorld {

    public static void main(String[] args){

        String seedCode = "yard impulse luxury drive today throw farm pepper survey wreck glass federal";
        long creationtime = 1409478661L;
        DeterministicSeed seed = null;
        try {
            seed = new DeterministicSeed(seedCode,null,"",creationtime);
        } catch (UnreadableWalletException e) {
            e.printStackTrace();
        }

        NetworkParameters params;
        if (args[0].equals("testnet")) {
            params = TestNet3Params.get();
        } else {
            params = MainNetParams.get();
        }
        Wallet wallet = Wallet.fromSeed(params, seed);
        Address address = wallet.currentReceiveAddress();
        System.out.println(address);

    }
}


BIP's and RFC's are similar in that they

debate an implementation in the community in order to improve it, and
produce documentation that's useful to other coders.

However, they're different in a lot of other ways. This is largely because the two solve different problems: RFC's usually invent new protocols, whereas BIP's amend an existing system.
Other differences:

An RFC with a specific serial number always refers to a specific version of that document. If the RFC changes (and the change isn't something tiny, like spelling), it is assigned a new number.
On the other hand, a BIP is expected to go through multiple major revisions in the Draft stage. Changes are instead tracked through version control.

The RFC approval process and the BIP approval process are different.

RFC's have authors, BIP's have champions. This isn't just a difference in terminology. The champion of a BIP needs to convince other people that it's a good idea before it will be accepted, whereas the RFC process is much less restrictive.

See also:

Who specified the Bitcoin protocol?
How is a BIP accepted?


That is called a vanity address, and Bitcoin Core does not support generating vanity addresses. In order to do that, you would have to find a vanity address generator (separate piece of software). But then, you have to audit the code to make sure it is not doing anything funny with your private key. Bitcoin Core is open source, so you can audit the code that generates the keys if you want.

The address prefix denotes the type of script the address encodes. A bitcoin address that starts with a 1 is a Pay-to-Pubkey-Hash address, and a 3 is a Pay-to-Script-Hash. See Address Prefixes

You can change the type of address the cli generates by passing an optional argument to getnewaddress see RPC Docs - getnewaddress:

bitcoin-cli getnewaddress "label" "address_type"

address_type options are "legacy", "p2sh-segwit", and "bech32"


PBFT is Practical Byzantine Fault Tolerance. It is a "classical" consensus algorithm that uses a state machine. Uses leader and block election to select a leader.

PBFT is a three-phase, network-intensive algorithm (n^2 messages), so is not scalable to large networks


Are change addresses visible from the GUI in the Bitcoin-QT client?

Change addresses should be invisible from the wallet GUI.


What is the difference between BitCoin, Bitcoin, and bitcoin?

The following answer seems to be the consensus judging from this question on the meta site.

  Use Bitcoin (with a capital "B") when talking about the
  concept/technology.
  Use bitcoins (no capitalization) when talking about the unit of
  currency (4 dollars - 4 bitcoins).
  Never use BitCoin or BitCoins


Bitcoind need blockchain to sign transaction

You surely need the unspent tx outputs (tx hashes, and indices) to sign a transaction. Furthermore you need the age and value for each utxo to calculate required fees.


Are all the *coin networks consistent in which script actions are permitted and disabled?

Short version
Yes.
Long version
Bitcoin
The bitcoin implementation of banned opcodes is in script.cpp:
        if (opcode == OP_CAT ||
            opcode == OP_SUBSTR ||
            opcode == OP_LEFT ||
            opcode == OP_RIGHT ||
            opcode == OP_INVERT ||
            opcode == OP_AND ||
            opcode == OP_OR ||
            opcode == OP_XOR ||
            opcode == OP_2MUL ||
            opcode == OP_2DIV ||
            opcode == OP_MUL ||
            opcode == OP_DIV ||
            opcode == OP_MOD ||
            opcode == OP_LSHIFT ||
            opcode == OP_RSHIFT)
            return false;

Note that this is not a complete list - OP_NOTEQUAL is also disabled. This code struck me oddly because it appears to create a fork with transactions that use OP_NOTEQUAL. (Perhaps it wasn't being used.)
                // OP_NOTEQUAL is disabled because it would be too easy to say
                // something like n != 1 and have some wiseguy pass in 1 with extra
                // zero bytes after it (numerically, 0x01 == 0x0001 == 0x000001)
                //if (opcode == OP_NOTEQUAL)
                //    fEqual = !fEqual;

Source.
Namecoin
Same.
LiteCoin
Same.
SolidCoin
You didn't ask about it, but it's also the same.


BTC wallet recovery: I have a 17 word backup, what do I do?

I have a 17 word seed phrase ...

Usually seed-phrases are 12, 18 or 24 words long. You can often add some extra phrase of your own, but even so, 17 words seems wrong.

... from a 10 year old Bitcoin-qt/core? ...

Bitcoin-qt/core has never used seed phrases.
Electrum was first released in late 2011 and used seed phrases - it used a proprietary system that has since been superseded by the standard BIP39 system for seed phrases.

... acct

The accounts feature in Bitcoin core was dropped some years ago.
There was never a private key per account. I believe Bitcoin-qt's accounts were mainly a way of organising addresses. The current equivalent is labels.
When people write about accounts, I always suspect they mean an online custodial account rather then a normal wallet. Bitcoin was intended as digital cash that each person looks after themselves without the need for any trusted third party. Accounts are associated with giving your money to some trusted third-party business and hoping they look after it for you. Some businesses call their customer accounts "wallets", which I think is misleading, but that's just one man's opinion.

17 letter associated private-key itself. It starts with "q" and has two commas and a space in it?

I don't think that is how Bitcoin private-keys are normally encoded. There are several encodings but the most common is probably Wallet Interchange Format (WIF)

One guy said Electrum, but it didn't help decipher the individual words

The individual words of a BIP-39 seed phrase are not ever deciphered. They are not the result of enciphering some plaintext. The whole phrase is the input to a mathematical operation (not encryption, decryption, encipherment or decipherment) whose result is a number that can be used as a private-key. The words are not intended to be processed individually.
I think Electrum is a good candidate but the information you are feeding it is not what would be expected. You also need to make sure that you are using electrum in a way that is appropriate for a legacy seed-phrase rather than the current system it normally uses.

With the information you have so far, I don't see any way to recreate your wallet - the information isn't consistent with typical use of Bitcoin-qt of around 2011. I'd look for other information, files on disk, backups, emails, records of downloaded software, etc.


Bitcoin-qt getnewaddress returns address starting with 2

You are using testnet. Addresses starting with "M", "N", "2" and "tb1" are testnet addresses.


What does the label field in Bitcoin-Qt mean?

The label is just a short, memorable name for your client to refer to that address.

It can be anything, or nothing.


Can I mine cryptocurrency using Javascript?

I see where you are coming from and I wouldn't be surprised on some systems if the user has less of a bad experience than ads (some sites filled with ads are simply unbrowseable for some).

But, Javascript is not a quick language and you wont generate any coins worth generating, no pool will allow you to direct this sort of traffic to them in any significant quantity and if you run your own p2pool the bandwidth and other resources will far outweigh the coins mined.

As a rough but educated guess that you'll probably generate about 1-2kh/s per user while they are on your site, meaning you'd need 250,000-300,000 simultaneous viewers to match a modern scrypt mining rig, take into account overheads and you're probably looking at more like 400-500,000 viewers.

In other words, don't do it. Your users will hate the site, it will lag video and audio and generally create a poor browsing experience meaning users won't stay on your site meaning you wont get the required hundreds of thousands of viewers. You may also get flagged for malware by Google etc. and like I say, pools wont accept it.


Using the blockchain for providing other services, besides bitcoin transactions

There are already tons of services doing this, so probably worth focusing your creative efforts elsewhere. Here are the ones we know about on Coin Secrets:

Proof of Existence
BlockSign
Stampd
La Preuve
Bitproof
Stampery
ProveBit

As for pruning, assuming you use the same OP_RETURN mechanism as these tools, then they may be pruned by some nodes. But I imagine there will always be plenty of full archives of the blockchain available (even if this is eventually a paid-for service) so I doubt that your timestamped hashes will ever be truly lost.


Does Sovryn really not allow you to use it if you use Bitcoin Core?

Sovryn is built on the Rootstock Bitcoin-sidechain. It follows that you must run software that interacts with the Rootstock sidechain in order to use Sovryn. Bitcoin Core only interacts with Bitcoin's blockchain and is not aware of the Rootstock sidechain.


OP_CHECKLOCKTIMEVERIFY generates non standard transaction

You should create a P2SH address containing the hash of that script, and when you want to spend, you can spend from that P2SH address. This'll make your transactions standard.


A paper wallet is more secure than a physical coin with addresses, as the former you can make yourself, on your own machine, while with a physical bitcoin you never know under what conditions it was manufactured and who could have copied the keys.


How to Create a new Genesis Block with some bitcoins initially asigned to some users?

If you do this, you'll be very disappointed even if you succeed. The genesis block is ignored in terms of effects on the state of coins. The actual Bitcoin genesis block's outputs are effectively unspendable, even if Satoshi showed up with the key.


As stated by the help,

  -server
       Accept command line and JSON-RPC commands

You may however also have to check if this configuration parameter has been enabled by your local configuration, usually a file called bitcoin.conf, unless configured using the -conf parameter to bitcoind.

On linux builds, this should default to ~/.bitcoin/bitcoin.conf, on Mac OS X ~/Library/Application\ Support/Bitcoin/bitcoin.conf

In this file, you can explicitly configure the server as off using the server configuration parameter.

server=0

You can alternatively pass a parameter as 1 (enabled) or 0 (disabled)

bitcoind -server=0

You should not be able to access your server assuming this has been toggled to 0.

The headless daemon bitcoind has the JSON-RPC API enabled by default, the GUI bitcoin-qt has it disabled by default.


I hope admins is not angry that I will share the link to another forum. On the bitcointalk.org/index.php?topic=5208641.0 you can find big discussion about pruned node - full node. There you will find a lot of useful information


Running bitcoind in a different directory

Make sure to stop bitcoind with bitcoin-cli stop, then move your data directory to a new folder and add the following line to your bitcoin.conf:

datadir=path/to/new/directory

This file should be somewhere in C:\Users\username\AppData\Roaming\Bitcoin\bitcoin.conf in Windows and ~/.bitcoin/bitcoin.conf in Linux.

As the user AntMor replied, you can also pass this configuration every time you run bitcoind.


Extracting Bitcoin historical ticker data by setting up Bitcoin Node?

The Bitcoin Node is part of the blockchain network. It has nothing to do with markets and trading, and has no concept of a price. As far as the node is concerned, 1 Bitcoin = 1 Bitcoin, and that's it.

If you want historical market prices, you will have to either scrape them from various exchanges yourself, or use a service such as this (I have no affiliation with them, and just found them through Google - I cannot vouch for their data, and better options may exist).


Electrum-personal-server isn't seeing any historical transactions; using a Trezor

It's the wallet type. There are three address types: legacy, p2sh-segwit and segwit. Choose the right one or your transaction history will be empty.


I send this to a watch only Wallet. But that was wrong. What i can do to send it to the right wallet.

Bitcoin transactions are irreversible. You cannot cancel or reclaim them. Therefore you cannot now redirect those bitcoins to the right wallet.

Watch-only addresses are controlled only by whoever knows the corresponding private-key.

If you know who owns the private-key to the watch-only address, you can ask them to make a new payment to you of the same amount you sent them. You have to rely on their charity.

Related?

Reg: Watch only Address


Or is there a big gap in my logic?

Your logic is right, it is just that no decent service will accept a payment unless 1, 3 or even 6 block confirmation.

  How common are such race attacks

Not common at all, but if the services or the person is forced to accept unconfirmed block, here is a link with information about how to better perform and how to defend against a race attack.

https://bitcoin.stackexchange.com/a/74283/95422

  I don't think the restaurant can wait like 6 blocks before they accept my payment

You are right, and the fact that you have to wait ~30 minutes can be a problem for mass adoption, this is one of the reason there is a project called the lightning network build on top of bitcoin trying to solve this  and other major things by rendering transaction instantaneous while keeping the security, you can read more here: https://lightning.network/


The idea is that you shouldn't reveal the extended public key (and thus the chaincode) unless you want people to be able to know all of your addresses and potentially recover the extended private key. It should be considered semi-secret; more secret than just the public key itself, but less secret than the private key.

Knowing the extended public key allows someone to know what all of your addresses are, so you lose security. But it does not allow them to know the private keys except in certain circumstances. Because of the extended private key could be derived from the extended public key, you shouldn't give out the extended public key.

However there are few use cases where others do need to know the extended public key, and if you avoid the insecure case, it is safe and secure to reveal the extended public key. You just need to be extra careful in the future to avoid revealing a child key.