Bitcoin Forum
April 25, 2024, 12:08:43 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Clarification on Off-chain Atomic Swap Lighting Network  (Read 182 times)
BerSERKERZ (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 03, 2018, 08:53:27 PM
 #1

May I know is off-chain atomic swap using Lighting Network requires both blockchain to have the same cryptographic hash function? If it is true, then how is it possible for Litecoin that has scrypt algorithm and Bitcoin that has Sha-256 algorithm to be able to perform atomic swap?

https://twitter.com/satoshilite/status/911328252928643072?lang=en

I'm still a newbie. Hope that anyone here can help this noob.
1714003723
Hero Member
*
Offline Offline

Posts: 1714003723

View Profile Personal Message (Offline)

Ignore
1714003723
Reply with quote  #2

1714003723
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 04, 2018, 12:02:52 AM
 #2

No, the hash function for the PoW is irrelevant to the Lightning Network. It does not matter if they are the same or if they are different.

BerSERKERZ (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 04, 2018, 03:44:23 AM
 #3

If that is the case, how is it that the lighting network website mentions that this cross chain atomic swap is feasible as long as both blockchain support the same cryptographic function?

It's on the fourth point under Transaction for the Future.
https://lightning.network/
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


View Profile WWW
July 04, 2018, 04:21:34 AM
Merited by Foxpup (4)
 #4

If that is the case, how is it that the lighting network website mentions that this cross chain atomic swap is feasible as long as both blockchain support the same cryptographic function?

It's on the fourth point under Transaction for the Future.
https://lightning.network/
There are multiple cryptographic hash functions used in different places in Bitcoin (and other cryptocurrencies) and in the Lightning Network. What that section is specifically talking about is the scripting language and that the scripting language must support the same hash functions. The hash functions in the scripting language are completely separate from the hash functions used in the PoW.

The Lightning Network operates solely on transactions and scripts which are independent of block related consensus rules, including the Proof of Work.

spartacusrex
Hero Member
*****
Offline Offline

Activity: 718
Merit: 545



View Profile
July 04, 2018, 08:57:58 AM
 #5

May I know is off-chain atomic swap using Lighting Network requires both blockchain to have the same cryptographic hash function? If it is true, then how is it possible for Litecoin that has scrypt algorithm and Bitcoin that has Sha-256 algorithm to be able to perform atomic swap?

https://twitter.com/satoshilite/status/911328252928643072?lang=en

I'm still a newbie. Hope that anyone here can help this noob.

I think for what you are asking  -  the answer is yes.

Both coins need to be able to use the same hash function so that an atomic swap can take place. I need to show the pre-image of some hashed value to collect my side of the deal, and this will allow the other party to collect their side. We both need to be able to speak the same 'hash'.

This, as achow101 points out, is independent of what the coin uses for it's actual POW / consensus.

Sooo.. LITECOIN needs to be able to perform a SHA256 in it's script to communicate with the BTC chain. (Since I don't think BTC will ever get s-crypt)

ps.. Litecoin does support sha256  Smiley


Life is Code.
Quickseller
Copper Member
Legendary
*
Offline Offline

Activity: 2870
Merit: 2298


View Profile
July 05, 2018, 05:26:21 AM
 #6

It is not possible for a LN "hub" to run on fractional reserve under the LN protocol as it exists now.

When a user opens a LN channel with a "hub" (or otherwise), the user will use an input worth "y", and the "hub" will use an input worth "x" to create a transaction that opens the channel (x and y may be equal, but they do not have to be), and the initial tentative closing transaction will be so that the user receives y and the hub receives x. It is not possible for the "hub" to get the user to reduce the value of their tentative closing transaction by a certain amount without the user agreeing to as much (and when acting economically rationally, without receiving a similar valued amount via other means). 
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!