stratisproject / StratisBitcoinFullNode

Bitcoin full node in C#
https://stratisplatform.com
MIT License
787 stars 312 forks source link

Oracle support? #1039

Closed roschler closed 6 years ago

roschler commented 6 years ago

Hello Stratis developers,

I'm a veteran C#/.NET developer looking for an alternate to Ethereum/Solidity. Does Stratis support Oracles (communication to external Oracles)? If so, can someone point me to a web page that explains that support?

dangershony commented 6 years ago

Hi what do you mean by Oracles can you be more specific? A fullnode can not just talk to an Oracle that needs to be a special purpose built node (sort of a master node).

roschler commented 6 years ago

Hello. I want to be able to perform a verification operation from within a smart contract as part of a "go/no-go" decision on accepting or rejecting a transaction. The smart contract would make a query to an external server, which I believe is considered an "Oracle" in the Ethereum world, to ask for an authorization.

If this workflow is not possible, I wonder if there is some other way to achieve this objective by having an external server that seeds the block chain with various info, launches a smart contract as usual, and then watches the block chain for a result code that indicates the smart contract has completed its current task. Then the external server would decide to authorize the "overall" transaction or not and launch another smart contract that takes the appropriate action depending on the "accept/reject" information the external server seeded on to the block chain.

My apologies if this a bit obtuse. Basically I'm trying to create a blockchain based app that facilitates transactions that have one or more steps where an external trusted server authorizes the transaction or not. Although the topical context of the following hypothetical example is not germane to my smart contract app, it is similar to what I want to accomplish. For example, imagine a car sale handled by the smart contract where the title of the car is being held in escrow. An external server at some point needs to check the validity of the car's title to see if it is fraudulent or not. That check determines whether or not the car is released from escrow and transferred to the buyer.

Does that make sense?

dangershony commented 6 years ago

Yes you touched a very problematic topic in the blockchain space, how to bring outside (real world) events in to the blockchain in a way that is viable.

Several projects have this issue (prediction markets to determine success or fail of a prediction, sidechains to determine if an external chain is not double spending etc...)

Yes an Oracle, to my knowledge, is a trusted server that can do such operations and record them on the blockchain. This however creates problems like trusting the oracle on decisions, an attack surface on a single oracle, what if multiple parties need to verify an event etc...

A solution can be master nodes (or call them Oracle Nodes) a master node will lock a significant amount of coins so they have stake and make such decisions (or a group of master nodes can vote on an event) and collect fees for doing this.

DemonRx commented 6 years ago

This might be something to look into with byteball which seems to have this implemented to some degree.

https://byteroll.com/oracle

roschler commented 6 years ago

@D3m0nKingx Would that code work on Stratis?

@dangershony

A solution can be master nodes (or call them Oracle Nodes) a master node will lock a significant amount of coins so they have stake and make such decisions (or a group of master nodes can vote on an event) and collect fees for doing this.

Has anybody done something like this that works on Stratis yet?

DemonRx commented 6 years ago

@roschler that oracle I linked to you is specific to the Byteball project, which works from within the wallet itself, and that project uses the DAG chain. So it wouldn't apply to Stratis, but it could give some insight as to the concepts needed in making it for Stratis.

No nobody has made any Oracle for Stratis, this would be a new milestone if / when that gets accomplished.

roschler commented 6 years ago

@D3m0nKingx Thanks, understood.

I know this is a really fuzzy question, but my time is limited these days. If you were in my situation, would you attempt writing your own Oracle node for Stratis, or given the difficulty of that tasks am I better waiting off for someone else to attempt that first?

DemonRx commented 6 years ago

I don't speak for the team developing this project, so from my own personal opinion, seeing the complexity of this project and that it still has some ways to go to completion with core parts of the code, to make sure its fully functional and stable . . . my advice would be to wait, since at that point other things like side chains and oracles could be developed.

roschler commented 6 years ago

A big thanks for your candor D3m0nKing. Although I'm a veteran C++ coder too (EOS), and a veteran Javascript coder (Solidity-ish), I'd much rather write my smart contracts in C#. I was looking at NEO but they want ~ $10,000 USD (500 GAS) to deploy a smart contract on the main net, so I'm hoping I can find a home in Stratis. I'll keep watching this repo.

dangershony commented 6 years ago

Hi @roschler if you are a veteran C# developer looking for a home within the crypto space you came to the right place find me on slack and lets chat further.

roschler commented 6 years ago

Hi @dangershony - sure, how do I find you on Slack?

I'll catch up with you on Thursday. I've got a big demo deadline I'm coding against right now that I have to deliver tomorrow. But after that I'm restarting my blockchain platform hunt.

dangershony commented 6 years ago

I need an email to send you an invite.

roschler commented 6 years ago

Cool. Follow me on Twitter (I'll follow you back) and I'll send you a DM with the E-mail. My twitter handle:

https://twitter.com/roschler

dangershony commented 6 years ago

https://twitter.com/dangershony

roschler commented 6 years ago

@dangershony DM sent on Twitter.