You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PBTS: Introduce consensus param to enable PBTS, along with all validation to update it #2197
changed the title [-]Introduce consensus param to enable PBTS (in genesis, in updates, etc), along with all validation to update it[/-][+]PBTS: Introduce consensus param to enable PBTS (in genesis, in updates, etc), along with all validation to update it[/+]on Jan 31, 2024
A chain starts from genesis, PBTS is enabled from scratch:enable_height = 1 (is this the default?)
A chain starts from genesis, PBTS is disabled (possibly forever): enable_height = 0 (is this the default?)
A chain starts from genesis, PBTS should be enabled from a given height H: enable_height = H, provided H > current height
An existing chain (i.e., behaviour when default values is adopted): if enable_height = 0 is the default, the existing chain does not (immediately) adopts PBTS
An existing chain that wants to adopt PBTS immediately after the upgrade: enable_height = H+1, where H is the upgrade height?
An existing chain that wants to adopt PBTS from a given height H: enable_height = H, provided H > current height
An existing chain that does not want to adopt PBTS (possibly forever): enable_height = 0 (is this the default?)
I think the pending to define here is the default value for existing chains and chains starting from genesis.
🟥 A chain starts from genesis, PBTS is enabled from scratch:enable_height = 1 (is this the default?)
🟩 A chain starts from genesis, PBTS is disabled (possibly forever): enable_height = 0 (is this the default?)
The default right now is 0.
🟩 A chain starts from genesis, PBTS should be enabled from a given height H: enable_height = H, provided H > current height
It will be the case, since current height is 0. Otherwise we fall into the following case.
🟩 An existing chain (i.e., behaviour when default values is adopted): if enable_height = 0 is the default, the existing chain does not (immediately) adopts PBTS
🟨 An existing chain that wants to adopt PBTS immediately after the upgrade: enable_height = H+1, where H is the upgrade height?
If the chain is already running v1 and we are talking about a different upgrade that is independent from PBTS, then on.
If the upgrade is to v1, then the upgrade must happen first so the parameter is available to be set.
🟩 An existing chain that wants to adopt PBTS from a given height H: enable_height = H, provided H > current height
Same as the 4th case
🟩 An existing chain that does not want to adopt PBTS (possibly forever): enable_height = 0 (is this the default?)
changed the title [-]PBTS: Introduce consensus param to enable PBTS (in genesis, in updates, etc), along with all validation to update it[/-][+]PBTS: Introduce consensus param to enable PBTS, along with all validation to update it[/+]on Feb 12, 2024
Activity
[-]Introduce consensus param to enable PBTS (in genesis, in updates, etc), along with all validation to update it[/-][+]PBTS: Introduce consensus param to enable PBTS (in genesis, in updates, etc), along with all validation to update it[/+]cason commentedon Feb 5, 2024
So, general question here: what is the expected behaviour for this parameter, meaning which value to use when:
HHsergio-mena commentedon Feb 6, 2024
@cason take a look at all the test cases inside
TestConsensusParamsUpdate_VoteExtensionsEnableHeight.Let me know if any of your questions above is not answered by that unit test.
cason commentedon Feb 7, 2024
So, correct me if I am wrong:
enable_height = 1(is this the default?)enable_height = 0(is this the default?)H:enable_height = H, providedH >current heightenable_height = 0is the default, the existing chain does not (immediately) adopts PBTSenable_height = H+1, whereHis the upgrade height?H:enable_height = H, providedH >current heightenable_height = 0(is this the default?)I think the pending to define here is the default value for existing chains and chains starting from genesis.
cason commentedon Feb 7, 2024
Yes, this defines the rules for upgrading the
enable_heightparameter. It does not define the behaviour.lasarojc commentedon Feb 7, 2024
The default right now is 0.
It will be the case, since current height is 0. Otherwise we fall into the following case.
If the chain is already running v1 and we are talking about a different upgrade that is independent from PBTS, then on.
If the upgrade is to v1, then the upgrade must happen first so the parameter is available to be set.
Same as the 4th case
Yes
sergio-mena commentedon Feb 8, 2024
The behavior is defined easily:
[-]PBTS: Introduce consensus param to enable PBTS (in genesis, in updates, etc), along with all validation to update it[/-][+]PBTS: Introduce consensus param to enable PBTS, along with all validation to update it[/+]feat(pbts): Update consensus params to include pbts enabled (#2231)
cason commentedon Feb 22, 2024
I think this is done, isn't it?
lasarojc commentedon Feb 23, 2024
Closing. Pls reopen if it was hasty.