Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
aaf8be7
fix(rs-platform-wallet): auto_select_inputs honors Σ inputs == Σ outputs
lklimek Apr 28, 2026
9ea9e70
fix(rs-platform-wallet): reserve fee headroom at DeductFromInput(0) t…
lklimek Apr 28, 2026
687b1f8
test(rs-platform-wallet): protocol-level reproduction of CodeRabbit f…
lklimek Apr 28, 2026
60f7850
refactor(rs-platform-wallet): sort auto-select candidates by balance …
lklimek Apr 28, 2026
9ff937f
fix(rs-platform-wallet): enforce min_input_amount, restrict fee_strat…
lklimek Apr 28, 2026
79c2b28
ci(rs-packages-filter): trigger Rust workspace tests on rs-platform-w…
lklimek Apr 28, 2026
d610502
Merge remote-tracking branch 'origin/v3.1-dev' into fix/rs-platform-w…
lklimek Apr 28, 2026
3c4f919
fix(rs-platform-wallet): clippy-clean for Rust 1.92 (workspace tests …
lklimek Apr 28, 2026
d0c772f
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek Apr 29, 2026
45779e3
docs(rs-platform-wallet): trim verbose comments in auto_select_inputs…
lklimek Apr 29, 2026
74b81d1
feat(rs-platform-wallet): support ReduceOutput(0) fee strategy in aut…
lklimek Apr 29, 2026
e16a819
Merge remote-tracking branch 'origin/v3.1-dev' into fix/rs-platform-w…
lklimek Apr 30, 2026
357ddb8
docs(rs-platform-wallet): note platform #3040 fee-estimation bug in R…
lklimek Apr 30, 2026
545fa99
Merge remote-tracking branch 'origin/v3.1-dev' into fix/rs-platform-w…
lklimek Apr 30, 2026
ea7810f
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 4, 2026
5e50a0b
fix(rs-platform-wallet): exclude output addresses from auto_select_in…
lklimek May 4, 2026
923992a
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 4, 2026
b6e7d05
chore(rs-platform-wallet): fix macOS clippy lints in manager/accessor…
lklimek May 4, 2026
ef4345a
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 5, 2026
376ef56
chore(rs-platform-wallet): remove stale QA-001-followup TODO
lklimek May 5, 2026
dac5a7a
feat(rs-platform-wallet): add address_derivation_info and fee_paid ac…
lklimek Apr 27, 2026
468e774
revert(rs-platform-wallet): drop test-only production additions; abso…
lklimek Apr 27, 2026
bdd46f3
fix(rs-platform-wallet): defensive checked arithmetic on Credits in t…
lklimek May 4, 2026
47997a2
refactor(rs-platform-wallet): collapse estimate_fee_for_inputs_pub wr…
lklimek May 4, 2026
f81cdf2
test(rs-platform-wallet): tighten non_fee_target_below_min_input_redi…
lklimek May 4, 2026
196f6c5
feat(rs-platform-wallet): typed OnlyOutputAddressesFunded error [CMT-…
lklimek May 4, 2026
b326a18
chore(rs-platform-wallet): drop useless vec! in detect_only_output_ad…
lklimek May 4, 2026
92bc962
chore(rs-platform-wallet): drop stray ManagedIdentitySigner re-export
lklimek May 5, 2026
6b530e5
ci: clean stale mac runner artifacts before rust tests
vivekgsharma May 5, 2026
bf99f0b
fix(rs-platform-wallet): saturating arithmetic on Credits in selector…
lklimek May 5, 2026
0cec379
fix(rs-platform-wallet): explicit runtime invariant checks in selecto…
lklimek May 5, 2026
61c6ab8
fix(rs-platform-wallet): rename OnlyOutputAddressesFunded to NoSelect…
lklimek May 5, 2026
d67fd1d
feat(rs-platform-wallet): balance-descending donor in ReduceOutput Ph…
lklimek May 5, 2026
07d046b
feat(rs-platform-wallet): borderline warn-log for ReduceOutput(0) cha…
lklimek May 5, 2026
7b45af2
refactor(rs-platform-wallet): extract select_inputs shared helpers + …
lklimek May 5, 2026
4853cf9
fix(rs-platform-wallet): split NoSelectableInputs into discrete varia…
lklimek May 5, 2026
fa3e676
fix(rs-platform-wallet): use saturating arithmetic for outputs aggreg…
lklimek May 5, 2026
00ac7f2
chore(rs-platform-wallet): document accepted-risk on selector heurist…
lklimek May 5, 2026
2dec6a6
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 6, 2026
6574b84
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 7, 2026
5ef1b44
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 8, 2026
e46d12a
refactor(platform-wallet/auto_select_inputs): inline helpers, collaps…
lklimek May 8, 2026
e986342
fix(rs-platform-wallet): pin unreachable selector branches with debug…
lklimek May 8, 2026
9e9d289
refactor(rs-platform-wallet): tighten transfer.rs narration, TODO lin…
lklimek May 8, 2026
eb68dba
fix(rs-platform-wallet): NoSelectableInputs Display omits zero-valued…
lklimek May 8, 2026
35f0e98
Merge branch 'v3.1-dev' into fix/rs-platform-wallet-auto-select-inputs
lklimek May 8, 2026
776cbd7
feat(rs-platform-wallet): output_change_address override on platform-…
lklimek May 8, 2026
22149b0
Merge remote-tracking branch 'origin/v3.1-dev' into fix/rs-platform-w…
lklimek May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/package-filters/rs-packages-no-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ wasm-sdk:
- packages/wasm-sdk/src/**
- packages/wasm-sdk/Cargo.toml
- *sdk

rs-platform-wallet:
- packages/rs-platform-wallet/**
- *sdk
48 changes: 47 additions & 1 deletion .github/workflows/tests-rs-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,53 @@ jobs:
with:
clean: false

- name: Free runner disk space
run: |
set -eo pipefail

echo "Disk before cleanup:"
df -h / "$GITHUB_WORKSPACE" "$RUNNER_TEMP" "${TMPDIR:-/tmp}" || true

RUNNER_ROOT=$(cd "$GITHUB_WORKSPACE/../../.." && pwd)
echo "Runner root: $RUNNER_ROOT"

if [ -d "$RUNNER_ROOT/_diag" ]; then
echo "Runner diagnostics before cleanup:"
du -sh "$RUNNER_ROOT/_diag" || true

find "$RUNNER_ROOT/_diag" -type f \( -name '*.log' -o -name '*.trace' \) -mtime +7 -print -exec rm -f {} + || true
find "$RUNNER_ROOT/_diag/blocks" "$RUNNER_ROOT/_diag/pages" -type f -mtime +2 -print -exec rm -f {} + 2>/dev/null || true

echo "Runner diagnostics after cleanup:"
du -sh "$RUNNER_ROOT/_diag" || true
fi

for dir in "$RUNNER_ROOT/_work/_temp" "${TMPDIR:-}"; do
if [ -n "$dir" ] && [ -d "$dir" ]; then
echo "Cleaning stale temp files in $dir"
find "$dir" -mindepth 1 -mtime +1 -print -exec rm -rf {} + 2>/dev/null || true
fi
done

for dir in target/llvm-cov-target target/nextest; do
if [ -d "$dir" ]; then
echo "Removing stale Rust test artifact cache: $dir"
du -sh "$dir" || true
rm -rf "$dir"
fi
done

AVAILABLE_KB=$(df -Pk "$GITHUB_WORKSPACE" | awk 'NR==2 {print $4}')
MIN_FREE_KB=$((80 * 1024 * 1024))
echo "Available workspace space: ${AVAILABLE_KB}KB"
if [ "${AVAILABLE_KB:-0}" -lt "$MIN_FREE_KB" ]; then
echo "Less than 80GB available; cleaning Rust target cache"
cargo clean || rm -rf target
fi

echo "Disk after cleanup:"
df -h / "$GITHUB_WORKSPACE" "$RUNNER_TEMP" "${TMPDIR:-/tmp}" || true

- name: Clean target if too large
run: |
SIZE=$(du -sm target 2>/dev/null | cut -f1 || true)
Expand Down Expand Up @@ -530,4 +577,3 @@ jobs:
fi
done
echo "No immutable/append_only structure violations found"

4 changes: 2 additions & 2 deletions packages/rs-platform-wallet/src/changeset/core_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ async fn build_core_changeset(
addresses_derived,
..
} => {
// Derive UTXO deltas BEFORE moving the record into `records`
// so we still have the per-record borrows.
// Derive UTXO deltas before moving the record into `records`
// so the per-record borrows are still live.
CoreChangeSet {
new_utxos: derive_new_utxos(record),
spent_utxos: derive_spent_utxos(record),
Expand Down
45 changes: 45 additions & 0 deletions packages/rs-platform-wallet/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use dpp::address_funds::PlatformAddress;
use dpp::fee::Credits;
use dpp::identifier::Identifier;
use key_wallet::Network;

Expand Down Expand Up @@ -72,6 +74,18 @@ pub enum PlatformWalletError {
#[error("Address operation failed: {0}")]
AddressOperation(String),

#[error("{}", format_no_selectable_inputs(funded_outputs, *sub_min_count, *sub_min_aggregate, *min_input_amount))]
NoSelectableInputs {
/// Funded addresses dropped by the input-equals-output filter.
funded_outputs: Vec<PlatformAddress>,
/// Number of addresses with a positive balance below `min_input_amount`.
sub_min_count: usize,
/// Aggregate of those sub-minimum balances.
sub_min_aggregate: Credits,
/// Per-input minimum from the active platform version.
min_input_amount: Credits,
},

#[error("Platform address not found in wallet: {0}")]
AddressNotFound(String),

Expand Down Expand Up @@ -137,6 +151,37 @@ pub enum PlatformWalletError {
ShieldedKeyDerivation(String),
}

/// Render the `NoSelectableInputs` diagnostic, omitting whichever failure
/// shape did not contribute (sub-min dust or funded-but-also-output) so
/// operators don't see misleading zero-valued fields.
fn format_no_selectable_inputs(
funded_outputs: &[PlatformAddress],
sub_min_count: usize,
sub_min_aggregate: Credits,
min_input_amount: Credits,
) -> String {
let mut parts: Vec<String> = Vec::with_capacity(2);
if !funded_outputs.is_empty() {
parts.push(format!("funded_outputs={funded_outputs:?}"));
}
if sub_min_count > 0 {
parts.push(format!(
"sub_min_count={sub_min_count} sub_min_aggregate={sub_min_aggregate} credits"
));
}
let body = if parts.is_empty() {
// Detector returns Some only when at least one shape applies; defensive.
"no funded inputs survived the auto-selection filter".to_string()
} else {
parts.join(" ")
};
format!(
"no selectable inputs for auto-selection: {body} \
(min_input_amount={min_input_amount}); rotate to a fresh receive address, \
consolidate funds, or use InputSelection::Explicit"
)
}

/// Check whether an SDK error indicates that an InstantSend lock proof was
/// rejected by Platform (e.g. the IS lock has expired).
///
Expand Down
2 changes: 0 additions & 2 deletions packages/rs-platform-wallet/src/wallet/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ impl PlatformWalletInfo {
drop(token_balances);

// 7. Recompute cached UI balance from the now-restored UTXO set.
// `update_balance` returns its own changeset internally; we
// discard it (apply does not re-emit).
use key_wallet::wallet::managed_wallet_info::wallet_info_interface::WalletInfoInterface;
self.core_wallet.update_balance();
// Mirror the recomputed balance into the lock-free Arc that the
Expand Down
Loading
Loading