Questions abous blockchain and ethereum - blockchain

I'm reading about blockchain and started devoloping my first smart contract, i have a lot of experience devoloping IT solutions, but everything in blockchain look very different than what i'm used to, i can't visualize some approach and possible i'm losing something in my reading, if someone could help me with those questions below ...
:)
so lets go
Suposing i have a blockchain solution running in ethereum. It's a voting system and this system was devoloped by a district to do a research with your citizens so
If one of the citizens vote, it's a transacation in ethereum and this must be paid using gas. To do that, you need ether and when you create an account this is zero. How would the citizens vote ? will they need to buy ether in a exchange (or mining ?) ?
how can i block votes outside my district if everybody in the network can send data to my smart contract ?
Is it common to have a traditional system for store other datas (address, phones, SSI) and use only a particular transaction, like vote, in blockchain ? how can i integrate them ?
i have created a wallet in myetherwallet. This wallet is the same as a new account command using geth ? is it possible to connect to my wallet created in myetherwallet from geth ?
where can i find a god material for those topics ?

Please find below responses from my end. Remember, the more responses we get to these questions the more diverse it can become as ideas differ from one individual to another based on lots of factors. Anyhow, here we go...
If one of the citizens vote, it's a transacation in ethereum and this must be paid using gas. To do that, you need ether and when you create an account this is zero. How would the citizens vote ? will they need to buy ether in a exchange (or mining ?) ?
Yes, for starters they have to pay the gas. Although, there's an ERC827 out there not to pay fee, and also some discussions around delegating the payment to a specific account, such that instead of individual users the owner of the smart contract can pay. In this case maybe the government can bear the amount.
how can i block votes outside my district if everybody in the network can send data to my smart contract ?
You can run consortium chain like quorum to limit the participants to a specific group. So that the transactions aren’t visible to everyone. Because on the Blockchain main chain of Ethereum it’s visible to everyone.
Is it common to have a traditional system for store other datas (address, phones, SSI) and use only a particular transaction, like vote, in blockchain ? how can i integrate them ?
Yup, you don't want to take the Personal Information (PI) onto Blockchain as its visible for everyone to view. Instead you can have them store in a database and use an Oracle service to be able to talk to outside Blockchain.
i have created a wallet in myetherwallet. This wallet is the same as a new account command using geth ? is it possible to connect to my wallet created in myetherwallet from geth ?
Yes, pretty much possible. You can use your password (or) mnemonic to connect to that account from your geth node.
where can i find a god material for those topics ?
Get this book on amazon or if you are eager to read it before you get the paperback book read it on github here. A better way to read this as a book on github is install an extension called Octotree
Hope, i have answered your questions, except one :)

Related

Is it necessary to use a cryptocurrency to make a payment, using blockchain?

I'm documenting in this blockchain world. Basically I would like to make some web application in which a user decides to make a donation, and would like to see who made the donation and to which entity. I have several doubts, the first one:
1-Is it possible to use blockchain using javascript? (can smartcontracts be done in javascript?)
2- If the donation is made using blockchain, is it necessary to use a cryptocurrency? or you can use real money and make the transaction (using some means like paypal)
3- Can real money be transferred by some means such as paypal using blockchain?
Thank you very much, your answers will document me much more
Is it possible to use blockchain using javascript? (can smartcontracts be done in javascript?)
Every blockchain has a SDK, the part of the software which lets you
interact with the real blockchain( A decentralise ledger). There
are generally two parts in the Blockchain , One is client and one
is processor.
As you must have guessed, Client is the one who sends the transaction,
This transaction must satisfy certain rules in order to be accepted by
the transaction processor. If the transaction gets validated by
transaction processor, The transaction will be added to the block alongwith
other transactions and this block will then be added to the blockchain.
Copied to all other nodes (Forks are a different story)
Generally Most blockchains lets you interact with the blockchain through
ABCI which is just an interface to convert your transaction into
a format understandable by the blockchain processor.
Some blockchains has their fixed transaction processing logic like Ethereum for
security and some lets you write your own transaction processing logic like
Sawtooth, Fabric etc.
Permissioned and some public blockchains like Hyperledger projects and
cosmos SDK lets you write your own application layer logic for Blockchain,
So yes, You can write those transactions in Javascript or any other programming
language, as long as it satisfies the interface.
Public blockchain deals with tokens having real worth. Their transaction logic
is already fixed, but some of them does provide javascript API's like NEO
(Not sure about that)
2- If the donation is made using blockchain, is it necessary to use a cryptocurrency? or you can use real money and make the transaction (using some means like paypal)
You can do that and put the donation receipt on Blockchain linked with
real identities of people. This way if anybody wants to check who pays
how much donation, They can query blockchain for the user address.
3- Can real money be transferred by some means such as paypal using blockchain?
This can also be done, but this will involve using a crypt exchange,
centralised or decentralise. You can convert the real money into crypto
of your choice at one end and vice versa at the other hand.
Note: This is based on my limited knowledge of Cryptocurrencies. Please consult more people or any professional company before acting on this advice.
I don't think any protocols offer the possibility to implement their smart contracts in Java Script, but you can build a translator between the two languages which could potentially benefit others in the open source community.
So you want have some engineers do some work for you, in this case build an web application. There are several ways you can get this done, here are some ideas:
a) issue tokens which pays profits based on the success of your new business, you might be able to do this on a protocol that is not tied to any specific crypto or fiat currency.
The users can use an exchange to convert your tokens to their favorite one.
b) approach a private equity or VC fund and get them to pay for it.
c) forget about blockchain, and just pay for the project to your favorite engineers.

Blockchain dApp: How end user use dApp without care of Ethereum Account

I want to develop a dApp (Smart Contract) on Ethereum and have a mobile application on top of it.
My concern is: every time we interact with Smart Contract to inquiry or change data, we need a account as well as a certain number of ETH used as Gas. It looks no problem on the development environment, but getting into trouble in real life, I mean about user experience (UX).
- Whenever a user download and install the app, we will create for them an Ethereum account. BUT where they can get ETH to interact with Smart Contract? And absolutely, they don't care and don't want to be bothered with exchange ETH.
I have an alternative solution: we have only 1 Ethereum account with some ETH in their and act as the Proxy to the Smart Contract. Whenever user's request come, we delegate the request to Smart Contract and return to user. BUT it seems we will lost the main characteristic of Blockhain: Decentralized :) Who know we might arbitrarily change the Smart Contract without user attention.
Any suggestion is appreciated. Thank you!
You can send some ether to each new user that is just enough to call your contract.

how to uniquely identify user on ETH blockchain

I am currently learning ETH blockchain based DApp development. I want to ask that, if we are developing an eVoting application based on blockchain, then how can we ensure that each citizen is voting only once and votes are calculated properly to avoid duplicate votes?
Thanks
Identity is a very difficult thing to do on the blockchain and is the subject of very active research by many large and small entities.
With this said, the way to limit users to one vote each on the Ethereum blockchain is to limit each public address to one vote each. Your smart contract can check if the user has already voted, and can deny the user a second vote. This does not stop users from simply creating a second account and voting again.
The most effective way to do this given technological limitations is to simply perform the identity check off-chain. You can implement a Know Your Customer (KYC) system on your site and assign each user to a single address. Provided the system is robust, it should be extremely difficult for people to create multiple identities.

Smart Contract (Solidity) Auction when bidders abstracted from their wallets

I have a web site which sells certain information for its users for a fixed cost.
I want to go ICO with my business and trying to change my operating model so it can leverage blockchain technology.
However I want to make sure that auction participants are in some way abstracted from their Ethereum wallet and budding in points (they will pay later if action is actually won. i.e. eBay model) without knowing that they are actually using blockchain behind the scenes. Once bidding is complete, ICO investors will automatically get their share distributed to them, and winning bidder will receive their info upon payment (in most cases real money which we will convert to ETH and mark status as paid in solidity contract)
Is there any solution for that problem, can i create wallets on the fly for the bidders accounts? Since my site is always a seller, is there a way to set auctions automatically (interact with my contract from my lets say java backed etc?)
Is there any work around/ suggestions?
Thank You
You can create wallets on the fly for your customers. That's perfectly doable. But as you create the wallets, customers can't trust those wallets you have their private keys, so they should withdraw the funds immediately to their wallets. This took us to step 0: Wallet creation. So either way, your customers have to create a wallet for themselves, for security reasons.

Permissions within a blockchain?

Everything I've been reading about blockchain from my understanding says that even on a private blockchain, every participant can view all transactions. I've seen it mentioned that a use case for block chain could be the sharing of medical data. So for example if I had a blockchain that holds the medical history of every person from birth to death in a country. Is there no way of setting up permissions so that only data relating to a person and those who have been given permission to that person's data can view it? If the data is stored on every node in a blockchain, how is a person's computer supposed to have the capacity to store the medical data of every person in a country?
I would advise looking up Medrec when related to health care. Most of the research is geared towards dealing with keeping the data off the chain. In addition, there are other blockchains that might provide a better solution, for more privacy, for example, I would look up quorum by JP Morgan. There are different formats being looked at but these can give you two possible solutions. Also, check out Health Nexus' whitepaper, it deals with medical blockchain technology. Let me know if you need more.
https://www.pubpub.org/pub/medrec
https://github.com/jpmorganchase/quorum
There are blockchains that allow defining permissions. Hyperledger Fabric is one of them. You have the ability to configure channels with data stored in the ledger of the participants in the channel only.
to pass the scalability problem of blockchains and their solutions for this purpose, you should concentrate on off-chain architecture.
right now this scenario should be considered:
save tx's to the blockchain(it should be formal)
save hashed data to an off-chain repository like DB's.
save the address of that data-hash to blockchain for future access.
yeah, you pointed to the right thing. a central point of access as an admin-node or god should be the opposite of blockchain as a distributed dream.
for this issue, the mechanism like secret-sharing or re-encrypt proxy should be realized to guarantee the privacy and security of data-hashed.
for more information read this article:
https://www.sciencedirect.com/science/article/pii/S2210670717310685
GoQuorum has an 'enhanced permissioning' model where you can do all that, and at the same time stay compatible with Ethereum standards.
Check this out: https://consensys.net/docs/goquorum/en/latest/configure-and-manage/manage/enhanced-permissions/