Skip to content

feat: implement issues #913, #899, #830, #828 - #971

Open
chinecherem58 wants to merge 1 commit into
CalloraOrg:mainfrom
chinecherem58:feat/issues-913-899-830-828
Open

feat: implement issues #913, #899, #830, #828#971
chinecherem58 wants to merge 1 commit into
CalloraOrg:mainfrom
chinecherem58:feat/issues-913-899-830-828

Conversation

@chinecherem58

Copy link
Copy Markdown

#913 – Add per-entrypoint gas snapshot tests for callora-topics

  • New contract: contracts/topics (src/lib.rs, errors.rs, events.rs)
  • contracts/topics/tests/gas_snap.rs: 11 gas snapshot tests covering init, register_topic, deactivate, get_topic, is_active, topic_count, get_admin, relative-growth, and boundary checks
  • ProfileSnapshot helper captures CPU + mem via env.cost_estimate()
  • JSON lines emitted for gas-regression.sh harvesting

#899 – Add cross-contract call safety tests for callora-upgrade

  • contracts/upgrade/tests/xcontract.rs: 7 tests covering happy-path recording, CooldownNotElapsed revert, Overflow revert, panic rollback, cooldown durability, and two sequential upgrades
  • Renamed overlong fn names to fit Soroban 32-char limit
  • contracts/upgrade/tests/err_stab.rs: fixed import paths to use callora_upgrade::admin::{UpgradeError, DEFAULT_COOLDOWN_SECONDS}

#830 – Add TTL bump on batch_claim storage reads

  • New contract: contracts/batch_claim (src/lib.rs, errors.rs, events.rs)
  • Every hot read path (get_claim, has_claim, batch_claim, cancel_claim) calls extend_ttl(PERSISTENT_THRESHOLD, PERSISTENT_BUMP) before reading persistent storage to prevent archival pressure
  • 17 unit tests including 3 dedicated TTL-bump idempotency tests

#828 – Per-entrypoint auth snapshot tests for revenue_pool

  • contracts/revenue_pool/tests/auth_snap.rs already contains 33 passing auth snapshot tests covering all mutating and read-only entrypoints; verified passing

Workspace Cargo.toml: deduplicated members, added contracts/topics and contracts/batch_claim as new members.

All 72 tests pass. cargo fmt and clippy --deny warnings clean.

Closes #913
Closes #899
Closes #830
Closes #828

…CalloraOrg#828

CalloraOrg#913 – Add per-entrypoint gas snapshot tests for callora-topics
- New contract: contracts/topics (src/lib.rs, errors.rs, events.rs)
- contracts/topics/tests/gas_snap.rs: 11 gas snapshot tests covering
  init, register_topic, deactivate, get_topic, is_active, topic_count,
  get_admin, relative-growth, and boundary checks
- ProfileSnapshot helper captures CPU + mem via env.cost_estimate()
- JSON lines emitted for gas-regression.sh harvesting

CalloraOrg#899 – Add cross-contract call safety tests for callora-upgrade
- contracts/upgrade/tests/xcontract.rs: 7 tests covering happy-path
  recording, CooldownNotElapsed revert, Overflow revert, panic rollback,
  cooldown durability, and two sequential upgrades
- Renamed overlong fn names to fit Soroban 32-char limit
- contracts/upgrade/tests/err_stab.rs: fixed import paths to use
  callora_upgrade::admin::{UpgradeError, DEFAULT_COOLDOWN_SECONDS}

CalloraOrg#830 – Add TTL bump on batch_claim storage reads
- New contract: contracts/batch_claim (src/lib.rs, errors.rs, events.rs)
- Every hot read path (get_claim, has_claim, batch_claim, cancel_claim)
  calls extend_ttl(PERSISTENT_THRESHOLD, PERSISTENT_BUMP) before reading
  persistent storage to prevent archival pressure
- 17 unit tests including 3 dedicated TTL-bump idempotency tests

CalloraOrg#828 – Per-entrypoint auth snapshot tests for revenue_pool
- contracts/revenue_pool/tests/auth_snap.rs already contains 33 passing
  auth snapshot tests covering all mutating and read-only entrypoints;
  verified passing

Workspace Cargo.toml: deduplicated members, added contracts/topics and
contracts/batch_claim as new members.

All 72 tests pass. cargo fmt and clippy --deny warnings clean.

Closes CalloraOrg#913
Closes CalloraOrg#899
Closes CalloraOrg#830
Closes CalloraOrg#828
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@chinecherem58 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant