You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue with traiiling bytes ( RPC error -26 Trailing bytes after final byte of witness) after #389
When I was migrating the simplicityhl-std repo to an up-to-date version of Simplex to implement fuzz tests, I encountered this error
Error: Broadcast failed with HTTP 400 for http://127.0.0.1:52982/tx: sendrawtransaction RPC error -26: non-mandatory-script-verify-flag (Trailing bytes after final byte of witness)
Nearly all tests with a running local node fail, while in the previous version everything was fine.
After some investigation, I found that SimplicityHL 0.8.0 bumped simplicity-lang to version 0.9.0.
This PR introduced this bug: #379.
This bug can be reproduced in version 0.1.0 of Simplex, and error was introduced in BlockstreamResearch/smplx#166 after the SimplicityHL version bump to 0.8.0 a2d0c4e.
witness-encoding-regression.patch is a minimal example with a test (this path is included in a previous one. It just requires changes in the Simplex API to reproduce it).
git apply dev-witness-reproduction.patchsimplex cleansimplex buildcargo test --test assert_eq_128_witness_encoding_roundtrip -- --nocapture
The problem occurs before Elements validates the transaction.
Pruning retains unused witness data, producing extra bytes in the serialised witness.
The reproducer executes and prunes the actual stdlib assertion contract, serialises the result, then confirms that Rust’s own RedeemNode::decode rejects it.
No Elements or electrs process is needed to reproduce the failure.
If there is some issue with pruning then please describe the actual bug and ideally provide some sort of reproduction. Also, please do not post LLM-generated textwalls.
Activity
apoelstra commentedon Oct 13, 2026
Why is this issue on rust-simplicity? This crate has no HTTP support.
apoelstra commentedon Oct 13, 2026
If there is some issue with pruning then please describe the actual bug and ideally provide some sort of reproduction. Also, please do not post LLM-generated textwalls.
ikripaka commentedon Oct 13, 2026
Ok, I'll redo it soon