Skip to content

cooked-node-backend - #536

Draft
mmontin wants to merge 39 commits into
mainfrom
mm/cooked-node-backend
Draft

cooked-node-backend#536
mmontin wants to merge 39 commits into
mainfrom
mm/cooked-node-backend

Conversation

@mmontin

@mmontin mmontin commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@mmontin
mmontin force-pushed the mm/cooked-node-backend branch 5 times, most recently from 58ab7ac to de4e6a8 Compare August 5, 2026 14:51
mmontin and others added 11 commits August 5, 2026 23:12
Introduce a `SomeTxSkelOutDatumHash` constructor for `TxSkelOutDatum`
representing an output datum known only by its hash, and propagate it
throughout the codebase:

- Datum.hs: Eq/Ord, kind/typed optics, datum-hash fold and ToOutputDatum
- GenerateTx/Output.hs: emit a TxOutDatumHash
- GenerateTx/Input.hs: throw the new MCESpendingHashOnlyDatum error when a
  spending witness would require the (absent) datum content
- State.hs: mirror it with a new UtxoPayloadDatumHash constructor
- Pretty printers for the skeleton, UTxO state and the new error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce a `UserScriptHash Api.ScriptHash` constructor for `User`,
allowing outputs to be paid to a bare script hash via `receives`. Since
such an owner carries no script body or version, spending it recovers the
full script from the redeemer's reference input and errors with the new
`MCESpendingHashOnlyScript` otherwise. `userVScriptL` is narrowed to
`User IsScript Redemption` accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mmontin
mmontin force-pushed the mm/cooked-node-backend branch from be3d00b to bf2f707 Compare August 5, 2026 21:14
@mmontin
mmontin force-pushed the mm/cooked-node-backend branch from d485d7c to 89a51ba Compare August 6, 2026 15:57
@mmontin
mmontin force-pushed the mm/cooked-node-backend branch from 89a51ba to e086e9b Compare August 6, 2026 18:51
@mmontin
mmontin force-pushed the mm/cooked-node-backend branch from 360b64f to e2898ff Compare August 7, 2026 23:04
@mmontin
mmontin force-pushed the mm/cooked-node-backend branch 2 times, most recently from d597a42 to 2d5085a Compare August 11, 2026 19:25
@mmontin
mmontin force-pushed the mm/cooked-node-backend branch from 2d5085a to abc80a7 Compare August 11, 2026 19:40
mmontin and others added 19 commits August 12, 2026 14:38
Distinguish effect interpreters by name rather than by an `Emul`/`Node`
suffix: the emulated interpreters keep the `MockChain` prefix
(runMockChainReadConf, runMockChainTime, runMockChainReadChain,
runMockChainSubmit) while the node interpreters use a `BlockChain` prefix
(runBlockChainReadConf, runBlockChainTime, runBlockChainReadChain,
runBlockChainSubmit).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the contents of src/Cooked/MockChain/ one level up into src/Cooked/,
renaming the Cooked.MockChain.* module prefix to Cooked.*. Remove the
Cooked.MockChain umbrella module; the top-level Cooked umbrella now imports
each piece directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename src/Cooked/Common.hs to src/Cooked/Aliases.hs and the module
Cooked.Common to Cooked.Aliases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move src/Cooked/Testing.hs to src/Cooked/Run/Testing.hs and rename the
module Cooked.Testing to Cooked.Run.Testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the contents of Cooked.UtxoSearch into Cooked.Effect.Read.Chain and
delete the now-empty UtxoSearch module. The UTxO search DSL naturally belongs
with the chain-reading effect it is built upon.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename src/Cooked/Run/ to src/Cooked/MockChain/ and the Cooked.Run.* modules
(Instances, Runnable, Tweak, Testing) to Cooked.MockChain.*, so the MockChain
namespace now holds only the emulated-blockchain-specific running code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce Cooked.BlockChain.Instances and Cooked.BlockChain.Runnable as the
node-backend counterparts of the Cooked.MockChain running modules. They are
currently empty placeholders.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce one umbrella module per directory, following the existing
umbrella convention, and make the top-level Cooked module re-export
these umbrellas instead of the individual submodules. This also exposes
the previously unexported Cooked.Effect.Log, Cooked.Effect.Submission
and Cooked.BlockChain.* modules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…onvention

Group the transverse utilities (Aliases, Families, Wallet, ShowBS) into a
new Cooked.Utilities directory with a Cooked.Utilities umbrella module, and
move Cooked.Ltl into Cooked.MockChain.Ltl (re-exported from the MockChain
umbrella). The top-level Cooked module now re-exports these umbrellas.

Document the umbrella-module organization convention in CONTRIBUTING.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Flatten the Effect/Read/ sub-directory into Effect/ and rename the three
weakly-named modules: Read.Chain -> Query, Read.Conf -> Params, Write ->
Override.

Since every effect is backend-agnostic (it has both a runMockChain* and a
runBlockChain* interpreter), drop the misleading MockChain prefix from the
effect types themselves: MockChainReadChain -> Query, MockChainReadConf ->
Params, MockChainWrite -> Override, MockChainLog -> Log, MockChainMisc ->
Misc, MockChainSubmit -> Submit, MockChainTime -> Time, MockChainValidate ->
Validate. Interpreters keep the run<Backend><Effect> convention.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Runtime types are no longer MockChain-specific (they are shared with the
BlockChain backend), so drop the misleading MockChain prefix: MockChainError
-> ChainError, MockChainJournal -> ChainJournal, runFailInMockChainError ->
runFailInChainError. The plain Error name is avoided because it would clash
with Polysemy.Error, which is used unqualified throughout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant