can i do this with colored coin? how?

2 views
Skip to first unread message

fabio.a...@gmail.com

unread,
Mar 3, 2015, 7:42:12 PM3/3/15
to bitc...@googlegroups.com
hi, I tried to have answer to my question on several places, including reddit

http://www.reddit.com/r/Bitcoin/comments/2xrvb4/using_bitcoin_blockchain_with_an_external_service/

let me paste here what i'd like to do and let me know if this suite well with colored coins concept and where i can find information about how to implement this:


Hi, I'm sure this is possible but I'd like to have advices about where to look for informations, don't know if this is the right place (in case it's not, point me to the right place thanks)
Basically, I have a nice idea i want to implement about a game. I could implement it on as a stand alone cryptocurrency but i don't see the point of creating another altcoin so i would like to use bitcoin blockchain as a base to implement my logics.
Technically what i'd need is to store information linked to a bitcoin address and the bitcoin blocks would trigger some events in my game logic the things to store could take several KB of data, i could even need to upload some images/sounds, so i can't store them right into the bitcoin blockchain, so i think i should need something like external assets linked to bitcoin transactions.
Now, i could easily implement a service that can be used to get/put assets but since it would be a proprietary server, there is the problem about the trust of information it holds, so what's the best practice for things like this?
without entering in the game detail, i have in mind the workflow i need. the user should be able to do this:
1) store the (encrypted) information about his character (it's not really a character but for semplicity sake let call it this way) and be able to update it 2) subscribe to an event, sending a BTC amount to a specific address, plus a link to his subscribed character address 3) validate the subscribtion, sending the private key to decrypt his character 4) the external service will then execute the event, producing a result that would take a lot of space, so will be stored in the external server and a link to that result(asset?) need to be store in the bitcoin blockchain
users can use their own clients to verify that the produced result is right (the concept is like the transaction validations that bitcoin nodes does, this is why i said that i could implement an altcoin)
questions are: - what's the best practice for things like this? - how to grant that stored external asset doesn't change over time? (generate a CRC and put it on blockchain? any better ideas?) - how to handle the payment in BTC without running a sort of exchanger? (i was thinking about using RETURN_OP as a way to link informations) - would be nice to give to users the chance to store the same data stored in my server (sort of sidechain), is this possible actually?
thanks, feel free to ask if i didn't explained well
p.s. it seems that sidechains proposal would fit well but it's just a proposal (http://www.coindesk.com/bitcoin-core-developers-bitcoin-side-chains/)


thanks

Ricardo Filipe

unread,
Mar 3, 2015, 8:12:12 PM3/3/15
to bitc...@googlegroups.com
why are you looking into the blockchain to do what you want in the
first place? you don't need decentralized, trustless transactions for
a web based game. any game server should be able to do what you
describe. what specifically are you seeking to do that a game server
isn't able to do?
The blockchain has its specific use cases, don't bloat the blockchain
with data that is better stored on a database.
> --
> You received this message because you are subscribed to the Google Groups "Colored Coins" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bitcoinX+u...@googlegroups.com.
> To post to this group, send email to bitc...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Alex Mizrahi

unread,
Mar 4, 2015, 1:31:23 AM3/4/15
to bitc...@googlegroups.com

You can commit and link to external data using hashes. Pretty straightforward.

fabio.a...@gmail.com

unread,
Mar 4, 2015, 4:36:33 AM3/4/15
to bitc...@googlegroups.com
Il giorno mercoledì 4 marzo 2015 02:12:12 UTC+1, Ricardo Filipe ha scritto:
> why are you looking into the blockchain to do what you want in the
> first place? you don't need decentralized, trustless transactions for
> a web based game. any game server should be able to do what you
> describe. what specifically are you seeking to do that a game server
> isn't able to do?
> The blockchain has its specific use cases, don't bloat the blockchain
> with data that is better stored on a database.

Hi Ricardo,
I didn't went into the game detail but it's about a game where you craft your own kind of "robot" (better call it bot) programming its behaviours and other things and then compete vs other robots in tournaments or 1vs1 challenges, etc...
it will use blockchain to store the ownership of the bot and to subscribe and manage challenges

The challenges are computed by an external service, that will generate a result that will be played graphically by client(s) (i thought about implementing an api to leave to others devs the chance to buil their own graphical clients)
there wouldn't be direct interaction on bots during the fight, the challenge is to create a bot that have the "best" AI / Inventory(weapons/armors, etc...)
I don't know if any of you know about old games of this kind, sort of robotwar

I don't want to go too much in details, anyway I want the code to be available, in crypted form, to every player before a tournament starts, so that after the tournament I'll release the keys for every submitted bots
and their client could decrypt the bot code and compute it against the tournament scenarios (maps + random events generated) this way i can guarantee that the tournament is fair. I don't have yet decided many things, maybe the tournament result will be computed by sidechain nodes (game clients) using a centralized generated map, depends on technical difficulties to mantain a sidechain this way and the need to secure it

tournament subscription will be in bitcoin, and prize too. bitcoins would be needed even to build the bots (buy items) and players will be able to generate their own assets (weapon graphics/ai) and sold them

Of course i could do that out of chain in a proprietary environment, but since i want to give something to the bitcoin movement, i thought about implementing it in blockchain and sidechains

On top of that, since the game involve crypto things and trust i think that's the best way to do that is to use bitcoin blockchain trust

I don't know if i explained properly what i've in mind, but i don't want to bloat bitcoin blockchain, i'd like to put heavy data on sidechains, i'm just asking if colored coins could be a way to implement this, or if you have some sidechain info you can share about implementing such idea

thanks

fabio.a...@gmail.com

unread,
Mar 4, 2015, 4:45:41 AM3/4/15
to bitc...@googlegroups.com
Il giorno mercoledì 4 marzo 2015 07:31:23 UTC+1, Alex Mizrahi ha scritto:
> You can commit and link to external data using hashes. Pretty straightforward.

yes Alex, this is what i'm actually thinking and if possible i'd like to avoid the use of sidechains, but to achieve this i need a way to generate a crypted bot code, generate some kind of hash from that and add that hash to the bitcoin blockchain, question is: would this be enough to have trusted external data?

I mean that if there is a way that, giving some KB sized text i can generate an unique "key" that can be used as a link in bitcoin chain for the ownership (bound to an address) and even as a check to be sure that the outsurced bot code hasn't been changed over time (sort of checksum)

I'm not so experienced in cryptographics things so maybe i asked trivial things

Kawal Grover

unread,
Mar 4, 2015, 12:25:25 PM3/4/15
to bitc...@googlegroups.com, fabio.a...@gmail.com
Seems like you have really thought about this use case well.

I would suggest that you look at how transactions are implemented in detail in the Bitcoin protocol.

2 good sources are 


Specifically look at how P2SH (Pay-To-Script-Hash) transactions work. I feel like if you can figure out how to create a script for your specific transactions using the available OPCodes you will have solved half the puzzle.

The other half would be transference of these tokens and you can do that WITHOUT bloating the block chain. Look at payment channels for that. There is a great thread on the Lightning network on reddit recently that discusses the payment channels. Some bitcoin implementations that have implemented the payment channels are BitcoinJ and Bitcore (the one we are using).

Both these are important for our use cases too (creating coupons on the blockchain) and we have started our development on Github that you can follow.

Hope this helps.

- Kawal.
Reply all
Reply to author
Forward
0 new messages