Conversation
3esmit
added this pull request to stack #337
September 14, 2026 14:16
3esmit
force-pushed
the
feat/stablecoin-module-user-journeys
branch
2 times, most recently
from
September 14, 2026 14:36
c0ede1f to
c3ee697
Compare
3esmit
force-pushed
the
feat/stablecoin-module-user-journeys
branch
from
September 14, 2026 14:37
c3ee697 to
39ccef3
Compare
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.
Problem
The stablecoin module stack exposes global-state reads, redemption-rate quotes, and permissionless refresh plans. Existing tests cover individual API mappings, but do not exercise the account state transitions a user or keeper sees across several calls.
This PR adds stateful user-history coverage. Each journey keeps protocol parameters, the stability-fee accumulator, redemption-price state, oracle data, and clock data in memory. It builds a transaction plan through the public FFI API, decodes the serialized instruction, executes the native stablecoin handler, and feeds the post-state into the next read.
Journeys
u128/i128boundary serialization.Implementation
modules/stablecoin/ffi/src/api/journeys.rswith seven end-to-end user-history tests at the FFI/native-program seam.stablecoin_ffi.stablecoin_ffilibrary; the existing mock-based module suite remains unchanged.078f5b6cstartup global-state journey31406961fee accrual journey3c836760controller update journey8c74fed5blocked update recovery2a5a784fstale quote retry2bccf9b2account recovery journey39ccef34long idle journeyStacked on #340, following #339, #338, #333, and #332.
Validation
RISC0_DEV_MODE=1 cargo +1.94.0 test --workspace --exclude integration_testsRISC0_DEV_MODE=1 cargo +1.94.0 test -p integration_testsRISC0_DEV_MODE=1 cargo +1.94.0 test -p stablecoin_ffiRISC0_DEV_MODE=1 cargo +1.94.0 test -p stablecoin_programRISC0_SKIP_BUILD=1 cargo +1.94.0 clippy --workspace --all-targets -- -D warningscargo +nightly fmt --all -- --checktaplo fmt --check .nix build path:.#stablecoin-module-tests --no-link -Lnix build path:.#stablecoin-module --no-link -L