andytoshi changed the topic of #bitcoin-wizards to: This channel is for discussing theoretical ideas with regard to cryptocurrencies, not about short-term Bitcoin development | This channel is logged. | For logs and more information, visit https://bitcoin.ninja
belcher_ has joined #bitcoin-wizards
belcher has quit [Ping timeout: 240 seconds]
belcher_ is now known as belcher
rusty has joined #bitcoin-wizards
jadi has joined #bitcoin-wizards
proofofkeags has quit [Ping timeout: 240 seconds]
jadi has quit [Remote host closed the connection]
bitdex has joined #bitcoin-wizards
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
harrigan has quit [Ping timeout: 268 seconds]
harrigan has joined #bitcoin-wizards
AmberJ_ has joined #bitcoin-wizards
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
<jeremyrubin> Has anyone thought much about some sort of OP_INPUTVALUE opcode?
<jeremyrubin> Trying to figure out if something like https://gist.github.com/JeremyRubin/d9f146475f53673cd03c26ab46492504 makes sense
<jeremyrubin> This is super annoying to work out because CAmount is wider than CScriptNum
jb55 has quit [Remote host closed the connection]
jb55 has joined #bitcoin-wizards
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
gribble has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
gribble has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
ghost43 has quit [Ping timeout: 240 seconds]
ghost43_ has joined #bitcoin-wizards
jadi has quit [Ping timeout: 252 seconds]
<rubikputer> jeremyrubin: what context would that be useful? when you're constructing the scriptPubKey wouldn't you be able to know how big the input is?
sr_gi has quit [Read error: Connection reset by peer]
sr_gi has joined #bitcoin-wizards
rusty has quit [Ping timeout: 240 seconds]
jadi has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
jadi has joined #bitcoin-wizards
harrigan has quit [Ping timeout: 252 seconds]
harrigan has joined #bitcoin-wizards
smartineng has joined #bitcoin-wizards
smartineng has quit [Excess Flood]
smartineng has joined #bitcoin-wizards
rusty has joined #bitcoin-wizards
jb55 has quit [Remote host closed the connection]
jb55 has joined #bitcoin-wizards
DeanGuss has quit [Ping timeout: 240 seconds]
rusty has quit [Ping timeout: 268 seconds]
Emcy_ has joined #bitcoin-wizards
Emcy has quit [Ping timeout: 265 seconds]
jadi has quit []
Guyver2 has joined #bitcoin-wizards
jadi has joined #bitcoin-wizards
TheoStorm has joined #bitcoin-wizards
rusty has joined #bitcoin-wizards
rusty has quit [Quit: Leaving.]
rusty1 has joined #bitcoin-wizards
rusty1 has quit [Ping timeout: 246 seconds]
IGHOR has quit [Quit: No Ping reply in 180 seconds.]
IGHOR has joined #bitcoin-wizards
rusty has joined #bitcoin-wizards
AmberJ_ has quit [Remote host closed the connection]
EmmyNoether has joined #bitcoin-wizards
rusty has quit [Quit: Leaving.]
bitdex has quit [Quit: = ""]
TheoStorm_ has joined #bitcoin-wizards
TheoStorm has quit [Read error: Connection reset by peer]
rusty has joined #bitcoin-wizards
rusty has quit [Quit: Leaving.]
rusty has joined #bitcoin-wizards
rusty has quit [Quit: Leaving.]
rusty has joined #bitcoin-wizards
TheoStorm_ has quit [Quit: Leaving]
rusty has quit [Ping timeout: 246 seconds]
TheoStorm has joined #bitcoin-wizards
TheoStorm has quit [Remote host closed the connection]
sipa has quit [Remote host closed the connection]
sipa has joined #bitcoin-wizards
TheoStorm has joined #bitcoin-wizards
jadi has quit [Remote host closed the connection]
smak has joined #bitcoin-wizards
amcrae1 has joined #bitcoin-wizards
DeanGuss has joined #bitcoin-wizards
smak is now known as smk
raphanus has quit [Quit: leaving]
<jeremyrubin> rubikputer: mostly, no
<jeremyrubin> Addresses are recipient created destinations
<jeremyrubin> E.g., imagine I want to make an address that is {8 of 10 if amount > 1BTC, 2 of 3 if amount < 1BTC}
<rubikputer> oh wait I misunderstood how it would be used, that makes sense
<jeremyrubin> err one should be <=
<jeremyrubin> yeah pretty useful, right?
<rubikputer> that could be useful with lightning close addresses, like if you have a big channel that gets closed you want to send it to a hw wallet
proofofkeags has joined #bitcoin-wizards
<jeremyrubin> hmm for LN you have presigneds
<rubikputer> oh that's true
<rubikputer> you would be able to update the output address on every update anyways
ghost43_ has quit [Quit: Leaving]
ghost43 has joined #bitcoin-wizards
justanotheruser has joined #bitcoin-wizards
jesseposner has quit [Quit: Textual IRC Client: www.textualapp.com]
TheoStorm has quit [Quit: Leaving]
lukedashjr has joined #bitcoin-wizards
luke-jr has quit [Ping timeout: 260 seconds]
lukedashjr is now known as luke-jr
jesseposner has joined #bitcoin-wizards
smk has quit [Quit: Connection closed]
kabaum has quit [Ping timeout: 276 seconds]
<ariard> jeremyrubin: have you explored template extensions committing to sha_amounts ?
<jeremyrubin> IDK if you saw that or not
<jeremyrubin> Comitting to sha_amounts would be cool I guess?
<ariard> yes i'm proposing a different approach to solve the same problem of branching on input value?
<jeremyrubin> the only issue is w/o OP_CAT you can't do multi-input txns that easily?
<ariard> because there you assume extending the witness data
<jeremyrubin> yeah I guess the question is how useful is the "exact value" v.s. "ranged value" form
<ariard> well you assume per-template extension branch
<ariard> that's also a good question
<jeremyrubin> The reason why I disincluded amount from the template in the first place is kinda interesting
<jeremyrubin> which is that A) I figured the functionality should be independent (has uses for TR)
<jeremyrubin> B) you might want to always include a little bit more to add fees
<jeremyrubin> (that only works from a parent to a child node)
<jeremyrubin> But you could make the compiler wait to compile till you pick fees too, of course
<ariard> right fees is matching my intuition why you wouldn't include but in practice you will have an anchor ouput on each trancation node
<jeremyrubin> hopefully sponsors w/ 100 block timeout + package relay
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #bitcoin-wizards
<jeremyrubin> ariard: another reason is that CTV is the minimal info to prevent malleability / be secure
<ariard> well for the use case you're describing you will need multiple templates committed in the witnessScript as outputs scriptpubkeys are always part of the template
<jeremyrubin> Which case?
<jeremyrubin> I don't think that implies that anchors are always free
<ariard> they're def not free
<ariard> the 8 of 10 if amount > 1BTC, 2 of 3...
<jeremyrubin> I do anticipate the most common use case would be "if amount != expected: multisig else: program"
<jeremyrubin> and you probably only need it at top level nodes or nodes with >1 input
kabaum has joined #bitcoin-wizards
<jeremyrubin> ariard: BTW the way CTV works is 32 bytes is the only interpreted arg size for now. Could easily propose a version byte flag that adds the relevant data (and leave the other 7 open)
<jeremyrubin> I think it would be reasonable to have feature redundancy with some sort of value checking operation
<jeremyrubin> If you actually want to solve for it tho I think it's really annoying
<jeremyrubin> since script is limited to 4 byte nums
<jeremyrubin> which is why i didn't propose some push value form
<jeremyrubin> I think you could also do some sort of "mini" scripting language inside of a stack elt which just can check value logic constraints
<jeremyrubin> But I think that would be a bit lolsy to add a script inside script
<jeremyrubin> but it might be less lolsy than having to use two sep integers if the amount is more than 21 btc
<jeremyrubin> (altho miniscript should be able to make the user not care)
<ariard> jeremyrubin: so it would be <hash n> ... <hash 0> <version_hash> OP_CTV? where version hash tell you the length of the byte vector and which semantic to enforce on them?
<ariard> right so you can't enforce on the stack CAmount
<jeremyrubin> no I was thinking more like
<jeremyrubin> <version || PROGRAM> OP_CTV
<jeremyrubin> but I think your form might be more general
<jeremyrubin> but then you need to follow it by DROP*n
<ariard> hmmm can't you drop them with OP_SUCCESS semantic?
<jeremyrubin> Well not really
<jeremyrubin> since CTV is defined in base script
<ariard> right you're purposing op_nop4
<jeremyrubin> yeah
<ariard> jeremyrubin: so you're version byte flag would be a push on the stack transaction data and then your PROGRAM do whatever checks it wants?
<jeremyrubin> if we wanted to go all OP_SUCCESSX you could make CTV a pushdata thingy like johnson lau's approach
<jeremyrubin> well no generally OP_CTV should be a verify only op
<ariard> not a big fan of this approach, hash malleability might let you check multiple transactions field with same hash
<ariard> quite remember OP_PUSHTXDATA
<jeremyrubin> I'm pretty OK with OP_CTV *not* getting extended and someone coming up with something else later
<jeremyrubin> CTV wins in the sense it's just really simple
<jeremyrubin> and the scripts are minimal
TheoStorm has joined #bitcoin-wizards
<jeremyrubin> BTW it might not be obvious, but you can do: <program> sha256 ctv too
<jeremyrubin> so if you have op_cat you can pick random bits if you want
<ariard> if the template_hash is longuer than 32-byte, you proceed as a NOP right?
<jeremyrubin> yep
<ariard> so easy to add a longer template_hash in the future and fail the execution with new semantics?
<jeremyrubin> yeah
<ariard> good, i think it should be more clear in the bip, that's an implicit versioning mechanism :)
<ariard> like in the future the 33th byte could be an extension/malleability flag
<jeremyrubin> If the argument length is not exactly 32, CHECKTEMPLATEVERIFY treats it as a NOP. Many OP_NOP upgrades prefer to fail in such circumstances. In particular, for CHECKTEMPLATEVERIFY, making an invalid argument a NOP permits future soft-forks to upgrade the semantics or loosed restrictions around the value being previously pushed only. ?
<ariard> yes op_cat + sha256 you have same flexibility than OP_CSFS?
<jeremyrubin> maybe a bit different
<jeremyrubin> some things more some less
<ariard> fair, the bip is quite wide
<jeremyrubin> i didn't want to over specify how upgrades had to look for non 32 byte things
<jeremyrubin> just the minimal rules
<ariard> i just fear that such script will require a huge witness data making it too expensive for a lot of users
smartineng has quit [Quit: smartineng]
<jeremyrubin> if your version is determistic program over the txdata, you can also just commit to the hash
CryptoDavid has joined #bitcoin-wizards
TheoStorm has quit [Quit: Leaving]
flag has quit [Ping timeout: 252 seconds]
Guyver2 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
TheoStorm has joined #bitcoin-wizards
TheoStorm has quit [Remote host closed the connection]
amcrae1 has quit [Remote host closed the connection]
deusexbeer has joined #bitcoin-wizards
tasmo has joined #bitcoin-wizards
tasmo is now known as Guest46956
proofofkeags has quit [Ping timeout: 246 seconds]
shesek has quit [Remote host closed the connection]
shesek has joined #bitcoin-wizards
shesek has joined #bitcoin-wizards
EndFiat has quit [Ping timeout: 240 seconds]
EndFiat has joined #bitcoin-wizards