aiken-lang / aiken

A modern smart contract platform for Cardano
https://aiken-lang.org
Apache License 2.0
468 stars 91 forks source link

aiken tx rerun with traces inplace #963

Closed waalge closed 1 month ago

waalge commented 3 months ago

What is your idea? Provide a use case.

I'm running top quality dapp. Tracing is off, obvs. Tx fails with plutus error. Eeeek. Can't diagnose - no tracing. But i have very cleverly dumped the tx as cbor. Now I ask aiken to run the problematic script again, but rather than run the original script, run a build of the script with tracing on.

Why is it a good idea?

Tracing where its needed.

What is the current alternative and why is it not good enough?

Crying / leaving tracing always on.

MicroProofs commented 3 months ago

I agree with this but wonder if it should be an offchain mechanism rather than through Aiken

rvcas commented 2 months ago

Yea honestly, might be better to remove aiken tx entirely

waalge commented 2 months ago

Fair

KtorZ commented 2 months ago

Orthogonal to whether aiken tx is still relevant, I like the idea of re-running with traces. It shouldn't fundamentally be too complicated, especially without any semantic change to the program. But I would even push the idea a bit further and simply allow re-running a transaction with a different validator? So one may even swap out an entire chunk of logic, and see if the results are different.

It becomes tricky with multiple validators referencing one another, but it also sounds doable for many scenario to just swap reference hashes on the fly in compiled PLC 🤔