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

reinstate our two tickf optimizations #3390

Merged
merged 2 commits into from
May 1, 2023
Merged

Conversation

JaredCorduan
Copy link
Contributor

Description

While preparing for a new release, we had to remove our two TICKF optimizations: #3375

The problem was that a local network test in cardano-node was failing, namely cardano-testnet.

The problem, however, was not in the optimizations, but rather in the test setup:

https://github.com/input-output-hk/ouroboros-network/blob/8685fc4b08cd5f11735768d60da921628602b630/ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Node/TPraos.hs#L336-L344

The problem is that the inserted mark snapshot is now not enough to quick-start the network, the pool distribution also needs to quick-started:

SL.ssStakeMarkPoolDistr = SL.calculatePoolDistr initSnapShot

I verified this by running cardano-testnet with a modified ledger and consensus as described above.

We can now restore the optimizations in ledger, but we still need to either fix registerGenesisStaking as described above, or do something safer to prevent future mistakes like this.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@JaredCorduan JaredCorduan requested a review from lehins April 24, 2023 22:46
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Awesome. Make sure that the version of ouroboros-consensus-cardano with a fix to DRAGONS, has a lower bound on cardano-ledger-shelley >= 1.2

@JaredCorduan
Copy link
Contributor Author

Awesome. Make sure that the version of ouroboros-consensus-cardano with a fix to DRAGONS, has a lower bound on cardano-ledger-shelley >= 1.2

Sounds good! We will approach the dragon 🐉 with shields 🛡️ made of 1.2 ⚔️ .

@JaredCorduan JaredCorduan force-pushed the jc/tickf-revert-revert branch from a44bd84 to 5732f0d Compare April 25, 2023 15:20
@lehins lehins mentioned this pull request Apr 27, 2023
8 tasks
@JaredCorduan JaredCorduan force-pushed the jc/tickf-revert-revert branch from 5732f0d to 0d54837 Compare May 1, 2023 21:03
@JaredCorduan JaredCorduan enabled auto-merge (rebase) May 1, 2023 21:52
@JaredCorduan JaredCorduan merged commit 1802716 into master May 1, 2023
@iohk-bors iohk-bors bot deleted the jc/tickf-revert-revert branch May 1, 2023 22:36
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.

2 participants