Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Belisarius on April 05, 2021, 03:13:04 PM



Title: No more Blocks Generated if Mempool is Empty
Post by: Belisarius on April 05, 2021, 03:13:04 PM
Hypothesis: a private group wants to create a 2ᵉ layer blockchain to facilitate its internal payments. The aim is to keep costs as low as possible, as well as energy and disk space consumption.

Important detail: the network is centralized. To transfer BTC, you just have to send your Bitcoin to the private group address, and specify your other address on the layer 2.

To save disk space, when nobody uses the network, the blockchain is simply deleted.

For energy consumption and costs, the first idea is to keep the mining difficulty at 1 forever. The second is to stop block generation, without disconnecting the network.



My question is: Is it possible to stop the block generation when mempool is empty?


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: DannyHamilton on April 05, 2021, 04:01:32 PM
Hypothesis: a private group wants to create a 2ᵉ layer blockchain to facilitate its internal payments. The aim is to keep costs as low as possible, as well as energy and disk space consumption.

Important detail: the network is centralized. To transfer BTC, you just have to send your Bitcoin to the private group address, and specify your other address on the layer 2.

To save disk space, when nobody uses the network, the blockchain is simply deleted.

For energy consumption and costs, the first idea is to keep the mining difficulty at 1 forever. The second is to stop block generation, without disconnecting the network.



My question is: Is it possible to stop the block generation when mempool is empty?

If you're going to have a centralized system, and your proof-of-work is going to be meaningless, then why bother with a blockchain at all?

Just store the user balances in a traditional database. It will be faster, easier, and cheaper.

Blockchain exists for purposes where a traditional database is insufficient (distributed trustless systems).


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: bitmover on April 05, 2021, 04:09:32 PM
If you're going to have a centralized system, and your proof-of-work is going to be meaningless, then why bother with a blockchain at all?

Just store the user balances in a traditional database. It will be faster, easier, and cheaper.

Blockchain exists for purposes where a traditional database is insufficient (distributed trustless systems).

Exactly
Sometimes people choose a solution and try to find a problem that fit that solution.

But it is the other way around

Although blockchain is a buzzword now , it doesn't fit every company database needs.

Blockchain is a slow and expensive database. It is necessary for very specific situations where you need a trustless environment.  A centralized database doesn't need it.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: Belisarius on April 05, 2021, 04:17:42 PM
That's an example.

You can imagine that's a private network for McDonald's with a node in each of their hundred thousands restaurant all around the world.

Guys are used to Bitcoin Core, and they want something as familiar as possible for their employees. Speudo-anonymous, backed with Bitcoin, etc.

As I said that's just an example.


Is it possible to stop the block generation when mempool is empty?


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: bitmover on April 05, 2021, 04:25:42 PM
Is it possible to stop the block generation when mempool is empty?
Looks like an easy problem to solve

As your netwoek is centralized, you can just turn off all miners when mempool is empty and there are no transaction.



Title: Re: No more Blocks Generated if Mempool is Empty
Post by: Belisarius on April 05, 2021, 04:35:34 PM
Don't you need a miner to listen to the mempool?

In my mind, locking the block generation offered more flexibility and a faster response. Maybe I'm wrong.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: NotATether on April 05, 2021, 05:35:33 PM
Is it possible to stop the block generation when mempool is empty?

This is practically impossible to orchestrate on Bitcoin's network because some miners routinely broadcast empty blocks with no transactions in them except for the coinbase. On your own layer, you modify your protocol rules for all your nodes on L2 to reject empty blocks and the problem should go away. Miners will not waste their time mining blocks they know will be rejected.

But it would be much, much simpler for you to just use Lightning Network in a scenario like this.

Don't you need a miner to listen to the mempool?

You don't. What would happen is that the mempool on each node would just keep filling up until its maximum size and then transactions start to get dropped after that. Because new transactions can come at any time, shutting off miners isn't the solution you want.



Title: Re: No more Blocks Generated if Mempool is Empty
Post by: Belisarius on April 05, 2021, 06:16:50 PM
Maybe waiting until the block limit is reached can be a good solution, but it can be very slow.

Lightning would have been good, but I have one big problem: the value. 1 BTC ≠ 1 LBTC. Because of this, it is possible to lose a lot of money due to price fluctuations.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: odolvlobo on April 05, 2021, 06:24:08 PM
My question is: Is it possible to stop the block generation when mempool is empty?

I don't see why not, except that it requires users to accept single confirmations as final. But, I think the people involved in recent transactions would continue to mine in order to avoid that requirement.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: pooya87 on April 06, 2021, 03:09:28 AM
the network is centralized. To transfer BTC, you just have to send your Bitcoin to the private group address, and specify your other address on the layer 2.
It doesn't need to be on layer 2 or there is no need for mining.
This can happen easily on bitcoin blockchain without needing mining. Similar to how Tether works on bitcoin network. It is centralized and you only transfer Tether tokens on bitcoin when your transaction contains a special script in its outputs that the Omni layer can only evaluate.
You can create 21 million Belisarius Token out of thin air and promise that it will be converted to bitcoin 1:1. Then people can send their bitcoins to a specific address to "lock" them and receive Belisarius Token.

On second layer this could be repeated without needing to send an on-chain transaction each time. The user sends their coin to a specific address (basically locks them in a special script/smart contract) and gets to spend the same amount on that second layer.
There is no mining on second layer, just nodes that have access to bitcoin blockchain and can verify if the amount user is spending is locked in that smart contract or not and be able to create many transactions among themselves and only settle it on-chain once.

Lightning would have been good, but I have one big problem: the value. 1 BTC ≠ 1 LBTC. Because of this, it is possible to lose a lot of money due to price fluctuations.
Any amount of bitcoin on Lightning Network is equal to any amount of bitcoin on main chain! There is no difference.
I think you are confusing LN with shittokens on altcoins that call themselves "XBTC" such as the WBTC on Ethereum platform. Those could fluctuate in value or disappear but LN can not.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: nc50lc on April 06, 2021, 03:34:58 AM
Lightning would have been good, but I have one big problem: the value. 1 BTC ≠ 1 LBTC. Because of this, it is possible to lose a lot of money due to price fluctuations.
AFAIK, most exchangers and exchanges have the same value when withdrawing/depositing through Lightning, the only difference is the fee.
Are you perhaps referring to an altcoin named Lighting Bitcoin with LBTC symbol? Because that's not the Bitcoin.

Lightning isn't another coin: The Lightning Network FAQ (https://bitcointalk.org/index.php?topic=5158920.0)


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: Belisarius on April 06, 2021, 08:27:49 AM
OK! So this Lightning Bitcoin isn't THE Lightning Network ? >:(

https://coinmarketcap.com/currencies/lightning-bitcoin/

Now I think it's better to use Lightning than a custom layer 2.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: pooya87 on April 06, 2021, 09:00:35 AM
OK! So this Lightning Bitcoin isn't THE Lightning Network ? >:(

https://coinmarketcap.com/currencies/lightning-bitcoin/

Now I think it's better to use Lightning than a custom layer 2.
Haha, no that's an altcoin.
Basically ever since 2017 they have been creating a large number of copies of bitcoin and all of them are named things like "lightning bitcoin", "micro bitcoin", "bitcoin cash", "bitcoin SV (scam version)", "Bitcoin pizza"...
You can see some of their names here and also claim your airdrops if you have any by checking old addresses: https://findmycoins.ninja/


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: odolvlobo on April 06, 2021, 06:53:33 PM
My question is: Is it possible to stop the block generation when mempool is empty?
Impossible, miner will just mine empty block (block which only contain coinbase transaction). Here are few example (each from different pool),

My assumption is that he is talking about a side chain with no subsidy, therefore there is little incentive to mine empty blocks.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: DannyHamilton on April 06, 2021, 07:41:52 PM
My question is: Is it possible to stop the block generation when mempool is empty?
Impossible, miner will just mine empty block (block which only contain coinbase transaction). Here are few example (each from different pool),
My assumption is that he is talking about a side chain with no subsidy, therefore there is little incentive to mine empty blocks.
In that case, security is still an incentive, unless it is an entirely closed and centralized system (in which case there is no need for a blockchain at all).

If block mining stops, then an attacker has as much time as he likes to mine an alternative chain that is longer than the current chain.  As such, he could remove confirmations from transactions or replace transactions entirely.


Title: Re: No more Blocks Generated if Mempool is Empty
Post by: Quickseller on April 08, 2021, 01:51:41 AM
My question is: Is it possible to stop the block generation when mempool is empty?
In a hypothetical situation, in the future, tx fees will make up the majority of miners' income. If there are periods during which there are not transaction (fees), most miners may decide to turn their machines off until there are enough transactions to confirm that pay a sufficiently high fee.

However, as long as the block subsidy is high enough, miners will decide to mine empty blocks if the mempool is empty. Or they will mine blocks full of transactions to themselves, if there is some rule requiring blocks to have a certain number of transactions.