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

Automated drep (Scenario 2) #5809

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Automated drep (Scenario 2) #5809

wants to merge 20 commits into from

Conversation

palas
Copy link
Contributor

@palas palas commented Apr 26, 2024

Description

This PR aims to address this issue: #5600
With that aim, it adds two scenarios for automated DReps. This PR contains the second scenario:

Scenario 2

  • Create default testnet with 3 DReps and 3 stake holders delegated, one to each DRep.
  • Do some proposal and vote yes with all the DReps.
  • Check that proposal passes.
  • Take the last two stake delegators and delegate them to "No Confidence".
  • Do some other proposal and vote yes with all the DReps.
  • Check the new proposal does NOT pass.
  • Create a no confidence proposal.
  • Vote no to the no confidence proposal with all DReps.
  • Check the no confidence proposal passes.

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

@palas palas self-assigned this Apr 26, 2024
@palas palas linked an issue Apr 26, 2024 that may be closed by this pull request
@palas palas changed the base branch from master to automated-drep-scenario1 April 29, 2024 16:25
@palas palas changed the title Automated DReps tests Automated drep (Scenario 2) Apr 29, 2024
@palas palas marked this pull request as ready for review April 29, 2024 16:33
@palas palas requested a review from a team as a code owner April 29, 2024 16:33
@palas palas force-pushed the automated-dreps branch 3 times, most recently from 051f153 to 910bd8d Compare April 30, 2024 20:00
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.

LGTM, but left few comments.

cardano-testnet/src/Testnet/Components/SPO.hs Outdated Show resolved Hide resolved
@@ -515,6 +517,18 @@ defaultDRepSkeyFp n = "drep-keys" </> ("drep" <> show n) </> "drep.skey"
defaultDRepKeyPair :: Int -> PaymentKeyPair
defaultDRepKeyPair n = PaymentKeyPair (defaultDRepVkeyFp n) (defaultDRepSkeyFp n)

-- | The relative path to SPO key pairs in directories created by cardano-testnet
defaultSPOKeys :: Int -> PoolNodeKeys
defaultSPOKeys n =
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the paths are different than those in Testnet.Start.Cardano? Can we reuse it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, you are right, it turns out that cardanoTestnetDefault returns the paths to most things. I hadn't realised, I think I should do another PR just refactoring those things afterwards.

@palas palas force-pushed the automated-dreps branch 3 times, most recently from 572cc7b to 91327bf Compare May 1, 2024 22:14
@palas palas force-pushed the automated-drep-scenario1 branch from 8368f83 to 172d84e Compare May 1, 2024 22:16
@palas palas requested a review from carbolymer May 2, 2024 01:26
@palas palas force-pushed the automated-drep-scenario1 branch from 172d84e to e4f6e9d Compare May 2, 2024 22:39
@palas palas force-pushed the automated-dreps branch 3 times, most recently from fb73a5f to 00d1e04 Compare May 3, 2024 02:02
@palas palas requested review from a team as code owners May 3, 2024 17:51
@palas palas force-pushed the automated-drep-scenario1 branch from a2537b8 to 5b62ae6 Compare May 16, 2024 21:44
Base automatically changed from automated-drep-scenario1 to master May 17, 2024 03:07
@smelc
Copy link
Contributor

smelc commented Jun 24, 2024

@palas> is this still relevant?

Copy link

github-actions bot commented Aug 9, 2024

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale label Aug 9, 2024
@smelc
Copy link
Contributor

smelc commented Aug 9, 2024

cc @palas

@github-actions github-actions bot removed the Stale label Aug 10, 2024
@palas
Copy link
Contributor Author

palas commented Aug 21, 2024

@smelc, sorry just saw your message. Yes, it is relevant, I have it parked because there is a problem with parameter update proposals, see these two commented out tests:

-- TODO: Disabled because proposals for parameter changes are not working
. This one has the same problem so I cannot really work on it. Last thing I know was @lehins and @Jimbo4350 were investigating

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.

Automated DReps
3 participants