In What Do You Want In Proof?, I suggested several commonly-held community values, like cooperation and the ability for everyone to participate in the network.
Let’s assume we continue to hold these values.
I think we should have a conversation about where we want the network to go in the next 1, 2, 5, 10, and 20 years.
Timothy Stebbing rightly pointed out that no one person (not even me!) can drive the conversation for a decentralized project, but one person can start a conversation and see where it goes.
I prefer to lead by example, so let’s try an experiment.
What if we discuss an idea with some obvious pros and some obvious cons and see where that goes? There may be some hidden pros and some hidden cons, but by having this discussion we can exercise the muscles we need to exercise to make better, more robust, more thoughtful long-term plans.
First, let’s talk about mining.
Finding Holes in the Hashes
What’s the biggest problem with Proof-of-Work mining right now, at least as implemented in Dogecoin?
The more money you have to spend on expensive, power-guzzling hardware, the more likely you are to get block mining rewards.
The way mining works right now is that you have to solve what I continually call a “little math puzzle”. That puzzle is essentially “guess a random number that when combined with other numbers from the network and unsettled but verified transactions and run through a specific mathematical function produces an output with at least n leading zeroes”. In other words, it’s a math puzzle.
As far as everyone knows, there’s no mathematical formula to figure out that random number other than guessing and trying a bunch of possibilities. The faster you can try numbers, the more likely you’ll guess a valid number before everyone else does.
For more details, see Mining the Block in the Mastering Bitcoin book.
If you’re lucky at guessing numbers, you’ll get a cool 10,000 Dogecoin and any transaction fees for your trouble. Much wow, happy cha-ching.
The number of leading zeroes can change, making it easier or more difficult to guess a valid random number. The more leading zeroes, the more difficult the puzzle. The fewer leading zeroes, the easier the puzzle.
This is important because we want the network to process one batch of transactions (one block) about every minute. If more people add more machines and can try more numbers more quickly, that minute may soon become 59 seconds then 50 then 30 then… except that the difficulty increases. Similarly, if Godzilla steps on a data center and knocks out all of the ASIC miners in Eurasia and that minute becomes 2 then 4 then 16, the difficulty decreases.
This is very clever, but I wonder if we’re thinking about difficulty in only one direction.
The Results are In
What do we really want to accomplish here?
We want miners to continue to validate transactions and, thus, mine blocks. Offering the reward of 10k Dogecoin for mining a block gives people an incentive to validate transactions.
We want the network to process transactions about once a minute, so you never have to wait much longer than 60 seconds for your transaction to settle and about 6 minutes, give or take, for the entire network to decide it’s not worth the trouble to invalidate your transaction.
Neither of these suggestions are controversional; they’ve been part of the network ever since the start.
What if we want a few other things?
I want more people to feel like they can validate transactions and mine even if they’re running on an old laptop or a tiny handheld computer or a solar-powered phone stuck where it gets sunlight 16 hours a day.
I want to process more transactions and possibly more transactions more quickly. As more and more people use Dogecoin, I want the network to scale with all the transactions.
I want to process as many transactions in a block as possible.
Can we achieve all of those things?
What if we invented…
Variable Block Difficulty
If you own that datacenter Godzilla is thinking about stepping on, and I have a turn-of-the-millennium titanium Macbook with a battery duct-taped in just to keep the thing running, and we’re the only two people mining on the network, you’re going to be flush with Doge-themed cash and I’m going to have a very warm room and maybe some stickers to show for it.
I can’t compete with your ability to test random numbers quickly.
What if I don’t have to?
What if you’re trying to find an answer to the puzzle with 8 leading zeroes and I’m trying to find one with 5?
In other words, why does your target difficulty have to be the same as mine?
Block difficulty is a suggestion. It’s more of a guideline. We choose it so we don’t process blocks too quickly or too slowly.
Maybe we should focus on mining blocks on time.
What if, instead of saying “everyone needs to compete to answer the puzzle with an answer with the same number of leading zeroes”, we pick the best answer after the minute is up?
If, at 1 minute, you have an answer with five leading zeroes and I have one with six, hooray for me!
Variable Block Rewards
“Wait a minute,” you say. “I spent a lot of money building this data center, and I have to pay for Godzilla insurance, and you just had that laptop lying around, even if you had to duct-tape in the battery!”
That’s true.
Maybe we should keep the difficulty level, but more of a suggestion.
Let’s say the difficulty level is 8z but I get 6z and that’s the best the network has seen after a minute.
If I’d hit 8z, I’d get 10,000 Dogecoin as the coinbase reward. I didn’t, so let’s scale that down by 2 (8z - 6z = 2z), and I get 100 Dogecoin. That’s not bad for a minute’s worth of work.
Here’s the thing: you could decide that all of your computing power isn’t satisfied with a potential 100 Dogecoin reward and you want to go for the 8zY reward or the 7z reward. That’s cool. I respect your ambition.
What if you could set your miner to reject puzzle answers that don’t hit the target difficulty? You won’t settle for anything less than 8z if the difficulty is 8z. You’re more likely to hit it than I am, but we’re still in a race based on our computing power to calculate the best result after about a minute.
Block Full Rewards
“Zeroest answer closest to one minute” is one direction to evaluate potential answers. There are others!
What if we also calculated how full the blocks we mine are?
We want to process as many transactions as possible as quickly as possible, so it’s to our benefit to fill our blocks as much as possible.
What if another way we evaluate miners is to see how full their blocks are? If you and I each find a 7z solution at the same time, but your block is 98% full and mine is 48% full, the network should ideally pick your block and reward you because you’ve done the network a bigger favor than I have.
Drawbacks of Variables
Sometimes in computer science they say “Constants aren’t and variables don’t.” I’m not sure why they say that, but if you like goofy jokes that are a little bit mathy, hang around with people who think about computer science.
I’m sure there are a lot of drawbacks of this scheme. Some I can see already. Some I’m sure I can’t. I’ll suggest one to get your brains thinking.
A node on a slow satellite or radio Internet connection a hundred kilometers from anyone else might have trouble processing (and transmitting) transactions and puzzle answers as quickly as a node plugged into the wall of a financial services company in San Francisco.
This scheme rewards (pun intended) nodes with great network connections: not directly, but over time I suspect the faster you can transmit bits, the more rewards you’ll see, ceteris paribus.
If you decide you’re done with all this Godzilla nonsense and relocate your data center to Mars, even if you have a laser uplink to the fastest satellite on Earth and account for rotations and eclipses and Vogon spaceships hanging in the sky in the exact way that bricks don’t, you’re still going to have latency, and a difficult time getting spare parts.
That may be okay. Then again, it might not be.
What other pros and cons can you think of?
A Doge in a China Shop
Here’s the other question, one I’m sure all of the other Core contributors ask themselves every time I ask questions about what’s possible: how could we do this without breaking everything?
I’m not sure.
In theory, we could allow nodes to opt in to a variable reward scheme. If 51% of nodes accept a block with a difficulty of 8z and a reward of 10,000 Dogecoin but the best riddle answer was 6z and earned a reward of 100 Dogecoin, that’s the game. That’s what the network decides.
If, on the other hand, I’m the only person who ever runs a node, and nobody agrees with my aging Macbook that this is a valid riddle answer and coinbase block, then the Shibes have voted.
This, to me, is the other important part of this thought exercise.
As I wrote in my previous post, I personally have no plans to move away from Proof of Work. It may happen in the future. I haven’t myself seen any concrete implementation suggestion or project idea on how to accomplish it.
It’s not up to me. It’s not up to any other developer. Even if someone proposed the ideal implementation and we implemented it and released it, it would only work if you and enough other Shibes agreed to use it.
That, to me, is a wonderful thing.