3 ms·
It'll make more sense once sharding is in production. What makes more sense right now, for many games, is to put most of the state changes off-chain. If player
by DennisP 9y ago
It'll make more sense once sharding is in production.
What makes more sense right now, for many games, is to put most of the state changes off-chain. If players are taking turns, they can sign the state changes as they go, and submit the final couple moves to the blockchain. Add in another trick and you can even make fair random numbers: http://www.blunderingcode.com/gamble-channels-fast-verifiable-off-chain-gambling/ http://www.blunderingcode.com/gamble-channels-fast-verifiabl...
This is how FunFair works; there's an on-chain transaction to deposit, another to close out and withdraw, and in between you can gamble all day without waiting for blocks or issuing transactions to the blockchain.
- albertgoeswoof 9y ago> If players are taking turns, they can sign the state changes as they go, and submit the final couple moves to the blockchain. This is the same way that the lightning / plasma network works, right?
- DennisP 9y agoYes, Lightning is similar, the previous blog post covers that. Plasma is a bit different, I'm still wrapping my head around it.
- theptip 9y agoIt's one half of it; Lightning also needs a "time lock" mechanism to somehow execute payment for the committed balance of the channel if one party unilaterally abandons it. This is quite complex involving both parties holding a delayed and revokable payment from the other party. In the case of a game, this might be simpler since you can have each player sign their own moves and the other player's last move, so that you can always broadcast your opponent's last move if they quit.
- DennisP 9y agoIt's not too complicated on Ethereum. Here's some sample code, which Raiden devs have told me works much like their system. http://www.blunderingcode.com/a-lightning-network-in-two-pages-of-solidity/ http://www.blunderingcode.com/a-lightning-network-in-two-pag...
- runeks 9y agoAs far as I can see, putting most of the state changes off-chain, without compromising security, is literally solving the blockchain scaling problem. If it can be applied to a game, it can be applied to e.g. Bitcoin (and used for payments). I’m not saying it’s impossible, of course, just that a lot of really smart people have been working on this problem for almost a decade, without having a production-ready solution yet.
- DennisP 9y agoYou're certainly right that it's a challenge and nobody is production-ready yet, but here's Ethereum's stage 1 sharding spec: https://github.com/ethereum/sharding/blob/develop/docs/doc.md https://github.com/ethereum/sharding/blob/develop/docs/doc.m... A good discussion of the challenges is at their sharding FAQ: https://github.com/ethereum/wiki/wiki/Sharding-FAQ https://github.com/ethereum/wiki/wiki/Sharding-FAQ
- ncallaway 9y ago> putting most of the state changes off-chain, without compromising security, is literally solving the blockchain scaling problem Isn't that the approach taken by the Lightning Network for Bitcoin? I think it's totally fair to say that Lightning technically isn't production ready, but it does seem to be in the late stages of testing / early release candidate stage of development.