Skip to content

spec: abci2.0 -Incorporate content of RFC100 into the spec#484

Merged
jmalicevic merged 16 commits intofeature/abci++veffrom
jasmina/spec-port-rfc100
Mar 22, 2023
Merged

spec: abci2.0 -Incorporate content of RFC100 into the spec#484
jmalicevic merged 16 commits intofeature/abci++veffrom
jasmina/spec-port-rfc100

Conversation

@jmalicevic
Copy link
Copy Markdown
Collaborator

Closes #483.

@jmalicevic jmalicevic added abci Application blockchain interface spec Specification-related labels Mar 8, 2023
@jmalicevic jmalicevic added this to the 2023-Q1 milestone Mar 8, 2023
@jmalicevic jmalicevic self-assigned this Mar 8, 2023
@jmalicevic jmalicevic marked this pull request as ready for review March 15, 2023 09:28
@jmalicevic jmalicevic requested review from a team as code owners March 15, 2023 09:28

The configuration file now contains a [**new consensus parameter**](./abci%2B%2B_app_requirements.md#abciparamsvoteextensionsenableheight): `VoteExtensionsEnableHeight`.
This parameter represents the height after which vote extensions are
required for consensus to proceed, with 0 being the default value (no vote extensions).
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@sergio-mena , maybe I have not a clear understanding, but let's say a chain is just starting and wants to have vote extensions, but the default value here is 0. Should we not say something like - we have to set this to at least 1? Because someone starting from scratch with a version of the software having extensions enabled, might assume they are enabled by default?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good point.
First, I realize we're not mentioning that the ConsensusParam can be set at genesis. So, typically, for chains starting from scratch and having vote extensions from their app's first version, they just need to set VoteExtensionsEnableHeight to 1 at genesis and forget about the upgrade path. We need to say this somewhere in the spec.
Second, to your question. We (our team) discussed about the default value at genesis last spring in some PR (I'll try to pull it up). I remember thinking default value at genesis should be 1, but then people convincing me that 0 is better. Now, when I think of it, it makes total sense to me that the default value is zero, for compatibility with existing genesis docs.
Let me know if you're still unclear in some aspect.

Copy link
Copy Markdown
Collaborator

@sergio-mena sergio-mena Mar 17, 2023

Choose a reason for hiding this comment

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

they just need to set VoteExtensionsEnableHeight to 1

actually, to be precise, they need to set it to their InitialHeight parameter

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I know and agree it should be 0 by default. But as you said, I think we should state it that, if they do want vote extensions they have to change it, they will not magically be turned on. Of course, it can be deducted from the spec, but I think it's better to be clear on this as people might just skim through some parts of the spec.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'll try to pull it up

Here it is (took some time :-) )

Copy link
Copy Markdown
Collaborator

@sergio-mena sergio-mena Mar 17, 2023

Choose a reason for hiding this comment

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

Agreed.

Just make sure it's clear that there are two ways of enabling vote extensions for new chains:

  • Via app's logic at InitChain, by changing the ConsensusParam
  • Via setting it to InitialHeight in the genesis. This way, the app does not need to do anything to have extensions enabled from the very beginning.

BTW, this distinction also applies to other parts of CometBFT's state, such as validator updates.

jmalicevic and others added 2 commits March 16, 2023 16:16
Co-authored-by: Lasaro <lasaro@informal.systems>
sergio-mena
sergio-mena previously approved these changes Mar 17, 2023
Copy link
Copy Markdown
Collaborator

@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

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

Thanks!
EDIT: Sorry, I must have done something wrong, because I just noticed I was reviewing an old version of this PR. Bear with me

@sergio-mena sergio-mena dismissed their stale review March 17, 2023 10:11

Review done on an old version, sorry


The configuration file now contains a [**new consensus parameter**](./abci%2B%2B_app_requirements.md#abciparamsvoteextensionsenableheight): `VoteExtensionsEnableHeight`.
This parameter represents the height after which vote extensions are
required for consensus to proceed, with 0 being the default value (no vote extensions).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good point.
First, I realize we're not mentioning that the ConsensusParam can be set at genesis. So, typically, for chains starting from scratch and having vote extensions from their app's first version, they just need to set VoteExtensionsEnableHeight to 1 at genesis and forget about the upgrade path. We need to say this somewhere in the spec.
Second, to your question. We (our team) discussed about the default value at genesis last spring in some PR (I'll try to pull it up). I remember thinking default value at genesis should be 1, but then people convincing me that 0 is better. Now, when I think of it, it makes total sense to me that the default value is zero, for compatibility with existing genesis docs.
Let me know if you're still unclear in some aspect.

Copy link
Copy Markdown
Contributor

@adizere adizere left a comment

Choose a reason for hiding this comment

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

I think I'm starting to understand ABCI++ better, the docs are very thorough!

- [State Sync](#state-sync)
- [Application configuration required to switch to ABCI2.0](#application-configuration-required-to-switch-to-abci-20)


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This helps navigating he document, but for anyone reading on GitHub, which I expect to be the norm, you can now see an auto generated outline. Just something to think about going forward when writing specs, RFC and ADR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suggested to add a TOC, because I didn't realize GH has one. I managed to find it in the left-hand side of the view:

Screenshot 2023-03-21 at 09 33 49

Thanks for highlighting that Lasaro! I still think having the TOC directly in the file does not hurt.

something to think about going forward when writing specs, RFC and ADR.

Agree. We might want to have a consistent approach. Good discussion to have internally another time.

@jmalicevic
Copy link
Copy Markdown
Collaborator Author

@sergio-mena , do you mind taking a last look at the TOC and the latest changes so we can merge this?

@sergio-mena
Copy link
Copy Markdown
Collaborator

On it! (sorry I couldn't get back to this earlier)

Copy link
Copy Markdown
Collaborator

@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

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

This is looking awesome :-)

@jmalicevic jmalicevic merged commit c63b986 into feature/abci++vef Mar 22, 2023
@jmalicevic jmalicevic deleted the jasmina/spec-port-rfc100 branch March 22, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abci Application blockchain interface spec Specification-related

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants