Add deposit worker integration test, pin deps, add key rotation - #1011
Open
evans-storm wants to merge 1 commit into
Open
Add deposit worker integration test, pin deps, add key rotation#1011evans-storm wants to merge 1 commit into
evans-storm wants to merge 1 commit into
Conversation
Closes kellymusk#896, kellymusk#897, kellymusk#898. - kellymusk#896: Add tests/deposit_worker_flow.rs — creates a wallet, mocks BlockchainListener with a fake deposit, runs poll_once (now pub), and verifies the payment row and XLM balance are created correctly, plus that re-polling the same tx_hash does not double-record or double-credit. - kellymusk#897: Every direct dependency in Cargo.toml now pins an exact version (matching what Cargo.lock already resolved to), not a caret range. Cargo.lock stays committed as the source of truth for transitive versions. Added .github/workflows/cargo-lock-check.yml running `cargo check --locked` so a Cargo.toml bump without a regenerated lockfile fails CI instead of silently drifting. - kellymusk#898: Added `--rotate-key`, re-encrypting every wallet's secret_key_encrypted from WALLET_ENCRYPTION_KEY to WALLET_ENCRYPTION_KEY_NEW. Documented why this is safe without downtime today (nothing in the live server decrypts a wallet secret yet) and what would need to change once that's no longer true. A row that fails to decrypt with the old key is left untouched and reported, so a partial rotation is safe to re-run. Also fixes a pre-existing extractor.rs compile break (ApiError gained a `field` member; two call sites weren't updated), needed for this branch to build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MufZfphu6ouEFfuYyJxdwA
|
@evans-storm 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #896
closes #897
closes #898
tests/deposit_worker_flow.rs: creates a wallet, mocksBlockchainListenerwith a fake deposit, runspoll_once(nowpub), and verifies the payment row and XLM balance are created correctly. A second test confirms re-polling the sametx_hashdoesn't double-record the payment or double-credit the balance.Cargo.tomlnow pins an exact version (matching whatCargo.lockalready resolved to), not a caret range.Cargo.lockstays committed as the source of truth for transitive versions. Added.github/workflows/cargo-lock-check.ymlrunningcargo check --lockedso aCargo.tomlbump committed without regenerating the lockfile fails CI instead of silently drifting.--rotate-key, re-encrypting every wallet'ssecret_key_encryptedfromWALLET_ENCRYPTION_KEYtoWALLET_ENCRYPTION_KEY_NEW. Documented why this is safe without downtime today (nothing in the live server decrypts a wallet secret yet — see the doc comment onsrc/rotate_key.rs) and what would need to change once that's no longer true. A row that fails to decrypt with the old key is left untouched and reported, so a partial rotation is safe to re-run.Also fixes a pre-existing
extractor.rscompile break (ApiErrorgained afieldmember; two call sites weren't updated), needed for this branch to build.Test plan
tests/deposit_worker_flow.rsadded per Add integration test for deposit detection worker #896's scope.