Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC(0043): CKB softfork activation #349

Merged
merged 2 commits into from
Oct 31, 2022

Conversation

zhangsoledad
Copy link
Member

@zhangsoledad zhangsoledad commented Jun 16, 2022

Preview Link
This is a proposal based on BIP9 modified by ckb characteristics and also incorporates the "speedy trial" activation specification.

@zhangsoledad zhangsoledad marked this pull request as ready for review June 17, 2022 03:31
@zhangsoledad zhangsoledad requested a review from a team as a code owner June 17, 2022 03:31
Copy link
Member

@janx janx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An epoch in CKB (4 hours) is far shorter than an epoch in BItcoin (2 weeks). The tally period of softfork signaling should be long enough so it's resistant to governance attack. Instead of 1 epoch (4 hours), I think CKB softfork activation tally period should be at least as long as Bitcoin's (2 weeks ~= 90 CKB epochs).

@zhangsoledad
Copy link
Member Author

An epoch in CKB (4 hours) is far shorter than an epoch in BItcoin (2 weeks). The tally period of softfork signaling should be long enough so it's resistant to governance attack. Instead of 1 epoch (4 hours), I think CKB softfork activation tally period should be at least as long as Bitcoin's (2 weeks ~= 90 CKB epochs).

I'm not so sure it's appropriate to measure the replacement in realistic time, CKB is much faster to mine, 2 weeks ~= 151,200 blocks.
A big problem with BIP9 is that without the cooperation of miners, the process would be relatively long and a year would be wasted if it failed. So Speedy Trial proposes to "Start soon, Stop soon", there may have room for compromise here, for period and timeout.

@nirenzang
Copy link
Contributor

nirenzang commented Jun 24, 2022

Despite its similarities with BIP9, I would still like the following information to be added to the RFC so that it is more friendly to readers like me.

  • Before presenting the parameters: where are these parameters written? Are they part of the block, or written somewhere on some website?
  • How long should the fallow pause be? Do we need to prescribe miners to clear the bit for a long-enough time before we can assign a new meaning to that bit?

I agree with Jan that deciding on a soft fork upgrade with a four-hour epoch seems too short. Perhaps it's better to define a longer time-unit like "era" (90 epochs each) and make decisions based on eras. Personally, I think a month or two is enough to make decisions. So we can set the parameters so that as soon as all miners are on board, the soft fork is activated in a month.

@janx
Copy link
Member

janx commented Jul 4, 2022

An epoch in CKB (4 hours) is far shorter than an epoch in BItcoin (2 weeks). The tally period of softfork signaling should be long enough so it's resistant to governance attack. Instead of 1 epoch (4 hours), I think CKB softfork activation tally period should be at least as long as Bitcoin's (2 weeks ~= 90 CKB epochs).

I'm not so sure it's appropriate to measure the replacement in realistic time, CKB is much faster to mine, 2 weeks ~= 151,200 blocks. A big problem with BIP9 is that without the cooperation of miners, the process would be relatively long and a year would be wasted if it failed. So Speedy Trial proposes to "Start soon, Stop soon", there may have room for compromise here, for period and timeout.

Why is lockinontimeout not included in this proposal?

@zhangsoledad
Copy link
Member Author

lockinontimeout

lockinontimeout is the logic of BIP8, which is used to start a flag day.

  • MUST_SIGNAL for one retarget period prior to the timeout, if LOCKED_IN was not reached and lockinontimeout is true.
  • During the MUST_SIGNAL phase, if (2016 - threshold) blocks in the retarget period have already failed to signal, any further blocks that fail to signal are invalid.

Optimistically, we hope that BIP8 will not be used,
BIP8 forced signaling (or automatic activation) in specific, is that it can be risky, this scheme could split the network between upgraded and non-upgraded nodes.

This risk is probably best countered by offering enough time to upgrade. Unfortunately, not everyone agrees on how much time is enough.

@zhangsoledad
Copy link
Member Author

zhangsoledad commented Sep 14, 2022

The current signaling period is tentatively set at 42 epochs, approximately one week.

@doitian doitian mentioned this pull request Sep 14, 2022
14 tasks
@zhangsoledad zhangsoledad changed the title RFC: CKB softfork activation RFC(0043): CKB softfork activation Sep 15, 2022
bors bot added a commit to nervosnetwork/ckb that referenced this pull request Oct 18, 2022
3631: feat: add light client support to ckb full node r=zhangsoledad a=quake

### What problem does this PR solve?

add light client support to ckb full node

### What is changed and how it works?

related rfcs:
[RFC(0043): CKB softfork activation](nervosnetwork/rfcs#349)
[RFC: CKB Light Client Protocol](nervosnetwork/rfcs#370)
[RFC: Client Side Block Filter Protocol](nervosnetwork/rfcs#375)

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- Unit test
- Integration test

### Release note <!-- Choose from None, Title Only and Note. Bugfixes or new features need a release note. -->

```release-note
Note: Add a note under the PR title in the release note.
```



Co-authored-by: Boyu Yang <[email protected]>
Co-authored-by: quake <[email protected]>
Co-authored-by: Linfeng Qian <[email protected]>
Co-authored-by: Quake Wang <[email protected]>
bors bot added a commit to nervosnetwork/ckb that referenced this pull request Oct 24, 2022
3652: chore: tweak softfork activation params r=zhangsoledad a=zhangsoledad

<!--
Thank you for contributing to nervosnetwork/ckb!

If you haven't already, please read [CONTRIBUTING](https://github.com/nervosnetwork/ckb/blob/develop/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.

PR Title Format:
1. module [, module2, module3]: what's changed
2. *: what's changed
-->


### What is changed and how it works?
Tweak parameters according to the latest changes of rfcs
nervosnetwork/rfcs#349

### Related changes

- PR to update `owner/repo`:
- Need to cherry-pick to the release branch

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- Unit test
- Integration test


### Release note <!-- Choose from None, Title Only and Note. Bugfixes or new features need a release note. -->

```release-note
None: Exclude this PR from the release note.
```



Co-authored-by: zhangsoledad <[email protected]>
bors bot added a commit to nervosnetwork/ckb that referenced this pull request Oct 24, 2022
3652: chore: tweak softfork activation params r=zhangsoledad a=zhangsoledad

<!--
Thank you for contributing to nervosnetwork/ckb!

If you haven't already, please read [CONTRIBUTING](https://github.com/nervosnetwork/ckb/blob/develop/CONTRIBUTING.md) document.

If you're unsure about anything, just ask; somebody should be along to answer within a day or two.

PR Title Format:
1. module [, module2, module3]: what's changed
2. *: what's changed
-->


### What is changed and how it works?
Tweak parameters according to the latest changes of rfcs
nervosnetwork/rfcs#349

### Related changes

- PR to update `owner/repo`:
- Need to cherry-pick to the release branch

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

- Unit test
- Integration test


### Release note <!-- Choose from None, Title Only and Note. Bugfixes or new features need a release note. -->

```release-note
None: Exclude this PR from the release note.
```



Co-authored-by: zhangsoledad <[email protected]>
@doitian doitian requested review from janx, doitian and yangby-cryptape and removed request for yangby-cryptape October 26, 2022 02:02
@janx janx merged commit 6bd254f into nervosnetwork:master Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

todo list of release 0.105.0
5 participants