text:
testnet3 frequent tx malleability
Related How confirm my own doublespend transaction got confirmed
This is not about double spends and I believe that the related question is not about double spends ether!
On bitcoin's testnet3 I am seeing (using https://github.com/bitpay/bitcore-p2p) many tx change id

scenario:

I send some tBTC using http://testnetwallet.com
I see a utx with txid of XXXX broadcast onto the network with my inputs and going to my test address (everything looks cool)
I carry on monitoring looking at all broadcast-ed txs
a new block happens.
I look through the txids in the block but do not find my txid
I query my receiving address on some block explorer web service and see that my tx's txid got renamed to YYYY
I go and look at the block again and see YYYY is in its tx array!
I discontinue monitoring all broadcast-ed txs

I am starting to think that it (tx malleability) is happening when the miners are including the txs into the blocks!
I never see a tx with txid YYYY broadcasted NEVER (I am seeing every transaction!) this suggests that the txid is being altered!
I have been seeing this happen now for over 2 weeks and not found anyone talking about it apart for the first person today (4th april 2017) In the related question.

I have been trying many things in my code to stop relying on the txid to identify if my tx has 6 confirmations. But, I am finding it impossible to ...update my tx with its new txid!
I have been trying (many times in different ways) to ask peers (p2p peers) getdata for each unrecognizable txid in new blocks, but a lot of the time the peer seems to disconnect ....

My question is: What should I be doing in this situation?

Note: I'm trying not to use 3rd party services
also related: How did blockr.io see this?

UPDATE
I am seeing all txs change id not just mine! I am collecting every txid I see broadcasted and putting them in an array called seen, then when a block happens i look for each tx on the block in my seen array.
for the last ten or so blocks today I have console.logged on each block
seen:1/52 by 73 peers
seen:0/4 by 73 peers
seen:0/35 by 73 peers
seen:0/22 by 73 peers
etc...
99% of all txs (everyones) on testnet3 are changing txid
I am listening to max peers 150
PROOF THAT THIS IS HAPPENING TO EVERYONE'S TXs

{ hash: '00000000000017f2a1d8ff44f149e7ead61a38e1a03217c33762ed9ace3c0c7d',
  validProofOfWork: true,
  validTimestamp: true,
  prevHash: '000000000000178c28b96e945965b9311ea4005a66e8c5c2701d30f928a498d8',
  txs:
   [ '775b7b0bf9345cbee62e3af57e1660a6fd92d0a089fd0694e4804a7190dd4a05',
     '1133ba34f4ef95af8a53c9698877cf8b7dc0e03d3095c371c0e2a1b8cd395ce2',
     '14df326c04bf2da2edbd4f9f04810916b95144eeef67570458c06449d3a56fc4',
     'b969a4bdab4b6a5ea91500b4230c3eadc9aa807cca000ecce6686450d2676b42',
     'fa5acc2feecae6a603673c6a817f79fa3a4dd1516d50c59014772c80500b7063',
     '0cd386804b65a3fb826557881dc3b50c1b298b7f0a0372da8faec97a2744d0e0',
     '24ca695bac05c4500a596415b70bd199c935308f7a90ccfc8ae01d7b96e6b115',
     '8125ed124dd4d0b3af98bc6028905fb329ff311c22f484be41bf9def8ea7b63e',
     '4f1e5a894be245d2a68c79e2b73dde54dbeaa8bb2e872b9b1115f40c0b93585b',
     'aee4a615c617d71c544930d5dbacdb62d66fb089d556d84cbe92682295895d91',
     '545b2164e6bc2e764a702eac1bd69e625c6100c8cbeaa9528c16cd74eb144ecb',
     '450c86ef90858943f6b6ba284da3987191880b2b534749d3ae762d7c9060bb7c',
     '83d9107d90c36b0302af47f2b7e7bece30aaf20431dcdf251faa025d31f02fa8',
     '4785a7fb5b0a6106152dc80d2c028b2aa80cb9b4f0ce81985b8c672a34561703',
     '232a70178859760c5cd75ae054c503af9db4515d92a47b9da17ca5c81cee5d34',
     '5c218f9e957cfd7fa97dbbdd29a81673d4c91b3441279c23607a7d3889533855',
     'b2472c88eb6c7a38476444c22cb560793624216e1e36354b406f15b09dd8316b',
     '5a7f3652282429eedf7bd2a6d0a8404e7844515f4139d14f8d7ed1e871efd373',
     '5147d190550b44eddad2d8ea6cdd022e47fe71a2517458b69c07c2424fd08bb2',
     '8e64ee1dcde8feb6b39ee043ecc43be719d0999ad181acee4d01e9d603976ff1',
     '0223ed8beb7d466d9d4026665d2ba58a97cbd1e6641be22f16d23be2b4574688',
     '18efc474f89835fb9eb1fa9ed1fc1dc296621aae3b727aab64f4f80ff76a098f',
     '8f38f6030a0471c7bef2b1e1757a6db0b63edf07aab3fe12a7e85d86b35c5eb5',
     '6b88744cba8f7661e64c67cd554d07a1b1981fe10614647a18b101520d289816',
     '6aee3deb7c0cb7247c2a85f14f96f8cb8447dee00e98a72ace80cbb850f5a709',
     '67de891a99a4c62fc90af91f5d880f9c2be80c1fc55bc444d10b74b63dd1ae1a',
     '62f955cf10d52f34a0b7bf2328c5095051d8dcf5009b65dd53632d54de4a515c',
     'c42685086053a0b2d989453b6f0cb17a1b60642ac963acc782b5269c8e563b89',
     'e2c2114e7cd15e47a84a4a48e7c1adbb29daff0f85afb5be6015a17271859909',
     'cc834a0f20e43f4eb05638398e8cfc61bfaaa303dcd82705be2c9cbf80189ded',
     '10907000e1062dc63c817b995683a4a7433836f450f763c910fe6191aa555f24',
     'a5bf7009e9c97b1b7652d3f5ed4067c1eeb40d1625e2fadb6ffb11ca18a27e74',
     '40c3ffce0140a9db634e4b869e79848f4316fd40528e48b0899e2b5606075ef2',
     '22b9db7c0ee380ec0c4eed97788dbf6f75fedbec569fb84a6c0d27bf36923cfa',
     'f4906eda20607d733ae55caf3274fa91d5c2f20506881857af59be4d8bb0af25',
     '98dfd83a0506b7a56e7cc6b1c91623a38ecf504c9b78c658bb8a6e5c56f7af72',
     'cd2711ab3400f03cb3830e6d7401058c99f5b3c0c438fe78180785582994b884',
     '566251b6b27cfbca202678f87ab6ebe5e6a71f306dea8e4035bca96207e630c1',
     '68eb0e868ebc4f0388c130bac9adcfb26fb526d8fdd7af6646ddcb9969e045df',
     '1cc856b20b1a66702782b4063caa1cce1cfd9a77600d53dbb727bc8d59cdeee3',
     'd5312340a7bd04a732ea6da056fa4a32ef92558a30160cb63c457b9d72603823',
     'd6cadd383605ab45e1cab2499349724d8973b160cd85e226115cbb30df383d44',
     '30a09d4abd5f3f52d47b7a7d2da05c5e0db2e40d93ae26a3d8b772227dffed48',
     'efb6889c4507f2e7ccb781dc5982e14d111b696098acaa450a286b100322ca5d',
     'cb7d6e3b904b49f01c85de319d4f3ed5ecc80aa3048dfbb97bb7300bc2fb4bd1',
     'bb70bd40d0d9d2ceda243172a10c05b2f9099d4ea6c62414e6c04c0309e5f7d1',
     '7912e77605eddb2e18a5baac16326f5ee3f31ebee5ed5badec7f9327dda75a7e',
     '75255b0e2000c546b5f9e3836a8ed483b401280f993b5320f433507b7dad4981',
     '77af8d90ecca1b09f072b244a032775f025a82c148ae8393a56bdf2f055e687f' ] }

look at the block: http://tbtc.blockr.io/block/info/1115996
next lets pick a random tx from the block that could be anyones tx:
http://tbtc.blockr.io/tx/info/a5bf7009e9c97b1b7652d3f5ed4067c1eeb40d1625e2fadb6ffb11ca18a27e74
you will see that this tx has two outputs lets look at one of the addresses an output leads to:
http://tbtc.blockr.io/address/info/mjSujFSUn1uCVHkD4bDj5cs3mZrp8ayec5
Oh what a surprise! it has 1 confirmed tx and one unconfirmed tx
unconfirmed:  http://tbtc.blockr.io/zerotx/info/8d7778e2238db427149f0c7fa46a572e0ea5c3ae9eeefe78c0ec9e4b795f0d38
confirmed: http://tbtc.blockr.io/tx/info/a5bf7009e9c97b1b7652d3f5ed4067c1eeb40d1625e2fadb6ffb11ca18a27e74
the inputs and outputs are all the same on both!
I just pucked that out randomly from a random tx in a random block today happend a few minutes ago!
If you go through each of those txs then they will 99% all be like that!

testnet i suppose to act just like mainet. something is clearly broken with some/many miners on testnet... so testnet is currently useless for testing.

I would say just the opposite.  Malleability is equally possible (and legal) on mainnet.  It just so happens that nobody is doing it on a large scale right now, but they certainly could.  So any application you design needs to be able to handle it appropriately.  Whoever is doing this on testnet is doing us all a favor by forcing us to handle this important case that we might otherwise ignore or dismiss.

i understand now

Someone (let's call her Alice onwards) is messing up with testnet transactions, it happened to one of mines earlier today.
What's happening
Alice is changing the s representation of the EDCSA signature (See ECDSA signature generation algorithm) from at least one of the inputs of the transactions. By doing so, the signature is changing, but still valid, and thus the txid changed.
How is she doing so?
As explained in the BIP62, there are two valid representations of the s value, depending on how big the value is. Moreover, depending on the result the DER encoding may also be changed.
Alice is simply modifiying  one of the the s values from one of the original transaction signatures, by performing a subtraction between the order n of the curve (that is FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141 for the Secp256k1), and the value s.
Example:
Lets say that the s component of a signature from one of out transactions is s = 37c0af486123367bc7839d507894bd30cba3f61e0d1bbf54727e43199864452c, if we substract s to n:
s' = n - s = c83f50b79edcc984387c62af876b42cdef0ae6c8a22ce0e74d541b7337d1fc15

That is a valid representation of s.
Since s' starts by 0xc8, which is bigger than 0x80, the DER encoding will need a leading 0x00:
00c83f50b79edcc984387c62af876b42cdef0ae6c8a22ce0e74d541b7337d1fc15

Who is doing so?
It could be a miner, just as you suggested, but it could also be a normal node.
If its a miner, it could be doing the modifications just before including the transactions the block he is mining. On the other hand, if a normal node (better connected than you) receives the transaction, modifies it, and broadcast it, it could be included in a block instead of your original transaction. Notice also that, since you have been broadcasting the original transaction from your node, you are not likely to be aware of transactions trying to double spend it, since your neighbours (to which you have sent the original transaction) will drop the double-spending attempt and do not forward it to you.
What can you do?
You can forward the transaction from a different source that the one you are using to monitor the network, and do not rely transactions from the latter, in order to see what's going on. Moreover, you can monitor the network using the UTXO you are trying to spend (prev_txid + index) instead of the txid from the transaction you just created. If another transaction appears spending from the same source, you will know.

I am seeing all txs change id not just mine! I am collecting every txid I see broadcasted and putting them in an array called seen, then when a block happens i look for each tx on the block in my seen array. seen:0/63, seen: 0/45, seen: 0/87 etc.... all txs on testnet3 are changing txid

I know, as I said it happened to me also, I just considered all the possible cases.

i updated my question, and if you give me about 20 minutes to add further proof i think it will suprise you!

I have posted indeniable proof in the question

Sorry, but what is the problem? Bitcoin transactions are malleable. The miner can use this technique and is using it now. Just live with this knowledge.

@ben-muircroft I don't get the point, no one is telling you that you are not right, just explaining you why it is happening.

yeah i understand that. but i don't understand how I'm suppose to match a malleated txid in a block to the original tx

If what you want to do is just identify them, you can check which UTXO both transactions are spending, that is, which previous tx id and index both transactions are trying to spend. There will be two transactions spending from the same source, one in the block, and another one that you had received though the network.

but i never see the malleated txs. I only see the malleated txid in the block so i don't know what outupts the malleated tx has

But you know the inputs of the transaction you have seen, you have to check with transaction in the new generated block is spending from the same previous output.

but seen as I never see malleated txs broadcated i don't have anything to check

Let us continue this discussion in chat.

you were correct also about there being extra tx info inside blocks

The miner which confirms current blocks on testnet is malleating transactions. I can confirm this.
But what is the problem? Current consensus rules allow this. Trust me. I am an expert in malleability :)

Finally, thank you!! who do we report this to?

Bitcoin is decentralized. There is no central authority to complain and send reports. This is normal behaviour. May be somebody is testing something.

for the last 2 weeks?

I do not see any problems here at all.

the problem is that i never see the malleated txs broadcast over the network (i only see the original txs)

It is your problem, not a bitcoin network problem :) nobody can help you because current clients do not relay HI-S transactions. So, they exist only on miner's node until confirmed in block

Let us continue this discussion in chat.


text:
How did blockr.io see this?
Here's the pushed/broacast-ed tx http://tbtc.blockr.io/tx/info/d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080
txid was malleated to txid (when the tx was added into the block):
http://tbtc.blockr.io/tx/info/a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec
I am watching all utx broadcasted on the testnet3 network using https://github.com/bitpay/bitcore-p2p
I did not see a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec broadcast-ed I only saw d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080
How the hell did blockr.io see both the original broadcasted tx and the altered tx when it never was seen on the network?
What voo-doo magic is this?
Look, blockcypher didn't store the original broadcasted txid:
https://api.blockcypher.com/v1/btc/test3/txs/d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080
but they did store the malleated version:
https://api.blockcypher.com/v1/btc/test3/txs/a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec
HOW?
related: How confirm my own doublespend transaction got confirmed and testnet3 frequent tx malleability

I did not see a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec broadcast-ed I only saw d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080

That might not be meaningful. Bitcoin is a gossip network, so it's possible for a different node to see a transaction that you didn't see, particularly if it contradicts a transaction you have.
If you're connected to 8 nodes, and each of those has transaction TX1 in their memory pool, none of them will send you TX2 if it contradicts TX1. (Assuming they're running Bitcoin Core, of course.)

so i need to 'pool' (https://github.com/bitpay/bitcore-p2p/blob/master/docs/pool.md) more nodes to have a greater chance of seeing it?

'particularly if it contradicts a transaction you have' - please elaborate!

@BenMuircroft If two transactions spend the same outpoint, they cannot both succeed. One or more must not get into the chain.

'none of them will send you TX2 if it contradicts TX1' - but if TX2 was the malleated transaction altered and included in the block by the miner then race conditions don't matter so; the none of them sending TX2 is retarded because the logic will always be ignored by the miners choice of what inevitably goes in!

@BenMuircroft Yes, that's correct.

wow that is a major exception! it is occuring like mad frequently right now on testnet3!

If a wallet sends raw tx
[4d]49[00]3046....
without [in brackets unnecessary bytes] do you think some miners might be resigning the tx with the unnecessary bytes? therefore changing the txid?!

related: http://bitcoin.stackexchange.com/a/22058/14316

source: Stack Exchange

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

sort: votes


text:
Can I regenerate blkindex.dat from blk0001.dat?
My copy of blkindex.dat became corrupted, but I still have the whole blk0001.dat file.
Is it possible to reconstruct the blkindex.dat file from the blk0001.dat file or do I have to delete both files and redownload the whole blockchain from scratch?
Edit: Pieter's answer is working for me.  It's taking many hours to run, but at least it isn't using any bandwidth.  I'm wondering, as a related question, whether this bitcoind -loadblock=blk0001.dat.bak technique is a way of being able to get a trusted copy of the blockchain from an untrusted source.  If I download a blk0001.dat from a random website, then import it using this -loadblock command, does that ensure it's correct, and ask the network for anything the download was missing?
While running, the command just said:
SetBestChain: new best=00000000000004411998  height=174305  work=284206530118085534778
SetBestChain: new best=00000000000009a01d64  height=174306  work=284213516218692473063
InvalidChainFound: invalid block=000000000000038181de  height=174307  work=284220502319299411348
InvalidChainFound:  current best=00000000000009a01d64  height=174306  work=284213516218692473063
SetBestChain: new best=00000000000007e352ec  height=174307  work=284220502319299411348
SetBestChain: new best=00000000000006b4b91c  height=174308  work=284227488419906349633

Is that normal, representing an orphaned block?  Or possibly the result of the same disk error that caused the blkindex.dat to become corrupted initially?

(because I don't want to redownload the whole blockchain over this 3G connection)

Seems unlikely that it's caused by the disk error. I see no way to recover from a corrupted block that's part of the main chain, since all later blocks depend on it.

It looks like I had two different blocks at height 174307 though - see how the hashes are different?  All later blocks only depend on one of them.  Incidentally, the -loadblock command hung after about 6 hours, with around 8000 blocks still to import.  I quit it and ended up going back to the partially completed download I had been running before, which only had about 2000 blocks missing.

Orphan (in the meaning of "without parent") blocks are never stored on disk, just cached in RAM until their parents are fetched. This seems to be a stale block (one not (anymore) in the main chain) that got corrupted; it is certainly not normal to have stale blocks that cause invalid chains.

I just remembered; the number 174307 looks familiar to me. I believe this was a BP16-invalid block that got created shortly after the switch, before many nodes updated. Getting an invalid chain error during re-import is expected behavior in that case.

This is possible in git HEAD, and will be in 0.7.0. You can move the existing blk0001.dat elsewhere, delete blkindex.dat, and then start the client using ./bitcoind -loadblock=blk0001.dat.bak

That's working nicely, thanks.  One thing I noticed is that while it's importing from the .bak file the splash screen says "Loading wallet..." which is a little misleading.  (I use 'bitcoin-qt -server' rather than 'bitcoind')

I added to my question as the -loadblock=... is running.

my blk0001.dat corrupts all the time.

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


text:
Exporting Bitcoin settings to bitcoin.conf?
How do I Export/dump the settings of bitcoin into a .conf file?
I know I can review some of them via bitcoin-qt GUI.
I'm not interested in the GUI settings like font, etc.
I'm interested in exporting ALL the settings eg.
  prune=1000
  server=1
  datadir=/myAwsumDir
  addnode=127.0.0.1:18442
  fallbackfee=0.00001
  etc.

I want a text file of all the settings.
FYI: I have already used this very good tool to generate a .conf file
Bitcoin Core Config Generator
but it's only a generator. It doesn't query the actual current settings.
Perhaps Bitcoin doesn't allow exporting of settings? If not why not? Are there security concerns about exporting .conf settings? What are they?

AFAIK when you run bitcoind it will use your bitcoin.conf in the default directory if you have one. Typically .bitcoin/bitcoin.conf in your users home folder. Otherwise if you run bitcoind with arguments that will override things you've set in bitcoin.conf. One way to get your current settings is to just look at what is in your bitcoin.conf.
Potential security concerns are you can set the rpcpassword in the conf file along with other potential sensitive information.

Yes, this is all true but not what I'm looking for.  bitcoin.conf often does not provide a complete listing of all the settings.

which setting specifically are you trying to figure out? (if not understood by looking at the bitcoin.conf).

no one setting in particular.  I want to know what ALL the settings are.  The bitcoin.conf doesn't list ALL settings.

You want to know all the default values that aren't specified?
You can look up what the default values are if they are not set in the bitcoin.conf.

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


text:
QR Scan "Unrecognized format" mycelium "Mastering Bitcoin'
Noobie here.
In Ch. 2 of Antonopoulos' "Mastering Bitcoin", I try to scan figure 2-2 (per his instruction) using a recently installed Mycelium on my Android.
Why do I keep getting "Unrecognized format"? How do I properly scan this?

Mh i'm try with Bitcoin android wallet and work, this is the result

Can be your wallet have a bug?

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


text:
Retrieve the xpub and private key of a given path (Bitcoin Core)
How do we retrieve the xpub and the private key (for signature) of a given path (m/87h/0h/0h, for example) for legacy and descriptor wallets in Bitcoin Core?


text:
Public Keys Prefixes and Derivation Paths
When importing an zpub, for example, to a wallet, does the wallet understand it should recreate a set of addresses using the derivation path "m/84'/0'/0'" and the script type "p2wpkh" ?
So if I generate an zpub with correct script type but choose an arbitrary path like  "m/77'/0'/0'", would it be conceptually wrong and can cause problems when exporting to other wallets ?
I am just trying to understanding if the concept of version bytes / prefixes in extended public keys are also path-dependent or can change just according script type.
The SLIP 0132 mentions the path for some prefixes.
But the Electrum Docs don't.

The zpub you get from electrum will be at that path itself (m/84'/0'/0'). It's not at m. You can't derive hardened paths from a zpub anyway. If you create a watch only wallet using the zpub electrum will treat it as m and derive public keys and addresses at m/j/i where j is 0 for external (receive) and 1 for change addresses and i is the index. In actuality the addresses will be at m/84'/0'/0'/j/i.

It all depends on the wallet. There is no rule saying they should even accept these strings or know what they correspond to and there is no consensus among wallets.
Wallet A could accept zpub and know the desired path and script type while wallet B may accept the same zpub, ignore its version byte and use the default derivation path and a completely different script type while wallet C could simply reject the string because of "unexpected" starting character (z).
With that said most of the times wallets perform similarly as long as there is a BIP somewhere defining the algorithms.


text:
What are the differences between the Minsc and Sapio high level scripting languages?
Both Minsc and Sapio are high level scripting languages that compile down to Miniscript. What are the differences between the two? When should I use one over the other?

The two have very little to do with one another.

Minsc is a scripting tool for defining keys.
Sapio is a compiler framework for defining covenant contracts.

You could, if you wanted, use Minsc from Sapio as a plugin for defining the unlocking conditions in any given Sapio program path, but you could not use Sapio inside of Minsc in the same way.
Sapio does not compile down to miniscript; it has it's own compiled object format that contains miniscript. There is other stuff in there as well.

A covenant contract has to produce a script that goes onchain. I get that OP_CTV adds an extra opcode to Script (other than that Script stays the same). But at least in theory in a world where OP_CTV has activated on mainnet Miniscript could be extended to support OP_CTV? Just like Miniscript will hopefully be extended to support Taproot?

Perhaps as Miniscript only encodes a subset of Script you've made the decision to bypass Miniscript as you want the full Script functionality... but it is impossible to bypass Script. Somehow a Sapio contract needs to turn into Script.

yes, miniscript would have CTV support -- you can see i've added it to my fork of rust miniscript. it's missing the point though. think of miniscript/minsc as generally being focused on the problem of "compiling a single function that has the API bool spend(SigningData, Utxo). Sapio is focused on the problem of either<txn, bool> spend(SigningData, Utxo). The functions are fundamentally different types. miniscript/minsc tell you true/false, sapio tells you either a specific txn OR anything OR not valid.

so what you're missing is that sapio encodes state transitions and unlocking conditions, whereas minsc/miniscript just encodes the specific unlocking conditions. of course you could consider the state transitions to be part of the unlocking condition, but that's not what miniscript or minsc have been designed to think about.

So across multiple transactions (multiple locking and unlocking) rather than just a locking script within a single UTXO? State transitions can only really happen across transactions in Bitcoin so it must be that.

exactly; sapio lets you author transactions and scripts, not just scripts. the transactions are embedded in the scripts of course through ctv


text:
Can I edit Bitcoin Core's config file with a text editor?
Must changes to bitcoin.conf only be made using the GUI settings options?
Or can I edit the file with a text editor such as Notepad?

Again, find someone to help you write questions. This is incomprehensible.

@Pieter: I replaced it with something that is either what the author meant or something completely different but less unintelligible.  The jury is out on whether this will act as an example for OP or merely encourage further incomprehensible postings.

I believe you can edit the config file with a plain-text editor. However using the GUI is less likely to cause the file to contain invalid data that will cause alarming or potentially impoverishing problems.
If there are reasons to not use the GUI to change the configuration, using the command line options may be safer than editing the config file.


text:
Mined Bitcoin withdrawn but not deposited into wallet yet
I mine bitcoin with effort and yesterday I withdrew a third of bitcoin, but it has not been deposited into my wallet yet. Thank you for your answer.

Sounds like you are being scammed. This is not how bitcoin or mining works.

A common scam is to offer X much for remote mining or mining on your computer, but it doesn't mine anything. In fact, unless you bought one of the most recent bitcoin miners, there's no profit. But if you did so, it'd be near impossible for you to mine third of bitcoin, $5k! Whoever offered you this, if they ask you for more money so that you can withdraw, this is the continuation of the scam. Don't pay them anything and don't expect from them anything. I'm sorry for your loss.

Thank you for your answer, but it took almost 4 years to mine a third of Bitcoin, and she didn't ask me for money

In the installed program, check confirmation

@ابراهیمجمالی What's the program called? You cannot mine a third of Bitcoin in the last four years even if you had bought a specifically designed ASIC computers.

Send me a message to my email so I can send a photo of the program
ebi657113@gmail.com

Please edit your question post to add the picture there, if it provides context to your question.

@ابراهیمجمالی Tell us its name, that should be enough

https://btcfree.win/?r=818921

Log in through Google and enter the email, thank you for the answer, thank you

When Bitcoin was invented, if you mined bitcoin, the mining rewards were paid directly into your wallet. There was no need for any separate withdrawal or deposit process.
Nowadays, mining is almost always done using mining pools. I believe mining pools pay pool members directly into their wallets. If not, the payment arrangements would be a private matter between you and whoever runs the mining pool you use.
The Bitcoin network itself does not have any process for withdrawal or deposit.
If someone claims to have paid you but you don't see the payment in your wallet, one of the following is probably the cause:

your wallet isn't synchronised with the network yet.
you gave the other party the wrong address.
the other party used the wrong address.
the other party is cheating you.

authors: ابراهیم جمالی


text:
Can someone break down what is returned by pybtc?
I am feeding network data to pybtc.Transactions. What I do is I take tx messages (which I understand to only contain a single transaction) and I feed them into pybtc.Transaction but only after removing the first 24 bytes.
This seems to work, however, I sometimes cannot parse the data. As far as I can tell the data comes in two forms:
form 1
{
  0: {
    'value': 472100,
    'scriptPubKey': b'v\xa9\x14K\xf1p;\xfc\x01\x1c\xd3\x91\xf9\n\xc9,\xde\xef\x13\x01\xcc\x13\xfa\x88\xac',
    'nType': 0,
    'type': 'P2PKH',
    'addressHash': b'K\xf1p;\xfc\x01\x1c\xd3\x91\xf9\n\xc9,\xde\xef\x13\x01\xcc\x13\xfa',
    'reqSigs': 1
    },
  1: {
    'value': 72978592,
    'scriptPubKey': b'\x00\x14\xce}{W\xb1\xb4m\xbfH\xf7v?\xb7\x86\xdf\xf6\x9b{\xa0\xdd',
    'nType': 5,
    'type': 'P2WPKH',
    'addressHash': b'\xce}{W\xb1\xb4m\xbfH\xf7v?\xb7\x86\xdf\xf6\x9b{\xa0\xdd',
    'reqSigs': 1
    }
}

form 2
{
  0: {
    'value': 12007,
    'scriptPubKey': b'jLPX2[z\x1cm\xdb\xf0\x00\xc8\x0f\xe6\xa8\x1e^\xabE\xf0\xed\x17:\xacYA\xc2\x13~>4\xb7\x8e\xf81~\t\xf6\x81 +S\r\xaeX\xb5\xcc\xde\n\xb1\xef\xf7\xd3\xce\xf8\xc6\xa6\xc0B\x85\x85.##w\x85\xcf`\xc8\x00\x0b\xdf\xa3\x00C\x00\x0b\xdd\x19\x00L*',
    'nType': 3,
    'type': 'NULL_DATA'
    },
  1: {
    'value': 206496,
    'scriptPubKey': b'\xa9\x14\x031\xa9\xde\x93\x13\x9d\x14\x7f\x01\x00\xf3rwI\x9e\x8dn\x91\x81\x87',
    'nType': 1,
    'type': 'P2SH',
    'addressHash': b'\x031\xa9\xde\x93\x13\x9d\x14\x7f\x01\x00\xf3rwI\x9e\x8dn\x91\x81',
    'reqSigs': None
    },
  2: {
    'value': 206496,
    'scriptPubKey': b'\xa9\x14\xf7\x17\x84{K\x9b2\xfe\x17\xc0`\xb1v\xee\x81\xf4\x05p6\xbe\x87',
    'nType': 1,
    'type': 'P2SH',
    'addressHash': b'\xf7\x17\x84{K\x9b2\xfe\x17\xc0`\xb1v\xee\x81\xf4\x05p6\xbe',
    'reqSigs': None
    },
  3: {
    'value': 68346341,
    'scriptPubKey': b'v\xa9\x14\x99=\xdf\xac\x9bQ\xa0h\xb4\xeb\x98:Q/\x10\xd9\xd5\x04\x9a\xe9\x88\xac',
    'nType': 0,
    'type': 'P2PKH',
    'addressHash': b'\x99=\xdf\xac\x9bQ\xa0h\xb4\xeb\x98:Q/\x10\xd9\xd5\x04\x9a\xe9',
    'reqSigs': 1
    }
}

As far as I can tell, the only difference between them is the presence of addressHash but, for form 2 addressHash is actually present in dictionaries with keys greater than 0.
All this to ask, my question is what is the meaning of "value"? Is it the amount transacted? Additionally, if at all possible, could anyone break down the meaning behind these other fields?

Could you please add the original tx message you started with? Also please the txid of the transaction you are looking at, so we can take a look.

Also, just looking at the transactions on a block explorer may be insightful

could anyone break down the meaning behind these other fields?

Many of them are not explicitly present in the data but are inventions of pybtc that present you with an interpretation of some aspect of the data.
For example type:p2pkh is not a data item in the transaction data but is a label created by examination of the form of the scriptPubKey. It is an additional categorisation that represents the results of an assessment, it is not data present explicitly.
Consequently, if you want to fully understand the meaning and scope of these invented items, you would have to consult the pybtc author or its source code.
Parsers that invent data in a confusing attempt to be helpful is why I wrote my own parser. I think a parser should be clear about what is original data and what is additional interpretation.

The only "real" data items in that list are those labelled value and scriptPubKey, all the rest are inventions, commentary.
Value is the amount of money, expressed in units of Satoshi (10-8 Bitcoin), being sent to one "recipient".
scriptPubKey is the locking script that typically prevents anyone other than the intended recipient from subsequently spending this particular amount. It defines the spending conditions (if any). With scripts such as P2SH, I guess you could say it constrains rather than defines since the real conditions are not revealed until the amount is spent (if at all).
Additionally, Python's bytes literals are a particularly noisy and unhelpful way of presenting Bitcoin scripts. I think pybtc's author should have chosen to show them as hexadecimal. If I wanted to show readable text embedded in a script I would use something like canonical hexdump format or something close to the algorithm used by Unix strings.

I can only guess at the inventions:
type appears to be a categorisation of the pattern of scriptPubKey
nType is probably a numeric code for type
addressHash is the middle portion of scriptPubKey
reqsigs presumably attempts to guess the value of n in an n of m multisig output - or attempts to assign a sensible value in other circumstances.

Excellent answer!

Transactions may have many inputs and many outputs. I assume you extracted the output list from some transactions.
The “form1” dictionary has two entries with the keys 0 and 1. Entry 0 is a P2PKH output worth 472'100 satoshis, entry 1 is a P2WPKH output worth 72'978'592 satoshis (i.e. 0.729'785'92 ₿).
The “form2” dictionary has four entries, naturally with the keys 0–3. Entry 0 is a null_data output that burns 12'007 satoshis, outputs 1 and 2 are P2SH outputs worth 206'496 satoshis each and output 3 is a P2PKH output worth 68'346'341 satoshis.
As I wrote in my previous answer to you, not all output types have addresses. One of the types that does not have addresses are null_data outputs aka OP_RETURN outputs.

All this to ask, my question is what is the meaning of "value"?

According to https://en.bitcoin.it/wiki/Transaction#General_format_.28inside_a_block.29_of_each_output_of_a_transaction_-_Txout
the "value" key indicates the amount of Satoshis in an output. Assuming your data is txouts this is the same "value" key representing Satoshi amount.


text:
Consequences of turning on pruning setting in Bitcoin core after initial block download
I have been running full node without specifying the pruning settings in bitcoin.conf.
I was wondering if I need to re-download the entire blockchain if I restart my node after turning on pruning settings?

No, when turning on pruning for a node with a full copy of the blockchain, it simply discards the oldest part of the blockchain down to the specified limit of what's to be kept.
You only need to download from scratch, if you turn off pruning or when you need to rescan or resync.


text:
How to attract traffic to a Lightning routing node
We have a lightning node and are searching for some educated advice on how to attract more traffic to our routing node.

A short explanation of what we have been experiencing.
We have a small node with about 60 million sats that currently has six channels. We recently closed a few channels that did not seem to be doing very much (over a long period of time)to assist our node's routing figures and soon after that we opened a few much larger sat channels with big Lightning nodes like LNBig, Nicehash, etc... things only got worse and not better. So we lowered the fees considerably in hopes of improving things but as of yet we have not had much luck with little or no routing coming in and then out again and a lot of difficulty rebalancing using RTL. Which prior to closing these long held channels worked significanlty better that at the present time.
We took advice from a few contacts we have made over the last year but we must have misinterpreted this information because it has not worked that well for us. One of the main things we would like to know is how to gain more than one or two nodes that appear to start the ball rolling to route sats in to our node, as that seems to be the key here. If we do not have at least one node routing sats into our node then nothing seems to happen.
Any ideas on how to create a more widely used routing node?

If no-one here offers a good answer, the top few hits in https://www.google.com/search?q=bitcoin+lightning+routing+node+traffic look potentially useful as a starting point.

Hi RedGrittyBrick, thanks for the tip.

The lightning network can be thought of as a graph, where the nodes are vertices and the channels are edges.
A transaction starts at a vertex (node) and travels through one or more edges to get to its final destination.
What you want is for your node to be on the path of those transactions.
In general this means the following.
Be well connected, be well balanced, and have sufficient liquidity (balance) to route transactions.
Have connections to some of the busy nodes, but also to some of the edge nodes that need liquidity.
In the past i have used https://lightningnetwork.plus/ to swap channels with people.  That seemed to have a good effect on transaction volume through my node.
My LN knowledge is a bit stale (i am working on something else now) so perhaps there are better tools now to swap channels, optimize traffic and keep channels balanced.
Hope this helps

Hi Albert,Great information, Thank you.  Orange_Bonzo


text:
Failing to create a new address to be used for receiving staking rewards whenever a generated block is accepted
Our problem is that we need to get a new address on each stake.
What I've tried so far is:

Generating a new address right before a block is accepted and try using it to receive the stakes, but that kept getting signing verification errors, I could tell the wallet to ignore all that verification, but I could end up making the wallet vulnerable.
2.Taking the stealth address route, loading up a stealth address for receiving the staking rewards, since a stealth addy automatically associates itself with a pub addy and could have solved it smoothly but again there was a signing verification error.

After some research, I figured an address has to be used in a transaction previously in a wallet for it to be used and accepted for receiving rewards, specifically the very last address.
So currently I'm working on creating a microtransaction within a wallet, sign it, and it will be picked automatically to be used for receiving the staking rewards.
From my point of view, there are two options:
1. Creating a new addy and use it to generate a self-transaction that is not charged a transaction fee, just making sure it's the most recently used in the transactions list, before creating a new block.
This way we guarantee when the new block looks up for an addy to send rewards to, this one will be picked up.
2. Changing the address picking approach, instead of looking for a recently used addy in wallet transaction list, we tell it to create a new one and use it instead. Problem with this one, we don't know if this newly generated addy works, IMO it is a loophole that could be used to attack the wallet.
There is also generating a stealth transaction which didn't work for me, had block signing issues.
Any guidance would be grateful.

any ideas? Looking for any guidance here.


text:
Bitcoin / Crypto and exchanges!
When we buy/ sell bitcoin through some exchange say "Koinex in Indian context", what is the process i.e. actually followed ?
1. Does exchange communicate to node(s) in the bitcoin blockchain thru my public address on my behalf or
2. My browser directly communicates with node in blockchain which then broadcast it across bitcoin blockchain or
3. Exchange itself is a node in the network and to which i am communicating and it is broadcasting my transaction in the network

When we buy/ sell bitcoin through some exchange ... what is the process

The answer to your question is number 3.

Exchange itself is a node in the network and to which i am communicating and it is broadcasting my transaction in the network

why my balance gets updates instantly in exchange?

Some currency exchanges (and BTMs) just send your BTC to whatever Bitcoin-address you give them. This is subject to the usual Bitcoin block production timing. If the exchange subsequently goes bust you lose nothing.
Other exchanges act like a bank, rather ironically. They insist you open an account with them and just change a number in your account without actually performing any Bitcoin transactions. The number shown as the balance in your account basically says that is the amount they owe you (not the amount you own as far as the Bitcoin network is concerned). This is arguably the most risky way to hold Bitcoin (other than for someone who trades currencies several times a day). If the exchange subsequently goes bust you lose everything.
As the wise folk say: "No Private Key - No Bitcoin".

how can be ensure we are not duped by second type of exchange?

There is no infallible way to ensure you are not duped by the second type of exchange (or by criminals hacking that exchange). Such exchanges are inherently absurdly risky. Remember MtGox, MyBitcoin, Bitcoinica, Neo & Bee, Bitinstant, NiceHash, Moolah, Cryptsy etc. Peruse this website
Don't just assume that a unique string they shared with you is a private-key. Verify that it is by importing it into a standalone wallet and checking the balance (then delete the wallet and clean unused space on the hard disk or Flash memory)
The only sensible action, if you plan on keeping Bitcoin for more than a day or so, is to immediately transfer "your" bitcoin into a paper-wallet (which you generated privately, not generated through some online website) or into a hardware-wallet (directly purchased from the manufacturer) that only you control and which no-one else has ever touched or seen.
If you need to constantly see your Bitcoin balance, set up a watch-only wallet. That way your private-keys are never exposed to the thousands of fanatically determined criminal hackers roaming the Internet.

Related:

Do you 'own' Bitcoins purchased via an exchange?
Pros and cons of using Mt. Gox as an e-wallet
Why is the disappearance of Mt Gox a problem?
Am I scamed? FA exchange trading company is fraud? They are requesting taxes
Is Binance a scam exchange/wallet?
etc, ad nauseam.

follow up question is why my balance gets updates instantly in exchange, it should have waited for 10 mins for BTC buying

@Aditya See updated answer

Thanks Brick...then how can be ensure we are not duped by second type of exchange....as far as my exchange goes they have shared one unique string with me, which i assume is my private key...but everyone time i buy/sell BTC, the balance is getting updated in real time

@Aditya See updated answer .


text:
Bitcore vs bitcoin
Currently bitpay has provided the complete code for the webwallet+blockchain explorer + bitcore running
can we use same thing for the bitcoin blockchain ? or the system that bitpay has developed will work only for the bitcore(BTX)
https://blog.bitpay.com/announcing-the-bitcore-wallet-suite/

Bitpay's Bitcore is unrelated to BTX, though it shares the same name. It was built for Bitcoin (BTC) though Bitpay may or may not choose to support BTX in addition to other coins such as BCH.
See Bitcore - A full stack for bitcoin and blockchain-based applications

Thanks ,JBaczuk , Is this means we can use https://github.com/bitpay/bitcore for the own bitcoin application setup.  I want to setup new bitcoin wallet . So can i use this ? i will setup the complete code from the above url on my dedicated server which allow users to send and receive bitcoin and also dont want that customer data or private key store directly on my server. (running as node + webserver for web wallet+ blockchain explorer)

That is what they say you can do with it. I have never used it myself.


text:
What are Public Notes
I see these "Public Notes" on blockchain.info. What are they? How do they work? Can I make one? Here's a random example: http://blockchain.info/address/1DkyBEKt5S2GDtv7aQw6rQepAvnsRyHoYM
Some of the transactions on that address have "Public Notes" before them.

Public notes are simply attached to addresses/transactions in the blockchain.info database, not in the blockchain itself, it's more of a convenience service offered by this particular website than a protocol feature.
And yes, you can make them on blockchain.info, you apparently do not need to own an address to tag it (some of my addresses got tagged without me doing it). The same is probably (I haven't checked) true for transactions.


text:
What does it mean by Public Key on the Vanitygen Pool?
When I wanted to request a vanity address from https://vanitypool.appspot.com/ it asked me for my public key. I tried my main address, but it said it was too short. What should I put there?

ThePiachu explains it like this:

The idea is, that you can generate a vanity address without even
  knowing what private key it will actually belong to. One party grabs a
  random ECDSA keypair and saves the private key for themselves. They
  later can issue a request for a vanity address to be created, by
  supplying the public key form that keypair, their desired pattern and
  so forth. A person takes with looking for the vanity address is
  required to brute force random ECDSA private keys, get their
  corresponding public keys, add them to the provided public key, and
  proceed normally with SHA, RIPEMD and base58 until they receive the
  desired pattern. Then they give the private key they found to the
  first person, which adds the two private keys in order to get their
  vanity address. The best thing about it - the person looking for the
  solution won't know what the resulting private key is! This means that
  you can outsource your vanity key generation without needing to trust
  any third party.
An example (available from gobittest website): We have a private key:
  18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725 which
  maps to public key:
  0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A
  299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6
and say we want to find a pattern "166". One of the solutions takes a
  form of a private key
  B18427B169E86DE681A1A62588E1D02AE4A7E83C1B413849989A76282A7B562F
  mapping to public key:
  049C95E0949E397FACCECF0FE8EAD247E6FD082717E4A4A876049FB34A9ADED110DFEA2EF691CC4
  A1410498F4C312F3A94318CD5B6F0E8E92051064876751C8404
If we add the two public keys (like the person looking for the
  solution would do), we get a public key:
  0436970CE32E14DC06AC50217CDCF53E628B32810707080D6848D9C8D4BE9FE461E100E705CCA98
  54436A1283210CCEFBB6B16CB9A86B009488922A8F302A27487 which is
  equivalent to this address: 166ev9JXn2rFqiPSQAwM7qJYpNL1JrNf3h
If we add the two private keys (like the person requesting the address
  would), we get:
  CA65722CD418ED28EC369E36CFE3B7F3CC1CD035BFBF6469CE759FCA30AD6D54 which
  maps to the same public key as the sum of the public keys, and thus -
  to the same address.
Since this is a model that requires basically no trust from any party,
  I've decided to create this "Vanity Pool" to enable people to easily
  outsource their vanity address creation, as well as enable people
  wanting to earn some Bitcoins to use their machines for something
  different from traditional mining.

The simplest option to get the keypair to get started with the vanitypool is to go to https://www.bitaddress.org/ and generate a new address. Note down the private key. Now switch the tab to "Wallet Details" and enter the private key. One of the resulting fields is the "Public Key (130 characters [0-9A-F])" which has exactly the required format that is needed for the vanity pool.
Once a solution is found just combine the result that is mailed to you with the private key you noted before and you can import it into your Bitcoin client.

How do I combine the private keys? Can I use this website? https://gobittest.appspot.com/VanitySum

Yes that will your base private key and the found solution. I'm still looking for an offline tool to do the computation as submitting the base private key to a website defeats the purpose of splitting the base key from the solution.

Found one, there's a keyconv tool included with vanitygen. It can generate a keypair and combine private keys.

@cdecker, you wrote "If we add the two public keys...".  The public key is a coordinate pair on the elliptic curve, so I wanted to verfy my understanding here.  As you used it here, "add" means to combine the two points according to the group function of the elliptic curve, which is to identify the third point on the curve that intersects the line formed by the two coordinate pairs the public keys represent, and then negate its Y-coordinate, right?

Not exactly sure about the math here, but that is my understanding as well, yes.


text:
How does vanitygen calculate difficulty?
It seems really random. 1d is 1353, 1L is 22, 11 is 256, 11L is 78508, 11x is 78508, 111 is 65536, 112 is is 1335, 113 is 1330, 114 is 1330, 1L1 is 1330.
I thought it was 58 to the power of the number of digits. Why isn't it?

There are two parts to this.
First is leading 1s.  A leading 1 represents a 0 byte i.e. 8 bits.  This means that for every additional 1 you prefix your search string with the difficulty increases by 256 (2^8).  You can see this easily by checking the difficulty of prefixes 1, 11, 111 etc.
Second is other characters.  Here the difficulty changes depending on how many bits you are specifying, because as your value is converted from base58 to an integer value and from there to a power of 2.  Depending on your second number in your 2-digit prefix the difficulty will move around a bit (plus there will be rounding errors).  Again, easy to see with prefixes of 12 and 1z (which are 1 and 57 in base58 encoding, respectively).
Once you get past all of that you should find that your 58 to the power of the number of digits comes in to play.  For example the difficulty of 1234 should be 58 times the difficulty of 123.

"For example the difficulty of 1234 should be 58 times the difficulty of 123." It's not. 1353 * 58 != 78508. Even if you compare 12345678 and 123456789, you'll find it's not exactly a factor of 58

As mentioned, there are rounding errors because difficulties are calculated using integer values (and the calculation multiplies integers so the error compounds as you increase the size of the prefix).

Ah. So the difficulty reported by vanitygen is inaccurate?

I wouldn't label it as inaccurate; it's a minor rounding error that's less than 0.05% in the most egregious case, and that's only when it really doesn't matter because the absolute numbers are so small.

Also, why is 1m (non-case sensitive) the same difficulty as 1L?

Because 1M is the same difficulty as 1L.

Non case sensitive. It says that the probability of finding 1L is the same as finding 1m OR 1M. That seems a little odd to me.

@jgm's answer is unfortunately wrong. Adding one character does not multiply the difficulty by 58, though it is a good approximation. (The part on 1s at the beginning are correct, consecutive 1s only at the beginning are a special case, an exception)
If the smallest address were
111111111111111111...111111
and the largest address were
1zzzzzzzzzzzzzzzzz...zzzzzz
and those addresses were of equal lengths, he would be correct.
In other words, if I told you I've chosen a random number between 0 and 99, the probability of the first digit being 3 would be 10%. But if I choose a number between 0 and 36, the probability of the first digit being 3 would be much lower than 0, 1 or 2. Welcome to the world of base conversions.
How Vanity address generators pattern matchers work:
(Let's just ignore the prefix byte 0x00 which gives the 1 in the beginning of addresses)
In batches, it will generate a random private key and its corresponding public key hash. We'll add the four bytes of checksum at the end. Then we Base58 encode it and check if its prefix matches.
Recall that Base58 encode is a base conversion from base256 to Base58 (plus the special treatment of the 1 at the beginning). So instead of Base58 encoding every calculated public key + 4-byte-checksum, we can find the binary number ranges of the expected prefix. Thus if public key + 4-byte-checksum is in that binary range (comparing large binary numbers is quick), then it's Base58 encode will yield an address with that prefix.
Suppose we want 1PA. The smallest Base58 character is 1, the largest is z. To find the range, we can inspect the smallest and largest numbers in Base58, and convert them to binary.
Is 1PA111111111111111111111 our lower limit (same reasoning as a large number starting with 1320 could be 1320000)? No, if we apply Base58 decode to it, we can see it has 19 bytes. So we add 1s until we get one that decodes to 24 bytes:
1PA111111111111111111111111111111 is our lower limit.
So 1PAzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz is our upper limit? It decodes to 24 bytes. Yes!
Are we done? No. What if we added one more 1 to our lower limit:
1PA1111111111111111111111111111111 still decodes to 24 bytes.
same for 1PAzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz. So this address has two ranges? Vanitygen adds sizes of ranges and divides the total number of ranges by their sum and rounds down.
There is also a second group of prefixes, those who who have only one range. (For example 1Qa111111111111111111111111111111; adding one 1: doesn't decode to 24 bytes but to 25 bytes)
How do we know if there are one or two ranges?
Supervanitygen's approach is the most simple one: compare with 1QLbz7JHiBTspS962RLKV8GndWFw. If the first character of our prefix is lower, then it'll have two prefixes. If ours is comes later in the Base58 alphabet it'll have one prefix. If same, compare the next character. Ones with two ranges are easier to find, but never those two ranges are equal in length.
The prefix subsets (1Q, 1QL, 1QLb) of 1QLbz7JHiBTspS962RLKV8GndWFw are an absolutely mess to work with. For example for the prefix 1QLbz7, the longer lower range is 1QLbz71111111111111111111111111111, so the corresponding higher range should be 1QLbz7zzzzzzzzzzzzzzzzzzzzzzzzzzzz, right? No, it's 1QLbz7Hzzzzzzzzzzzzzzzzzzzzzzzzzzz. I had to write a binary tree just for this prefix in my (dirty and useless) range generator implementation.
But why can there be at most two ranges? It's about adding 1s, which is the same as multiplying by 58. If we have a 01 byte for example, 58 would still be a byte, but we can't multiply by 58 once again; that would definitely increase the number of bytes by 1. On the other hand, some prefixes have 1 range because for example the byte 20 can't be multiplied by 58 without introducing another byte. Think of those bytes as the most significant bytes.
For example 1QLa (has two ranges, just below the one range boundary)'s ranges are (this time the result of base58 decode):
lower 0x0469... upper 0x0469...
lower 0xfffe upper 0xffff
Notice that 0x0469 which is {4, 120}, when multiplied by 58 (ignore the rest, next few bytes which affect through multiplication carry) 232,105, the most significant byte is really close to 255.
About 40% of prefixes have 2 ranges.
Now, think of those addresses who start with 1. Overall, there are so many edge cases that multiplying by 58 to calculate difficulty is no good.
Addresses in other coins and testnets have network bytes other than 0x00. So they can have at most one range. Why? To multiply by 58 one has to multiply the network byte too; as a result the network byte is invalid.
TL;DR There are three things that make difficulty calculation complex:

Leading 1s are treated differently.
Public key hashes/public key hashes + checksums are in binary. So there are 2^20 of them. 2^20 isn't a power of 58, so the largest address won't be "1zzzzzzzzz...." but something longer than an address which could be filled with z. Same reasoning as the 36 example in the beginning.
Some prefixes have two ranges instead of one, with different address lengths.


text:
Is BIP 32 Technology Cryptographic Curve Agnostic?
Does BIP 32 always implicitly assume secp256k1 elliptic curve cryptography (ECC) is to be applied, or can BIP 32 technology also be applied to create extended public or private keys that can readily be converted to say ed25519 private/public keypairs? One of the reasons I ask is because if a mathematical or computational backdoor is ever discovered for secp256k1, can ed25519 slide right in or does BIP 32 need to be re-engineered to support ed25519?  Ed25519 can also be applied to provide Schnorr Signature capabilities.

Any Elliptic Curve could work in the BIP32 scheme. The only property of a Curve that BIP32 relies on is that a * G + b *G = (a + b mod N) * G, which is true for any Elliptic Curve.
Secp256k1 is a 'Koblitz' curve, which just means its choice of parameters enables very fast scalar multiplication (computing a multiple of the Generator point).
With that said, if a vulnerability was discovered in secp256k1, it's not like everyone could just switch over easily. That would require a major change to the Bitcoin consensus system, and require coordination of many software systems.

That's not exactly correct. BIP32 at least needs a small tweak to be usable on curves with a cofactor different from one. Ed25519 also uses a key generation scheme that forcibly sets some bits to 0 and 1, which would make BIP32 derived keys technically invalid Ed25519 keys.

@PieterWuille thanks. How is a cofactor greater than 1 a problem? And I wasn't aware that Ed25519 had restrictions on the keys, I'll update my answer.

@StephenM347. Ed25519 isn't used for ECDSA, it is used for EDDSA.  It will be really nice to be able to generate a few billion ed25519 public keys from a xpub* extended key without knowledge of  xprv* extended keys. I'm assuming a cofactor will fix this, any idea how? Related ed25519 posting.


text:
configure: error: No working boost sleep implementation found
On Ubuntu 18.04 using the /depends for ./configure but I keep getting this error:
checking for boostlib >= 1.47.0 (104700) includes in "/home/tony/crypto/bitcoin/depends/x86_64-pc-linux-gnu/share/../include"... yes
checking for boostlib >= 1.47.0 (104700) lib path in "/home/tony/crypto/bitcoin/depends/x86_64-pc-linux-gnu/share/../lib/x86_64-linux-gnu"... no
checking for boostlib >= 1.47.0 (104700) lib path in "/home/tony/crypto/bitcoin/depends/x86_64-pc-linux-gnu/share/../lib64"... no
checking for boostlib >= 1.47.0 (104700) lib path in "/home/tony/crypto/bitcoin/depends/x86_64-pc-linux-gnu/share/../libx32"... no
checking for boostlib >= 1.47.0 (104700) lib path in "/home/tony/crypto/bitcoin/depends/x86_64-pc-linux-gnu/share/../lib"... yes
checking for boostlib >= 1.47.0 (104700)... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system-mt-x64... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem-mt-x64... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread-mt-x64... yes
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono-mt-x64... yes
checking whether the Boost::Unit_Test_Framework library is available... yes
checking for dynamic linked boost test... no
checking for mismatched boost c++11 scoped enums... ok
configure: error: No working boost sleep implementation found.

The command called is
./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu --disable-wallet

. I've tried this without the depends and with. Tried to checkout to 0.18.1 and on master, but getting same error. Help very much appreciated.

Extra info from config.log
uname -m = x86_64
uname -r = 4.15.0-65-generic
uname -s = Linux
uname -v = #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019

More from config.log here: https://paste.ubuntu.com/p/v6nhPvW68s/

Seems like the depends build wasn't completed. Try rebuilding the dependencies and see if there are any errors there.

@AndrewChow Running make in /depends gives me
copying packages: boost openssl libevent qrencode zlib qt expat libxcb xcb_proto libXau xproto freetype fontconfig bdb miniupnpc zeromq to: /home/tony/crypto/bitcoin/depends/x86_64-pc-linux-gnu
Doesn't seem to give any errors when building depends.

Tried rebuilding twice by deleting /depends, doesn't seem to make a difference.

Found the problem. Had these lines in my .bashrc and commenting them out fixed it:
alias gcc="gcc-8"
alias g++="g++-8"
export CC="gcc"
export CXX="/usr/bin/gcc-8"
export PATH=/usr/local/clang_8.0.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/clang_8.0.0/lib:$LD_LIBRARY_PATH

Why this caused ./configure to error out, I have no idea. But problem solved.


text:
Multiple inputs with one signature
From this question I've learned that a transaction with N inputs requires N sign operations.
But what if there a huge amount of inputs? E.g. I have a coffee shop and I sell 5000 pcs coffee every day for $1 each. If I want to transfer my daily income I'll end up with a transaction with 5000 inputs.
Counting with 100kB max transaction size ~300..400 inputs can be included in one transaction. So I need to make 10..15 transactions every day. In addition, if I have a hardware wallet that needs let's say 500 ms to make a signature it will take 5000*0.5 sec = 41 min to sign all the inputs.
What is the correct way to handle this?
Is there an option to sign the transaction only once and use this signature for all the inputs?

The current signature scheme that bitcoin is using (ECDSA) doesn't support signature aggregation, so you will have to sign each input and provide one signature per input (assuming it requires only one signature) and your transaction size will grow accordingly.

sell 5000 pcs coffee every day for $1 each

Then you might want to look into Lightning Network. It works on top of bitcoin as a second layer and for micro and frequent payments it is the better choice:
https://lightning.network
How does the Lightning network work in simple terms?


text:
How can I consume my whole bitcoin balance in a single transction? Is it possible to use multiples UTXOs in a single transaction?
I want to make use of a single bitcoin address for payment. I'm using bitcoinjs library's transction builder for creating my own transaction. Can anyone help with a proper code to use multiple UTXO's in a single transaction? Is there any function which can automatically select the no. of UTXO's to be consumed depending on the output transaction value to be sent?
Thank you.

Yes, after refering to some documentations I'm now sure that,you can consume multiple UTXOs in a single transaction but upto a certain limit.Also transaction fees will increase as the size of input increases using multiple UTXOs.
I used Transaction Builder of bitcoinjs-lib, for transaction. Hence, using
tx.addInput(txId, vOut) (txId and Vout of respective UTXO to be used)
multiple times, multiple UTXOs can be used. However to estimate the no. of UTXOs, simple logic such as using a FOR loop, till the sum of all UTXOs is sufficient for the btc to be sent, will work.

Of course, you can add as many UTXO's as will fit in a block. In fact, you usually have to because you don't always have a UTXO for the exact amount you are trying to spend. Note that more UTXO will result in a higher transaction fee because the fee is based on the current market fee rate (satoshi/kB) and more UTXO increases the kB.
For example, check out this transaction, it uses 7 UTXO as inputs.
See Bitcoin Wiki - Transactions

Nit: you can't "add as many UTXO's as will fit in a block". Bitcoin transactions bigger than 400,000 weight units are non-standard and will not be relayed.

Thanks @Murch didn't realize there was a relay standard!


text:
I can lose coins but they can’t be spent? Is that what they are saying?
I have a web wallet that meets all or most of the requirements recommended by Colin Dean at An online wallet service could "lose" my bitcoins?  Unless they’re lying or I’m misunderstanding, both of which are always possible.
Assuming neither happened, a cracker or employee might take control, and then
If I don’t have a backup, I will have lost my coins, but the bad guy can’t spend them.  True or false?
Since I have a backup, I will have lost nothing, though the weird format of the backup might mean it takes a bit of time/effort to recover.  True or false?

This is nearly impossible to understand. If anyone takes control of your wallet it will always be spendable. The point of a backup is to keep a second copy of your wallet in a safe place for circumstances where you lose your wallet.

I’m a newbie.  It’s not hard for me to believe that the answer to my question might be “no,” but how is the question “impossible to understand”?  They do indeed claim that it is safe because they “encrypt everything.”

What exactly are you asking? I have trouble understanding what you mean :(

In many languages, including English, a question mark on the end of what would otherwise be a statement, implies “True? or false?” I will make it explicit.

I think I understand your question.  Let me try to answer.
Assume:

the online wallet operator stores only an encrypted version of your private keys
key decryption and transaction signing is done on the client side, without giving the operator access to your unencrypted keys at any time
you have a strong passphrase on your private keys
the client-side software is correctly implemented and not compromised

Then an attacker or dishonest employee who gains access to the operator's data will not be able to spend your coins.
They could conceivably delete the operator's copy of your encrypted keys.  If you have a backup, this won't really bother you, since you can decrypt the keys and use them to spend the coins yourself.  If you don't have a backup, then the coins may be permanently lost: neither you, the attacker, nor anyone else would ever be able to spend them.
They could also threaten to delete them, or demand ransom to return the encrypted keys to you.  Again, if you have a backup, you can ignore their demands.  If you don't, then they have you over a barrel, and you might be motivated to pay them a sizeable fraction of the value of your coins to get the encrypted keys back, because otherwise those coins would be lost to you.

Client-side!  Why didn’t I think of that?  :-). No offense, Peter, your answer was good but this was a tad better.  Now, does that mean if (1) I had no backup, and (2) I had not cleared cache, cookies, or history, and (3) I were extremely talented or extremely determined, I could figure out how to recover the keys that had been used before?  (or should I be posting that as a new question?)

@WGroleau: It's possible that copies of your encrypted keys would still be around somewhere.  That would depend on the details of the software implementation.  You certainly shouldn't count on it.  In general, though, good software practice is not to leave extra copies of sensitive data around in random places.

If you have a backup but a cracker gains access to the online wallet then both of you (yourself and the cracker) can spend the bitcoins. If you spend them before the cracker does you are safe, if the cracker spends them first you have lost them.

If, as I believe, the site meets the encryption requirements Colin stated, then the cracker should not be able to get my private key, no?

Hmmm, thinking about it more, it occurs to me that although they claim everything is encrypted by my password, the fact that they are able to send me a backup containing the private key means that if I pull a backup, it could be intercepted by someone on the inside prior to hitting the SSL layer.  If that’s the case, then the weak spot is not their wallet code, but their staff and their intrusion prevention.  Would they be able to see the private key during a spend?

for that matter, if they can send me the private key in a backup, then they must be able to send it to someone else—or to themselves.


text:
How can I reverse a Bitcoin transaction mistakenly sent to the wrong address?
I bought a bitcoin cash at a place called Bithumb in Korea and mistakenly copied the bitcoin address and sent it to the wrong. Obviously my fault is, but the fact that I can't get the cancellation done and lose all that money is very upsetting now.
Bitcoin, return my money right away. The money will not be sent anywhere, but it does not make sense that no refund is available.
2019. 5. 22. 13:20:14 BCH 20.121968
BitSumTXID:
7553dfd8ce04b2f78889224434f6602070c0ccdf81fb38a9e18307809d10d553

Id: 010  7122  1223

33zQhR8VGnHrXZuq4qz89VMqiWdCnPE51R

Firstly, Bitcoin Cash is not Bitcoin. Secondly, neither Bitcoin nor Bitcoin Cash have any sort of central authority or way to reverse/refund transactions. This is completely intentional - all confirmed transactions are final. The only way you can get a "refund" is to ask the person that you sent the Bitcoin Cash to to send it back to you. If you don't know who you sent it to or how to contact them, then unfortunately your money is gone.
The whole point of cryptocurrencies like Bitcoin and Bitcoin Cash is that it is like digital cash - once you hand someone cash in person, there's no way to get your money back except by talking to that person and asking them (or forcing them) to give you your money back. If you have no way to contact that person, then your money is gone.

So do I have to contact number 1 when I move from number 1 to number 2? Or should I call number two?

Who are number 1 and number 2? You need to contact the owner of the address you sent to. Whoever that is is up to you to figure out.

@Jihoon: as Andrew says - contact the recipient if you know who they are. You are relying on the recipient's kindness and good will to rectify your mistake.


text:
Do I have to know all my private keys for sending a "big" amount?
As I understood it: My client creates a public key (for recieving) and a private key (for accessing) for each transaction.
And the private key is here that I can send the BTCs I recieved (for all transactions only handled by this same public and private key pair where this private key is the private key).
But what if I want to send a big amount of BTCs but I only have recievied many small amounts? Would I then have to mention each private key for each transaction that I can send this big amount?

Private keys are not for using previous transactions, they are for using previous transaction outputs.  A single transaction may have many outputs, and many different people may hold the keys to those outputs.
When you send a transaction, you need to reference one or more unspent transaction outputs (UTXOs) to use as inputs of your new transaction.  The sum total of these UTXOs must be greater than or equal to the amount you wish to send someone (minus network fees, of course).  Any leftover can be specified back to you as "change" in the form of a second output on the transaction that is paid to an address you own.

But what if I want to send a big amount of BTCs but I only have recievied many small amounts? Would I then have to mention each private key for each transaction that I can send this big amount?

You would have to reference all the transaction outputs that you wish to use.  This is simply how Bitcoin works.  However, you don't "mention each private key", since you should never share your private keys with anyone.  What you need to do is sign the transaction with the private keys, which is what lets the rest of the network know that you are allowed to use those UTXOs.
I know this all sounds complicated, but don't worry; your wallet handles all the complexities for you.


text:
Which wallets support French seed-phrases?
I found an old backup seedphrase but it is has French words in it, and I've been struggling to find wallet to restore it as it seems most wallets support only English. There has to be a wallet that supports French bit39 words


text:
What parts of a block, other than the nonce, can a miner vary
What are the list of all the variables whose values that the miner can cycle or modify to get a valid hash for this block (with very high probability) ? The only one I am aware of is:

Nonce - 4 Bytes.

But since Nonce is just 4 bytes it is simply not enough for generating many potential hash candidates that pass the difficuly condition of SHA256 (256 bits).
What are the other variables that can be tweaked for ensuring the existence of a passing hash candidate (with very high probability)?
P.S. We are assuming that all the hashes are calculated immediately so timestamp for each candidate is same. Thus, timestamp wont be able to help as far as I understand.
I am struggling with this for a while and can't find much detailed answer for this (other than nonce).

Related: https://bitcoin.stackexchange.com/q/90393/5406, https://bitcoin.stackexchange.com/q/96434/5406

ExtraNonce: As well as the Nonce field, There is also an extranonce convention - a part of the unlocking script in the input of the coinbase transaction is used as an extra nonce by miners.
Timestamp: The miner can vary the timestamp. It only has to be accurate within about 2 hours. It doesn't have to be greater than the timestamp of the previous block.
Version: Miners can vary a part of the version number. There is a method known as ASICboost which helps miners who are using ASICs for mining.
Coinbase output: The miner can vary the coinbase output. Perhaps selecting a different receiving address or varying the type of script.
Transaction order: The miner can vary the order of transactions (other than for transactions that spend outputs of prior transactions in same block).
Transactions: The miner can make an arbitrary select of transactions from their mempool or create their own new arbitrary valid transactions to include. If inventing their own transactions they can vary the fee from zero to maximum and can vary the transaction type from legacy to latest. They can also vary the input amounts from near zero to whole UTXO. The transactions must be valid but that still allows a vast range of variations, assuming the miner owns some bitcoin to start with.

From Bitcoin for Developers I

Table 2. The structure of a coinbase transaction input

Size
Field
Description

32 bytes
Transaction Hash
All bits are zero: Not a transaction hash reference

4 bytes
Output Index
All bits are ones: 0xFFFFFFFF

1–9 bytes (VarInt)
Coinbase Data Size
Length of the coinbase data, from 2 to 100 bytes

Variable
Coinbase Data
Arbitrary data used for extra nonce and mining tags. In v2 blocks; must begin with block height

4 bytes
Sequence Number
Set to 0xFFFFFFFF

See also BIP-34

Thank you. I get the generic idea but I am not clear on the specifics or structure of some things: such as Extranonce, the coinbase script part. Can you please point to a resource where its discussed in details and is more specific (for implementation level details)?

The ExtraNonce isn't a "field", it's more a practice. The entire scriptSig of the coinbase transaction input is freely chosen by the miner (except that it has to be between 2 and 100 bytes long, and subject to BIP34's requirement that it starts with a push of the block height). Miners use this field to put messages in, but since very early on, part is also used as an additional overflow nonce field. There are no consensus rules governing this, just miners choosing to use the coinbase scriptSig this way.

@Pieter: Thanks, updated.

In the more recent past, miners have also been using the version field as a source of entropy per Overt ASICBoost.

@Murch: Thanks, updated.


text:
Wallet app disappeared from app store, is my money gone?
I've held some cash in an app called Coinbox, by Coinbox Inc. (1m+ users according to Google Play) and wanted to transfer it today. It seemed to have lost its functionality, so I uninstalled and reinstalled with the hope that would solve the problem.
Unfortunately now it has suddenly ceased to exist on Play and I have not had a response to my support ticket to the developers. I've also tried installing old apks of the app on my android phone and they don't connect or won't install.
I have my passphrase and QR of the account and even have some screenshot of when it was installed but is it safe to say my portfolio is lost if the developers don't restore the program or respond to my messages?

See https://bitcoin.stackexchange.com/q/108287/13866

but is it safe to say my portfolio is lost if the developers don't restore the program

We can categorise wallets into two major types

Custodial
Non-custodial

A Custodial wallet is where some business controls the money in the wallet. they have the keys that control the money in the Bitcoin Blockchain, you don't. This is a bit like having an IOU instead of money. It is a bit like having an account at an unregulated bank rather than having cash in your pocket. The business is the custodian. If the custodian stops performing customers requests or goes out of business or stops responding to support messages, you have no recourse but to law. This is why it is important to research the business before giving it money.
A non-custodial wallet (sometimes called self-custodial) is where there is no  custodian, no business who holds money. You control your money directly yourself. You run software on your own device that holds the private-keys on that device and which has very little or preferably no dependence on the developer's website or other services. This is the way Bitcoin was originally designed to work. No trusted third parties between you and the other party to a transaction. This is usually regarded as safer. In this case if the wallet developer is no longer available or if the wallet app stops working you can just transfer your private-keys to a different software wallet and carry on without losing any money.
So in conclusion, if the app is non-custodial, if app stops working your money is still safe (so long as you made backups of wallet and keys or recovery-phrase/seed-phrase). If the app is custodial, your money may be in peril.

Related

How to tell if a cryptocurrency exchange or trading platform is trustworthy?
What kinds of wallets are there?
I have lost my wallet, what can I do?
if the hardware wallet company ledger goes out of business, what will happen to my crypto asset / private keys in ledger?

The above answer is intended to be a general answer for all questions of a similar nature. However we can look at a specific instance.
Example: "Bitcoin Wallet" app by Coinbox Inc.

Website broken.
App not available for any of my devices.
Generally bad recent reviews in the app store.
app store ID is com.polehin.android. polehin.com redirects to coinbox.org. polehin wallet has discussion suggesting deceptive/untrustworthy
Review on Youtube shows evidence of deceptive software. App suggests it is non-custodial but isn't.
The only "Coinbox Inc" I found was a Canadian business dissolved for non-compliance.

If the Youtube review is correct, your money has been stolen.

I do got a link for install the coinbox which was send by the support team of coinbox as l do encounter same problem quite a few years ago. The coinbox app is available in google play store but unfortunately searching cannot search for it. Reason unknown. Below is the link in google play store. Hope it helps.
https://play.google.com/store/apps/details?id=com.polehin.android
Below is the support page for coinbox
https://coinbox.org/support.html

Maybe try directly with the APK:  https://www.apkmonk.com/app/com.polehin.android/
Of course never install from sources you don't fully trust.


text:
Communicating with mining pools
if I designed my own ASIC machine, what is the easiest way to connect it with the mining pool? I was searching but couldn't find any pool that has an API to communicate.

Mining pools use protocols such as Stratum to communicate.
However, I'd find it unusual to implement this in firmware or in an ASIC. I'd expect the ASICs to be dedicated to hashing and have pool communication handled by a supervisory computer. But I've not designed ASICs or mining systems so maybe my intuition here is weak.

yes that what i am meant, i will build asci machine and then use a computer to handles these asic machines. I have looked for stratum, explored their website too, but couldnt find any documentation of api, or some paltform  where I can find some help. Neither do i find any documentation on pool websites like which protocol are they using etc. where can i find such documents, regards


text:
Does leaving your wallet unencrypted mean that all the private keys bundled in the wallet are susceptable to loss of confidentiality?
I noticed that multiple private keys can be imported into a wallet.  If each private key originally had their own private password password to protect the elliptic curve private keys, does importing them into the wallet mean that they are clear text within the wallet and only the wallet's password is the means to protect those keys when the software wallet client is functioning?
Here is a use case for bundling numerous private keys together within a wallet. A small businesses will want to have a public key released to each of their clients.  Then, they will want to bundle the associated private keys into a single wallet.  This will allow the small business to not expose their overall income, but still spend their currency as if it where all from one pot.  Would deterministic wallets (not Bitcoin-Qt nor Multibit) be a better fit for small business need?

When you export a private key, you are essentially just exporting a plain text private key (you have to type in a password to export is a giveaway of decryption happening). So yes, an unencrypted wallet has all the private keys plain text no matter what.


text:
What are the key differences between regtest and the proposed signet?
What are the key differences between regtest and the proposed signet?
One of the key differences is that using regtest is not ideal for public networks as anyone anywhere can just rewrite the blockchain at their whim by mining a ton of blocks. Are there any others?
Is signet a strictly superior replacement to regtest?
If not, when would someone use regtest as opposed to signet in future?

Since submitting this question I have also found this Kanzure transcript from the Bitcoin Core meetup (2019) that also discusses the differences between regtest and signet. To be used to supplement Pieter's and Andrew's great answers below. http://diyhpl.us/wiki/transcripts/bitcoin-core-dev-tech/2019-06-07-signet/

The main difference between signet and regtest is that signet is an actual network, as opposed to a sandboxed environment.
In regtest, the network topology is entirely manual. You spin up nodes, and manually establish connections between them. You have exact control over what blocks are mined and when. This is great for testing things like consensus logic, but it's inconvenient and artificial to use it for testing actual large-scale network effects.
In signet, there is an actual network, with public nodes, operating in a way that's similar to the mainnet network. It doesn't just let you test consensus logic, but also peer discovery, transaction and block propagation, how transactions get selected, ...
Signet doesn't replace regtest; regtest was designed for use in Bitcoin Core automated integration tests and it will continue to be used there. But for other larger-scale tests, of Core and other software, signet(s) may turn out to be a better choice.

Signet is more comparable to testnet than it is to regtest.
Regtest is for private use and testing things. Even if signet were available, it is still useful to have your own blockchain for testing where you can generate coins, blocks, forks, and reorgs at will. It allows tests to run quickly and for a specific set of conditions to be tested. There is no need to rely on outside parties, or even having a connection to the internet at all. This makes regtest extremely useful for development. Bitcoin Core's regression tests use regtest (hence the name, regtest is short for regression testing network) and will continue to use regtest.
Signet is a public network where blocks will be produced at some interval by the signer. The signer determines at what rate blocks are produced, what transactions are included in them, whether there are forks, and whether there are reorgs. As a user, you have no control over blocks whatsoever, unlike regtest, where you have absolute control. So this is more comparable to testnet, which is the current public testing network. Both signet and testnet will allow you to use a blockchain where someone else is going through the work of producing blocks. This gives you a more realistic simulation of mainnet.
The main difference between signet and testnet is that signet will have blocks be produced more evenly distributed (like they are on mainnet), and even have planned reorgs to allow you to test your software under these conditions. The main issue with testnet is that due to its difficulty reset behavior, blocks are mined very quickly and often clustered together. So there are usually large gaps between blocks, followed by several (thousand) blocks mined in a short timespan. Signet avoids this issue.
Lastly, you can use different signets by simply choosing someone else to be the signer. There is no need to create a new genesis block and define a new network, you can use the same rules, just a different signer. This allows you to test different scenarios with almost no work at all, just choose a signer that is doing some pattern of blocks that you want to test.


text:
Why are broadcast checkpoints considered bad?
warren, a LiteCoin dev, said of Peercoin:

Good Luck Removing PPC's Centralized Checkpoints
Regarding PPC... these amount to empty obfuscating defensive excuses.  Sure he wants to remove the broadcast checkpoints.  Novacoin's Balthasar made similar promises because he too knows that it is indefensible.  Unfortunately for PPC, in the age of ASIC's it will be impossible to keep a sha256d network stable without it, so I would be highly surprised if it is actually removed.

Why are broadcast checkpoints so indefensible? It would seem to make sense to have a protocol-level mechanism whereby the nodes agree not to go back past a certain number of blocks (say 10 or 20 blocks). What about the mechanism is flawed? It sounds like it's able to keep a network stable without requiring as much hashing power.

Why the downvote?

Centralized checkpoints is a mechanism whereby nodes trust a certain hardcoded key to make new checkpoints. This means that in case of a fork, the key owner can make the network choose any branch he wants, even the one which is shorter. If this key is compromised, an attacker can use it to mount an equivalent to 51% attack with any hash rate. This, together with that the developer should constantly do something (produce checkpoints) to keep the network secure, goes totally against the idea of decentralization. Without decentralization, a cryptocurrency has little advantage over traditional banking system.


text:
How do I restore a Ripple wallet backup?
In the Ripple client (as of 0.2.48-2) there is a way to backup a wallet to a text file. How can we use this file to restore a wallet (for example, to a new browser)?
I am aware how to regain access to my wallet having the secret key, yet, I would also like to reimport the contacts that were stored in my wallet.

See also How to restore a ripple wallet, having the security key? and How do I backup my Ripple wallet?

I realize that you can use the secret key to recover account access, but the wallet also contains contact information, and I couldn't find a way to back up and reimport to another browser. Also, what's the point of backing up a wallet to a text file if you can't import it again?

My guess is that they added the backup to file ability with the intention of having a restore ability "real soon now"... but since then they've decided to re-work the whole client login stuff so they've probably (my guess) decided to leave it until the "new" login stuff is ready. Remember Ripple is still beta, which often means not all features are fully complete :(.

In the mean time: you can use a blob store to get your wallet to a new browser (perhaps even a local one); if you know how to manipulate browser storage you can directly insert the blob into the new browsers store at the correct place; you can use some code that knows how to decrypt the encrypted blob (e.g. JavaScript code from the ripple client and/or ripple-lib or some Go code I was experimenting with).

What's this about reworking the client login stuff?

The "new" login stuff has been mentioned over on the Ripple forums a bunch of times. The only link I have off the top of my head is to wiki page by the CTO that may or may not be outdated.

This was already asked here.

Following these instructions, after clicking on Create a new wallet,
  you will have the option of using a custom secret key.

This does not answer the question. Yes, you can use the security key to regain access to the account, but it does not restore the wallet (including the contacts), and does not make use of the exported text file.


text:
Could an old, unconfirmed transaction fail to be processed because it is no longer deemed to have enough fees
I just read Why do small transactions without fees ever get processed? and it made me wonder about the risk that a legitimate, lock_timed transaction might not be processed once the lock_time is past.
I'm aware (from the above question) that in the reference implementation, the increasing age of a transaction (in the mempool once it's been submitted?) should increase its priority regardless of the its fees but not every miner is willing to process low(/no) fee transactions even now never mind what they may (not) do in future.
So if I have a signed transaction with a (very!) distant lock_time and it has fees that were considered reasonable at the time that the transaction was created and then when I submit it after lock_time what is the risk that no miners will process it because its fees are subsequently considered to be too low to bother with it?

Is there any way to increase the fees on an already signed transaction?

No since the signature also signs the outputs (which is how the fee is derived)

If that does happen, all you need to do is spend your unconfirmed transaction's output with a sufficient fee. A "sufficiently greedy miner" will process both transactions just to get the fee of the latter.

Oh I see. I hadn't considered that miners would analyse the queue in such way looking for various threads of dependent transactions and pick the most profitable threads over simply picking the most profitable transactions...although it does make sense so long as the extra profits on threads more than makes up for the CPU time that they expend analysing the queue to find them.


text:
Send payment and message at the same time
I am using NBitcoin to write some code.  I want to send some bitcoin to an address AND include a message with it.  The message could say who the payment came from or why it was sent.  According to the demos, a txOut can have a destination or a message but not both.  Both are stored in the ScriptPubKey.
Edit.
Someone suggested I could use two Outputs, one for the payment and one for the message, but that doesn't seem to suggest there is a link between the two.

What do you mean with "message"? Are you talking about an OP_RETURN?

I mean this
https://programmingblockchain.gitbook.io/programmingblockchain/bitcoin_transfer/spend_your_coin#message-on-the-blockchain a note relating to that payment.

Okay, I had a look and what you linked appears to refer to an OP_RETURN, so I added the tag. What you state is correct, you can either send an amount to an address in an output, or send an OP_RETURN. You would need to create two outputs, one to send the bitcoins, one to create the OP_RETURN. Was that your question? Could you please edit your question post to clarify what your question is?

Warning: Make sure to include the amount in a different output than the message. Do not include the amount you wish to send in the OP_RETURN output or you'll burn all the BTC in that output.

Edited.  So there is no way of including a comment in an payment?  That's a bit naff.

That's correct, you'd need to create two separate outputs.
OP_RETURN and payment outputs are two different output types that cannot be combined.
I don't know what you're trying to do, but generally, it should be unnecessary to provide a comment with a payment. All the payment related communication would already have been done out of band with the recipient finally providing an invoice address. Given the payer sending the payment to that invoice address, the payment is clearly associated with the invoice.
Note that any bitcoins included in the OP_RETURN output are burned and become unspendable. (H/T Jose Fonseca)

My idea was for an on chain tipping system.  I want to send your public address 0.00001 btc for this cool answer.  I also want some way of you tracing it back to me and/or me telling you which answer it was i'm tipping for.  It's only polite.  And, it seems, impossible.

@ThirdPrize It's not impossible at all.  You can simply use OP_RETURN as indicated, but it is generally unnecessary.  Addresses should not be reused so the recipient should give you a unique address.  If you send bitcoins, they know it was you.  A third option is to sign a message using the private key corresponding to the address you are sending from (if it is just one address).  Then send that to the person you want to prove the payment to (via email, etc).

Yeah, I agree with Jonathan. The message could just be posted off-chain and each post could have a separate address. Also, note that 1,000 sats are less than one magnitude greater than the cost of spending 1,000 sats. Transaction fees are likely cost-prohibitive for on-chain tipping (at least on Bitcoin).