Bitcoin Forum
April 28, 2024, 10:08:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: op_codes usability in payment channels?  (Read 1035 times)
JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
March 30, 2016, 10:28:55 AM
Merited by ABCbits (1)
 #1

With improvements in the Script language such as P2SH and OP_CSV, how are they going to be in used on payment channels? Since payment channels most likely write their own logic layer, wont the entirety of the script be negligible, as we can assume settlement on chain will be costly?

Or are payment channels going to utilize the Script language in Bitcoin at the secondary layer as well? I have been unable to find anything on both Lightning implementations as well as the Thunder implementation.

From all I can see, there are no scripting rules. But wont this kill the need for more op_codes as we move ahead with abstraction layers?

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714298914
Hero Member
*
Offline Offline

Posts: 1714298914

View Profile Personal Message (Offline)

Ignore
1714298914
Reply with quote  #2

1714298914
Report to moderator
1714298914
Hero Member
*
Offline Offline

Posts: 1714298914

View Profile Personal Message (Offline)

Ignore
1714298914
Reply with quote  #2

1714298914
Report to moderator
1714298914
Hero Member
*
Offline Offline

Posts: 1714298914

View Profile Personal Message (Offline)

Ignore
1714298914
Reply with quote  #2

1714298914
Report to moderator
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1093


View Profile
March 31, 2016, 05:24:00 AM
Merited by ABCbits (1)
 #2

Not sure I understand your question.

Transactions in payment channels are all valid Bitcoin transactions, so they must use the same set op_codes as the main Bitcoin network. In a payment channel, OP_CHECKSIG, OP_CHECKMULTISIG, OP_HASH160, HASH256, OP_CSV, OP_CLTV are probably enough for all functions.

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
March 31, 2016, 10:51:55 AM
Merited by ABCbits (1)
 #3

Rusty said similarly on IRC, and I understand that. But here is something that I dont understand.

If I make a transaction on a payment channel, following all the Script rules, then how does channel funding play a role?

I assumed that funding a channel via op_cltv and op_csv were required only to setup the channel, and thus whatever transaction took place would be "outside" the scope of Script and rely on different rulesets.

If Script is still in use, it implies that all transactions are subsequently recorded in mempool as they are Bitcoin transaction, but with the only exception of that they wont get mined (due to op_cltv/op_csv settings). This sounds, wrong, so I am sure I missed something in terms of the transaction abstraction on secondary layers.

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6551


Just writing some code


View Profile WWW
March 31, 2016, 11:43:08 AM
 #4

If you are referring to lightning network payment channels, they still use bitcoin transactions. The way that lightning works is that the channel is really just a transaction that is never broadcasted and replaced over and over as transactions in the channel happen. When the channel is closed, that transaction is broadcast to the network.

Because that transaction is a bitcoin transaction but I'd not broadcast until later, it still must use OP codes.

kn_b_y
Newbie
*
Offline Offline

Activity: 26
Merit: 3


View Profile
March 31, 2016, 11:02:14 PM
 #5

I assumed that funding a channel via op_cltv and op_csv were required only to setup the channel

I have experimented with implementing payment channels using python-bitcoinlib and unless I'm mistaken timelocked transactions are not used during channel setup. The setup is just a regular payment to a multisig address. However, a timelocked refund (which is not broadcast if the payment channel is otherwise closed) is used to prevent funds from being taken hostage.

Watch the lightning guys explain it (skip to six minutes for payment channel stuff):
https://www.youtube.com/watch?v=8zVzw912wPo
JackH (OP)
Sr. Member
****
Offline Offline

Activity: 381
Merit: 255


View Profile
April 01, 2016, 03:42:53 AM
 #6

This also implies that we are probably going to get payment channel specific op_codes in the future.

It would for example be interesting to have an opcode that allows for pulling funds, but only applicable to the secondary layer. Would allow us to make credit card type of payments available.

<helo> funny that this proposal grows the maximum block size to 8GB, and is seen as a compromise
<helo> oh, you don't like a 20x increase? well how about 8192x increase?
<JackH> lmao
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!