Author

Topic: off chain storage for Bitcoin possible? (Read 392 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
June 20, 2020, 07:01:03 AM
#6
About off-chain storage, there are some discussion that IPFS could be used as off-chain storage and Bitcoin (or other cryptocurrency) will be used to store hash of the file and other optional metadata.

Unfortunately there aren't many discussion specifically for Bitcoin and IPFS. Only Filecoin and Ethereum is often mentioned when we're talking IPFS as off-chain storage.
newbie
Activity: 20
Merit: 5
June 20, 2020, 04: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
legendary
Activity: 1876
Merit: 3132
June 19, 2020, 05: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
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
June 18, 2020, 08:03:23 PM
#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.

legendary
Activity: 1876
Merit: 3132
June 16, 2020, 01: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.
newbie
Activity: 10
Merit: 2
June 16, 2020, 12: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?
Jump to: