Proposal: activate CSV with 1.15 #3509
Replies: 4 comments 4 replies
-
👍 to bringing in CSV (it's mature and well understood and has some interesting usage benefits) and 👍 to using this as a learning opportunity. I want to think about the specific implementation in more detail before I fully commit to it, but I like this idea a lot on its face. |
Beta Was this translation helpful? Give feedback.
-
I think focusing on implementing CSV instead of SegWit is a better choice. Given Dogecoin's faster block times, we're less likely to encounter issues with blocks becoming full. Dogecoin Ordinals may become a problem due to them clogging up the blockspace. In terms of implementation, I support BIP9 over BIP8. My reasoning is that miners, who run the core infrastructure, have invested in the equipment and are the most enthusiastic about the protocol. I don't like how in BIP8, there is still a way to force network adoption even without full support. I believe that in the future, mining will become more mainstream. For example, the Spiritus car has the capability to mine cryptocurrency, a move primarily driven by the market's increased interest in mining crypto compared to its interest around 2012. |
Beta Was this translation helpful? Give feedback.
-
Agree on CSV, it would definitely have interesting applications and build developer knowledge. Are there any other protocol upgrades you personally think we should take a look at assuming everything with CSV goes well? |
Beta Was this translation helpful? Give feedback.
-
Does the DIP repo need any work (organization/updates) before we start using it again? |
Beta Was this translation helpful? Give feedback.
-
Currently there’s a protocol feature implemented in the code since 1.14.0, waiting to be activated: relative lock time (aka CSV). Because we only do one round of soft fork proposals per major release, and we cannot use versionbits as-is (part of the designated bits are already in use for AuxPow) only absolute lock time (aka CLTV) was proposed with 1.14.0. Now that we’re already working on a new major release and 1.14 is stable and maintenance-only, we can safely propose a protocol upgrade.
Note that maintainers have previously proposed to fork in CSV with 1.21. However, as progress on that effort has largely stalled for 2 years now, there is no reason to keep that a blocking requirement: all the code is there already, and we’re not bound to only doing minor updates for the current 1.15 release target.
I think that, because we only need to modify the versionbits location and make a decision about activation, this could be an excellent learning opportunity for those devs that have thus far not gained any practical experience with protocol extensions and softforks, on a relatively straight forward feature add and a smooth learning curve. If the Dogecoin developer community gains expertise around how protocol upgrades work, we can better collaborate with those people that for a longer time now have been waiting to be enabled with upstream protocol features we did not yet activate: I've personally talked to at least 5 teams that would love to work on implementing solutions on top of Dogecoin, but cannot because the protocol lags in features that Bitcoin and Litecoin already have; and I'm sure that there's many people out there with similar dilemmas that I don't know about.
Scope
1. Fix versionbits
We’ve tried fixing this in the past, but the plan was an unfinished and over-engineered effort that eventually got made obsolete by 1.14.0 - which didn’t solve the issue. We can however solve this in a much easier way than before, if we’re willing to limit ourself to 6 concurrent proposal slots (I haven’t seen anyone ever doing that many, isolated protocol change proposals concurrently, and for good reason: it’s good to be conservative in protocol changes, because consensus is the cornerstone of this tech.)
We have an entire byte in nVersion of which we only use 1 bit for indicating whether a block is AuxPoW, this leaves 7 bits, of which we should probably reserve 1 for any future auxpow-specific flagging, in case we need it. That leaves 6 pristine bits we can use for miner activation. If we change the bitmask in versionbits.cpp to cover only these 6 bits, we can effectively plan concurrent deployments. I have been a brat and mined a couple of testnet blocks with these bits set, to see if anyone complains - but every source code implementation I’ve checked (from electrumx to libdogecoin) properly applies the correct bitmask to decide on auxpowness of a block.
I’d personally be looking to deeply document both AuxPoW’s usage of
block::nVersion
and this new versionbits standard, for example in the form of a DIP, which is a facility we imho don’t use often enough.2. Activation mechanism
We can then simply use BIP9, which also is included since 1.14.0 as an activation mechanism. It would be good to make an informed decision on this though, as we could also opt to use BIP8 which contains some lessons learned from BIP9, but at the very least make ourselves familiar with what Bitcoin learned from executing these methods for activating protocol upgrades, like this thread.
This doesn't have to be a big issue: I think that as long as we have some discussion and make an informed decision, we can make it work, even if we decide to just implement BIP9.
3. Marking CSV for potential activation
In parallel, we can test and prepare CSV (consisting of BIP68, BIP112 and BIP113) for activation. Its activation is currently disabled because the timestamp is in the past, but as we can 1-on-1 fork this in (which is great because we’d have full compatibility with any library written for Bitcoin). If we want to increase time granularity and make the lock-by-relative-height more meaningful for our 1-minute blocks (Bitcoin parametrization only allows for a translated 45 days worth of blocks), we can do that in a later softfork, so that we don’t break any bitcoin tooling and just non-obtrusively support 2 standards (which would be optional for transaction scripts to use)
And that’s it.
I’m interested to know what everyone thinks. Are you interested in this? Do you think it will help you learn more about the protocol? Let’s discuss.
Beta Was this translation helpful? Give feedback.
All reactions