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

Test SPOs cannot vote protocol parameter change proposals #5871

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

palas
Copy link
Contributor

@palas palas commented May 31, 2024

Description

This PR creates a test that ensures SPOs cannot vote proposals that change protocol parameters. In particular, it tests this by trying to change the DRep activity expiration time and then checking the voting transaction cannot be submitted.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

Sorry, something went wrong.

@palas palas self-assigned this May 31, 2024
@palas palas requested a review from a team as a code owner May 31, 2024 19:04
@palas palas linked an issue May 31, 2024 that may be closed by this pull request
@palas palas mentioned this pull request May 31, 2024
@palas palas force-pushed the test-pparam-change-spo-fails branch from 2477fe7 to 2d2288a Compare June 4, 2024 20:28
Copy link
Contributor

@carbolymer carbolymer 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

@palas palas force-pushed the test-pparam-change-spo-fails branch from 2d2288a to dacbf34 Compare June 6, 2024 18:59
palas added 3 commits June 6, 2024 21:17

Verified

This commit was signed with the committer’s verified signature. The key has expired.
palas Pablo Lamela

Verified

This commit was signed with the committer’s verified signature. The key has expired.
palas Pablo Lamela

Verified

This commit was signed with the committer’s verified signature. The key has expired.
palas Pablo Lamela
…function
@palas palas force-pushed the test-pparam-change-spo-fails branch from dacbf34 to 81b4fe8 Compare June 6, 2024 19:27
@palas palas enabled auto-merge June 6, 2024 19:27
@palas palas mentioned this pull request Jun 6, 2024
9 tasks
@palas palas added this pull request to the merge queue Jun 6, 2024
Merged via the queue into master with commit 0fba660 Jun 6, 2024
24 checks passed
@palas palas deleted the test-pparam-change-spo-fails branch June 6, 2024 21:25
proposalFile <- H.note $ baseDir </> "sample-proposal-anchor"

void $ execCli' execConfig $
[ "conway", "governance", "action", "create-protocol-parameters-update"
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't hardcode "conway" here. Also food for thought, if we continue implementing functions like this, we are going to have a lot of boiler plate. What about we introduce a callback function that directly modifies the PParamsUpdate ledgerera type and then serialize to disk?

txIn <- findLargestUtxoForPaymentKey epochStateView sbe wallet

void $ execCli' execConfig
[ "conway", "transaction", "build"
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't hardcode "conway"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SPO Voting
4 participants