EOS whitepaper walk-through: Accounts & Action and Handlers.

in #eos6 years ago (edited)

                                                        

Read the Whitepaper here 

Last time we finished going over the abstract, note and disclaimer, and took a brief overview of the EOS whitepaper.

And we went over the two of the ten parts, Background, and Requirement.

Then we went over the Consensus Algorithm in three parts. Part One, Part Two, Part Three.

Today we'll be going over the Accounts system in EOS.

Accounts

The EOS.IO software permits all accounts to be referenced by a unique human readable name of up to 12 characters in length. The name is chosen by the creator of the account. The account creator must reserve the RAM required to store the new account until the new account stakes tokens to reserve its own RAM.

In Bitcoin and Ethereum, the unit that holds data is that of the address. 

In Bitcoin, the address is an identifier of 26 to 35 character length that holds any amount of bitcoin. They typically look like this:  1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2. All Bitcoin address perform the same functions. 

It cost noting to create a new Bitcoin address, and they can be created offline.

In Ethereum, the address is sometimes called accounts and it stores both ether and code data. Ethereum address usually look like this:  0xb794F5eA0ba39494cE839613fffBA74279579268. Ethereum has two kinds of addresses. One is used to store ether, and the other is used to store contract code. Though the contract address can also store ether, and it is how the code gets activated: by sending ether to the contract address. 

It cost nothing to create a new Ethereum address, and they can be created offline.

EOS, though uses the same terminology, has accounts that are different from Ethereum. EOS accounts are usally human readable, like @bluabaleno. They store both eos tokens and eos contract code.

EOS accounts must be created using staked tokens. This means that EOS tokens are NOT free. 

In a decentralized context, application developers will pay the nominal cost of account creation to sign up a new user. Traditional businesses already spend significant sums of money per customer they acquire in the form of advertising, free services, etc. The cost of funding a new blockchain account should be insignificant in comparison. Fortunately, there is no need to create accounts for users already signed up by another application. 

Here EOS offers a brief justification for the account creation fee. Currently, there is a fee associated with account creation on Steem also, though this might change with a upcoming hardfork.

As with accounts on Steem, once a user has an account, he can choose to use the same account across different application interfaces. 

On Steem, it is possible to log into over a hundred different applications operating on the Steem blockchain.

It cost around $8.21 for companies to convince users to sign up for an account.

Actions & Handlers

Each account can send structured Actions to other accounts and may define scripts to handle Actions when they are received. The EOS.IO software gives each account its own private database which can only be accessed by its own action handlers. Action handling scripts can also send Actions to other accounts. The combination of Actions and automated action handlers is how EOS.IO defines smart contracts.

In Ethereum, transactions are the basis for smart-contract. Ether are sent to contract-holding addresses to trigger the contract. 

In EOS, there because there is no transaction fees associated with sending data update request to the blockchain, these are called Actions. 

Actions

Actions are flexible in what they can accomplish, and depends on how they are structured by the smart-contract. Each smart-contract specifics how an action is to be processed by specifying the action handler.

Action-handlers.

For example, a smart-contract that acts a casino might have an action-handler that handles the action "place-bet", let's call this "incoming-bets", which will take a numerical input, usually in the form of tokens.

The users would send a "place-bet" action along with the parameter that is associate with that action, namely, a token amount.

Action-automation.

Action-handlers can also trigger other actions. Keeping with the example of the casino, once the "incoming-bets" action handler is receives the "place-bet" action, it run the casino code and then returns a result which is sent back to the users with a "bet-results" action.

This can go on and on. The user can specify in his contract with code logic that if the "bet-results" is <0, then send another "place-bet" action to the contract, thus creating a automated gambling cycle.

To support parallel execution, each account can also define any number of scopes within their database. The block producers will schedule transaction in such a way that there is no conflict over memory access to scopes and therefore they can be executed in parallel. 

Scopes is a region of data of a contract. Contracts can only write to regions in their own contract but they can read from any contract's regions. Proper scoping allows transactions to run in parallel for the same contract because they do not write to the same regions. -source.

This means that in any smart-contract, the database can be broken up into different, non-conflicting regions. 

Using the Casino example again, suppose the contract supports donations from users, since the donation scope does not affecting the process of placing bets and returning results to the user, those two operation can be done simultaneously.

------------------------------------------------------------------------------------------------------------------

If you would like to know more about me and what I'm doing you can read my introduction post here.

Read my series on the Steem blockchain:

Steem: Welcome to the Matrix. Part One

Steem: Operating in the Matrix. Part Two

Steem: Construction of the Matrix. Part Three

Read my series on the EOS blockchain:

EOS whitepaper walk-through. Abstract

EOS whitepaper walk-through. Note and Disclaimer

EOS whitepaper walk-through. Overview

EOS whitepaper walk-through. Background

EOS whitepaper walk-through. Requirement.

EOS whitepaper walk-through. Consensus Algorithm. Part One, Part Two, Part Three.

And you can contact me in the following way:

Twitter

@bluabaleno on Steem.chat

bitadco@gmail.com  

Sort:  

Coins mentioned in post:

CoinPrice (USD)📈 24h📈 7d
BTCBitcoin9253.560$4.3%10.67%
EOSEOS15.116$1.55%52.54%
ETHEthereum657.283$4.32%14.21%
STEEMSteem3.893$4.23%25.84%

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.029
BTC 61215.97
ETH 3350.38
USDT 1.00
SBD 2.49