Repository navigation
Conversation
…ipt Lab)
/transactions/{hash}/fork rebuilds a transaction and lets you change it: redeemers and spent
datums (JSON in the detailed schema, or CBOR), required signers, the validity range, outputs
(address, ADA, tokens, removal), mint, withdrawals, fee, and the rules (another epoch's cost
model, protocol 10 or 11). Every script runs again shortly after each edit, next to the on-chain
result, with CPU/memory changes and "now passes" / "now fails" when an outcome flips.
- replay/fork.ts applies edits to the store-shaped transaction before it is rebuilt, so ledger
order, purposes, the julc#244 context fixes and the redeemer map stay consistent.
- Forked runs open in the debugger inline (it now accepts a prepared run).
- Any run, on chain or forked, exports as a JSON fixture: script, target, cost model, limits,
VM arguments, ScriptContext CBOR, expected result and the fork's edits.
- Older epochs' cost models are shorter; the lab says when julc fills the missing builtin costs.
- "Fork this transaction" link on the Scripts tab.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 of 72 tasks
|
Initial automated review · Aster Hi @satran004, thanks for the PR! 🙏 This is an automatic first check by an AI reviewer. It does not replace maintainer review and may be wrong. Reviewed commit: Issues found:
Not tested: Static review only; type checks, Vitest, Playwright and live julc/Yaci Store execution were not run. GitHub reported no checks for this commit. |
This branch has not been deployed
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.
Stacked on #209. Part of #207: PR 4 of the Script Lab series, the what-if lab.
What users get
/transactions/{hash}/fork("Fork this transaction" on the Scripts tab) rebuilds a transaction from Yaci Store and lets you change it. Every script runs again about a quarter of a second after each edit, next to the on-chain result.What you can edit:
{constructor, fields},{int},{bytes},{list},{map}), with readable integers, or as raw CBORWhat you see:
What you can do with a run:
Nothing is submitted; the fork exists only in the browser.
How
replay/fork.ts: edits are applied to the store-shaped transaction before it is rebuilt. Ledger ordering, purposes, the julc#244 context corrections and the complete redeemer map therefore stay consistent for every script without special cases. Unit-tested on a recorded Mainnet transaction.prepared,syncUrl) for forks, and hides "Link to this step", since a fork isn't addressable by URL.Example (Mainnet withdraw-zero transaction
1da5cd…)Constr 0 []makes it Now fail (HeadList: empty list, −99% CPU); the two spend scripts are unaffected.Not included
A julc-testkit Java snippet in the export. Loading a script from CBOR spans julc modules (one is in the decompiler), so a generated snippet would be fragile. The JSON fixture is language-neutral.
Tests
npm run check: 0 errors, 0 warnings.script-lab.spec.ts: all 4 tests pass against a production build in Chrome. The new one covers an edit, the summary, invalid JSON, Reset and a fixture download.🤖 Generated with Claude Code