These are chat archives for ethereum/tutorials

23rd
Aug 2017
blckrbbt
@blckrbbt
Aug 23 2017 05:43
Is there any kind of decentralized cheap Shipping DAO ??
Shipping decentralized?
cheap global Shipping?
Satyam Agrawal
@satyamakgec
Aug 23 2017 11:22
send me link
Utws
@Utws
Aug 23 2017 12:55
Hello, help. Wrote a smart contract creating a token. Poured into the purse of MIST. The fourth day is worth, confirming 0 of 12. What to do ?
Henrique Leite
@falehenrique
Aug 23 2017 13:25

Hello guys, I am studying about smart contracts and I am use the example Ballot of the site solidity.readthedocs.io.

I saw that informations is salved in a vector, is common it? I believe that this vector will grow and my gas to compile the contract too. I think it is invalid, I want to save the informations of my clients outside the contract without to use Vector. Example, name, age e document outside my contract. Is it possible?

Patrick McCorry
@stonecoldpat
Aug 23 2017 13:25
@falehenrique it is cheaper to store that off-chain
you could store the hash i.e. h = H(name, age, salt, etc)
and then people can verify the information they see off-chain matches what is committed too on-chain
Henrique Leite
@falehenrique
Aug 23 2017 13:28
Yes!! But @stonecoldpat What is the advantage to use the Blockchain, because I continue using a private database.
And it isn't a decentralized architecture
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:30
plenty of reasons.
  1. co-ordination: contract replaces the role of a single entity to forward/store messages
  2. self-enforced protocol: consensus that secures the blockchain - also guarantees that your contract/protocol is actually enforced
  3. public verifiability: everyone can verify the protocol is running correctly and no one is cheating
the downside is that computation and storage is expensive - so you try to minimise that as much as possible
metabol
@metabol
Aug 23 2017 13:32
Blockchain would is not necessarily a storage dump its more like a means of time-stamping and tracking transactions hashes
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:32
it is more than that
you should model a blockchain/contracts are a trusted third party with public state - i.e. anything a trusted party can do without keeping secrets - so can the blockchain/contract
metabol
@metabol
Aug 23 2017 13:33
How do you track state then?
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:34
the trusted third party maintains state
that is the point, it has public state
the "contract" is the trusted party who maintains everything for you
metabol
@metabol
Aug 23 2017 13:34
yeah but the state has to be stored in a merkel tree
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:34
that is implementation stuff
metabol
@metabol
Aug 23 2017 13:34
yeah
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:34
not the mental model
metabol
@metabol
Aug 23 2017 13:35
that was what i was explaining... merkel trees are the bases of blockchain technology
contracts and code are "enhancements"
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:35
digital signatures (ecdsa) and hash functions are the basis
merkle trees are one way to structure hash functions
metabol
@metabol
Aug 23 2017 13:36
BLOCK OF HASHES == blockchain
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:36
i.e. a tree of hash functions, and their pre-images follow a particular order
a blockchain has two components; the ledger and how it is governed
the ledger is a block of hashes
how it is governed can be permissioned, proof of work. proof of stake, whatever
metabol
@metabol
Aug 23 2017 13:37
ledger is a block of hashes == blockchain
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:37
no
that is 1 part
metabol
@metabol
Aug 23 2017 13:37
Without EVM contracts do not work
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:38
:/
metabol
@metabol
Aug 23 2017 13:38
hehe
contracts get compiled into OPCODES for EVM
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:39
i think you are trying to troll me
im going to go back to work
metabol
@metabol
Aug 23 2017 13:39
Nope
Henrique Leite
@falehenrique
Aug 23 2017 13:39
@stonecoldpat wow que legal, thank you so much. Good answer.
metabol
@metabol
Aug 23 2017 13:39
Serious .. look EVM/Ethereum DOCS @stonecoldpat
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:39
i'm very familiar with it @metabol
Henrique Leite
@falehenrique
Aug 23 2017 13:40
Blockchain would is not necessarily a storage dump its more like a means of time-stamping and tracking transactions hashes yes, Now it makes sense
Now it makes sense
metabol
@metabol
Aug 23 2017 13:42
Yeah
Look at this from the official docs
Henrique Leite
@falehenrique
Aug 23 2017 13:42
But everyday I see people talking about DAP and the application total decentralized, I think now it is impossible. We need to make hybrids projects.
metabol
@metabol
Aug 23 2017 13:42

The Ethereum Virtual Machine
Overview

The Ethereum Virtual Machine or EVM is the runtime environment for smart contracts in Ethereum. It is not only sandboxed but actually completely isolated, which means that code running inside the EVM has no access to network, filesystem or other processes. Smart contracts even have limited access to other smart contracts.

@falehenrique Correct
@stonecoldpat Revise the solidity docs
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:43
-.-
@falehenrique what they mean by "decentralised" is that there is no single human body in control of the protocol. but you are right - it is not decentralised as the contract itself is a conceptually a centralised being
so when designing a "dapp" - you should think of protocols that require a centralised being i.e. a contract - and design it such that the contract can manage everything and store that publicly.
to be truly "decentralised" means there is no central body managing the process at all (which also means no contract at all).
in a way - you are building a centralised "dapp" ontop of a potentially decentralised platform
and that "decentralised platform" is what allows the centralised contract to work without any single human's intervention
Henrique Leite
@falehenrique
Aug 23 2017 13:53
@metabol and @stonecoldpat Thank you a lot! Can you suggest good materials to me learn how I can to structure my project using Ethereum?
Patrick McCorry
@stonecoldpat
Aug 23 2017 13:55
but i really liked it
in fact my paper http://homepages.cs.ncl.ac.uk/feng.hao/files/openvotenetwork.pdf might also be helpful - in terms of how to structure it (for an election) and some pitfalls
i tell students just to get their hands dirty though. go build crap dapps and see for yourself
Henrique Leite
@falehenrique
Aug 23 2017 13:59
yes!!! I agree. The theory is beautiful, but are only words.
i do more than words :p
but you need to know the theory to really appreciate / work out what a contract can do for you
Henrique Leite
@falehenrique
Aug 23 2017 14:01
@stonecoldpat thank you!!! I will to study it the documents and see your project.
Patrick McCorry
@stonecoldpat
Aug 23 2017 14:01
cool good luck