Skip to content

chore(moolah-vault): increase MAX_QUEUE_LENGTH from 100 to 1000 - #222

Open
razww wants to merge 2 commits into
masterfrom
chore/increase-max-supply-queue-length
Open

chore(moolah-vault): increase MAX_QUEUE_LENGTH from 100 to 1000#222
razww wants to merge 2 commits into
masterfrom
chore/increase-max-supply-queue-length

Conversation

@razww

@razww razww commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Increases the hardcoded maximum supply/withdraw queue length in MoolahVault from 100 to 1000.

  • src/moolah-vault/libraries/ConstantsLib.sol: MAX_QUEUE_LENGTH 1001000

This constant caps both the supply and withdraw queues, enforced in:

  • MoolahVault.setSupplyQueue (MoolahVault.sol:245)
  • MoolahVault.updateWithdrawQueue (MoolahVault.sol:643)

Both now allow up to 1000 markets in the queue.

Testing

  • forge build passes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hashdit-bot

hashdit-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

Pull Request Review

This Solidity PR increases MAX_QUEUE_LENGTH in ConstantsLib from 100 to 1000. As a result, MoolahVault can permit up to 1000 markets in its supply and withdrawal queues.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

Decouple NB_MARKETS from ConstantsLib.MAX_QUEUE_LENGTH so the shared vault
setUp no longer creates 1001 markets per test. Rewrite
testAcceptCapMaxQueueLengthExceeded to create markets on demand and enable
them via direct setCap (O(n)) instead of the supply-queue-rebuilding helper
(O(n^2)), which blew up at MAX_QUEUE_LENGTH=1000.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hashdit-bot

hashdit-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

Pull Request Review

This Solidity PR increases MoolahVault’s maximum supply and withdrawal queue length from 100 to 1000 markets. It also updates the Foundry tests to create queue-boundary markets on demand while keeping the shared test setup fixed at 100 markets.

Sensitive Content

No sensitive content detected.

Security Issues

No serious security issues detected.


Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits.

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.

1 participant