Author

Topic: Block construction? (Read 84 times)

hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
June 30, 2024, 03:03:24 PM
#9
2. Every time difficulty is adjusted, it can't be decreased by more than 75%.

Now that`s interesting, I never knew that!
I know I read somewhere that the dificulty is adjusted every 2 weeks, but that`s probably only true for the current hashrate.
A lot to learn you have, young padawan.

As hosseinimr93 states, difficulty adjustment is done after 2016 blocks have been mined in a difficulty period. This 2016 period length was likely chosen to have a difficulty adjustment in about every two weeks. Significantly shorter or longer adjustment periods have serious disadvantages and likely two weeks is a good compromise.

Then there's another rule in the node's code which hosseinimr93 mentioned, that difficulty adjustment can't exceed a change more than 4x or less than 1/4 of current difficulty. The reason is to prevent some sort of attack, but I forgot the details.
legendary
Activity: 2380
Merit: 5213
June 26, 2024, 11:51:25 AM
#8
I know I read somewhere that the dificulty is adjusted every 2 weeks, but that`s probably only true for the current hashrate.
The difficulty is adjusted every 2016 blocks. Since a new block is mined every ∼ 10 minutes on average, it's estimated that the difficulty is adjusted every 2 weeks.
If blocks are mined less than 10 minutes on average, the difficulty would be adjusted before 2 weeks and if they are mined more than 10 minutes on average, the difficulty would be adjusted after 2 weeks.
brand new
Activity: 0
Merit: 0
June 26, 2024, 11:36:26 AM
#7
2. Every time difficulty is adjusted, it can't be decreased by more than 75%.

Now that`s interesting, I never knew that!
I know I read somewhere that the dificulty is adjusted every 2 weeks, but that`s probably only true for the current hashrate.
legendary
Activity: 2380
Merit: 5213
June 26, 2024, 11:26:52 AM
#6
So if there were a single miner and node, then all candidate transactions would be stored in that nodes memory pool  until the miner figured out the correct hash and then the block containing those transactions would be formed and added to the blockchain,
Correct.


obviously with just a single node and miner the difficulty level would have to brought right down to fit the 10 minute time slot.
If miners shut down their devices now and there's only one miner, the network hash rate will decrease significantly and to maintan the average block time of 10 minutes, the difficulty should decrease. But there will be two problems here.

1. The difficulty is adjusted every 2016 blocks and it may take years until difficulty is adjusted.
2. Every time difficulty is adjusted, it can't be decreased by more than 75%.

Take note that I am talking about the theory and in practice the above scenario is very unlikely to happen.
brand new
Activity: 0
Merit: 0
June 26, 2024, 11:12:58 AM
#5
So if there were a single miner and node, then all candidate transactions would be stored in that nodes memory pool  until the miner figured out the correct hash and then the block containing those transactions would be formed and added to the blockchain, obviously with just a single node and miner the difficulty level would have to brought right down to fit the 10 minute time slot.

Thanks guys! Smiley
legendary
Activity: 2380
Merit: 5213
June 26, 2024, 11:00:30 AM
#4
How are the "blocks" constructed? on my mining pool I can see blocks being constructed out of transactions, and I know my miner is guessing numbers and when a block is finished the Nodes all get a copy of this new block and the transactions within it, but what part does the fitting of these transactions into a block?
Miners (or mining pools) build a candidate block and then they solve the proof of work problem which is actually finding a number.
To build the candidate block, miners are free to include any valid transaction. Since the block size is limited, miners usually prioritize transactions based on their fee rate to maximize their profit.


For instance, I consolidated about 30 UTXOs the other day and could see it on Mempool as a consolidation, what part of the Bitcoin machinery is this done on? the Miners, the Nodes or something else I haven`t heard of yet?
Once you broadcast a transaction, it's sent to some nodes. Those nodes validate your transaction and if it's valid they put your transaction in their mempool and then send it to some other nodes.
After a few seconds, almost all nodes should have your transaction in their mempool. Mempool is like a waiting room for unconfirmed transactions and each node can have its own mempool.

Miners (or a mining pool) pick some transactions from their mempool, build a candidate block and then try to solve the proof of work problem. Once a miner (or a mining pool) mines a block, all the tranactions that were picked by the miner go to the blockchain and become confirmed.
brand new
Activity: 0
Merit: 0
June 26, 2024, 10:51:43 AM
#3
Riiight! so the bit I was missing belongs in the Nodes functionality, that makes sense now Smiley

I`v so gotta get one of those!
newbie
Activity: 11
Merit: 0
June 26, 2024, 10:33:57 AM
#2
I`m trying to understand Bitcoin a bit more, but have a problem I can`t quite figure out, and I`m so unsure about it that I don`t even know how to ask the question (so don`t shout at me!).

How are the "blocks" constructed? on my mining pool I can see blocks being constructed out of transactions, and I know my miner is guessing numbers and when a block is finished the Nodes all get a copy of this new block and the transactions within it, but what part does the fitting of these transactions into a block?

But I`v been told that even if all the electricity on the planet died, all it would take is for someone to spin up a node and Bitcoin`s back in action again (and I assume you`de need at least one miner to start hashing as well).
so if all you need is a node and miner, I`m really missing something in the middle here (I think).
what`s the missing bit? because the info I have doesn`t really make any sense when it`s all put together.

For instance, I consolidated about 30 UTXOs the other day and could see it on Mempool as a consolidation, what part of the Bitcoin machinery is this done on? the Miners, the Nodes or something else I haven`t heard of yet?



read this https://learnmeabitcoin.com/beginners/guide/mining/
                 https://learnmeabitcoin.com/technical/mining/memory-pool/
brand new
Activity: 0
Merit: 0
June 26, 2024, 10:14:11 AM
#1
I`m trying to understand Bitcoin a bit more, but have a problem I can`t quite figure out, and I`m so unsure about it that I don`t even know how to ask the question (so don`t shout at me!).

How are the "blocks" constructed? on my mining pool I can see blocks being constructed out of transactions, and I know my miner is guessing numbers and when a block is finished the Nodes all get a copy of this new block and the transactions within it, but what part does the fitting of these transactions into a block?

But I`v been told that even if all the electricity on the planet died, all it would take is for someone to spin up a node and Bitcoin`s back in action again (and I assume you`de need at least one miner to start hashing as well).
so if all you need is a node and miner, I`m really missing something in the middle here (I think).
what`s the missing bit? because the info I have doesn`t really make any sense when it`s all put together.

For instance, I consolidated about 30 UTXOs the other day and could see it on Mempool as a consolidation, what part of the Bitcoin machinery is this done on? the Miners, the Nodes or something else I haven`t heard of yet?


Jump to: