Repository navigation
Add bip360-spend-verify RL environment - #5
Merged
Merged
Conversation
Tool-use environment for Prime Intellect's Environments Hub: the model validates a BIP 360 script-path spend and names the first rule it breaks. Labels come from p2mr.py; invalid cases mirror real bug classes the lab found (over-depth control blocks, padded elements, parity). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBPzBYP67FvgjFczj4GVZ1
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.
Requested by Ash · project thread
Before: the lab's findings could only be used as a test suite for implementations.
After: the same findings also make up an RL/eval environment for Prime Intellect's Environments Hub. A model gets one BIP 360 script-path spend and a
tagged_hashtool, and has to say whether consensus accepts the spend and which rule fails first.The invalid cases follow real bug classes this lab found: over-depth control blocks (fixed in bitcoin/bips#2273, and still present in bitcoinjs-lib #2312), padded zero elements, parity, flipped path or script bytes, and wrong leaf versions. Labels come from
p2mr.py.How:
environments/bip360_spend_verify/contains the generator, a vendored copy ofp2mr.py, and tests. The tests check that the labels balance across all five codes, that they recompute exactly, and that the vendored file still matches the rootp2mr.py. A literal reading of the system prompt, run with only the tool, matches all 400 tested labels. The environment loads under verifiers 0.3.1, and its reward functions score sample answers correctly.🤖 Generated with Claude Code
https://claude.ai/code/session_01PBPzBYP67FvgjFczj4GVZ1
Generated by Claude Code