Updates & Forks - Discussion

true
but if you paid for something yourself then not. in the worst case you just dont get the product, but you will not lose your money.
Thats why i posted, it was abit unclear in which cases you lose your money, its better to rephrase that part in my opinion.

1 Like

Maybe he meant that If you send dollars for this bitcoin, you could lose your ā€˜fiatā€™ money without getting your bitcoin.

1 Like

@filip

You said that in HF, ā€œpreviously invalid blocks become validā€.

Does that mean that if a block was disregarded because of not following the rule set, itā€™ll now be incorporated in the new blockchain, if it fits that rule set?

Like ā€¦ if I sent 1 BTC to Anders December 10, the transaction was included in one block but the block got disregarded. Then the tx got included in another block, and went through there. But then the disregarded block suddenly matches the new rule set, but has my transaction included?

Maybe I answer myself, lol, but please confirm; then the nodes will check the block; has it any transactions with double spending? In my case, it does, because my transaction was included in another block, and because of this rule, the block will remain invalid. But in the case where a block was disregarded because of space, but no transactions has been included in another block, then the block becomes valid because the size now fits the max size rule AND that the block has no double spending txs?

ā€¦ and then, when a SF occurs, I might have received 10 BTC from Anders, and sent 2 BTC to Casper, but because the block, that contained the transaction where I received the 10 BTC from Anders, was above the size limit of the SF, that block becomes invalid.

Then the block where I sent 2 BTC to Casper becomes invalid too, because I cannot spend 2 BTC when I havenā€™t received any?

To me, thatā€™ll most likely kill a HUGE load of blocks?

But thatā€™s probably also OK, because the network will just probably not comply with the SF, since it wouldnā€™t be an ā€œappealingā€ fork? @filip

In a hardFork, previous invalid blocks becomes valid means that the rules expanded. for example an increase in blocksize. in bitcoin, the blocksize needs to be smaller or equal than 1MB. so If a miner construct a block bigger than that, itā€™s an invalid block. with a hardfork you could change the consensus rules to increase the blocksize, so the invalid bigger block becomes valid. but then you have a chainsplit( unless every miner updates to the new rules) , and you canā€™t send bitcoin from the bitcoin blockchain to the newly Hardforked blockchain. In a soft fork we contract the rules (more strictly) for example to 0.5MB blocksize limit. 0.5mb blocksize still is valid in bitcoin because itā€™s still lower than 1MB. Only the nodes who updated will apply those new stricter rules. but you can still send bitcoin to eachother unlike in a hardfork. (Thatā€™s why a softfork is backwards compatible and not in hardforks)

1 Like

Thank you, ziomanzo, but it didnā€™t really answer my question.

Iā€™m aware of the differences between HF and SF, but Iā€™m curious about the situation where a previously invalid block (containing transaction A) becomes valid, when transaction A is included in another block.

Example:
Blockchain with 1 MB block size.

Block 0 - Confirmed, everything OK
Block 1 - Rejected, 1.5 MB in size, transaction A was included here.
Block 2 - Confirmed, under 1 MB in size, transaction was included here.

Then a hard fork occurs; block size is now 2 MB, making Block 1 valid, so transaction A is now processed in block 1, but then block 2 will become invalid, because it contains a double-spending transaction (transaction A), right?

2 Likes

Hi sebastian, good questions indeed. Iā€™ll try to answer it the best I can.

In your example, if a hard fork were to happen after block 2, the transaction would not be added in a second block. The miners look in the mempool when looking for transactions to include in the next block, and since your transaction was included and mined in the previous block it is no longer in the mempool. It doesnā€™t actually matter that it was in a block that was disregarded before. Thatā€™s actually why we wait for a minimum of 6 confirmations in Bitcoin, because we want to make sure our block actually stays in the blockchain and doesnā€™t get replaced by some other block.

I think I understand where your question came from. The expression ā€œpreviously invalid blocks become validā€ can be confusing and might make you think that a HF takes on old invalid block and suddenly adds it to the blockchain.

That is not the case. Itā€™s not referencing a specific ā€œpreviousā€ block. Itā€™s more like a general statement about the rules. It simply means that any block over 1 mb, for example, would previously be invalid. And now, after the HF, blocks above 1 mb are suddenly valid.

Does that make sense?

3 Likes

Yeah maybe I could have explained it better. Itā€™s obviously not an issue if everyone waits for the necessary confirmations. But if someone payed me for a product, I see the tx (the money) in my wallet so I ship the product, then the chain is reorganized by some event and the block is no longer in the chain. Then I have lost the money.

I think that was my point :smiley: But thatā€™s not an issue in 99.99% of cases if everyone waits for the confirmations.

1 Like

Thank you for the reply!

Ah that makes sense! I got a bit confused too, but it makes sense now.

But then one could argue; you didnā€™t lose money, because you were paid in the previous blockchain. Your money was just not transferred to the hard fork. You didnā€™t lose the money, you just never get them (on the new blockchain).

But thanks for a good job, @filip!

GlƦdelig jul fra Danmark :+1: :santa:

1 Like

I get it, yes! Thanks!

1 Like

sorry I misunderstood your question,

Happy Holidays :santa::v:

1 Like

If a transaction is only confirmed after 6 blocks (to make sure it is not part of a stale block), and only one block gets created every 10 minutes; then does that mean a transaction is only confirmed after 60 minutes?
This is not the case when I make a transaction through my wallet. It gets confirmed nearly instantly.
Please elaborate.

2 Likes

You wait as a precautionā€¦ Your wallet may say that it is confirmed but in reality it is safer to wait 6 blocks to really confirm that it has propagated through network and you do not have the accidental fork problemā€¦

2 Likes

My question is what happens when the miners finished a few blocks and then the network rejected them because blocks that they produced are no longer part of the longest chain.
I guess they arenā€™t getting the block reward and transaction fees?
Do they just mine for nothing in that case if the blocks are orphaned?

Hello Filip,
My question is - what happens to the stale blocks - are they just hanging around in the network waiting for someone smart to scoop them up - a bit like space junk - and recycle them into wallets?

1 Like

hehe, every transaction will go back to the mempool
and the stale block goes extinct. However orphan blocks stay in memory. Nodes keep such blocks in memory, while asking their peers to fill in the gap of their history. The clients does not show these.

1 Like

As @bitcoin alluded to. Your wallet can choose how many confirmation to consider ā€œsafeā€. The average time for a block to be produced is 10 minutes. But it can vary from only a few minutes to 15-20 minutes as well. So it depends. But on average it would take 60 minutes for a transaction to be considered confirmed, by most people.

Thatā€™s right, their block reward would ā€œdisappearā€. They would just continue to mine on the next block in that case.

2 Likes

Hello Filip,
My question relates to stale blocks and hard forks:
If there is a hard fork, which means that previously invalid forks become valid, does that mean that the stale blocks become valid?