-
Notifications
You must be signed in to change notification settings - Fork 49
fix: avoid unnecessary calls draw() when no juror is available #2002
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
base: dev
Are you sure you want to change the base?
Conversation
…res upgrading KlerosCore
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
""" WalkthroughThe changes update the core contract's upgrade process to use a new initializer, revise the Changes
Sequence Diagram(s)sequenceDiagram
participant KeeperBot
participant CoreContract
KeeperBot->>CoreContract: staticcall draw(disputeID, simulatedIterations)
CoreContract-->>KeeperBot: returns simulated drawn jurors
KeeperBot->>CoreContract: get current number of drawn jurors
KeeperBot->>KeeperBot: calculate extraJurors
alt extraJurors > 0
KeeperBot->>CoreContract: draw(disputeID, iterations)
CoreContract-->>KeeperBot: returns number of jurors drawn
else extraJurors <= 0
KeeperBot->>KeeperBot: log warning, skip draw
end
Possibly related PRs
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (15)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Deploy Preview for kleros-v2-university failed. Why did it fail? →
|
Code Climate has analyzed commit 7123f43 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
7123f43
to
9e8aa9e
Compare
|
PR-Codex overview
This PR focuses on upgrading the
KlerosCore
andKlerosCoreNeo
contracts to a new version and updating related initialization functions. It also enhances thedraw
function inKlerosCoreBase
to return the number of drawn jurors and introduces logic in thekeeperBot
script for handling juror draws.Detailed summary
KlerosCore
andKlerosCoreNeo
contracts' version from0.9.3
and0.8.0
to0.9.4
.initialize4
toinitialize5
in bothKlerosCore
andKlerosCoreNeo
.draw
function inKlerosCoreBase
to returnnbDrawnJurors
.keeperBot
for simulating draw iterations and logging juror availability.Summary by CodeRabbit
New Features
Bug Fixes
Chores