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

Fix Praos obsolete node check #3891

Merged
merged 1 commit into from
Jul 20, 2022
Merged

Conversation

JaredCorduan
Copy link
Contributor

@JaredCorduan JaredCorduan commented Jul 12, 2022

Description

The obsolete node check in the Praos ledger protocol is suppose to compare the current major protocol version (from the protocol parameters in the ledger state) with the global "max major protocol version" value. Currently, however, it is checking that the global max major value is not bigger than the protocol version listed in the block header (which is not supposed to have any semantic meaning).

This PR fixes the check to perform the same logic done by the TPraos ledger protocol, ie the logic in the ledger function chainChecks. To do this, Views.LedgerView now contains the current protocol parameters.

The consequence of the incorrect obsolete node check is that nodes will not properly halt after a hard fork when they do not have the required software for the hard fork.

Checklist

  • Branch
    • Commit sequence broadly makes sense
    • Commits have useful messages
    • New tests are added if needed and existing tests are updated
    • If this branch changes Consensus and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
    • If this branch changes Network and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
    • If serialization changes, user-facing consequences (e.g. replay from genesis) are confirmed to be intentional.
  • Pull Request
    • Self-reviewed the diff
    • Useful pull request description at least containing the following information:
      • What does this PR change?
      • Why these changes were needed?
      • How does this affect downstream repositories and/or end-users?
      • Which ticket does this PR close (if any)? If it does, is it linked?
    • Reviewer requested

Copy link
Contributor

@nfrisby nfrisby left a comment

Choose a reason for hiding this comment

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

Thanks, Jared! Nice PR.

I did make one significant comment.

Copy link
Contributor

@nfrisby nfrisby left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks Jared 👍

@JaredCorduan
Copy link
Contributor Author

bors merge

iohk-bors bot added a commit that referenced this pull request Jul 13, 2022
3891: Fix Praos obsolete node check r=JaredCorduan a=JaredCorduan

# Description

The obsolete node check in the `Praos` ledger protocol is suppose to compare the current major protocol version (from the protocol parameters in the ledger state) with the global "max major protocol version" value. Currently, however, it is checking that the global max major value is not bigger than the protocol version listed in the block header (which is not supposed to have any semantic meaning).

This PR fixes the check to perform the same logic done by the `TPraos` ledger protocol, ie the logic in the ledger function `chainChecks`. To do this, `Views.LedgerView` now contains the current protocol parameters.

 The consequence of the incorrect obsolete node check is that nodes will not properly halt after a hard fork when they do not have the required software for the hard fork.



Co-authored-by: Jared Corduan <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 13, 2022

Timed out.

@JaredCorduan
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 13, 2022
3891: Fix Praos obsolete node check r=JaredCorduan a=JaredCorduan

# Description

The obsolete node check in the `Praos` ledger protocol is suppose to compare the current major protocol version (from the protocol parameters in the ledger state) with the global "max major protocol version" value. Currently, however, it is checking that the global max major value is not bigger than the protocol version listed in the block header (which is not supposed to have any semantic meaning).

This PR fixes the check to perform the same logic done by the `TPraos` ledger protocol, ie the logic in the ledger function `chainChecks`. To do this, `Views.LedgerView` now contains the current protocol parameters.

 The consequence of the incorrect obsolete node check is that nodes will not properly halt after a hard fork when they do not have the required software for the hard fork.



Co-authored-by: Jared Corduan <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 13, 2022

Build failed:

iohk-bors bot added a commit that referenced this pull request Jul 13, 2022
3896: Fix chocolatey error in GH Actions Windows CI r=amesgen a=amesgen

# Description

Like #3075, in order to fix the current CI issue, see e.g. #3891 (comment)



Co-authored-by: amesgen <[email protected]>
@amesgen
Copy link
Member

amesgen commented Jul 14, 2022

bors retry

iohk-bors bot added a commit that referenced this pull request Jul 14, 2022
3891: Fix Praos obsolete node check r=JaredCorduan a=JaredCorduan

# Description

The obsolete node check in the `Praos` ledger protocol is suppose to compare the current major protocol version (from the protocol parameters in the ledger state) with the global "max major protocol version" value. Currently, however, it is checking that the global max major value is not bigger than the protocol version listed in the block header (which is not supposed to have any semantic meaning).

This PR fixes the check to perform the same logic done by the `TPraos` ledger protocol, ie the logic in the ledger function `chainChecks`. To do this, `Views.LedgerView` now contains the current protocol parameters.

 The consequence of the incorrect obsolete node check is that nodes will not properly halt after a hard fork when they do not have the required software for the hard fork.



Co-authored-by: Jared Corduan <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 14, 2022

Build failed:

@amesgen
Copy link
Member

amesgen commented Jul 14, 2022

There is a rework of the GH Actions Windows CI (#3901) just around the corner, which will hopefully resolve this 🙏

The obsolete node check in the Praos ledger protocol is suppose to
compare the current major protocol version (from the protocol parameters
in the ledger state) with the global "max major protocol version" value.
Currently, however, it is checking that the global max major value is
not bigger than the protocol version listed in the block header (which
is not supposed to have any semantic meaning).

This PR fixes the check to perform the same logic done by the TPraos
ledger protocol, ie the logic in the ledger function chainChecks.
To do this, `Views.LedgerView` now contains the current protocol
parameters.
Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

This should be good to go now, the necessary CI improvements have been merged.

@nfrisby
Copy link
Contributor

nfrisby commented Jul 20, 2022

bors retry

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 20, 2022

@iohk-bors iohk-bors bot merged commit 513a4fe into master Jul 20, 2022
@iohk-bors iohk-bors bot deleted the jc/fix-praos-obsolete-node-check branch July 20, 2022 17:13
nfrisby pushed a commit that referenced this pull request Jul 21, 2022
3896: Fix chocolatey error in GH Actions Windows CI r=amesgen a=amesgen

# Description

Like #3075, in order to fix the current CI issue, see e.g. #3891 (comment)



Co-authored-by: amesgen <[email protected]>
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.

3 participants