-
Notifications
You must be signed in to change notification settings - Fork 28
fix: incorrect rotation behavior on execution error #1275
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: main
Are you sure you want to change the base?
fix: incorrect rotation behavior on execution error #1275
Conversation
WalkthroughThe changes implement specialized handling for Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend
participant Backend
participant ConsensusEngine
User->>Frontend: Initiates transaction (may be leader_only)
Frontend->>Backend: Submits transaction
Backend->>ConsensusEngine: Processes transaction
alt leader_only transaction
ConsensusEngine->>ConsensusEngine: Select 1 validator (leader)
ConsensusEngine->>ConsensusEngine: Skip multi-validator voting
ConsensusEngine->>Backend: Return immediate consensus (majority agree)
else normal transaction
ConsensusEngine->>ConsensusEngine: Select initial validators
ConsensusEngine->>ConsensusEngine: Collect votes
ConsensusEngine->>Backend: Return consensus based on votes
end
Backend->>Frontend: Return consensus result
Frontend->>User: Display consensus history and vote results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (14)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 (
|
|
PR SummaryHere's a concise summary of the changes in the Pull Request:
Recommendations for developers:
|
Sherlock AI FindingsThe automated tool completed its analysis of the codebase and found no potential security issues. Next Steps: No immediate actions are required. Continue monitoring the codebase with future scans. Full report available at: https://ai.sherlock.xyz/runs/7c9eb8bc-cc6b-4ed4-8325-bcd04452c01a |


Fixes #DXP-499
What
PendingStateclass inbackend/consensus/base.pyto handle leader-only transactions by setting the number of validators to 1. And modified theProposingStateclass to no longer clear validators for leader-only transactions. So, we do not choose the 5 validators and then remove 4.CommittingStateandRevealingStateclasses to account for leader-only transactions when emitting events.determine_consensus_from_votesfunction inbackend/consensus/utils.pyto handle leader-only transactions by returning a majority agree result. This way the transaction gets accepted and the contract gets deployed. If we did not do this then no votes means no majority which means undetermined state.TransactionsProcessorclass inbackend/database_handler/transactions_processor.pyto correctly process leader-only transactions.TransactionItem.vuecomponent in the frontend to correctly display the votes.Why
Testing done
Decisions made
Checks
Reviewing tips
User facing release notes
Summary by CodeRabbit
New Features
Bug Fixes