Repository navigation
Conversation
a717ac1 to
b4cc29f
Compare
|
Rebased to revendor libsimplicity |
|
ACK b4cc29f; Ran through local tests and fuzzing |
There was a problem hiding this comment.
Note
🤖 Claude Opus 5.5 responding on behalf of @KyrylR
Superseded by the inline review: #405 (review)
|
Ran some of my AIs on the PR This is a pilot test, so if you think that this "batch" is bad and distributing or you would like to see it in a different way, pls let me know for the future |
KyrylR
left a comment
There was a problem hiding this comment.
Note
🤖 Claude Opus 5.5 responding on behalf of @KyrylR
@KyrylR authorized posting this review. It was written by AI reviewers: ten independent reviews of b4cc29f, each in its own worktree. Each inline comment ends with an "Agreed by" line naming the AI reviewers that reported it independently. Opus 5.5 = Claude Opus 5.5 (×2), Mythos = Claude Mythos 5.2, Fable = Claude Fable 5.2, Astra = GPT-6 Astra (×3), Sol = GPT-6.1 Sol (×3).
The generated Bitcoin CMR and cost tables are correct; the padding API and the hand-written FFI block need changes, as described in the 9 inline comments.
Checked and correct:
- All 428 CMRs and costs match the vendored
bitcoin/primitiveJetNode.inc, with 0 mismatches across independent parsers. 3f0bb69..4e0beb5changes onlyGenRustJets.hs, andupdate_jets.sh --checkpasses.- Elements budget and padding results are identical to the old encoder-based code.
- Tests pass for every feature combination and on MSRV 1.74; clippy
-D warnings, fmt and docs are clean.
The tables commit (ffd1c22) could land on its own.
|
Pushed some updates for the review comments, feel free to pick this up @KyrylR thanks |
Update the vendored libsimplicity to 4e0beb5947b7e75ee7974d82a1447e89a0b4b5d6 and regenerate the jet files with update_jets.sh
Co-authored-by: Kyryl R <kyryl.ryabov@gmail.com>
Co-authored-by: Kyryl R <kyryl.ryabov@gmail.com>
43bd4ed to
4c2d1b4
Compare
|
To simplify the scope, I decided to create this #409 |
| /// The budget is the serialized size of the witness stack, in weight units, plus 50 weight units. | ||
| /// Bitcoin and Elements serialize a witness stack the same way. | ||
| /// A CompactSize item count, then each item with a CompactSize length prefix. | ||
| #[cfg(feature = "bitcoin")] |
There was a problem hiding this comment.
It is like so, because in Cargo.toml we have this:
elements = ["dep:elements", "bitcoin"]
Co-authored-by: Kyryl R <kyryl.ryabov@gmail.com>
Co-authored-by: Kyryl R <kyryl.ryabov@gmail.com>
4c2d1b4 to
0d5ffb1
Compare
Includes and supercedes #386 #387 #388
Implements the rest of the Bitcoin jet environment from #331: the
cost()andcmr()stubs for Bitcoin jets are replaced with full tables derived from the canonicalprimitiveJetNode.incin libsimplicity, covering all 428 jets in the Bitcoin jet set.Splits
Cost::get_paddinginto a chain-agnosticget_padding_sizeplus a chain-specificget_padding_bytes. While Elements uses an annex item ([0x50]+ zeros), Bitcoin must pad with a plain all-zero stack item.Also declares the FFI bindings for the env-context Bitcoin jets (with tests exercising them against a real transaction environment) and drops the now-unnecessary
Arcs in environments.Closes the remaining gaps in
RedeemNode::prune(): the Rust Bit Machine can now execute Bitcoin jets against a realCTxEnvin order to rewrite dead case branches into asserts.Draft until I figure out how to resolve this with upstream code generation for simplicity-sys/src/c_jets/c_env/bitcoin.rs