Code Monkey home page Code Monkey logo

Comments (6)

ProofOfKeags avatar ProofOfKeags commented on July 20, 2024

I'd imagine this would be a SIMP "attachable at" the transaction template?

from sapio.

JeremyRubin avatar JeremyRubin commented on July 20, 2024

i think it could be a couple different areas, with different meanings...

e.g., at the Object --> all descendants should be emulated thus
at the guard --> this term in this guard should be emulated thus
at the template --> this template should be emulated thus

Maybe the guard is the best place for it?

from sapio.

ProofOfKeags avatar ProofOfKeags commented on July 20, 2024

What if we created an arm of Clause that has a dyn Emulated or something to that effect?

I'm less excited about locating it within the Object or Template I think on second thought. The reason being that the only benefit I can imagine is smaller resident memory. If we have that problem we can do the optimization later. Conceptually it belongs at the guard as best I can tell.

from sapio.

JeremyRubin avatar JeremyRubin commented on July 20, 2024

We can't modify Clause easily, since it's upstream rust-miniscript.

further, dyn Emulated can't go into the Clause AST since the miniscript policy needs to be able to parse from a script (kinda...).

from sapio.

ProofOfKeags avatar ProofOfKeags commented on July 20, 2024

Got it, maybe we need a different data structure at the guard level that does a pass translating a hypothetical dyn Emulated into a combination of SIMPs and Polcy fragments. I guess for now we can just do what we were going to do in the output of that pass now and then worry about a more unified and ergonomic approach later.

The reason I say this is that it would be preferred for users to not have to think about where exactly their intents get wired up into the technology stack. I'm imagining here that the ideal ergonomic interface for users is to have some single predicate language to express guards, and if the compiler is configured to handle certain predicates with emulation then it does the SIMP insertion itself.

It occurs to me, though, that this ticket isn't about the CTV emulation and so maybe I've taken this ticket off track. Can you elaborate on the connection between "emulated thus" and "SIMPs ... for adding inputs"

from sapio.

JeremyRubin avatar JeremyRubin commented on July 20, 2024

No i think i took it off the rails, this should be in the other SIMP issue I think I got my wires crossed on emulation API v.s. inputs.

for this issue, you should probably use SIMPAttachableAt

for the other issue, the reason we don't want to just use some sort of dyn Emulated stuff is we want the contract to be able to declaratively specify any presigned txns it should be getting before proceeding from any source (including cached from last run), and those can't be deeply embedded in some AST. We can move this discussion to that ticket tho.

from sapio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.