Bitcoin Forum
April 28, 2024, 05:30:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mining an invalid block  (Read 193 times)
Hatchy (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 458


The Alliance Of Bitcointalk Translators - ENG>PID


View Profile
October 04, 2023, 05:01:39 AM
 #1

I don't know if i should be asking this, but since we've got experts here who I know would be able to explain. I decided to study about the Blockchain recently, and came across something that raises some questions about the Blockchain security.The question is
Quote
If someone managed to mine an invalid block five years ago, effectively spending coins without a valid signature, would this constitute a fundamental issue with the Bitcoin protocol, potentially rendering it compromised?

If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?


███████████████████████████████▀▀▀▀
███████████████████████████████
█████████▀▀▀▀▀█▀█▀▀▀▀▀█████████
███▄▀▀▀   ▄▄▄▄   ▄▄▄▄   ▀▀▀▄███
███████▀▀▀████▌ ▐████▀▀▀███████
█████▀███▀█▀██▌ ▐██▀█▀███▀█████
███████▀▄▀▄███▌ ▐███▄▀▄▀███████
█████▄██▄██▄██   ██▄██▄██▄█████
███████▄▄▄████   ████▄▄▄███████
██████████▀▀▀▀   ▀▀▀▀██████████
██████████▄▄▄▄▄▄▄▄▄▄▄██████████
███████████████████████████████
███████████████████████████████▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
TRUST DICE
.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
█▀▀▀











█▄▄▄
#1 RATED CRYPTO
CASINO IN THE WORLD
██ ██ ██ ██ █Trustpilot
▀▀▀█











▄▄▄█
▄█████████████████████████████
██████████████████▀▀█████▀▀████
█████████████████▀█████████▀███
██████████████████████████████
███████████████████████████▄███
█████████████████████████▄▄████
███████████████████████████████
█████████████░░░███████████████
███████████░░░█████████████████
█████████░░████████████████████
█████░░░██████████████████████
███░░█████████████████████████
▀░░░█████████████████████████▀
█▀▀▀











█▄▄▄
▀▀▀█











▄▄▄█
1714282244
Hero Member
*
Offline Offline

Posts: 1714282244

View Profile Personal Message (Offline)

Ignore
1714282244
Reply with quote  #2

1714282244
Report to moderator
1714282244
Hero Member
*
Offline Offline

Posts: 1714282244

View Profile Personal Message (Offline)

Ignore
1714282244
Reply with quote  #2

1714282244
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
nc50lc
Legendary
*
Online Online

Activity: 2394
Merit: 5539


Self-proclaimed Genius


View Profile
October 04, 2023, 05:16:43 AM
 #2

Quote
If someone managed to mine an invalid block five years ago, effectively spending coins without a valid signature, would this constitute a fundamental issue with the Bitcoin protocol, potentially rendering it compromised?
If that happened, that block would've been included exclusively in that specific miner's blockchain,
the rest of the network just rejected it for being invalid and most likely accepted a valid block of the same height from other miners.

The key factor here is it's not just the miner who'll decide which block to include to their blockchain but the full nodes (whole network) as well.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10505



View Profile
October 04, 2023, 05:23:54 AM
Merited by ABCbits (1)
 #3

Anybody can mind an invalid block, create invalid transactions, do whatever that is breaking the consensus rules,... BUT none of it would be accepted by the full nodes that would be validating everything they receive. That's how the decentralized network works.

If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?
If anybody finds a way to bypass the consensus rules and pass something invalid, then it would be a problem and needs to be fixed. We had this situation once in 2010 that an invalid block was mined and accepted by nodes because there existed a bug in the implementation. It was fixed and the invalid block was discarded.
Read more: https://en.bitcoin.it/wiki/Value_overflow_incident

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Zaguru12
Hero Member
*****
Offline Offline

Activity: 672
Merit: 862



View Profile
October 04, 2023, 07:30:15 AM
Merited by ABCbits (1)
 #4


If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?

It is possible for a miner to mine an invalid block. This can be done accidentally where an invalid transaction is mined without proper validation and if included in a block renders it invalid. This also can be done intentionally by the miner(s) but it will never get to propagate Long into the network before it is rendered invalid block by other nodes and also other blocks mined on top of this. That is the sweet part of decentralization, many nodes needs to verify a block, so even if one miner is doing it intentionally they would just be wasting their hash rate or power.

A recent example of this case happened last week where Marathon miner mined an invalid block due to a transaction in a wrong order (probably the child transaction is in a lower block to the parent transaction)

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Faisal2202
Sr. Member
****
Online Online

Activity: 1190
Merit: 465


#SWGT CERTIK Audited


View Profile WWW
October 04, 2023, 08:45:04 AM
 #5

If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?
If anybody finds a way to bypass the consensus rules and pass something invalid, then it would be a problem and needs to be fixed. We had this situation once in 2010 that an invalid block was mined and accepted by nodes because there existed a bug in the implementation. It was fixed and the invalid block was discarded.
Read more: https://en.bitcoin.it/wiki/Value_overflow_incident
I was going to say, that no one could bypass the network's rules because that would shake the base of the decentralization factor of the BTC blockchain but dear Pooya87 thanks for bringing this overflow incident in front of us. I did not know about it.

I am shocked to see, that BTC blockchain was not perfect at the start. I am a later joiner (2021)

Cricktor
Hero Member
*****
Offline Offline

Activity: 742
Merit: 1073


Crypto Swap Exchange


View Profile
October 04, 2023, 08:54:34 AM
Last edit: October 04, 2023, 10:41:43 AM by Cricktor
Merited by o_e_l_e_o (4), Foxpup (3), pooya87 (2), ABCbits (1), DdmrDdmr (1), seek3r (1)
 #6

If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?

As others said already that would be a waste of time, energy and thus money for this evil miner. There's no benefit for this miner to mine invalid blocks because the rest of the network would reject such invalid blocks.

Invalid blocks happen rather rarely. As far as my nodes logged such invalid blocks, there were about three of them in approx. the last six months (none in maybe a year or more before as far as I remember before since about end of July 2021, see P.S. at the end):
  • block 783426 and 784121: mined by F2pool and invalid due to exceeding the SIG_OPS limit of all transactions within a block which is currently 80,000
  • block 809478: mined by MARA pool and invalid due to wrong order of some interdependent transactions, namely at least one child transaction occurring before its parent

The invalid blocks didn't cause any disruption as the Bitcoin network worked as intended. Other consensus compliant nodes rejected the invalid blocks.


A recent example of this case happened last week where Marathon miner mined an invalid block due to a transaction in a wrong order (probably the child transaction is in a lower block to the parent transaction)

What do you mean by "lower block"? Parent and child transaction, at least one dependent pair of transactions, were in the same block but their order in the invalid block was wrong because of some foolish transaction sorting: the child preceded the parent transaction which is not allowed.


I am shocked to see, that BTC blockchain was not perfect at the start. I am a later joiner (2021)

Complex software and design is rarely free of bugs, welcome to reality. Important is in the end that bugs get fixed before they can disrupt the whole thing. And as far as I perceive it, Core devs aren't reckless to implement fancy features without carefully evaluating their possible consequences (that is sometimes very hard if not nearly impossible).


P.S.
I checked my "oldest" RaspiBlitz node that has the longest history of chaintip branches of all my nodes (use bitcoin-cli getchaintips to get a list of all those your own node knows about) and above three invalid blocks were the only ones that this node knows about from end of July 2021 on.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Yamane_Keto
Sr. Member
****
Offline Offline

Activity: 462
Merit: 477



View Profile WWW
October 04, 2023, 10:56:15 AM
 #7

The probability of finding invalid blocks in the past will be higher given that the block reward was 50k or less, but now we are talking about more than 150k unless there is bad programming software, I do not think that such blocks will be mined, especially since they are invalid because Not following the protocol and not because of a major error as happened in 2013.

If we return to the case of block 809478 MARA pool, the transactions are correct and the block is correct, but since there is no “partially right”, the error in the transaction order makes the entire block invalid.

.BEST.CHANGE..███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Zaguru12
Hero Member
*****
Offline Offline

Activity: 672
Merit: 862



View Profile
October 04, 2023, 11:25:16 AM
 #8


A recent example of this case happened last week where Marathon miner mined an invalid block due to a transaction in a wrong order (probably the child transaction is in a lower block to the parent transaction)

What do you mean by "lower block"? Parent and child transaction, at least one dependent pair of transactions, were in the same block but their order in the invalid block was wrong because of some foolish transaction sorting: the child preceded the parent transaction which is not allowed.

It was a typo/grammar error from me, what I meant was although a block can consist of both a parent and child transactions, and since miners usually put the transaction which they confirm as valid at the bottom of the block, broadcasting two dependent transactions (parent and child) at the same time and validating the child first (takes it down) before the parent will definitely render the child transaction invalid first till after the parent is received later on base on protocol rule

The probability of finding invalid blocks in the past will be higher given that the block reward was 50k or less, but now we are talking about more than 150k unless there is bad programming software, I do not think that such blocks will be mined, especially since they are invalid because Not following the protocol and not because of a major error as happened in 2013.


I don’t quite get this statement, bitcoin block reward was 50 bitcoin before it started reducing by half after every 210000 blocks (usually every four years) and the current reward is 6.25 bitcoin.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
DaveF
Legendary
*
Offline Offline

Activity: 3458
Merit: 6239


Crypto Swap Exchange


View Profile WWW
October 04, 2023, 11:55:48 AM
 #9

The probability of finding invalid blocks in the past will be higher given that the block reward was 50k or less, but now we are talking about more than 150k unless there is bad programming software, I do not think that such blocks will be mined, especially since they are invalid because Not following the protocol and not because of a major error as happened in 2013.


I don’t quite get this statement, bitcoin block reward was 50 bitcoin before it started reducing by half after every 210000 blocks (usually every four years) and the current reward is 6.25 bitcoin.

I don't want to put words in their mouth but I think the point was when BTC was worth a lot less people were willing to play around a lot more to figure out what would work and what would not without going to testnet. Now that there is a significant value placed on blocks things like what happened with Mara are going to be a lot less.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
October 04, 2023, 12:14:30 PM
Merited by ABCbits (3), Foxpup (2), Zaguru12 (2)
 #10

what I meant was although a block can consist of both a parent and child transactions, and since miners usually put the transaction which they confirm as valid at the bottom of the block, broadcasting two dependent transactions (parent and child) at the same time and validating the child first (takes it down) before the parent will definitely render the child transaction invalid first till after the parent is received later on base on protocol rule
It sounds like you are misunderstanding the process.

All transactions in a block need to be valid. Miners don't put valid transactions "at the bottom of the block", nor does validating a transaction "take it down" the block or move it anywhere else in the block.

What usually happens is that a mining pool constructs a candidate block from transactions in their mempool. Transactions in their mempool will first be grouped in to "packages", where any child transactions with unconfirmed parents will be considered as a package, and the fee rate for the whole package calculated. The mining pool will then order individual transactions and packages by fee rate, and then pick the highest fee rate transactions/packages to fill their candidate block. They then attempt to mine that block. The order of the transactions does not change from this point on (unless they create a new candidate block), as it if did, it would invalidate the Merkle root and therefore invalidate their mining attempts. Any packages of multiple transactions will be ordered so the parent transaction comes before the child transaction. By doing this, the parent transaction is verified first, meaning the node now knows about the outputs it creates before those outputs are spent by the child transaction.
Zaguru12
Hero Member
*****
Offline Offline

Activity: 672
Merit: 862



View Profile
October 04, 2023, 01:12:02 PM
Merited by o_e_l_e_o (4)
 #11

It sounds like you are misunderstanding the process.

All transactions in a block need to be valid. Miners don't put valid transactions "at the bottom of the block", nor does validating a transaction "take it down" the block or move it anywhere else in the block.

What usually happens is that a mining pool constructs a candidate block from transactions in their mempool. Transactions in their mempool will first be grouped in to "packages", where any child transactions with unconfirmed parents will be considered as a package, and the fee rate for the whole package calculated. The mining pool will then order individual transactions and packages by fee rate, and then pick the highest fee rate transactions/packages to fill their candidate block. They then attempt to mine that block. The order of the transactions does not change from this point on (unless they create a new candidate block), as it if did, it would invalidate the Merkle root and therefore invalidate their mining attempts. Any packages of multiple transactions will be ordered so the parent transaction comes before the child transaction. By doing this, the parent transaction is verified first, meaning the node now knows about the outputs it creates before those outputs are spent by the child transaction.

I think I mix everything up. From your explanation i deduced that all independent transactions do not take order in the block. But for dependent transactions (parent and Child) broadcasted almost the same. Now both waiting in the mempool and a miner decides to pick any transaction to his own candidate block then picks the child first, without the knowledge of the parent which happens to be the output to be used for the child, he would render that child invalid first until it verifies the parent and then the child precedes it. If so this then the only place where order of transaction in a block is required.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
October 04, 2023, 02:37:27 PM
 #12

From your explanation i deduced that all independent transactions do not take order in the block.
That's correct. Independent individual transaction which do not depend on any other transactions in that same block can be ordered in any order the miner likes. In reality, almost all miners simply order transactions from highest to lowest fee rates. You can see this in action if you open the most recent block here and simply start scrolling down the list of transactions. It starts at 413 sats/vbyte and decreases as you go down.

If so this then the only place where order of transaction in a block is required.
The only other stipulation on order of transactions is that the first transaction in the block must be the Coinbase transaction.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7294


Farewell, Leo


View Profile
October 04, 2023, 02:41:42 PM
Merited by o_e_l_e_o (4)
 #13

If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?
You cannot "bypass" a network rule. Your transaction either agrees with the rules, or it doesn't. If it's the latter, then the full nodes (which are literally what we call "Bitcoin network") will reject it. If you want to validate something that is invalid, then your only option is to fork the client and enforce your rules.

The probability of finding invalid blocks in the past will be higher given that the block reward was 50k or less
How is the block reward relevant with the frequency of invalid blocks?

I do not think that such blocks will be mined
There is no doubt. They do not belong to the Bitcoin blockchain.

Not following the protocol and not because of a major error as happened in 2013.
To which major error are you referring to?

In reality, almost all miners simply order transactions from highest to lowest fee rates.
Is there any particular reason they do that? My guess is that by sorting the transaction array, it makes it trivial to make out which transactions aren't worth as much as new incoming transactions.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Cricktor
Hero Member
*****
Offline Offline

Activity: 742
Merit: 1073


Crypto Swap Exchange


View Profile
October 04, 2023, 03:25:42 PM
Merited by o_e_l_e_o (4), BlackHatCoiner (4)
 #14

Is there any particular reason they do that? My guess is that by sorting the transaction array, it makes it trivial to make out which transactions aren't worth as much as new incoming transactions.

No, except for mandatory rules like coinbase transaction must be the first in any block and for linked/interdependant transactions parent comes before a child transaction. To my knowledge any other order is irrelevant.

If a miner has less transactions in his mempool than fit into a block he doesn't need to make a choice and no particular ordering is required except for above stated mandatory rules.

If a miner has more transactions in his mempool than fit into a block he needs to make some sort of choice which usually is to cram as many transactions into the available space in the candidate block usually in the order of high to lower feerate per transaction or transaction package (interdependant transactions). Another limiting factor is sum of SIG_OPs of all transactions in the candidate block which must not exceed current limit of 80,000.

I assume that such feerate based ordering is applied almost always because it's a "natural" code path, it doesn't hurt to do it as long as you don't violate mandatory ordering rules. You could avoid having two separate code paths (one for all transactions fit into the candidate block, no particular ordering needed except mandatory rules ordering; the other where you have to pick a subset of transactions from your mempool because not all would fit into a block).

In pool reality things are likely more complicated to allow to include arbitrary transactions into your candidate block for whatever reasons.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18507


View Profile
October 04, 2023, 03:48:18 PM
Merited by BlackHatCoiner (4), Cricktor (1)
 #15

Is there any particular reason they do that?
In addition to Cricktor's answer above, simply because that's what happens in Bitcoin Core: https://github.com/bitcoin/bitcoin/blob/058488276f8dc244fe534ba45ec8dd2b4b198a2e/src/node/miner.cpp#L283

But yes, it is also the most efficient way to order transactions when it comes to updating your candidate block and swapping in newer transactions with higher fees.
wallet4bitcoin
Sr. Member
****
Offline Offline

Activity: 896
Merit: 279


Bons.io Telegram Casino


View Profile WWW
October 05, 2023, 07:28:36 AM
 #16

Anybody can mind an invalid block, create invalid transactions, do whatever that is breaking the consensus rules,... BUT none of it would be accepted by the full nodes that would be validating everything they receive. That's how the decentralized network works.

If it were possible for someone to consistently mine invalid blocks and bypass the network's rules, wouldnt it indicate a significant issue with the Bitcoin network's security?
If anybody finds a way to bypass the consensus rules and pass something invalid, then it would be a problem and needs to be fixed. We had this situation once in 2010 that an invalid block was mined and accepted by nodes because there existed a bug in the implementation. It was fixed and the invalid block was discarded.
Read more: https://en.bitcoin.it/wiki/Value_overflow_incident

Should this be the attack that made it possible for the attacker to create 184+ billion coins in 2010 and was swiftly responded to.


https://news.bitcoin.com/bitcoin-history-part-10-the-184-billion-btc-bug/

https://bitcointalk.org/index.php?topic=822.msg9503#msg9503

Loads of failed attacks have been attempted on the bitcoin network but I'm glad it happened at a much early stage in the life of bitcoin network and the blockchain technology entirely as it could be easily contained and the publicity still low, those failed malicious attempts today has given much credibility to the network.


        █████████████████      ███████████████    ██████████  ████████    █████████████
    █    ███████   ███████  ████████      █████  ███████████ ████████    ██████   ██████ 
        █████████   ███████  ████████      █████  ████████████████████  ████████   ▀▀▀▀▀▀
   ▅▅  ████████   ███████  ████████      █████  ████████████████████  ████████
  █  ▀▀  ████████████████    ████████      █████  ████████████████████    ██████████████
     ▅▅████████   ███████  ████████      █████  ████████████████████              █████   
       ▀▀████████   ███████  ████████      █████  ████████████████████  ▄▄▄▄▄▄      █████
▅▅▅▅▄ ████████   ███████  ████████      █████  ████████ ███████████  ▀▀██████████████
        █████████████████     ████████████████   ████████ ███████████    ▀▀▀██████████


Your Intro
Telegram Casino
to Fun & Entertainment
████
██
██
██
██
██
██
██
████
████
██
██
██
██
██
██
██
████
████
██
██
██
██
██
██
██
████
████
██
██
██
██
██
██
██
████
The Next-Gen
Gaming Space
     ▃▃▃▃▃▃▃▃▃▃▃▃▃
  ▄▄█████████████▄▄
██▀               ▀████▄
                       ██
   ██            ■■    ██
 ██████        ■■  ■■  ███
   ██    ▀ ▀     ■■    ███     
     ▃▃▃▃▃▃▃▃▃▃        ██
    █████████████      ██
    ██          ████████▀
████▀           ▀█████▀
████
██
██
██
██
██
██
██
████
████
██
██
██
██
██
██
██
████



Hero - Legendary Member
Faisal2202
Sr. Member
****
Online Online

Activity: 1190
Merit: 465


#SWGT CERTIK Audited


View Profile WWW
October 05, 2023, 06:19:59 PM
 #17

Complex software and design is rarely free of bugs, welcome to reality. Important is in the end that bugs get fixed before they can disrupt the whole thing. And as far as I perceive it, Core devs aren't reckless to implement fancy features without carefully evaluating their possible consequences (that is sometimes very hard if not nearly impossible).
Of course, they are rarely free of bugs but is it free of bugs now or not? I mean Ordinals were unexpected many consider them errors and a mistake that should not happen. I came to reality when came to know about ordinals but the invalid block information was totally new and the amount of BTC created in that transaction was huge.

There are even many threads on that issue on this forum. But they were created a long time ago so I did not come to read them.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!