Skip to content

fix:fix transactional receipt handling and improve public docs#1

Merged
mattwend merged 7 commits intomainfrom
fix/minor_gaps
Apr 15, 2026
Merged

fix:fix transactional receipt handling and improve public docs#1
mattwend merged 7 commits intomainfrom
fix/minor_gaps

Conversation

@mattwend
Copy link
Copy Markdown
Owner

Summary

This PR improves API documentation, cleans up app display helpers, fixes VM host read sizing, and makes receipt persistence transactional.

Changes

  • document public receipt fields
  • share short display helpers in the app layer
  • fix VM host reads to use the static address size
  • keep receipt updates transactional when mined batches fail
  • document JSON argument encoding in the REPL
  • enforce rustdoc coverage for public API items

Behavior change

Receipt handling is now transactional:

  • failed mined batches do not append a new receipt batch
  • previously successful receipt batches remain intact

Add field-level documentation for Receipt to match the rest of the public API surface and keep rustdoc coverage consistent.
Extract duplicated short address and hash formatting helpers into the app module so the demo and REPL present identifiers consistently from one implementation.
Replace the runtime Address::default().len() call with size_of::<Address>() so host memory reads express the fixed address width directly.
Only persist receipts after a mined batch succeeds so failed executions roll back receipt side effects together with chain and state changes. Update tests to assert the transactional contract.
Document the narrow JSON-to-Borsh mapping used by the REPL so callers understand which value shapes are accepted and why objects are rejected.
Add deny(missing_docs) and document the remaining public modules and API types so documentation coverage becomes an enforced repository standard.
Why: capture the fixes, refactors, and documentation updates that are shipping in the next patch release.
@mattwend mattwend self-assigned this Apr 15, 2026
@mattwend mattwend merged commit aa5e0fa into main Apr 15, 2026
2 checks passed
@mattwend mattwend deleted the fix/minor_gaps branch April 15, 2026 07:11
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.

1 participant