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

Use a single protocol version across all eras #1224

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

dnadales
Copy link
Member

@dnadales dnadales commented Aug 21, 2024

While giving us flexibility, using different protocol versions for all eras increased the level of complexity and led to several errors in the past. This PR removes this flexibility by using a single protocol version, which determines the maximum protocol version Consensus supports.

See #324 for more background.

Closes #324.
Closes #276.

TODOs:

  • Format the code.
  • Fix ThreadNet test failure.
  • Improve documentation.
  • Address all the FIXMEs.

@amesgen amesgen changed the title Use a single protocol version accross all eras. Use a single protocol version across all eras Aug 22, 2024
@dnadales dnadales force-pushed the dnadales/324-simplify-protver-arguments branch 2 times, most recently from 023d299 to ad3deca Compare August 23, 2024 10:58
@dnadales dnadales marked this pull request as ready for review August 23, 2024 10:58
@dnadales dnadales force-pushed the dnadales/324-simplify-protver-arguments branch from 46f3bca to 280aa95 Compare August 23, 2024 11:41
Comment on lines 128 to 129
-- TODO: could be simplified once we implement something like
-- ouroboros-network#4115.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this TODO is done?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure. I wanted to discuss this with @jorisdral, but leave it there until then. I'd be in favour of creating a new issue if we identify concrete simplifications.

-- but they're currently unused, and they're irrelevant for the
-- consensus logic.
--
-- For Cardano mainnet, the Shelley era has major protocol verison
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
-- For Cardano mainnet, the Shelley era has major protocol verison
-- For Cardano mainnet, the Shelley era has major protocol version

- Add an extra field `cardanoProtocolVersion` to `ProtocolParamsCardano`
- Remove `shelleyProtVer` from `ProtocolParamsShelley`. The corresponding comment was moved to `ProtocolParamsCardano`.
- Remove eras protocol parameters, except for Byron, which is still used.
- Remove `ProtocolParams` data family and `PerEraProtocolParams`.
- Remove protocol versions from the `HardForkSpec`.
- Expand the comments of 'MaxMajorProtVer'
@dnadales dnadales force-pushed the dnadales/324-simplify-protver-arguments branch from dc5a78f to d57d4e5 Compare August 26, 2024 10:01
@dnadales dnadales added this pull request to the merge queue Aug 26, 2024
Merged via the queue into main with commit 19b2ba8 Aug 26, 2024
15 checks passed
@dnadales dnadales deleted the dnadales/324-simplify-protver-arguments branch August 26, 2024 11:46
@dnadales dnadales mentioned this pull request Oct 7, 2024
8 tasks
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.

Simplify the protVer arguments Consolidate protocol versions in cardano-tools
3 participants