fix: broken tests - #1641
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThese changes implement size validation for WASM template binaries during publishing. A new error variant is introduced to handle oversized binaries, a pre-flight size check is integrated into the template publishing flow, and tests are updated to verify the new behavior with support for unsafe test data construction. Changes
Sequence DiagramsequenceDiagram
participant Client
participant PublishTemplate
participant SizeCheck
participant WasmModule
participant TxError
Client->>PublishTemplate: publish_template(binary)
PublishTemplate->>SizeCheck: Check binary.len() vs ENGINE_LIMITS
alt Binary exceeds max size
SizeCheck->>TxError: WasmBinaryTooBig { size, max }
TxError->>Client: Return Error
else Binary within limits
SizeCheck->>WasmModule: Load & validate template
WasmModule->>PublishTemplate: Success
PublishTemplate->>Client: Return Ok(tx_id)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Forgot to push fixes in #1640
Summary by CodeRabbit