Bitcoin Forum
April 23, 2024, 07:29:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: off chain storage for Bitcoin possible?  (Read 361 times)
cauciuc08 (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 2


View Profile
June 16, 2020, 05:49:27 PM
 #1

I wondered if anyone knows more about state channel and off chain storage. We all know that one problem of Bitcoin is scalability.
Off chain storage could be one answer but I don t really understand how that could work.
Has anyone any ideas?
1713857366
Hero Member
*
Offline Offline

Posts: 1713857366

View Profile Personal Message (Offline)

Ignore
1713857366
Reply with quote  #2

1713857366
Report to moderator
1713857366
Hero Member
*
Offline Offline

Posts: 1713857366

View Profile Personal Message (Offline)

Ignore
1713857366
Reply with quote  #2

1713857366
Report to moderator
1713857366
Hero Member
*
Offline Offline

Posts: 1713857366

View Profile Personal Message (Offline)

Ignore
1713857366
Reply with quote  #2

1713857366
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713857366
Hero Member
*
Offline Offline

Posts: 1713857366

View Profile Personal Message (Offline)

Ignore
1713857366
Reply with quote  #2

1713857366
Report to moderator
1713857366
Hero Member
*
Offline Offline

Posts: 1713857366

View Profile Personal Message (Offline)

Ignore
1713857366
Reply with quote  #2

1713857366
Report to moderator
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
June 16, 2020, 06:29:14 PM
 #2

Has anyone any ideas?

The Lightning Network seems to be the thing you are looking for. The LN consists of many payment channels which are connected one to another. The LN transactions are not broadcast to the Bitcoin Network and they are instant in most cases. However, because of the way the LN works, there are problems with payments failures due to routing problems. The coins need to be passed between nodes which are connected via channels which have limited capacity and different liquidity. The Lightning Network involves two on-chain transactions (opening a channel and its closure).

When you open a channel, the coins are moved to a multi-signature address controlled by both nodes. How do we make sure that coins are not stolen by the other party then? Both signatures are required to spend from the address. Each time a channel state is updated, both parties sign a commitment transaction which can be broadcast to the Bitcoin network resulting in the channel closure. A new commitment transaction revokes the previous one which is useful in case the other party attempts to cheat by broadcasting the old channel state. The penalty is included as well. By default, in the case of an uncooperative channel closure, one has 24 hours to publish the penalty transaction. The uncooperative channel closures happen when one of the nodes is offline or if the other node closes the channel forcefully without negotiation. Cooperative channel closures can happen instantly.

As for the LN payments, Hash Time Locked Contracts are used. The following explanation should be fairly easy to understand.

Alice opens a payment channel to Bob, and Bob opens a payment channel to Charlie.
    Alice wants to buy something from Charlie for 1000 satoshis.
    Charlie generates a random number and generates its SHA256 hash. Charlie gives that hash to Alice.
    Alice uses her payment channel to Bob to pay him 1,000 satoshis, but she adds the hash Charlie gave her to the payment along with an extra condition: in order for Bob to claim the payment, he has to provide the data which was used to produce that hash.
    Bob uses his payment channel to Charlie to pay Charlie 1,000 satoshis, and Bob adds a copy of the same condition that Alice put on the payment she gave Bob.
    Charlie has the original data that was used to produce the hash (called a pre-image), so Charlie can use it to finalize his payment and fully receive the payment from Bob. By doing so, Charlie necessarily makes the pre-image available to Bob.
    Bob uses the pre-image to finalize his payment from Alice

You should read my "Basics of The Lightning Network" and "The Lightning Network FAQ" threads. You will find plenty of information there! There are also a few other second layer protocols which are less popular.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
June 19, 2020, 01:03:23 AM
 #3

Not sure if bitcryptex mentioned it but the other problem with offchain payments is that your client has to be online to publish the commitment transaction with the penalty within a certain amount of time (normally two weeks by default) but if you can't go online in that time (such as losing Internet in your house, being arrested/kidnaoped for example or your node being hacked) then you risk losing your funds.

Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
June 19, 2020, 10:17:46 AM
 #4

(normally two weeks by default)

By default, in most cases, it is only 144 blocks (~1 day). For example, Eclair Mobile sets the timelock to 2016 blocks (~2 weeks) for channels which support receiving payments.

but if you can't go online in that time (such as losing Internet in your house, being arrested/kidnaoped for example or your node being hacked) then you risk losing your funds.

Watchtowers are supposed to solve that problem, but they are not impenetrable as well. If a node was hacked, I don't think there would be a need for an uncooperative channel closure Tongue
boissonnea
Newbie
*
Offline Offline

Activity: 20
Merit: 5


View Profile
June 20, 2020, 09:20:20 AM
 #5

I wondered if anyone knows more about state channel and off chain storage. We all know that one problem of Bitcoin is scalability.
Off chain storage could be one answer but I don t really understand how that could work.
Has anyone any ideas?

second layer technology (Lightning Network) is not for bitcoin only. it takes transactions away from the main blockchain. so any altcoin so build it’s own second layer.
It is not the solution to all scalability problems, but also the problem of fees for small transactions. The essential advantage lies in its use for frequent purchases from a trusted party such as buying coffee, but this does not mean that all transactions will be made through it.

watch this video for new features https://www.youtube.com/watch?v=W34RdzFwz8M

The Bitcoin Lightning Network Explained https://www.youtube.com/watch?v=Z7Q0AwbKZX8
Misconceptions about Lightning Network https://www.youtube.com/watch?v=c4TjfaLgzj4
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!