public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* Re: [bitcoin-dev] [Bitcoin Advent Calendar] Review of Smart Contract Concepts
@ 2021-12-23 11:55 Prayank
  0 siblings, 0 replies; 2+ messages in thread
From: Prayank @ 2021-12-23 11:55 UTC (permalink / raw)
  To: Jeremy; +Cc: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]

Hi Jeremy,

> This post covers some high-level smart contract concepts that different
opcodes or proposals could have (or not).
https://rubin.io/bitcoin/2021/12/04/advent-7/

Interesting post. I love the concept of recursion in programming. There is one Indian movie called 'Karthik calling Karthik' which is one of the ways I remember this concept. 

> Recursive is pretty much just a fancy way of saying “loops”. This is sometimesalso called “Turing Complete”.

Recently asked one dumb question on Stakexchange after reading a comment on reddit, maybe you can add anything new in this:

https://bitcoin.stackexchange.com/questions/111337/loops-in-bitcoin-scripting

> Here, the contract terminates after one canceled request by moving the coinelsewhere.  It’s possible to emulate recursive behavior a limited amount by“unrolling” a loop.

I think this is what I did in the above link where for loop was replaced with if-else statements.

> However, unrolling has it’s limits. When choices(action A or B) are introduced, unrolling can be less effective since you haveand exponential blowup (that means unrolling even like 32 steps might be toomany). However, there are some tricks that can be employed by a clever andcareful programmer to reduce this complexity through, for example, memoization.

Agree with limits and possibility of optimization.

> The key difference being that in the fully enumerated case we must know the exact specifics of the contract and how it will execute, and in the open ended contract case there are bits and pieces we can dynamically specify. If Alice is paid 1 BTC by December 25th, 2021 Midnight, then transfer 100 tokensto one of Bob’s Address B1, B2, or B3 at Bob’s discretion.

Interesting

> Signing the transaction fee rate as a function of locktime

TIL


-- 
Prayank

A3B1 E430 2298 178F

[-- Attachment #2: Type: text/html, Size: 2825 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [bitcoin-dev] [Bitcoin Advent Calendar] Review of Smart Contract Concepts
@ 2021-12-07 23:31 Jeremy
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremy @ 2021-12-07 23:31 UTC (permalink / raw)
  To: Bitcoin development mailing list

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

This post covers some high-level smart contract concepts that different
opcodes or proposals could have (or not).

https://rubin.io/bitcoin/2021/12/04/advent-7/

Interested to hear about other properties that you think are relevant!

Best,

Jeremy

--
@JeremyRubin <https://twitter.com/JeremyRubin>
<https://twitter.com/JeremyRubin>

[-- Attachment #2: Type: text/html, Size: 1600 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-23 11:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 11:55 [bitcoin-dev] [Bitcoin Advent Calendar] Review of Smart Contract Concepts Prayank
  -- strict thread matches above, loose matches on Subject: below --
2021-12-07 23:31 Jeremy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox