text:
Does the Breach Remedy Tx hinge on the remote party's revocation secret exclusively?
The original Lightning Paper required both signatures for the Breach Remedy Tx (see also this Q) but according to the BOLT #3 specs the Breach Remedy Tx only seems to hinge on the revocationpubkey for which Alice will share her revocation secret upon establishing a new Commitment Tx.
I'm wondering if I am missing some detail here.

You are right that in the BOLT3 Scripts the revocation path pays only to a single public key, the revocationpubkey.
In order to keep the same restriction with a single pubkey, the revocationpubkey is derived based on both a secret generated by the local node and one by the remote node.
Without the part of the secret only known to the local node, the remote node cannot spend from this path. In order to revoke a commitment, the local shares this secret to the remote node effectively allowing it to steal all the funds should it broadcast this transaction.
See the revocationpubkey derivation specification in BOLT3.

I think it is worthwhile to add that this trick works as going from private keys to public keys is done by multipling the generator point with a private key and that this process is a group homomorphism. Eg: (p+q)*G=pG+qG=P+Q where capital letters are points of the elliptic curve and lower letters are scalars in the additative group of a prime field


text:
Where to find rpcauth.py for configuring rpcauth in bitcoin.conf on Ubuntu
I can't find the python file to create the rpc credentials. According to the documentation it should reside somewhere here:

using the output from the script in share/rpcauth/rpcauth.py

The python file is not provided if you installed bitcoind through PPA.
You can download it yourself
wget https://raw.githubusercontent.com/bitcoin/bitcoin/master/share/rpcauth/rpcauth.py
And run the program as follows
python3 rpcauth.py myusername mysecretpassword

source: Stack Exchange

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

sort: votes


text:
Can someone explain the reason for this discrepency in speeds?
Can anyone shed some light on why this is happening?
Firmware is reporting 15TH/s but BFGMiner says its only running at 200GH/s

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


text:
how to fix mining software make error? bfgminer bitcoin
so i have bfgminer up on a linux machine running fine purring away at 67Mh/s solo mining (geforce gtx460)
im attempting to build on a windows 10 machine
i have tried msys2 mgwin32 and 64 bit
nothing seems to work i get errors in all stages: autogen, configure and make
im using mgwin64bit now and got to the make stage succesfully...
i am able to autogen, configure but when it comes to make i get an error:
make[3]: Leaving directory '/home/virtu/bfgminer/libblkmaker'
  CCLD     bfgminer.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: bfgminer-miner.o:miner.c:(.rdata$.refptr.cpus[.refptr.cpus]+0x0): undefined reference to `cpus'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:1340: bfgminer.exe] Error 1
make[2]: Leaving directory '/home/virtu/bfgminer'
make[1]: *** [Makefile:2844: all-recursive] Error 1
make[1]: Leaving directory '/home/virtu/bfgminer'
make: *** [Makefile:1209: all] Error 2

Could someone help me come up with a solution?
in the meantime i will return to mingw32 and attempt to fix the no gcc or c compatible compiler issue on autogen/configure

error in miner file, something to do with cpus
./configure with enable cpu mining fixed this
now able to make bfgminer
note similar issue from other users:
https://github.com/luke-jr/bfgminer/issues/787

./configure --enable-cpumining && make

./configure --enable-cpumining && make


text:
Can I use "walletnotify" to watch outgoing transactions from a watch-only wallet?
I have a watch-only descriptor wallet. I'm interested in getting notified when funds are sent from this wallet. By looking at the code for walletnotify it seems like this is only called when funds are added to the wallet.
Is it somehow possible to configure walletnotify and a descriptor-based watch-only wallet such that I'm notified when a given UTXO is spent? Or is this otherwise possible using bitcoind?

walletnotify is called every time a wallet transaction occurs, i.e. a transaction in which at least one input or output belongs to the wallet. It doesn't matter if the transaction is incoming or outgoing, or whether it was created by the Bitcoin Core wallet or any other wallet with the same set of keys.


text:
Is there any point in including XPUB fingerprints in wallet descriptors?
Consider these descriptors:
1: pk(xpub68Enqrw9EMhovqR93YKMGJ67JiNqVkMxggjzJY3ijcJmFv4TSBqUXg94GXN4UCEop1MAmUUucDzUphakwFQy8Da8ENoiz7cBRA2P11GeKVU)#rrz9d6nw
2: pk([b3d53e5f]xpub68Enqrw9EMhovqR93YKMGJ67JiNqVkMxggjzJY3ijcJmFv4TSBqUXg94GXN4UCEop1MAmUUucDzUphakwFQy8Da8ENoiz7cBRA2P11GeKVU)#qx98nulh
3: pk([2f9a2980]xpub68Enqrw9EMhovqR93YKMGJ67JiNqVkMxggjzJY3ijcJmFv4TSBqUXg94GXN4UCEop1MAmUUucDzUphakwFQy8Da8ENoiz7cBRA2P11GeKVU)#zk36mwcm

They all contain the same XPUB. The first descriptor has no fingerprint/key identifier. The second descriptor contains its own fingerprint. The third descriptor contains the fingerprint of the master key from which it was derived.
When I pass these descriptors into bitcoin-cli deriveaddresses, they all yield the same result: 1HPsQmQYzaDqF4aVLS8Wy16mZ3KuaMgaVu.
I realize that the fingerprint says something about the chain of previous XPUBs, and can be used by wallets to verify ownership of a given key. In the context of a descriptor, do they provide any value, or can they safely be removed from the descriptor?

The fingerprint (usually together with the full derivation path for that key, which gives the full key origin information) only helps to identify the origin of a certain key. It does not affect the resulting addresses, however:

software wallets use it to identify which signing devices should be plugged in order to sign with a specific key; they also use it to correctly fill the various PSBT fields, which require the key origin information.
signing devices can then use the information in the PSBT in order to identify what keys in the descriptor are internal, and what are the derivation paths of the private keys they need to derive and sign with.

Without the key origin information in the PSBT, signing devices would have no idea what keys are their own, what keys belong to cosigners, and what derivation paths to sign with.
Note that storing that information as part of your backup is not optional: even if you own the seed (root key) from which a certain xpub is derived, there is no guaranteed way to be able to deduce the derivation path for that xpub - which is necessary in order to be able to spend it. The only option is brute-forcing all the possible paths, which in general is not guaranteed to be successful, or even feasible.
It is of course safe to strip the key origin information from the descriptor before sending it to a third party that only needs to use it in order to generate addresses, like a watch-only wallet.


text:
How is a double spend via 51% attack possible?
If a transaction is already mined in lets say block A and has 2 confirmations, how can this transaction be spent again?
My understanding is that for a transaction to be propagated to the network it must be verified by each node, one of the checks is to see if the referenced UTXOs have been spent.
In order to double spend the inputs referenced in this transaction included in block A each node would attempt to verify it but would reject the transaction since the inputs have already been spent and so the double spend attempt would fail regardless of if you have control of 51% of hashing power.
So how is it that these double spends are possible by remining block A in this case?

Bitcoin nodes have to be able to perform a blockchain reorganisation. This is because in a large network, two distant miners can mine a new block at the same time, each of which reaches their nearby nodes before the other miner's block. A subsequent blockchain reorganisation is necessary to make all nodes in the whole network have the same blocks in their copy of the blockchain. This replaces one of the two mined blocks. Generally this can happen after several blocks have been mined over each of the two different blocks at the same block-height. Nodes learning of the alternate head of blockchain choose the one with the most work (proof of work). During the reorganisation they make the appropriate deletions and additions to their UTXO set.
The attack called a "51% attack" is a way in which this necessary blockchain reorganisation process can be exploited by a miner with more than 50% of the total network hashing power (not of number of nodes as people sometimes mistakenly think)

Questions about 51% attack
What can an attacker with 51% of hash power do?


text:
Problem in understanding other miners validating puzzle solving miner's claim
I understand that miner's role is to validate the block of transactions by calculating nonce based on difficulty level and finding hash of {block + nonce + hash of previous block} .
Then it adds this block in the ledger and broadcasts to all nodes that it has solved the puzzle. Other nodes verify it and allow the that new chain in which block is added.
My question is, what if a node decides to change transaction data in a block and goes throught the process of calulating nonce and then finding hash and adding this block to chain. Other node will see that this node has correctly solved the puzzle and should allow the newly created chain. Right?
I don't know and it is not written anywhere that at the point when a node broadcasts that it has solved the puzzle and found hash of tampered transactions, is it the case that the other node has also solved the puzzle and hopefully with the untampered transactions? Because won't it be waster of resources to solve the same puzzle twice? And if other nodes do not solve the puzzle for the second time, how are they able to decide that the malicious node has solved the puzzle with the tampered transaction?

My question is, what if a node decides to change transaction data in a
  block and goes throught the process of calulating nonce and then
  finding hash and adding this block to chain. Other node will see that
  this node has correctly solved the puzzle and should allow the newly
  created chain. Right?

No. Unless you mean changing the order of, or which transactions are included. Any unauthorized modifications to the transaction data itself will invalidate the digital signature. Any blocks with invalid transactions will be rejected by the bitcoin-core software that runs on the nodes on the network. Any work done (for PoW) is therefore wasted if the transactions are tampered with. Also, nodes don't typically mine anymore, it's the miners that do the proof-of-work, and then submit the work to the node for validation. This includes validating all of the transactions along with the proof of work.

I understand that miner's role is to validate the block of
  transactions by calculating nonce based on difficulty level and
  finding hash of {block + nonce + hash of previous block} .

The miners role is not to validate the block of transactions (though it might choose to in order to prevent wasting resources), it is the role of the node. Also, proof of work is done by hashing the block header, which includes: version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce, see Bitcoin Mining Algorithm.

I understand that miner's role is to validate the block of transactions by calculating nonce based on difficulty level and finding hash of {block + nonce + hash of previous block} .

More accurately: the miner's role is to confirm the block of transactions. Each and every node (and miner) will independently verify the validity of all transactions and blocks. 'Validation' is not just the job of a miner. As mentioned by JBaczuk, the POW blockhash is actually computed on version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce.

My question is, what if a node decides to change transaction data in a block and goes throught the process of calulating nonce and then finding hash and adding this block to chain. Other node will see that this node has correctly solved the puzzle and should allow the newly created chain. Right?

Not quite. Once a transaction is confirmed in a block, any new subsequent block that spends the same UTXO will be invalid (since that UTXO was already spent).
If the miner attempts to re-mine that original block (ie. a new block with the altered transaction, at the same blockheight), this will likely fail and be a waste of their resources. Even if they do find a valid block, the rest of the network will already know about the first version of that block, and the other miners will be working on the next block already (or they will have already found it). So even if your altered block is valid, the network will still ignore it since the network has already accepted a longest (most work) chain, that does not include your block.

I don't know and it is not written anywhere that at the point when a node broadcasts that it has solved the puzzle and found hash of tampered transactions, is it the case that the other node has also solved the puzzle and hopefully with the untampered transactions?

Transactions generally can't be meaningfully 'tampered with'. Transaction malleability is an edge case that could be considered, but otherwise changing the contents of a transaction will make it invalid. When a node verifies the validity of a block, it would catch any invalid transactions, and thus drop the block for being invalid.
Other ways you could change a block's transaction content would include adding or removing certain transactions from the block, changing the ordering of the transaction in the block, or substituting one transaction for another (that spends the same UTXO, see double spend attacks).

In short: Since the miners are always incentivized to mine at the chain tip, having a miner work on re-mining an old block to introduce an 'altered' block in some way ultimately doesn't really matter to the rest of the network participants. The network just ignores the altered block, meaning the net outcome is that the miner that made the altered block just wasted their resources.


text:
Why does Bitcoin no longer have checkpoints?
I've read that checkpoints in Bitcoin were removed because they were not preventing any meaningful attack.
Why should a regular checkpoint not prevent majority attacks? For instance, if a checkpoint is made every N blocks and (for example) 3/4 of the hash power agrees, would this not be possible to be used as a mechanism to create a permanent confirmation of the transactions before the checkpoint? Assuming, of course, that clients would check for those checkpoints and enforce them to be included in the valid chain.

If N is large then it doesn't help much, because majority attacks can be very damaging even if they only roll back a few blocks.  If N is small then whoever sets the checkpoints has disproportionate power in determining which is the "right" branch of the blockchain, violating the goal of decentralization.

Can't the right branch of the blockchain be the one with the more PoW at the time of the checkpoint?

@confused00 Yes, that is what it would be if N was six blocks. In the case of a network split (say someone cut the undersea cables to New Zealand) then when the network rejoins how should this be resolved?

The issue is that you assume a majority attack is an attack that can be prevented. It is not. It is a fundamental breakdown of the security assumptions.
Proof of work (PoW)'s assumption is that the majority of the hashrate will cooperate and converge on a single chain, because it is most financially advantageous thing to do. When that is no longer the case, PoW is broken and we should just move to something else - not to try to fix it up.
You might think that adding checkpoints helps to improve this situation, but consider this:

Either the checkpoints are created for old blocks (weeks or months old), in which case there is clearly nothing being prevented. A week-deep reorganization would utterly destroy the currency and the trust in it, and not be prevented by this.

Or the checkpoints are created for recent blocks (days or hours perhaps), in which case they may indeed affect what chain is accepted on the network during certain circumstances, but at the same time it is effectively replacing PoW based consensus with "developers-decide" consensus... something that doesn't need a complex peer to peer protocol at all, as effectively developers need to run systems to keep the system in check.

So, either checkpoints have an effect - and change the security assumptions into an uninteresting one, or they don't - and they don't matter.
To answer your question: the primary reason for removing checkpoints is due to the confusion they create. They make people think they're part of the system's security model (like your question shows). That is not the case. It was introduced as a necessity for implementing an optimization (skipping script validation) and an unrelated denial-of-service attack (the disk of a new node being filled with low-difficulty blocks during synchronization). Since some changes in the P2P protocol (headers based synchronization) we no longer need checkpoints to do these things safely.

This answer misses the temporal aspect of attacks.  Most coins except Bitcoin can have 51%

@user239558 Then they're broken.

There is one kind of majority attack that you didn't mention which checkpoints neatly solve. The construction of a longer but invalid chain. If an attacker constructs a chain with just one invalid transaction, then the rest of the chain forever on matches bitcoin consensus, checkpoints save new nodes from having to validate both chains all the way back to that invalid block. The attack is one that would disrupt new nodes - delaying them from entering the network, potentially by a long time. We can't assume Bitcoin will always have the most hashpower.

@B T I don't understand. If there is another majority chain (which I think inherently makes the minority one insecure, but ok), the fork will happen at the first block which is invalid to Bitcoin. That's at most one block that needs to be validated and rejected. Its successors won't even be downloaded.

You're right that another majority chain puts a minority chain at risk. I see your point there. However, you said "there's at most one block that needs to be validated" - but how do you know which block that is? I suppose .. you could ask other nodes for hints, which is likely to help you figure out where the split happens. I guess that sufficiently solves the problem. Thanks for following up! I'll have to do some thinking on that and probably revise my position.

You validate blocks one by one, from parent to child. If at any point you find an invalid block, you mark it plus all its descendants as invalid. If you never notice the block causing the fork simply means you have not seen the fork.

"When that is no longer the case, PoW is broken and we should just move to something else". I think the function of PoW would be degraded, not broken. Being forced to choose between two alternative chains (or a small number of them) with a significant amount of PoW still allows for a more effective convergence to consensus than having no honest signal at all to coordinate.


text:
Where can I find the rpc api endpoints for electrum?
Somehow I cannot find a list of the possible rpc commands. Basically they are just the bitcoin rpc commands I guess but I cannot find a list for that either...
There are some examples here:
http://docs.electrum.org/en/latest/merchant.html#jsonrpc-interface
Also there is a list here but e.g. addrequest from the link above is not in there:
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

Electrum RPC methods a little different from full bitcoin node RPC. You can run help command in order to get all methods. Here is an example:
"addrequest",
"addtransaction",
"broadcast",
"clearrequests",
"commands",
"create",
"createmultisig",
"createnewaddress",
"decrypt",
"deserialize",
"dumpprivkeys",
"encrypt",
"freeze",
"getaddressbalance",
"getaddresshistory",
"getaddressunspent",
"getalias",
"getbalance",
"getconfig",
"getfeerate",
"getmasterprivate",
"getmerkle",
"getmpk",
"getprivatekeys",
"getpubkeys",
"getrequest",
"getseed",
"getservers",
"gettransaction",
"getunusedaddress",
"help",
"history",
"importprivkey",
"is_synchronized",
"ismine",
"listaddresses",
"listcontacts",
"listrequests",
"listunspent",
"make_seed",
"notify",
"password",
"payto",
"paytomany",
"restore",
"rmrequest",
"searchcontacts",
"serialize",
"setconfig",
"setlabel",
"signmessage",
"signrequest",
"signtransaction",
"sweep",
"unfreeze",
"validateaddress",
"verifymessage",
"version"

Electrum RPC methods list are give below
Methods
blockchain.block.subscribe
blockchain.block.unsubscribe
blockchain.block.broadcast

blockchain.address.subscribe
blockchain.address.unsubscribe
blockchain.address.get_history
blockchain.address.get_balance

blockchain.transaction.broadcast
blockchain.transaction.get

blockchain.transactions.guess_fee
blockchain.transactions.subscribe
blockchain.transactions.unsubscribe

firstbits.resolve
firstbits.lookup

https://electrum.readthedocs.io/en/latest/protocol.html

check :
  https://docs.google.com/document/d/17zHy1SUlhgtCMbypO8cHgpWH73V5iUQKk_0rWvMqSNs/edit?hl=en_US#heading=h.qehquy6h3br2


text:
How do I download the blockchain from a specific height (409668)
I'd like to download the blockchain from height 409668 (first block on May 1st). I need data on time it was mined, and the amount of transactions it included.
If I don't need to download the blockchain to get this data, that would be 10x better. Where can I get a CSV of this? Otherwise, where can I download the blockchain and get this data from?

https://blockchair.com/bitcoin/blocks?q=id(409668..) will list all the blocks from that height onwards. You can use the filtering at the bottom of the page to restrict the data to the fields you desire. You can then export it to csv.

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


text:
What prevents broadcasting of fraudulent transactions
I see a lot of questions and articles about why someone can't generate fake coins, maliciously attack the network, and essentially security discussions focused on the generation and interception of coins.  With the blockchain being described as a ledger, what prevents someone from simply broadcasting a transaction moving a small amount (fractions) of coins from one account to theirs?  Or can coin movements only be originated from the source address?

When broadcasting a tx, a regular node checks for two things: Is the transaction standard, and is the transaction valid.
Standard transactions are, for simplicity's sake, transactions that create p2sh, p2pkh, p2wpkh, p2wsh, and OP_RETURN outputs. A standard transaction must also consume inputs in a few known scripts, namely multisig and regular single key scripts.
The transaction being valid is what prevents your scenario. For a transaction to be valid, a transaction must spend inputs that already exist and are unspent (unspent transaction outputs, or utxos), and the scriptsig for each input must verify. For a standard transaction, this means that the signatures on the tx must validate the script specified at output creation time.
You can try to make a fraudulent tx in two ways:

You spend coins that exist, but are not your own - In this case, the input validation will succeed, but since you don't own these coins, you cannot sign for them, and the signature validation will fail. The network will refuse to broadcast your transaction
You spend coins that don't exist - In this case, the network will simply reject your tx with a missing inputs error, since you can't spend coins that don't exist

So in short, without a combination of someone's address and private key, a malicious actor cannot generate a transaction that moves coins from the target's wallet to another wallet.  The transactions that are being copied over and over on the public ledger have already been securely vetted before they can be widely broadcast.

Validation.
You can totally broadcast a fraudulent transaction, but nodes in the network will ignore it as it is invalid.
Furthermore, nodes will also ignore any blockchain which contains any fraudulent transaction. As a result, miners are financially disincentivized from doing so.

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


text:
Unlocking a Private Key from watch status
I received Some mining profits to my Blockchain. However the person who sent them to me send them to me with a private key. They then wanted me to send them money to unlock the private key. Does anyone know of a way that I can get that private key unlocked so I can recoup my profits from them without paying them to do so?

You are almost definitely being scammed. Private keys do not need unlocking. They are either lying about what they sent to you, or are just plain trying to scam you

Thank You that is what i believed as well.  I have not a d will not give them money.  It shows up in my block chain as watch only.

Agreed, sounds like a scam to me! Do not send any more money to them

Possible duplicate of I need to recover private key?,

First, confirm that you did indeed receive a private key.  On Bitcoin mainnet, private keys are almost always distributed in a format that starts with either a K or an L (capitalized in either case) and are usually 52 alphanumeric characters long.  Here's an example:
L3SD2fM9hzVJyr4zxoHqXHDqHTVfQpbLuWDVm6b6W7PTCSYpkujd

If you instead received a code starting with a 1, a 3, or bc1, then what you received was an address.  If you received a hexadecimal code that was 130 characters long and started with 04 or 66 characters long and starting with 02 or 03, then what you received was a public key.  None of those are private keys, and there's no way to get the private key from an address or a public key.  Here are some examples of addresses and public keys:
1GWLEdJRaMTQSe7NkPAfBCZaR1XdTz4dct
3DXNLK83EiMsseHTfGySGvDL64CKpRTf6G
bc1q4gtqryu6dhs4vzwqwp9fjxegc4rmxcx6shn3qs
03d8f40442a837693820c4ca35bff30036af4df79c5563375200313462086b6d31

If you have any other type of information, that's probably also not a private key and it may have nothing specific to do with Bitcoin.
If you do indeed have a private key, you can import it into most Bitcoin wallets.  See the documentation for your specific wallet for instructions (if you can't find the documentation for importing private keys, feel free to ask a separate question).
You don't need any special information to "unlock a private key".  In addition, the normal way to receive mining profits is by a normal Bitcoin payment to one of your addresses; I've never before heard of any mining pool paying profits by distributing private keys as that has all the same costs plus a large additional security risk.  It seems likely to me that the person you're communicating with is attempting to steal money from you, so be careful in your dealings with them.

If you have the private key you do not need to pay to unlock it.
First you need a wallet and then you need to import the private key.
You can see my previous answer here for some information on choosing a wallet.
Importing the private key will be a different procedure depending on what wallet you choose.
For example, importang a private key in Electrum for an address starting with 3 is here (not the key, the address that the key makes) - it is slightly different if the address where the payment was sent is starting with either a 1 or bc1. If you do not know which address is correct you can import the private key multiple times. You can ask an additional question if you need to, it may have already been answered if you search.
But, the private key may not be a raw private key and may already be formatted for the address type.


text:
How do I recover bch sent to external btc address?
I mistakenly sent bitcoin cash from my bch wallet to an online casino but I sent it to their bitcoin wallet instead of their bch wallet and they didn't receive the funds to credit my account. Can someone please help me recover my bch if possible.

Most likely, you can't.
I am going to assume this happened recently.  If you recently sent BCH to a BTC address, then most likely it was sent to a segwit enabled address. If that is the case, they are probably gone and locked up forever.
IF you sent them to a legacy address, they will show up in the wallet. BUT, there may be more problems.  If the client that contains this wallet is segwit enabled, you CAN'T and should not attempt to just send them back without first disabling segwit.
The best scenario, is they were sent to a legacy wallet address on a legacy client. i,e. no salt, no segwit, etc.  Then you may recover them.
No matter what the case, it is worth at least trying.  You can try with one of these. https://bch.btc.com/docs/help/bch_segwit_recovery
Good luck!

Thank you @Aaron. I am a beginner son everything under the link you sent is foreign to me. I totally have no idea. It wasn't much but I was hoping to some way get it back. Guess I can cut my losses


text:
Seed recovery strategy
I got locked out of my Ledger Nano S. When setting up the device I was given a 24 words seed passphrase, which I wrote down. The device asked me to verify 3 of the 24 words and my input was valid.
It now turned out that I made a mistake when writing the seed passphrase down since the checksum doesn't validate and I can't recover my wallets. All words that I wrote down are words that are in the BIP32 spec words list.
What strategy would you use (involving coding or not coding) to try and fix the seed passphrase?

You most likely mistyped one or several words.
Manually trying different combinations can be a tedius process.
If I were you, I would be using seed recovery tool like btcrecover.
Are you familiar with the Levenshtein distance? The word(s) you misstyped are most probably the one(s) with shortest Levenshtein distance to the BIP32 spec words.
Example:

staff can easily be mistaken for stuff or vice versa, since both are BIP32
  words.

Thanks. Wanted to use btcrecover but it doesn't seem to support Segwit BTC addresses (P2SH starting with 3).


text:
Bitcoin integration api for website
i'm interested making a website allowing users to send and withdraw btc from it (every user will have private address on the site) , is there any suggestions of api i could use that will store the bitcoins on the server and not some third part service that stores the btc?

Why do you need to store user's bitcoin? What is the use case?

@MatthewStannard Thinking of making an bitcoin exchange to other alt coins, but as start i want to work on the bitcoin receive and withdraw first

Are you working with have a team of developers who have Information Security experience?

@MatthewStannard Planning to hire an expert to make all the needed security when i'm done with my part :)

You can't add security to an insecure system after it has been built. If you're certain you want to take on the responsibility of handling customers' funds, then I would work with a team of information security experts from the beginning and throughout the lifetime of your service.

@MatthewStannard does one developer is able to know both the site developing part and also doing the security?

It is possible that a single person has the expertise to build both the site and implement the necessary security requirements. But is is rare.

@MatthewStannard could you give an example of some common breach that requires some special security requirements?

As this is a separate question you should consider asking an new question. Try asking about common causes of data breaches over at https://security.stackexchange.com/.


text:
Almost a month, transaction still not confirmed... help?
I sent a transaction of 0.12 BTC with a fee of 11 sat/b. I expected the transaction to take a while to send, like a week, but it's already been almost a month. Is there something I can do to boost the transaction? A month ago I also sent a transaction of 0.03 BTC with a 15 sat/b fee and it took 4 hours to confirm. I didn't expected the 11 sat/b fee to take so much longer...

RBF (Replace-By-Fee) will solve your problem. What wallet do you use?

I'm not familiar with the RBF. I'm using a Copay wallet.

It seems this is an open issue on their GitHub regarding RBF support.

If you export your private key from Copay to Electrum, you may be able to double-spend the transaction.

You can enable in Copay/BitPay Wallet the option for use unconfirmed spents... So you can re-send it with a fee greater than the last you used


text:
Bitcoin unconfirmed trasection to cancel
I am new to bitcoin. i use blockchain. info.
i sent vtc to a purse on 15.12.17, but i am stuck still there after 20days.
i determined to cancel the reanection.
please help me.
Transection ID: https://blockchain.info/tx/2bd29e84967f6ee9c392b8bb8cb4cadb7e1560604f92dfbd57d88268b6c99714
please help me to cancel this. Thanks in advance

It is not possible to 'cancel' a published transaction. After you publish a transaction to the network, all of the nodes will relay your transaction, so that eventually they (should) all know of your transaction. If you tried to publish a 'cancel request', you would have no guarantee that every single node would hear about that request, and even if they did, they may not be incentivized to listen to it. So 'cancelling' a transaction is not part of the protocol.
Your transaction included a low fee, and so it has not yet confirmed. Eventually, the network's nodes may all 'forget' about your transaction, so you could then re-spend the coins to an address you control. Take a look at this question for more info on unconfirmed transactions.

still unconfirmed, pending....

You can not cancel transaction.
Next time do not put your funds in the technology you do not understand. 0.00561718 BTC - is not a significant amount paid for a knowledge.

i wanted to pay from a marchant website. then after payment, its stuck. please help to recover. (cancel/payment confirmation)

still not reached, pending......


text:
Understanding Blockchain client implementation details
I've started building a custom blockchain as a side project. The goal is to understand and familiarize myself with implementation details that are not usually described in a "What is blockchain" article or similar post. I'm looking for sources, with good examples if possible, on how different problems are solved like block publishing and sharing, node discover, validating transactions, block composition etc. I've gone through a small part of the Bitcoin protocol documentation on the bitcoin wiki and plan to read through the rest of it but, as expected, it is more of a reference and less of an educational resource. Is there any other place that one can read about how to tackle such problems? I've seen tutorials on "How to build a blockchain" but they mostly talk about the chain itself (i.e. creating a block from arbitrary transactions, generating PoW and linking the new block to the chain) without addressing all the "inbetween" stuff which is in my opinion the critical information.

The source code of Bitcoin's reference client, Bitcoin Core, is a good place to learn how the Bitcoin developers solved these problems. You can find Doxygen documentation for the source code here.


text:
How would a governmental Bitcoin ban work in practice?
How does a potantial Bitcoin ban work in practice in a regime that a.) at least partially allows access to the Internet, and b.) has at least one payment system that is not closely monitored by the government, such as cash.
Some difficulties of enforcing such a ban I can imagine:

Outside exchange access
Although direct access to Bitcoin exchanges behind a nationwide firewall can be restricted (and most likely is), there always exist Tor, proxies, tunnels, VPNs etc. In the extreme case, one could think of using a phone as some sort of acoustic coupler to talk to the outside world, provided there is a counter part of such a tech behind that firewall. Or think of satellite access. Talking to a Bitcoin exchange to obtain coins doesn't require much bandwidth. Paying such an exchange could be an issue if, e.g. the banking system closely monitors all parties involved in credit card transactions. But there may be other ways of paying an outside exchange.
What means could be used to ban access to outside exchanges, and how effective can they be?
Running an exchange inside the country
Obviously such an exchange could only trade coins that are already inside the country if points (1) and (3) cannot be overcome, as far as one can talk about locality of coins in a meaningful sense. Is there anything that could prevent anyone running an exchange by means of splitting the coins already in possession for accepting cash, at an ad hoc spot that frequently changes?
Banning the Bitcoin network itself
Ports can be closed by ISPs etc., but that can be circumvented by simply using ports that must be open (HTTP(S), FTP, IMAP)). As with point (1), there can be simple makeshift ways of obtaining the blockchain from the outside, and transferring blocks with transactions from inside the country back into the blockchain.
As with point (1), what means could be used here, and how effective can they be? Also, how can mining be effectively banned?
Bringing coins into the country
Assuming there are no travel restrictions, so they can go overseas, obtain coins there and bring them into the country, either electronically disguised or encrypted on their devices, or as paper wallets that can easily be hidden.
What systems must be in place to prevent physical import of coins? How useful or practical are physical coins (I know they are not very secure, but that's not the point here), provided they can be inserted into electronic wallets again?
Payment
Obviously, officially registered businesses could not accept Bitcoin (at least not officially), but coins could easily be transferred from person to person once (1) is solved, provided they have the means to setup nodes and inject transactions into the blockchain.
How could a ban private to private even work? Is it even practical to impose such a ban?

It would be great if anyone could answer these questions also in the context of nations that are contentious or outright hostile towards Bitcoin, such as Mainland China, India, Kazakhstan, Bangladesh, Ecuador, Bolivia, Algeria etc.

You may be thinking about this the wrong way.
Most countries have a ban on cars driving above a speed limit. However this is not enforced by using technical means that prevent cars driving over the limit.
These rules are enforced by doing unpleasant things to people who are detected as having broken the rules.
You may go on to suggest that rules need technical means of detection. But remember that detection need not be perfect. If the consequence of detection is that you lose your job and you life is ruined, few people will take the risk.

Fair point. The punishment needs to be just high enough, and most people will be discouraged. However, I'm really more interested one how such laws would need to be phrased and how these phrases are technically enforced, given the context of Bitcoin and its virtual nature. Speeding is a physical thing and can easily be put in words, using terms such as "speed limit", "higher", "faster" etc. It can also relatively easily detected, and the uncertainty of where speed cameras etc. are does its job. With Bitcoin, a law such as "Bitcoins are forbidden." would merely cause a giggle in the community.

If you could drive your car through your own invisible and private scrutiny-proof tunnel from the inside of your garage to your destination, regardless of the indirect route that the tunnel actually takes, with huge traffic mixing interconnecting nodes all over the place where you change cars and many others using the same system then, the similarity to using Bitcoin over Tor would be striking. TMU would only be aware that the tunnels and mixing nodes exist.They could, of course, block the lane that the tunnel operates on but, there is always another lane.


text:
How can I transfer tether(USDT) using omni JSON RPC API?
I looked for the information but I couldn't find that. It seemed to be done as I always do for Bitcoin though.
Any idea?

So for Omni layer token you do this omni_send
https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md#omni_send
This is what you need (at least on Kraken and Bittrex USDT is Omnilayer token). To send Omnilayer transaction you need to have some BTC on the same address for transaction fee. And you also need to know USDT propertyId which is 31 (https://omniexplorer.info/asset/31)
Just in case:
For ETH token you do eth_sendTransaction(different methods are possible like eth_sendRawTransaction) https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction. You need to know contract address of the token and it is your parameter to, from is normal address from here is the funny part - token transaction is defined in data. Lets take an example https://etherscan.io/tx/0x6fcf7dc3f6bc2b7e8a9e6b13689d042e659b2d016a3bdf7beffd033ab9b6db1e
this is 2.55 BNB(contract address 0xB8c77482e45F1F44dE1745F52C74426C631bDD52,  parameter to) token transfer(method name encoded in data as first 10 digits 0xa9059cbb) from 0x0861d1b074eb2489dd7878a5d6d869db5896a5f0 (parameter from) to 0x4283f315788b09a357ca83b8134cd48bde8b556f (middle part of data with some padding 0000000000000000000000004283f315788b09a357ca83b8134cd48bde8b556f). Last part of data is token amount in wei. BNB has 18 decimal places and the best way to explain that IMHO is this python assertion:

assert int('0x00000000000000000000000000000000000000000000000023803234a2f38c00', 16) * 1e-18 == 2.55809979

USDT is also an ERC20 contract in Ethereum mainnet. You need to use one of Ethereum Wallet accepting RPC calls (Geth, Parity, etc.). Then find contract address (check Etherscan). Then install contract to your wallet and manage your transaction.

I saw that it was on Omni layers on their website though .

Tether is also on the omni layer (it was originally only here, ERC20 is a new addition): https://www.omniexplorer.info/address/3MbYQMMmSkC3AgWkj9FMo5LsPTW1zBTwXL

Ohh.. My bad. Ignore my answer then.


text:
What transactions didn't make it to the Bitcoin blockchain?
Bitcoin,I want to transfer some Amount so I broadcast a transaction that is picked up by miners. So if my transaction get's in 2 different currently processing blocks by different miners and one of them is mined into the blockchain, the second miner's block is dropped.
My transaction did, but also some transactions did not make it to
the mined block.
How does the protocol know which transactions made it and which didn't? Another way of asking, how is a transaction "marked" as mined so if it's still floating in the p2p network, miners know that this transaction is already in the blockchain.

How does the protocol know which transactions made it and which didn't?

Once a transaction is mined, all the network knows it's there. No one will keep it in their mem-pool any longer. Only before it's in the canonical chain you don't know who's seen it.

the longest chain is always the chain which will be accepted by all nodes and miner. the other blocks in your scenario are called orphaned blocks. a good explanation for the longest chain is here.


text:
In Litecoin every single block is mined every 2.5 minutes, double spending?
In Bitcoin it takes roughly 10 minutes for every block to be mined.
In Litecoin it takes 2,5 minutes.
2.5 minutes in Litecoin mean that transactions can be confirmed faster.
In Bitcoin these 10 minutes are not  coincidentally, it has been choosen also to prevent double spending.
Why does Litecoin allows 2,5 minutes and not, like Bitcoin, 10 minutes?
Is the probability of having double spendings in Litecoin not much higher when using 2,5 minutes ?

The probability is not dependent on the block time alone, it is dependent on the block time, and how many blocks you wait before considering a transaction complete.
For Bitcoin, generally 6 blocks is considered to be the point after which a chain reorganization that changes the block the tx is in is considered to be impractically due to the cost involved with gaining enough hashpower to roll back 6 blocks.
Due to this, most exchanges and merchants will require 6 confirmations before crediting your account (although, Bitcoin is by far the largest network in terms of mining power, so for certain use cases, even 2-3 confirmations can be considered enough).
Litecoin has a lower block time, and to guarantee the same security, receivers should wait for a greater number of confirmations before considering the deposit complete.
Ethereum, with a block time of 15 seconds, is even faster. Thus, many exchanges will wait for even more confirmations (I've seen up to 50 for ETH and token deposits).
The block time alone does not guarantee safety against double spends. Even a 10 minute block-time chain can be double spent if you only wait for a single confirmation.  To prevent double spends, you simply need to find the tradeoff point after which it is impractical for someone to roll back the chain.
In most cases, the actual confirmation count used is often less than this impracticality point, since for smaller chains it may require too many confirmations, leading to a usability issue. Thus, exchanges may settle for a lower number of confirmations than required for absolute safety, but still good enough to guarantee it in the vast, vast majority of cases.


text:
Understanding how validation of a transaction works
As far as I understood, a transaction works like this:
Alice wants to send 5 BTC to Bob. Alice creates her digital signature that contains transcation info like id etc. She encrypts the signature with her private key. She creates scriptPubKey and scriptSig, she has the Bitcoin-Adress of Bob.
This transaction has to be verified by nodes. A node checks this transaction. He checks if Alice really has 5 BTC by checking her input. If it's ok, then all is fine. The node additionally checks Alice's digital signature. The node extracs Bob's Bitcoin Adress from Alice's signature. If it's ok, the Node puts the transaction to the mempool.
Nothing was mined until here. Now, due to the broadcast system and p2p network of Bitcoin, a Miner picks this transcation from the mempool.
What does he do now? Does he assume, that the transaction is valid or does he check the transaction again ?
If he does not check the transaction again, and assumes, that the transcation is valid, he creates a Merkle-Tree of several transactions, puts it in a block. Uses SHA-256(Blockhash+nonce) and tries to mine.
Is that right, what I've understood so far or did I make a mistake ?

Alice creates her digital signature that contains transcation info like id etc.

The digital signature only applies to certain inputs and outputs within the transaction, depending on the SIGHASH type. The default is SIGHASH_ALL, in which case all inputs and outputs are signed by every participant in the transaction (where one participant equals the required keys for an input). It is possible that all participants are actually the same key (or set of keys for a multisig address).

She encrypts the signature with her private key.

Nothing is encrypted. The signature is over plaintext data, and the signature is serialized into the tx as is. There is no encryption anywhere.

She creates scriptPubKey and scriptSig, she has the Bitcoin-Adress of Bob.

The scriptPubKey is created prior to the signing, as it is part of the unsigned transaction in the vout. The scriptSig is created using the signature and the public key (when spending a pay-to-pubkey-hash input), or the redeem script (when spending a pay-to-script-hash input). For segwit addresses, the signature and witness program are not serialize within the input, but are added to a special witness field in the transaction.

The node extracs Bob's Bitcoin Adress from Alice's signature

Bob's address is part of the vout set in the transaction. It is not included in the signature. In certain SIGHASH types, the output is signed and verified by the signature, but it is not included in it.

a Miner picks this transcation from the mempool.

Every node maintains its own mempool. The correct flow would be:

The transaction makes its way across the p2p network to the miner's node
The miner's node verifies the transaction
If valid, the tx is added to that node's mempool
The tx may make its way into the block template being mined at some point, depending on the fee.

he creates a Merkle-Tree of several transactions, puts it in a block. Uses SHA-256(Blockhash+nonce) and tries to mine.

Only the merkle tree root is added to the block header.
The hashing operations are performed on the block header, which contains the nonce.
The merkle tree is not stored anywhere. When needed, it is constructed from the list of transactions in the block.


text:
Moving Bitcoin from Bitcoin Core to another Bitcoin Core or Bitcoin Diamond
Before I even begin I'm going to admit that I know it was my fault in the end.
I was part of a community for crypto on a chatting server. I've been a part of it for more than a year. I got to know some people and asked one of the people I knew about getting some help for the following:
I've had a Bitcoin Core Wallet on my desktop from 2016 that I've held my Bitcoin in this whole time. I knew there were waves of up and down to come but I didn't want to sell. Part of being a hodler and thought I had helped the Bitcoin price by just keeping it and not doing anything with it.
Recently I had asked if anyone had experience with forks from a Bitcoin Core Wallet in said chatting community. One of the guys I know said he did and was willing to help. We got on TeamViewer and set everything up for forking. I had my Bitcoin Core Wallet on my desktop that was a bit outdated and a new laptop that I said would be better to put new wallets on for processing wallet nodes faster. We had done the BTG Core Wallet the other day and was going to do the Bitcoin Diamond one. He said that it would have to be a bit different from the Bitcoin Cash and Bitcoin Gold ones we did.
We got on Team Viewer again and I started downloading the Bitcoin Diamond Core Wallet on my laptop. He said it wasn't going to work on the laptop so we needed to connect on my Desktop that has the original Bitcoin Core Wallet. I said I wasn't comfortable with moving any Bitcoins out of the wallet itself and that I wouldn't let him have any control over the session. He said it was fine and would just type on the chat system of what he needed me to do (as usual). He asked that I had the wallet open so he can just look and tell me what to do. After he connected he said he would brb so I waited. After a few minutes, and almost instantly, before I could do anything he had sent a request from my BTC Core Wallet to transfer to an unknown address and clicked the shut down on my computer.
I was still on the laptop and he was in the chat so I just asked why and wanted to know what he did. He said that he "sent it to the BCD addy". I didn't know what he meant so I asked. He said "you need to send it onto the bcdblockchain im pretty sure" and that I should have the Bitcoin Diamond on the Bitcoin Diamond Core Wallet on my laptop. The BTD wallet is not synced and said we had to wait for it to finish (still not finished). After that he appeared offline and hasn't spoken to me from that point (late last night).
My question is this:
potential situation #1: If he did send said BTC to the BTD wallet, what should I do?
potential situation #2: If he sent to the Bitcoin Core wallet on said laptop instead what should I do? That one is also syncing as I put it on in case I had to move wallets, but it looks like he might have put the .dat file on it from desktop wallet (not sure).
Potential situation #3: If he moved it out of said wallet I don't control is there anything I can do? I know I would have to report a theft, but anything else?
thanks in advance

he moved it out of said wallet I don't control

Yes, your helper stole all your money.

is there anything I can do?

No, report the theft to the police.
Your money is gone forever though.

I don't understand your question but I will try to help..
First you should never give access to your pc except your self, if he transfer the coins to their own address you can't access them with simple words he stole your coins, to check if you still own the coins check your addresses from core wallet in a fork block explorer


text:
Are multiple parents/children possible in a block?
I always learnt/thought bitcoin blockchain is like a linked list and it can have only one parent and one child at max

Inside each block there is an eighty bytes block header with space for exactly one previous block hash of length 32 bytes. So, no, you can not create multiple children/parent in normal scenario.
But, sometimes there is a fork, there there will be multiple next block from a single block. Theoretically there could be unlimited number of such things, but for bitcoin those are bound to be very few and very short lived because of the cost of producing a block and one fork chain will win and everybody forget the other forks/next blocks.


text:
Where's the code that bitcoin core uses to generate private keys
I was looking through the repository but theres just too many folders to go through
https://github.com/bitcoin/bitcoin
Wheres the code bitcoin core uses to generate private keys?

I want to replicate that in a small program Im making

Here's what I did to find out:
BIP32 says:

Master key generation
The total number of possible extended keypairs
is almost 2512, but the produced keys are only 256 bits long, and
offer about half of that in terms of security. Therefore, master keys
are not generated directly, but instead from a potentially short seed
value.

Generate a seed byte sequence S of a chosen length (between 128 and
512 bits; 256 bits is advised) from a (P)RNG.
Calculate I = HMAC-SHA512(Key = "Bitcoin seed", Data = S)
Split I into two 32-byte sequences, IL and IR.
Use parse256(IL) as master secret key, and IR as master chain code.

In case parse256(IL) is 0 or parse256(IL) ≥ n, the master key is invalid.

(my emphasis)
So we need to find references to HMAC-SHA512 (or variations):

C:> findstr /S  "HMAC.SHA512" *.cpp *.h
bitcoin-master\src\crypto\hmac_sha512.cpp:CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen)
bitcoin-master\src\crypto\hmac_sha512.cpp:void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE])
bitcoin-master\src\crypto\hmac_sha512.h:#ifndef BITCOIN_CRYPTO_HMAC_SHA512_H
bitcoin-master\src\crypto\hmac_sha512.h:#define BITCOIN_CRYPTO_HMAC_SHA512_H
bitcoin-master\src\crypto\hmac_sha512.h:class CHMAC_SHA512
bitcoin-master\src\crypto\hmac_sha512.h:    CHMAC_SHA512(const unsigned char* key, size_t keylen);
bitcoin-master\src\crypto\hmac_sha512.h:    CHMAC_SHA512& Write(const unsigned char* data, size_t len)
bitcoin-master\src\crypto\hmac_sha512.h:#endif // BITCOIN_CRYPTO_HMAC_SHA512_H
bitcoin-master\src\hash.cpp:    CHMAC_SHA512(chainCode.begin(), chainCode.size()).Write(&header, 1).Write(data, 32).Write(num, 4).Finalize(output);
bitcoin-master\src\key.cpp:    CHMAC_SHA512{hashkey, sizeof(hashkey)}.Write(seed.data(), seed.size()).Finalize(vout.data());
bitcoin-master\src\test\crypto_tests.cpp:    TestVector(CHMAC_SHA512(key.data(), key.size()), ParseHex(hexin), ParseHex(hexout));
bitcoin-master\src\test\fuzz\crypto.cpp:    CHMAC_SHA512 hmac_sha512{data.data(), data.size()};
bitcoin-master\src\test\fuzz\crypto.cpp:                        data.resize(CHMAC_SHA512::OUTPUT_SIZE);

So key.cpp seems to be calling (rather than defining) HMAC_SHA512 ...
I stopped there but you could make a note of the name of the method in key.cpp that calls HMAC_SHA512 and repeat the search for calls to that method until you find code whose method names, variable names and comments suggest you have reached the right place.
Obviously, on Linux  instead of findstr /S you'll use grep -r .

Note that using any of this code is likely to be subject to the licence terms and conditions. These are set out in the file named COPYING - it is the MIT licence.


text:
Will the Taproot upgrade solve Bitcoin's scalability issues?
I understand that scaling Bitcoin is a complicated process so a single upgrade probably won't solve the whole problem, but what do you think the impact of the Taproot upgrade will be on Bitcoin's scalability? Will the lightning network solve some scalability issues and gain real world adoption?

Taproot increases slightly the throughput of transactions in the Bitcoin base layer. This increase can certainly not be considered a solution to scalability. However, its implications for the lightning network are severe. For example with taproot one can create cancelable payments to mitigate a stuck onion. This results in an improved user experience and, in combination with other techniques like redundancy in multi-path payments, an improved payment reliability which might help with adoption. However, such points are hard to measure and quantify.


text:
How do APIs know Bitcoin transaction and wallet types?
I am working on a university project, and I noticed that paid crypto APIs like Whale Alert or Whale Trace return information about transaction types (like exchange), sender and receiver wallets (like private/okex.com/...):
  {
     "hash":"fecb0051e9e69c7e8202fae3866a5193579696c1093049e7e336e5a15d0a9248",
     "from":{
        "address":"bc1qw0c0mrjjw73azm65utnhwvcpsdnpg0cdljg0eg",
        "name":"Wallet",
        "type":"wallet"
     },
     "to":{
        "address":"bc1quq29mutxkgxmjfdr7ayj3zd9ad0ld5mrhh89l2",
        "name":"OKEx",
        "type":"exchange",
        "url":"okex.com"
     },
     "time":"2020-01-24T19:44:03Z",
     "asset":"BTC",
     "size":2763.80593244,
     "USD_size":23417202.542436957
  }

My question is how can I get this information without using these specific APIs? I am new to crypto but I would like to build my own API on the top of Bitcoin (where of course I can't see this information).

I am not sure what API's you are looking for information on. The most common are the bitcoin core API's
https://developer.bitcoin.org/reference/rpc/
you have to have a full node running on your machine, but if you just developing you can run core in the testnet or regtest mode so you don't have to download everything
you can download core from here.  from there you can decode transaction
bitcoind -testnet -daemon
---wait until that synchs --
bitcoin-cli -testnet gettransaction <transactionid>

you can also use curl to directly access the rpc api if you want other examples.
https://bitcoin.org/en/download

You, or someone else working for you, registers to some service, makes transaction/s and see which bitcoins get merged with, or from which address it was withdrawn.
There is probably no easier way how to discover names other than this.
Source: Section "How are names discovered?" at WalletExplorer.com "FAQ: What is on this site?".


text:
Noob question: Why is there not a limit of the number of blocks in a chain revision?
I have a noob idea and I want to understand where I'm going wrong :)
Say nodes agreed on a block revision limit, say, 6. This would mean that if they see an incoming chain that is longer than the previous longest chain they have seen, they would reject it if it involved changes in blocks further back than 6 blocks ago on their previous longest chain.
If vendors then required 6 confirmations before delivering purchased product, they could be sure that the majority-agreed chain will not be revised to double spend the BTC used to purchase that product. This would protect against a 51% attack.
What am I missing?

What am I missing?

What is the length of largest known reorganization in bitcoin?

There have been only two large re-orgs in Bitcoin's history. The first is the value overflow incident in August 2010 that caused a re-org of 53 blocks and the March 12, 2013 fork that caused a re-org of 24 blocks.

There may be a future need for a reorg of more than 6 blocks?
The alternatives may include the forking and fragmentation of Bitcoin, possibly leading to failure.
At the very least, anyone proposing this sort of change ought to be expected to provide a thorough mathematical and statistical analysis of all previous reorgs and how their proposal would have affected outcomes.

Related?

An Empirical Analysis of Chain Reorganizations and Double-Spend
Attacks on Proof-of-Work Cryptocurrencies, by
James Peter Thomas Lovejoy S.B. Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 2019

Thank you. I will do some reading.

Turns out Bitcoin Cash ABC did this, or something like this. Here's a helpful BitMEX analysis, which was linked from the paper you linked https://blog.bitmex.com/bitcoin-cash-abcs-rolling-10-block-checkpoints/


text:
Where is there a graph of total miner revenue (BTC) per unit time (e.g. day)?
Basically I'm looking for this graph, but denominated in BTC https://www.blockchain.com/charts/miners-revenue or this graph plus the block reward https://www.blockchain.com/charts/transaction-fees
I've searched a bunch but can't find anything, maybe I am using the wrong search terms
Motivation
As I understand it, a key metric for the security of the bitcoin network is the ratio of A / B, where:

A is total miner revenue per unit time (e.g. year). This is made up
of transaction fees plus the block rewards, and is denominated in
BTC.
B is total number of circulating bitcoins.

The higher this ratio, the higher the network security, because miners are incentivized to keep mining and collect revenue in form of block rewards and transaction fees.
If the ratio gets too low, then it becomes profitable for miners (or mining pools) to instead band together, borrow a large percentage of circulating bitcoin, and repeatedly double spend all their bitcoin into fiat.
To use an extreme example for demonstration: if we get to 2140 when the block reward will be zero, and no-one is paying transaction fees, then miners get no revenue from mining and would find it more profitable to perform a double spend attack.
B is slow-changing if we just consider new block rewards and ignore bitcoins that are "lost", so it probably be sufficient to just track A as a proxy for A / B.
Please do let me know if I'm missing something above, I want to learn!


text:
how do you specify Blockchain Data location with bitcoin.conf file?
I am using an external hard drive I would like to specify
that mount point for all my block chain data.
Can this be done using bitcoin.conf?


text:
What if a pool of computers are used to attack a blockchain and modify it in 51% of the network?
I mean if a large computer pool is used to attack a blockchain and modify the copy of the blockchain in 51% of computers in the network.
Then due to consensus, the faulty blockchain will be replicated across the whole network. Thus changing the whole blockchain.

I mean if a large computer pool is used to attack a blockchain and modify the copy of the blockchain in 51% of computers in the network. Then due to consensus, the faulty blockchain will be replicated across the whole network. Thus changing the whole blockchain.

It won't work. Large computers are terrible at mining. It's like trying to use a jet plane to get billions of watermelons across a street. Sure, jet planes are big and powerful, but they're completely the wrong tool for that particular job.


text:
Why don't Bitcoin Full Nodes who are not Miners get compensated?
Why don't full nodes who are not miners get compensated for running, storing and validating the network?

Your compensation for validation is your own security :)

I don't think Satoshi ever answered this question so we can't be 100 percent sure on the rationale but it was clearly the right decision. Firstly, at least today (if not when released) it is orders of magnitudes more expensive to mine a block or contribute material hashpower to a mining pool than it is to run a full node. Secondly, it would be extremely difficult to locate all the full nodes on the network to distribute what would be a miniscule reward. The full nodes would need a way of telling the network what Bitcoin address they wanted to receive their "full node reward" to. Thirdly, it would cost a lot in transaction fees and take up a lot of limited block space to create an output for every single full node (tens of thousands exist) on the network every block to distribute the reward. Fourthly, many full nodes connect and disconnect to the network regularly. So you would need a way of monitoring all connections and disconnections to work out whether the full node deserved a "full node reward" for a particular block.
I'm sure there are many other reasons not to do this but hopefully the above convinces you that this is not a viable idea!

I don't think Satoshi anticipated mining pools or ASICs and probably assumed all full nodes would always be mining. There is also a potential revenue stream using lightning network for example to serve light clients. But I agree with @darosior - you don't run a full node to earn money, you do it because that's the most secure private decentralized way to use bitcoin.


text:
XPUB, YPUB, ZPUB Converter Tools
I was wondering if there are any good X,Y,Zpub converter tools that any of you are aware of. For instance, a tool that could convert an Xpub into the equivalent Zpub.

I was inspired to ask this question, as I was playing around with multi-sig capabilities on both Electrum and Caravan. I created a Segwit MultiSig wallet on Caravan by inserting 3 Xpubs into the tool (https://unchained-capital.github.io/caravan/#/wallet). I got a wallet with bc1 addresses...

I then tried to re-create that wallet with only the xPubs on Electrum (mimicking a scenario where I didn't have all the signor keys), but Electrum read the xPubs as legacy and generated standard P2SH 3xxx... addresses in the wallet, a completely set of addresses. Not what I was looking for!

I then recreated the initial SegWit MultiSig wallet (from step 1) on Electrum, by actually connecting the same devices. I got the same bc1 addresses as Step 1. Nice.

I opened the Electrum wallet data for the MS wallet and noticed that Zpubs were noted, rather then the xPubs I had seen in the wallet data from Caravan. Note: both of these wallets generate the same addresses depending on the tool used.

I then put the zPubs into Caravan to try and recreate the same MS wallet using the Electrum data (which worked), and it automatically converted the zPubs from the Electrum wallet to xPubs with the note: https://gyazo.com/b66d8788e62208a2bdd021fb6ce53bd7

Is there a tool that performs the opposite functions, that converts an xPubs to a zPub?
This would give me comfort that I don't have to save both xPub and zPub wallet files! I could simply use either the Caravan or Electrum wallet file and be confident I could always derive the other format if needed.

Jameson Lopp has a tool on his github that performs this function.
Paste your xpub into the text box, and select the type you want from the drop-down and click convert.
Demo: https://jlopp.github.io/xpub-converter/
Source: https://github.com/jlopp/xpub-converter

I see that I already upvoted here, but I only just now cloned that repo and tried it out, and it seemed to be what I wanted. Now I have a zpub for my Ledger BTC and can check my balance at https://www.blockonomics.co. Thanks!

There's a command line electrum option convert_xkey. If you're on linux or macosx you can see the documentation for it via electrum help convert_xkey. Alternatively you can use the console tab of electrum on all operating systems to achieve the same result. For example convert_xkey(xkey="xpub...",xtype="p2wpkh") will convert from p2pkh to p2wpkh

Blockonomics has a conversion tool that can convert xpub to ypub or zpub
https://www.blockonomics.co/views/segwit_xpub_convert.html


text:
Was the first full node IP address Satoshi's and how did shim hide it?
It is not surprising that people assume Satoshi used ToR when scouring the internets however if my understanding is correct in order for someone to run a full node they need to provide their IP address so that other peers can connect with them. How did Satoshi manage to run the first full node without disclosing their IP address? Did they setup an anonymous offshore server via anonoymousspeech like they did with reserving the bitcoin.org address?

That I know of, only Nick Szabo, Hal Finney and a couple other folks interacted directly (online) with Satoshi during these early days in 2008/2009. Assuming Szabo and Finney aren't Satoshi, and that Satoshi didn't trust them, then he probably went through some proxy or VPN to interact with them. This is all speculation though, nobody knows except these guys who were there 10 years ago but they're not talking.

According to the book Digital Gold, when Hal Finney first connected to the network (Jan 10, 2009), there were two other nodes running with both IPs pointing to some place in California (probably belonging to Satoshi). This is the exposed IP you might be asking, but there is a very high likelihood that Satoshi used a VPN service to mask the real IP addresses.

Pointing to a VPN service that would then redirect the traffic to his real IP would again leave a trail no?

It's possible, perhaps even probable, that Satoshi did actually reveal their node's IP address.
The day after Satoshi published the first version of the Bitcoin client, Hal Finney sent a public email to Satoshi describing an issue that he ran into while running the client. Importantly, this email contained Hal's debug.log file which contained the full response that Hal's node received from the IRC server seeder that was in use at that time. This response contains the IP address of nodes that could be connected to.
From that debug.log, we can see that there were only 2 nodes that were announced by the IRC server. One of these nodes is Hal's as the log states. That IP was also known to belong to Hal. Given the timing, it's safe to assume that the other IP is of Satoshi's node.
Of course, it's possible that this IP is that of a VPN or a hosted server. However, looking up the information for this IP reveals that it is allocated to a Covad which is a regional broadband ISP. This suggests that the node was not hosted in a data center or using a VPN as they would likely have an ISP known to have data centers or provide bandwidth to data centers.

Then can't Covad trace back who this IP address was registered to? Although if I was Satoshi I would probably have stolen one of my neighbors' IPs by hacking a low security (WEP) router or maybe use a public place IP.


text:
Smart Contract Execution
If I have a Blockchain which consists of few smart contracts. Let's say that the Blockchain consists of 2000 blocks. When a new block is added to the Blockchain then does the smart contract runs on all 2000 + 1 blocks or only the last one?

Are you talking about Ethereum?

I am more of talking about in general concept of smart contracts.

There is no such thing as general concept of smart contract. Every system has its own definition, and most of them aren't things you'd ordinarily call a contract. You'll have to specify what system you're talking about.

I believe a general concept of smart contracts is equal to a programmable blockchain. Saying there is no general concept is like saying there is no general concept to cereal. A lot of different types... but we all know what cereal is.

Still my answer to this question would be pretty much the opposite for Bitcoin and for Ethereum. I think that's enough to say that for the purpose of this question, there really is no established common ground.

It would be running on the blockchain.. which is a chain of blocks. So really its running on the whole blockchain network regardless of how many blocks there are.
Although the smart contract never existed until the block which you deployed the smart contract on.
For example you deployed a smart contract at block 1500 and right now its block 2000. If someone forked that blockchain at block 1499 your smart contract would never exist. But if they forked at block 1500 then your smart contract would exist on the new forked blockchain (look up the Ethereum classic fork.
I hope this clears it up for you.

This sounds very confused.


text:
Using Bitcoin Core
Ive asked a variation on this question...so plz forgive me if this is a repetition.
I have some old bitcoin on a harddrive, Im not sure of the details, or amount.
I will be using Bitcoin Core as my wallet - Im in the process of installing and synching the wallet now.
The question :
Can I sync my wallet and THEN import my older wallet?
OR
Is there a different process altogether.
Thank you in advance for your assistance.

Sure thing you can use it. After the import you should sync the blockchain, then you can see all transaction associated with your adress. Be sure that Port 8333 is forwarded to your machine. If you want to import your old wallet you have 2 choices:

Import the Private Key
Import the wallet

Import the private key
Open bitcoin core and then open the console. In the console enter
importprivkey [your private key]

Import the wallet
Open the folder where Bitcoin Core is installed, then rename or delete wallet.dat and finally move your old wallet.dat into this directory.
You can also move your Bitcoins from your old wallet with Electrum which doesn't need to sync the blockchain

Yes, sure you can do that. Don't forget to rescan the blockchain after you import your wallet.

Thank you adam, will this require the lengthy syncing process when initially installing BITCOIN Core?

No, you only need a rescan. Not a full reindex (which is what happens at initial sync). Both are lengthy processes, but rescanning is usually an order of magnitude faster at least.


text:
Use of proof of work in bitcoin
I am trying to understand what problem in bitcoin proof of work solves and came to this somewhat helpful quote:

So, for instance, if a miner controls one percent of the computing
  power being used to validate Bitcoin transactions, then they have
  roughly a one percent chance of winning the competition. So provided a
  lot of computing power is being brought to bear on the competition, a
  dishonest miner is likely to have only a relatively small chance to
  corrupt the validation process, unless they expend a huge amount of
  computing resources.

Does this mean that proof of work prevents say double spending because of following reasons. Imagine attacker introduces 100000 rogue nodes in the network and their goal is to send false information about transaction validity - but since these nodes need to do proof of work, in total, when all 100000 nodes are doing proof of work this is too costly for attacker. Is that right? So because of this proof of work keeps attackers at bay.

Imagine attacker introduces 100000 rogue nodes in the network and their goal is to send false information about transaction validity ...

That's no possible. Every node validates blocks and transactions for itself. It doesn't matter what another node tries to represent - if the block is invalid, it's ignored by the receiving node.
Proof-of-work is unnecessary for determining block validity.
What proof-of-work does do is makes block generation expensive. Without it, nodes could generate blocks cheaply, rolling back transaction history by publishing replacements for previous blocks willy-nilly.
To rewrite a previous block, a node must not only rewrite the block its self, but all of its descendants. It must re-do all of the work that was previously done.
To re-iterate: nodes validate transactions and blocks for themselves. Proof-of-work doesn't convince nodes of block validity. It convinces them that a certain amount of work must have been performed to produce the block.
A node uses the cumulative proof-of-work when faced with a choice of two or more valid block chains. The one with the most proof-of-work is used to build the global transaction log.

The production of a new block may be expensive, but the decision which fork (block) of the chain to continue with is cheap, it's a convention. People may decide to suddenly go with another choice while you were sleeping, which would double spend, so how can you have trustless consensus then?

Either the attacker controls around 50% of the computing power or he doesn't. If he doesn't, then it doesn't matter. The rest of the network will always be able to outpace him. If he does, then he's invested millions of dollars in mining hardware, all of which would become significantly less valuable if he attacks the network. Why would he attack the network rather than just mine honestly and make huge amounts of money in fees and block rewards?

Yes, you are right .
Finding the nonce is a costly affair and uses a lot of electricity . One way in which attacker can change the chain is if he can provide a longer chain than the existing one . If anyone can provide the longer valid chain, the entire network moves to the new chain provided . But for that to happen the attacker need to have the hashing power more than the entire network to calculate that chain.

As i see it, this proof of work is the same thing as captcha, which prevents miners from generating blocks too fast. The network (at least the official one named bitcoin) is self-regulating, so when blocks are generated too fast, each node independently rise the difficulty for blocks that it will consider as valid (this behavior is hardcoded). The double spending can happen even without any attackers (you and a boy from africa have generated block simultaniously and the majority of network "used" the africans block). This is why it's advised to wait around few days, even though the official blockchain shows your transaction has passed.


text:
In a chain split scenario (not soft fork), a miner has to confirm transactions from both chains?
In a scenario where a chain split occurs (two miners find a hash), would miners have to work with both chains until one of then become larger (more PoW)? i.e. Would they have to validate transactions from both chains as 1 confirmation until then?

No they don't. Miners only work on one chain.
In a chain split scenario miners are divided: some work on a chain and the others work on an other chain (both chains are correct, but they have a different last block). The miner who find the next block makes its chain the correct one because it's now the longest.

Some miners forego transactions in a block so they can broadcast more quickly than a miner that includes transactions. Longest chain wins and other is "orphaned" (side chain). You see issue a lot when the difficulty is low and there is a great chance of different miners solving a block around the same time.


text:
Is there a significance as to why bitcoin mining "costs" time/energy/money?
I have heard that the bitcoin mining process was created in a way that purposefully required the expenditure of resources (energy/money) in order to add real value to bitcoins. In this way, when more miners join, the value of bitcoins would rise because there would be additional resources that would be used to process the transactions. However, the way I see it, it is the opposite. In other words, it seems that the value of a bitcoin is based on supply and demand from buyers/sellers, and the degree of mining interest is based on this pre-established value. My reasoning is that people do not suddenly decide to buy or sell bitcoin because "oh there is more mining power going into validating the blockchain so it must be worth more." On the contrary, miners enter or leave the mining process based on whether the potential reward for successfully mining a block is "worth" the work, with the value of the reward being strictly based off the current market value of a bitcoin. Would anyone like to confirm or refute the latter hypothesis?

I have heard that [...] when more miners join, the value of bitcoins would rise because there would be additional resources that would be used to process the transactions.

I do not see why more validation power would make the currency unit more valuable. But before this discussion, lets clarify the technical side.
In general, the idea behind the Bitcoin protocol is to achieve a consensus view on the common transaction ledger in a decentralised way, i.e. no third-party intermediary to act as a clearing agency etc.
To avoid double-spending of coins, transactions need to be verified by miners before insertion into the blockchain - also, all nodes will synchronise with the longest chain available, so effectively the system works on a majority-based consensus system (majority of the miners determine the global chain).
Now, this would open up to security problems - one example is the Sybil attack, where an adversary simply creates countless virtual identities who all vote for his (potentially false) chain.
This is where the Proof-of-Work (PoW) scheme used in Bitcoin's mining protocol comes in. It is purposefully made computationally difficult for miners to verify blocks. Because of this, miners need to invest resources (energy, money) in order to participate - the rationale is that it is much harder to fake computational power in the network than simple identities, preventing a Sybil attack.
Back to the value of Bitcoin: Note that the following is rather subjective, and highly controversial.
I argue that it is simply determined by market supply and demand. Following this basic logic, the value of 1 BTC must increase in the number of users to join the network, since the monetary base of Bitcoin is limited by design. Because this is unrealistic in the long run, this argument can not be final.
On top of this, we can see extreme levels of speculation on cryptocurrency exchanges, driven by developments such as

adaptation (e.g. recognising Bitcoin as legal tender in some countries, more vendors' acceptance...)
news flow on upcoming updates, increasing awareness of cryptocurrencies and the resulting interest by the public and corporations
negative economic/political activity in some economies might lead to more demand for bitcoin

On the contrary, miners enter or leave the mining process based on whether the potential reward for successfully mining a block is "worth" the work, with the value of the reward being strictly based off the current market value of a bitcoin.

Yes, this is correct. A causality between hashing power and the market value of 1 BTC is not apparent, other than that new miners will likely participate in the system themselves, increasing demand. Rather, as the market value increases, mining becomes more attractive in the short run. Note that after each 2,016 blocks, mining difficulty is adjusted to maintain a fixed mining rate, so then it becomes more expensive and miners will have to decide if they continue participating.

Great answer, thank you. Also, I would like to point out that I agree with your hypothesis on the valuing of BTC.

You are correct as to what influences the price of bitcoin, but the significance of mining and Proof of Work and why it costs time/ energy and money is due to fact that the number of valid blocks produced needs to be limited over a period of time and to ensure that it is difficult to rewrite the blockchain.
If it was easy to produce blocks, the network would be flooded with blocks and various chains. It would be very difficult to agree which blockchain is authoritative. Further, if it were not for the difficulty of producing a new block, it would cost nothing to rewrite the blockchain and produce an alternative view of the history of transactions.

Okay I now understand your point that "if it was easy to produce blocks, the network would be flooded with blocks and various chains." So if I am understanding correctly, the expenditure of valuable resources (energy/money) is simply a side effect of the necessity to make the verification process "difficult"? Therefore in an ideal world–however implausible–the mining process should be as inexpensive as possible while still maintaining the appropriate threshold of difficulty?

I'd say the other way around, being that mining should be as expensive as possible. The problem we encounter, however, is that if mining is to hard the rate at which blocks are produced is too slow. It's important that mining is expensive as it is the expensiveness of mining which ensures the blockchain can't easily be replaced by an alternative.


text:
How can we use Blockchain for Land Registration Use Case?
How and where can we integrate Blockchain in this use case?
Say buyer and seller visits the registration office with sale deed they prepared.
The details in the sale deed is compared by the registration analyst with the land database.If the details match the registration officer will sign off the document.

Have some good old fashioned digital signatures from buyer/seller/registration officer on the documents and use opentimestamps.org to securely timestamp it. Let all parties involved keep a copy (encrypted or not) of the documents and you're done.
You don't need a blockchain.


text:
Asymmetric revocable commitment's revocation key
I am reading 'Mastering Bitcoin' to study for bitcoin and blockchain. At page 295-296, Author described that two parties should exchange their revocation key before signing new commitment transaction to punish when either party tries to cheat.
But, if we use this method, either party can redeem prior commitment transaction by using revocation key whenever it wants. This mechanism is being used by lightning network now. I wonder how this method prevents either party from cheating.

The github version of the book explains things better -- https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch12.asciidoc#asymmetric_commitments

The revocation key is actually a blinded key that is calculated from the two parties' revocation basepoints and generated per commitment keys.
So for A's revocation key for a commitment, the public key is calculated from B's revocation basepoint and A's per commitment basepoint. B does the same but with A's revocation basepoint and B's per commitment. This results in a revocation public key who's secret requires a component from each party so each party individually does not know the key.
When a commitment is revoked, the two parties will exchange the per commitment secrets so they will only be able to know their respective revocation keys. Since the revocation basepoint secrets are not shared, each node cannot know the other revocation key.
The full details of the key derivation algorithm can be found here.

Thank you for answering my question. But author assumed the situation that B can punish A when B saw the prior commitment which A sent to network. It means A can use B's revocation key to return prior status. Then how can you explain this ?

A cannot use B's revocation key because he does not know it. I have already explained that in my answer. The process of revoking a commitment means that A reveals to B a component necessary for the revocation key; B already has the other component and A does not have access to it.

ummm... then does book have an error ? or I understand the book wrong way. then how either party can punish one ...

You misunderstand or you did not read it fully. At first, revocation keys are explained simply as private keys, but more details come later to fix the flaws with that approach.

Sorry. but I want to ask you only one more thing. Author said "Crucially, before signing new commitment transactions, they must first exchange revocation keys to invalidate the prior commitment" and

"When Irene gives Hitesh the revocation key for her prior commitment transaction, she is effectively revoking her ability to profit from regressing the channel to a prior state because with the revocation key, Hitesh can redeem both outputs of the prior commitment transaction without delay. Meaning if Irene broadcasts the prior state, Hitesh can exercise his right to take all of the outputs." Does it denote that two parties know each revocation key ? Just I failed to understand it.

Read further. Your question is addressed near the end of that section.

You meant that CSV is being used for that mechanism just like nLocktime is being used for usual payment channel ?

No, past that. Two paragraphs after the diagrams it is explained.

But there might be a lot of old commitment in a channel, so Irene or Hitesh can gather secret values and make list whenever they get secret values from each other. then they can spread prior commitment to network by using secret value from the list which they stored.

They can gather secret values but those values are useless because they are not the complete revocation keys. Also, the secret values used for one person's commitment are not the same ones used for the other person's commitment.

The book is not wrong, it just dumbs down things in the beginning so that you understand the concept. Things are described as they actually work later.

Okay... anyway, thank you for answering my question this far.. could you tell me explicitly which paragraph addresses my question ? I wanna read it again and again. And read the document about BOLT too.

"The revocation key is composed of two secrets, each half generated independently by each channel participant. It is similar to a 2-of-2 multisig, but constructed using elliptic curve arithmetic, so that both parties know the revocation public key but each party knows only half the revocation secret key." https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch12.asciidoc after figure 8

Eng ?? That paragraph does not exist in my book. I am sure that I read all paragraphs in ‘Asymmetric Revocable Commitments’ section. I have the 2nd edition.

I think there is more information than book’s. I need to refer to that doc rather than book - - Thank you Andrew God, you saved me.

Hello, Andrew. I read the link describing about revocationpubkey. On this document, public key is calculated by own revocation basepoint and remote's per commitment point. but you explained that public key is calculated by own per commitment point and remote's revocation basepoint. Which one is right ?

Both are correct. You need to keep in mind the direction. In the documentation it talks about the local node creating the remote's revocation key (which goes into the commitment held by the local). My answer talks about the local node creating the local revocation key (which goes into the commitment held by the remote). My answer is more geared towards how the local generates the revocation secret.

Yeah. I noticed it. Really thank you for helping me. Now I understand of this mechanism completely. Thank you ..!

In the last example of balance change 3 and 7, how about Hitesh cheat? I mean Hitesh gets Irene's revocation key, and immediately broadcasts this transaction to get all 10 Bitcoin immediately.


text:
How do nodes communicate over Lightning network?
I read the following article and watched below video.
https://medium.com/@melik_87377/lightning-network-enables-unicast-transactions-in-bitcoin-lightning-is-bitcoins-tcp-ip-stack-8ec1d42c14f5
https://www.youtube.com/watch?v=Ug8NH67_EfE
On those media, they say that payment channels are based on just TCP/IP connection (unicast) not p2p.
In Lightning network's white paper, there is no explanation of what method is used to establish payment channel between two nodes.
What method is used for establishing payment channels ? traditional TCP/IP way or p2p ?

Why would p2p not be TCP/IP?

umm. my question can be ambiguous. I meant that two nodes are connected as TCP connection ?

You're asking "TCP/IP or p2p". A peer-to-peer network means that nodes are connected to each other as opposed to a client/server architecture. The connections between peers are generally TCP/IP still - so you're asking about the same thing twice.

Related: How is bitcoin transactions and the blockchain as a whole transferred over the internet?

You are confusing two things here: payment channels and network communication. A payment channel is really the set of commitment transactions and their revocations. It is unrelated to network communications and the participants in a payment channel do not need to communicate via one specific way.
The network communications that nodes use to talk to each other (e.g. to update payment channel states) use TCP in a P2P manner. Like Bitcoin, a node establishes a TCP connection to other nodes, and those nodes have connections to other nodes. P2P is not a communication standard like TCP and UDP, rather it is a model of the network's structure and is a concept.


text:
Unable to transfer Bitcoin to USD
I have Bitcoins in my Bitpay wallet that I need to cash out. I earlier assumed that a Bitpay wallet would have a linked Online Bitpay account. I gave my BitPay Wallet Address to a client who transferred bitcoins to my wallet. Bitpay Support says that they do not see any Bitcoins on my Online acc. How does this work? Bitpay is not clear about what they want me to do. Please help.

There is no link between a BitPay business account and a BitPay wallet. If you gave an individual a receiving address belonging to your wallet, then you should see the bitcoin arrive directly to your wallet.
If you were trying to have those funds routed through your business account, you should send your client a bill using the Email Bill tool or add a payment button on your website.  They can generate an invoice from the bill or payment button and when they pay the invoice, the funds are deposited to your BitPay business ledger and then settled through the settlement process.
If you need more information, please contact BitPay via the support form at https://help.bitpay.com/requestHelp.  There is also a lot of information about setting up your business to accept bitcoin as a payment option at the following link: https://bitpay.com/docs.


text:
how to use multiple time specific address in input scripts with difference balances?
look at to the following transaction (withdraw transaction from binance)
https://blockchain.info/tx/404fd22d3d88d129975d03fe2993f0126db8f066b3d8126d6cca676747439515?show_adv=true
How in input scripts section same address reuse again and again with different balances?!

Those are the transaction inputs.
Simple example:
In your pocket, you have 100$ and 50$ and 10$ and if you want to pay for something that cost 160$ you will give the seller 100$, 50$ and 10$ in total 160$.
The same thing in here:
1NDyJtNTjmwk5xPNhjgAMu4HDHigtobu1s (34.3721168 BTC - Output)
1NDyJtNTjmwk5xPNhjgAMu4HDHigtobu1s (10.03140713 BTC - Output)
1NDyJtNTjmwk5xPNhjgAMu4HDHigtobu1s (3.91377693 BTC - Output)
1NDyJtNTjmwk5xPNhjgAMu4HDHigtobu1s (14.88232237 BTC - Output)
1NDyJtNTjmwk5xPNhjgAMu4HDHigtobu1s (8.29127328 BTC - Output)

in total 71 bitcoin

why  binance use same address multiple time !? it can be use binance can not use the address one time for inputs?

because they didn't get it from one sender, I sent 34 BTC, You sent 10 BTC to the same address. that is the result of more than one inputs.


text:
How does Coinmarketcap calculate the USD price for Bitcoin?
I'm doing a school project in which I'm building my own bitcoin price index similar to coinmarketcap. I want to calculate the USD price for bitcoin by using volume weight averaging from multiple exchanges. Some of the exchanges don't offer USD or any foreign currency (EUR, GBP, etc) trading pairs.
I thought I understood how coinmarketcap calculated the price, until I looked at their BTC markets page. I see they're averaging in USD prices of altcoin pairs like TRX/BTC, XRP/BTC, etc as well.
So can someone explain how they determine the USD price (on the BTC markets page) of, for example, TRX/BTC on the Bit-Z exchange without first knowing the actual USD price of BTC? I don't understand where they're getting the USD price of TRX/BTC if its also being factored into the final USD price of BTC as well.
And when I add up the volume percentages in the "Volume (%)" column, it doesn't add up to 100%. More like 94%. Anyone know why that is?
I'm not a mathematician, so maybe there's a simple answer to this.

This is an interesting question and I've often wondered it myself. You cannot add two unknowns to a system with the same two unknowns and get an improved calculation. For example, does coinmarketcap.com use the price of TRX first to calculate the price of BTC or vise versa? It seems like there must be an ordering or "hierarchy" of the calculations. My guess is that they could do all the USD calculations first, and then go down the "market cap list" or "trade volume list" for the rest of the hierarchy.

Yea. That's a good guess. Seems like an odd way of doing it. The other strange thing is when I combine the pricing/volume data from all of the markets they display, the final price is always different from what CMC is showing (my price is always lower). At least for BTC and ETH. I tried DASH and my calculation was the same as CMC. So maybe they're using some kind of internal price index for USD pricing on the larger coins.

Doesn't answer your question, but related: https://bitrazzi.com/how-coinmarketcap-calculates-bitcoin-price/

CoinMarketCap takes necessary information like volume and price changes from exchanges and calculates their average.
That's why they delisted some of the Korean exchanges earlier, as you may have seen that their prices are too high when you compare it to other exchanges around the world, which causes price jump and misleading for investors.