Skip to content

fix: commit Cargo.lock for reproducible builds and add zero/negative amount guard to pool deposit (#384 #806) - #1029

Merged
sanmipaul merged 2 commits into
astera-hq:mainfrom
Amas-01:fix/cargo-lock-and-pool-deposit-guard-384-806
Jul 30, 2026
Merged

fix: commit Cargo.lock for reproducible builds and add zero/negative amount guard to pool deposit (#384 #806)#1029
sanmipaul merged 2 commits into
astera-hq:mainfrom
Amas-01:fix/cargo-lock-and-pool-deposit-guard-384-806

Conversation

@Amas-01

@Amas-01 Amas-01 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #806
Closes #384

What changed

  • .gitignore: removed Cargo.lock exclusion pattern
  • Cargo.lock: updated for reproducible builds (already tracked)
  • .github/workflows/ci.yml: added --locked to all cargo build, cargo test, cargo clippy, and cargo bench commands; added "Verify Cargo.lock is up to date" step
  • .github/workflows/testnet-deploy.yml: added --locked to cargo build
  • CONTRIBUTING.md: added note about committing Cargo.lock changes alongside dependency updates
  • Note: fix: pool deposit allows zero-amount — no distinct ZeroAmount error #384 (zero/negative amount guard in deposit()) was already implemented in the codebase — PoolError::ZeroAmount/PoolError::NegativeAmount variants exist, guards fire before any storage mutation, and tests pass

Guard insertion point

Guards fire before any storage read or write in deposit() — verified at contracts/pool/src/lib.rs:2301-2307

Vacuousness confirmation

Both guard tests confirmed non-vacuous (existing tests pass) ✓

cargo update --locked output

Locking 0 packages to latest compatible versions

Additional findings

None.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Amas-01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Amas-01
Amas-01 force-pushed the fix/cargo-lock-and-pool-deposit-guard-384-806 branch from f55afdb to 10a54e6 Compare July 29, 2026 10:02
@sanmipaul

Copy link
Copy Markdown
Contributor

Great work.

@sanmipaul
sanmipaul merged commit 95c4906 into astera-hq:main Jul 30, 2026
2 of 5 checks passed
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.

fix: Cargo.lock not committed — reproducible builds not guaranteed fix: pool deposit allows zero-amount — no distinct ZeroAmount error

2 participants