Bitcoin Forum
April 20, 2024, 06:05:46 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Smart Contracts in Blockchain  (Read 2698 times)
Wiss (OP)
Jr. Member
*
Offline Offline

Activity: 68
Merit: 1


View Profile
May 28, 2016, 06:01:25 PM
Merited by ABCbits (1)
 #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?
1713593146
Hero Member
*
Offline Offline

Posts: 1713593146

View Profile Personal Message (Offline)

Ignore
1713593146
Reply with quote  #2

1713593146
Report to moderator
1713593146
Hero Member
*
Offline Offline

Posts: 1713593146

View Profile Personal Message (Offline)

Ignore
1713593146
Reply with quote  #2

1713593146
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713593146
Hero Member
*
Offline Offline

Posts: 1713593146

View Profile Personal Message (Offline)

Ignore
1713593146
Reply with quote  #2

1713593146
Report to moderator
vincentvincent
Sr. Member
****
Offline Offline

Activity: 285
Merit: 251


View Profile
May 29, 2016, 08: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.
Wiss (OP)
Jr. Member
*
Offline Offline

Activity: 68
Merit: 1


View Profile
May 29, 2016, 08: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?
vincentvincent
Sr. Member
****
Offline Offline

Activity: 285
Merit: 251


View Profile
May 29, 2016, 09: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?

cr1776
Legendary
*
Offline Offline

Activity: 4018
Merit: 1299


View Profile
May 29, 2016, 11:45:11 AM
Last edit: May 29, 2016, 01:08:21 PM by cr1776
Merited by ABCbits (1)
 #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
Wiss (OP)
Jr. Member
*
Offline Offline

Activity: 68
Merit: 1


View Profile
May 29, 2016, 02:08:22 PM
 #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?
cr1776
Legendary
*
Offline Offline

Activity: 4018
Merit: 1299


View Profile
May 29, 2016, 03:17:15 PM
 #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. 
Wiss (OP)
Jr. Member
*
Offline Offline

Activity: 68
Merit: 1


View Profile
May 29, 2016, 05: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?

d5000
Legendary
*
Offline Offline

Activity: 3892
Merit: 6006


Decentralization Maximalist


View Profile
May 29, 2016, 10: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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1122


View Profile
June 01, 2016, 12:40:17 AM
 #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.

Paashaas
Legendary
*
Offline Offline

Activity: 3421
Merit: 4331



View Profile
June 02, 2016, 03:30:26 PM
 #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/
Karartma1
Legendary
*
Offline Offline

Activity: 2310
Merit: 1422



View Profile
June 07, 2016, 06: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...
Mark-Lester
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
June 07, 2016, 10: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.
martin_t
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
June 08, 2016, 07: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
Karartma1
Legendary
*
Offline Offline

Activity: 2310
Merit: 1422



View Profile
June 09, 2016, 08: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.
InnoTech
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 13, 2016, 12:03:53 AM
 #16

ETH is the best source code to see this implementation.
bitcoindanisma
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
June 13, 2016, 11:54:06 PM
 #17

is lisk better for creating smart contracts ?
nebuzen
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
June 14, 2016, 05: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
Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1122


View Profile
June 24, 2016, 12:17:55 AM
 #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. 



Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!