Author

Topic: Smart Contracts in Blockchain (Read 2728 times)

legendary
Activity: 924
Merit: 1132
June 23, 2016, 07:17:55 PM
#19
Bitcoin's first-cut code had several script instructions enabled, which were disabled by the time it launched.

Hal Finney was mostly responsible for that; he pointed out numerous ways in which the lack of ability to 'lock' resources before doing a transaction could result in legit-looking scripts that could later be attacked, or could result in a denial of service.  Satoshi and Hal disabled backward-branching instructions from Bitcoin's scripting language (which means it's no longer turing-complete) for security's sake.  That more-or-less forces multi-step transactions to wait several blocks between steps, during which interval people can verify that the previous step did happen and is now part of the chain, before going on.

No backward branching means that flow-of-control in a bitcoin script can jump forward over part of the script (in an 'if' branch for example) but can't jump backward to something it's done before (in a 'while' or 'until' loop, or in a recursion for example). 

ETH lifted this restriction among others.  That means contracts in ETH are more flexible and scripts can do more - but it also means they are trickier and enables people to make smart contracts that can be attacked in more unexpected ways - particularly with 'locking' of resources.  An ETH script can do many steps immediately based on balances that existed before the script ran - and then the whole sequence can be invalidated by a very shallow blockchain fork.  When more than one blockchain-recorded transaction is required to complete an interaction, this results in a relatively cheaper attack - if the two tx get into different blocks, and then one but not the other is invalidated by a fork. 



member
Activity: 70
Merit: 10
June 14, 2016, 12:09:51 PM
#18

Bitcoin has a limited set of commands it can execute in the blockchain. Smart contracts need more commands to be programmed: that is wat is called a programming language that is Turing complete. Afaik there are no smart contracts on bitcoin blockchain.

I don't really understand you question:
Is it correct that etherum uses the block chain Technology in order to define and executes smart contracts as Bitcoins uses it for Bitcoin exchange?


I doubt that's really what 'turing complete' is. Smiley
newbie
Activity: 56
Merit: 0
June 13, 2016, 06:54:06 PM
#17
is lisk better for creating smart contracts ?
newbie
Activity: 14
Merit: 0
June 12, 2016, 07:03:53 PM
#16
ETH is the best source code to see this implementation.
legendary
Activity: 2310
Merit: 1422
June 09, 2016, 03:44:47 AM
#15
This is a plug, but it's relevant. So pigeon hole me or delete as per your rules.

Are you trying to implement a B2B smart contract system that must be totally private but totally immutable ?
We have built this.
http://concordata.co.uk

There's some cool stuff in Concordata by normal standards, much of it do do with the issues of collision as well as a bunch of next level stack enhancements on Node & MVC, but of course compared with the blockchain we are just flattening everything with fairly crude but undeniable logic. But I cant see any other way of doing this given the privacy issues with most data.

Can you please explain more about this?
Quote
It does not depend on blockchain though it does use it and, as any observer or commentator of distributed ledger technology will appreciate, we are constantly learning about and reviewing our position on this complex subject.

And maybe you should open your own thread to open up the discussion about what you do. Thanks for sharing though.
newbie
Activity: 1
Merit: 0
June 08, 2016, 02:59:44 AM
#14
I have a close eye on Rootstock, they try to bring smart contracts to Bitcoin.

https://bitconnect.co/bitcoin-news/172/bitcoin-getting-smarter-smart-contracts-than-ethereum/

http://www.rootstock.io/

Thanks for sharing this! It says "The private testnet is live now. They look to launch their open-sourced public testnet by the end of the summer and have a full launch by the end of the year." Anyone has updates on this? I'm curious how it develops...

I agree with Karartma1- Ethereum should be afraid...





Marty
newbie
Activity: 4
Merit: 0
June 07, 2016, 05:55:59 PM
#13
This is a plug, but it's relevant. So pigeon hole me or delete as per your rules.

Are you trying to implement a B2B smart contract system that must be totally private but totally immutable ?
We have built this.
http://concordata.co.uk

There's some cool stuff in Concordata by normal standards, much of it do do with the issues of collision as well as a bunch of next level stack enhancements on Node & MVC, but of course compared with the blockchain we are just flattening everything with fairly crude but undeniable logic. But I cant see any other way of doing this given the privacy issues with most data.
legendary
Activity: 2310
Merit: 1422
June 07, 2016, 01:58:40 AM
#12
I have a close eye on Rootstock, they try to bring smart contracts to Bitcoin.

https://bitconnect.co/bitcoin-news/172/bitcoin-getting-smarter-smart-contracts-than-ethereum/

http://www.rootstock.io/

Thank you very much this is truly interesting and inspiring. I was getting only "no, bitcoin is not for smart contracts" and so on before finding your post.

This can be really something. Ethereum should be afraid...
legendary
Activity: 3512
Merit: 4557
June 02, 2016, 10:30:26 AM
#11
I have a close eye on Rootstock, they try to bring smart contracts to Bitcoin.

https://bitconnect.co/bitcoin-news/172/bitcoin-getting-smarter-smart-contracts-than-ethereum/

http://www.rootstock.io/
legendary
Activity: 924
Merit: 1132
May 31, 2016, 07:40:17 PM
#10
Hal Finney was worried about potential denial of service, and for that reason he and Satoshi eliminated several opcodes on the grounds that they could create programs that would take infinite time to run.

Bitcoin now also protects itself by putting an absolute limit on number of instructions executed, meaning there would be very limited risk in re-introducing those opcodes.  But the limitation on tx complexity would still exist, even with a Turing complete scripting language, because of the hard limit on number of instructions to be executed.

Ethereum has a different system, where the transaction has 'gas' that determines how many instructions to execute. This allows people to put arbitrarily complex programs on the Ethereum chain provided they pay for enough gas to actually run them.  But yeah, you could read that anywhere.

legendary
Activity: 3906
Merit: 6249
Decentralization Maximalist
May 29, 2016, 05:28:24 PM
#9
As I understand it, the main advantage of using a blockchain is that there is no "single point of failure". A centralized cloud service can be attacked or go offline because of technical problems, a blockchain is very difficult to attack. For example, a server or cloud service could be just attacked in the moment when the "smart contract software" decides if some action (e.g. a payment) has to be done or not, and the attacker could benefit from it.

Securing such cloud services to make this kind of attacks impossible is very expensive, a blockchain can reach the same level of security for much less cost. And cloud services are always centralized: you must trust some entity that can, in theory, run away with your money or manipulate the contract.

In https://en.bitcoin.it/wiki/Contract you can read the following:

Quote
Contracts don't make anything possible that was previously impossible, but rather, they allow you to solve common problems in a way that minimizes trust. Minimal trust often makes things more convenient by allowing human judgements to be taken out of the loop, thus allowing complete automation.

For your other question, read: https://en.bitcoin.it/wiki/Contract#Theory
jr. member
Activity: 68
Merit: 1
May 29, 2016, 12:21:22 PM
#8
so that means every rule is a transaction - lets make an example
if there is rain tomorrow then if will spend you 20 bitcoins

is this smart contract 1 transaction between you and me?
or are these several transactions?

in case of 1: why do a need for that blockchain? it will create one transaction which will never be used than yesterday and saved forever in the chain? just for non-manipulations and anonymity?

legendary
Activity: 4228
Merit: 1313
May 29, 2016, 10:17:15 AM
#7
thx  - this helps but i still do not understand how the smart contracts are connected with the block chain.
i understand the blockchain of bitcoin the input and output block, the double spending etc.

But how are the smart contracts connected with the block?

It depends on what you mean by "connected with the block".  The short answer is that they are connected via transactions with the script. 
jr. member
Activity: 68
Merit: 1
May 29, 2016, 09:08:22 AM
#6
thx  - this helps but i still do not understand how the smart contracts are connected with the block chain.
i understand the blockchain of bitcoin the input and output block, the double spending etc.

But how are the smart contracts connected with the block?
legendary
Activity: 4228
Merit: 1313
May 29, 2016, 06:45:11 AM
#5
Smart contracts do not require a Turing complete language. You need to define what smart contract you are talking about too.

See eg
http://www.coindesk.com/turing-complete-smart-contracts/

https://en.m.wikipedia.org/wiki/Smart_contract
sr. member
Activity: 285
Merit: 251
May 29, 2016, 04:24:21 AM
#4

Bitcoin has a limited set of commands it can execute in the blockchain. Smart contracts need more commands to be programmed: that is wat is called a programming language that is Turing complete. Afaik there are no smart contracts on bitcoin blockchain.

I don't really understand you question:
Is it correct that etherum uses the block chain Technology in order to define and executes smart contracts as Bitcoins uses it for Bitcoin exchange?

jr. member
Activity: 68
Merit: 1
May 29, 2016, 03:44:50 AM
#3
thx
but are the any smart conracts in the Bitcoin block chain? No or?

Is it correct that etherum uses the block chain Technology in order to define and executes smart contracts as Bitcoins uses it for Bitcoin exchange?
sr. member
Activity: 285
Merit: 251
May 29, 2016, 03:37:24 AM
#2
I think you might be talking about ethereum, take a look into that.

The thought behind programming on the blockchain (or a smart contract as it is called) is that you can program something that cannot be changed or stopped by someone.

As found on the ethereum website: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference.
jr. member
Activity: 68
Merit: 1
May 28, 2016, 01:01:25 PM
#1
can anybody give me a link for smart contract.
So far  - i got that Blockchain can be used for smart contracts because it is secure and assured that after Block 1 Block2 will follows. Based on the new script language smart contracts can be easily created.

Is that all?
What is the reason not to do this is in a normal central database and offer this service to the customer. For Example a electric car is connected to this platform and electric tank truck.
When the electric car run out of fuel the fuel car will come and put some power into my car. Payment will be done with anything. I can do this also in a cloud services - or?

I think is miss here something in order to link that to block chain. I know it is a complete different philosophy (dezentral and transparent) but for smart contract it is not necessary to be transparent or?
Jump to: