Videogame localization & technology_ how to enhance the power of translation.pdf
EOSIO Distributed Application Use Cases
1. Distributed
Apps on EOS
by Rob Konsdorf & Eugene Luzgin
All opinions in this talk are the speaker’s own and not the official statements of Block.one
or the greater EOS decentralized autonomous community. This presentation does not
constitute investment advice.
2. What is EOS?
● A governed blockchain network.
● A decentralized autonomous community.
● A protocol for deploying and interacting
with WebAssembly smart contracts.
● Launched using EOSIO software, an
open source C++ project on Github.
● Uses Delegated Proof of Stake (DPOS)
to achieve distributed consensus.
3. What is a distributed application?
● Distributed applications (aka d-apps) leverage data and code stored on a
blockchain network.
● Empower the user to be the authorizer of actions in an app.
● Participants can be valued for their contributions via tokens.
● All actions are transparent.
● Everyone can access data on EOS according to the same rules.
○ Private data could still be put on chain in an encrypted form.
4. Types of Distributed Applications
● Apps that use the core token of the platform e.g.
EOS.
○ Apps that only require storing or transforming data.
○ Apps that leverage the utilities of the core token.
■ e.g. EOS leasing platform.
● Apps that use their own token (perhaps for
different distribution of governance rights and/or
unique incentive models). Some examples:
○ Block producer DACs like EOS Cafe, EOSDAC, and
OracleChain.
○ Everipedia (IQ)
5. Distributed Autonomous Communities (DACs)
● DACs provide new ways to account for value in the
economy by providing incentives (micropayments) to
contribute to a collective.
○ Explicitly valuing data, e.g. blog content, wiki edits, health data,
transferring knowledge.
○ In STEEM, supply inflation pays for the incentive pool.
● DACs are implemented as distributed applications.
● The ecosystem of applications on EOS will give it
tremendous value as an identity provider that respects the
user’s rights.
6. Developer Intentions Should Be Stated Upfront
● Article XI in the draft constitution requires
developers to publish the intent and arbitration
forum for their application.
“Each Member who makes available a smart
contract on this blockchain shall be a
Developer. Each Developer shall offer their
smart contracts via a license, and each smart
contract shall be documented with a Ricardian
Contract stating the intent of all parties and
naming the Arbitration Forum that will resolve
disputes arising from that contract.”
7. Developers Are Responsible for their Users
● Article XIII in the draft constitution states
that developers are responsible for
ensuring the users of their apps follow the
constitution:
“As Developers are able to offer services
and provide interaction with the
blockchain to non Members via their
applications, the Developer assumes all
responsibility for guaranteeing that
non-Member interaction conforms to this
Constitution.”
8. “Ok, where do I start?”
● Step 1: Set up an EOS development environment.
● Step 2: Dig into the documentation.
● Step 3: Publish your first smart contract.
● Step 4: Tinker and iterate.
9. Setting up a local EOS environment
● Build from source (Linux and MacOS).
○ git clone https://github.com/EOSIO/eos.git
○ cd eos; git checkout dawn-v4.0.0; git submodule update --init --recursive
○ ./eosio_build.sh && cd build && sudo make install
● You’ll find some new programs on your PATH:
○ nodeos: the EOSIO blockchain node application.
○ cleos: the EOSIO blockchain API command line tool.
○ keosd: the EOSIO wallet program for storing encrypted account keys.
○ eosiocpp: tool to output web assembly files and ABI specification files from C++ code.
10. nodeos
● Connects to peers to form a distributed
network.
● Can be configured extensively.
○ Block producing nodes (compete to sign
blocks)
○ Non-producing nodes (API node)
○ Specific plugins can be toggled (exposing
different API capabilities)
● A mesh of nodes is the core of the
blockchain network.
11. cleos
● Used to interact with a nodeos
via API calls using the
command line.
● Supports querying chain state,
creating accounts and keys,
updating accounts and
contracts, transferring, signing,
voting, and more.
12. keosd
● A separate program for storing keys
in a password-protected & encrypted
wallet.
● Exposes wallet API endpoints for
other programs (such as cleos) to
communicate with.
13. eosiocpp
● Takes C++ files (smart contract code) as
input and can generate .abi and .wast
files as output.
● Those generated files can be published
to an EOS account.
● That EOS account becomes the address
for the smart contract actions defined in
the original C++ code.
14. EOS API Overview
EOS Node RPC Interface
EOSjs API for Web Development
Smart Contract API [C/C++]
Extra: EOS API Service & Web Wallet Keychain
15. EOS Node RPC Interface: Chain API
GET /v1/chain/get_info Get latest information from node
POST /v1/chain/get_block Get information on a specific block
POST /v1/chain/get_account Get account information
POST /v1/chain/get_code Fetch smart contract code
POST / v1/chain/get_table_rows Fetch smart contract data from an account
POST /v1/chain/abi_json_to_bin Serialize json to binary hex
POST /v1/chain/abi_bin_to_json Serialize binary hex back to json
POST /v1/chain/push_transaction Push single transaction (JSON) to blockchain
POST /v1/chain/push_transactions Push multiple transactions to blockchain
POST /v1/chain/get_required_keys Get required keys (public) to sign transaction
Full interface specs here: https://eosio.github.io/eos/group__eosiorpc.html
16. EOS Node RPC Interface: Wallet API
POST /v1/wallet/create Create new wallet with the given name
POST /v1/wallet/open Open existing wallet with the given name
POST /v1/wallet/lock Lock a wallet of the given name
POST /v1/wallet/unlock Unlock a wallet of the given name
POST /v1/wallet/import_key Import a private key to the wallet of the given name
GET /v1/wallet/list_wallets List all wallets
GET /v1/wallet/list_keys List key pairs for unlocked wallets
GET /v1/wallet/get_public_keys List all public keys across all wallets
POST /v1/wallet/set_timeout Set wallet auto-lock timeout
More specs here: https://eosio.github.io/eos/group__eosiorpc.html#walletrpc
17. EOSjs - general purpose JS library for EOS blockchain
Eos = require('eosjs') // Eos = require('./src')
eos = Eos.Localnet() // Default: 127.0.0.1:8888 or configuration set for remote endpoint
// All API methods print help when called with no-arguments.
eos.getBlock()
// If a callback is not provided, a Promise is returned
eos.getBlock(1).then(result => {console.log(result)})
// Parameters can be sequential or an object
eos.getBlock({block_num_or_id: 1}).then(result => console.log(result))
// Callbacks are similar
callback = (err, res) => {err ? console.error(err) : console.log(res)}
eos.getBlock(1, callback)
eos.getBlock({block_num_or_id: 1}, callback)
// Provide an empty object or a callback if an API call has no arguments
eos.getInfo({}).then(result => {console.log(result)})
Code and documentation here: https://github.com/EOSIO/eosjs
18. Smart Contract API [C/C++]
Account API Define API for querying account data.
Action API Define API for querying action properties.
Chain API Define API for querying internal chain state.
Database API APIs that store and retrieve data on the blockchain.
Math API Defines common math functions.
Console API Enables applications to log/print text messages.
System API Define API for interacting with system level intrinsics.
Token API Defines the ABI for interfacing with standard-compatible token messages and database
tables.
Transaction API Define API for sending transactions and inline messages.
Source: https://eosio.github.io/eos/group__contractdev.html
19. EOS API Service & Web Wallet Keychain
https://github.com/eluzgin/eos-wallet-keychain
21. EOS Documentation & Additional Resources
Github Wiki: https://github.com/EOSIO/eos/wiki
EOSIO Stack Exchange (Ask me for an invite after) https://eosio.stackexchange.com
EOS New York Dev Portal Eosdocs.io
EOS Technical Whitepaper v2 https://github.com/EOSIO/Documentation/blob/TWPv2/TechnicalWhitePaper.md
EOS Analysis and Evaluation https://multicoin.capital/2018/04/24/eos-analysis-and-valuation/
Dan Larimer’s Intro to Blockchain talk https://www.youtube.com/watch?v=sYAktmG1NuA
Thomas Cox Arbitration Overview https://vimeo.com/264069066/c84336cc39
EOS Persistence API https://github.com/EOSIO/eos/wiki/Persistence-API
22. Link up with the EOS Community
● EOS Developers: https://t.me/joinchat/EgOVjkPktgfUS3kt14FStw
● EOS Governance: https://t.me/EOSGov
● EOS BP Infrastructure: https://t.me/BPInfrastructure
● EOS Block Pros: https://t.me/EOSPros
● https://eostalk.io/forums
23. Upcoming Hackathons
● Hack Til Dawn
○ Community sponsored hackathon coming this summer.
○ Web: https://hack-til-dawn.com
○ Telegram: https://t.me/HackTilDawn
● EOS Global Hackathon
○ Pitch your team and idea today! First Block.one sponsored hackathon will be in Hong Kong.
○ https://eoshackathon.io
24. EOS Launch
We see VPN network with encrypted peer to peer
communication between BP nodes will go along
way in protecting servers running BP node from a
range of possible attacks.
The BP community have successfully tested
building mesh network of VPN nodes using
WireGuard software and then starting EOS
Mainnet on top of this VPN network.
25. Tulip Conference
● Next Gen Blockchain Conference in
San Francisco
○ June 7-8
○ Workshop: June 11-13
● Block Producer Summit
○ Multiple panels with representation from
different BPs.