Skip to content

fix(storage): suppress bootstrap fallback on reads - #671

Open
Hikmaholadele wants to merge 6 commits into
Betta-Pay:mainfrom
Hikmaholadele:fix/issue-485-bootstrap-fallback-read-path
Open

fix(storage): suppress bootstrap fallback on reads#671
Hikmaholadele wants to merge 6 commits into
Betta-Pay:mainfrom
Hikmaholadele:fix/issue-485-bootstrap-fallback-read-path

Conversation

@Hikmaholadele

Copy link
Copy Markdown
Contributor

Closes #485
Summary

Prevent bootstrap_fallback from being emitted as a side effect of read-only rule resolution.

Changes

  • Removed bootstrap_fallback emission from read_rule_or_default.
  • Added explicit bootstrap detection to the relevant mutating paths so unconfigured deployments are still signaled when storing or setting settlement rules.
  • Updated the event conformity tests.
  • Added a regression test confirming that read paths do not emit bootstrap_fallback.

Closes #485

Remove bootstrap_fallback event emission from read_rule_or_default,
making it a pure resolution function. Add explicit emission to the
mutating entry points that call it (store_payment_reference,
set_settlement_rule, and _set_settlement_rule) when the resolved
rule equals BOOTSTRAP_DEFAULT_RULE.

This fixes the issue where pure read paths (calculate_fee_split,
get_settlement_rule, etc.) emitted bootstrap_fallback as a side
effect, causing false "unconfigured deployment" signals for indexers
and unnecessary event churn.

Read-only callers (calculate_fee_split) no longer emit any events.
Mutating callers continue to signal unconfigured deployments when
appropriate.

Closes Betta-Pay#485

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

Hikmaholadele and others added 3 commits August 28, 2026 13:53
Add missing SettlementContractClient and Env imports in timelock_tests.rs
and fix the schedule() call in integration_tests.rs to pass Vec<Address>
instead of a bare Address. Run cargo fmt --all for workspace formatting.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…min_tests

Fixes clippy error on Betta-Pay#671 branch.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@Hikmaholadele

Copy link
Copy Markdown
Contributor Author

Hi, this workflow is currently waiting for maintainer approval. Could you please approve it so the workflow can proceed? Thank you.

Hikmaholadele and others added 2 commits August 31, 2026 09:12
Fix compilation errors from API changes merged from main:
- Add missing deployer parameter to init() calls in settlement and governance tests
- Fix _env/env variable naming mismatch in governance tests
- Fix soroban_sdk::vec! macro syntax in governance tests
- Add missing executor parameter to execute() calls in timelock tests
- Import GovernanceContract/GovernanceContractClient from governance_contract
- Add missing Symbol/Events/FromVal imports for test assertions
- Fix governance FeeConfig type reference
- Fix BOOTSTRAP_DEFAULT_RULE import in payments.rs
- Fix Symbol::into() to use IntoVal in storage.rs
- Remove unused imports and prefix unused variables with underscore
- Apply cargo fmt formatting across workspace

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
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.

read_rule_or_default emits bootstrap_fallback as a side effect of any read resolution

1 participant