Skip to content

Conversation

@bmuddha
Copy link
Contributor

@bmuddha bmuddha commented Dec 3, 2025

and use saturating sub for accountsdb slot

Summary by CodeRabbit

  • Bug Fixes
    • Safer slot comparison to prevent rare underflow issues during slot validation.
    • Default base fee updated to 0, changing the system's initial fee setting.

✏️ Tip: You can customize this high-level summary in your review settings.

@bmuddha bmuddha requested a review from lucacillario December 3, 2025 11:50
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The pull request updates two areas: (1) in the magic validator module, the slot comparison now uses saturating_sub to compare accountsdb_slot against ledger_slot, preventing underflow when accountsdb_slot is 0; (2) in the configuration module, the public constant DEFAULT_BASE_FEE was changed from 100 to 0. No public API declarations were changed and control flow is unchanged aside from the safer arithmetic.

Possibly related PRs

  • fix: set default base fee to 0 #716 — implements the same code-level changes: switching to saturating_sub in the accountsdb slot check and setting DEFAULT_BASE_FEE from 100 to 0.

Suggested reviewers

  • lucacillario
  • thlorenz
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bmuddha/fix/config

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7ad98f and dd278e1.

📒 Files selected for processing (3)
  • magicblock-api/src/magic_validator.rs (1 hunks)
  • magicblock-config/src/config/validator.rs (0 hunks)
  • magicblock-config/src/consts.rs (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Manual Deploy Available

You can trigger a manual deploy of this PR branch to testnet:

Deploy to Testnet 🚀

Alternative: Comment /deploy on this PR to trigger deployment directly.

⚠️ Note: Manual deploy requires authorization. Only authorized users can trigger deployments.

Comment updated automatically when the PR is synchronized.

and use saturating sub for accountsdb slot
@bmuddha bmuddha force-pushed the bmuddha/fix/config branch from d7ad98f to dd278e1 Compare December 3, 2025 11:56
@bmuddha bmuddha merged commit 1c9018d into master Dec 3, 2025
3 of 4 checks passed
@bmuddha bmuddha deleted the bmuddha/fix/config branch December 3, 2025 11:56
thlorenz added a commit that referenced this pull request Dec 4, 2025
* master:
  chore: update toolchain and fix clippy (#708)
  fix: set default base fee to 0 (#716)
  fix: use svm with program cache fix (#712)
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.

3 participants