EOS环境安装

EOS架构简单介绍

比较有价值的网站 

http://www.eosdata.io

https://steemit.com/


nodeos:区块服务端组件

cleos :和区块链网络交互以及钱包管理的命令行接口

keosd :钱包管理组件

EOS的安装

源码安装

clone EOS的git仓库

git clone https://github.com/EOSIO/eos --recursive

//git clone --branch dawn-v4.0.0 https://github.com/EOSIO/eos --recursive

编译

cd eos 

./eosio_build.sh

测试安装

start mongod

~/opt/mongodb/bin/mongod -f~/opt/mongodb/mongod.conf&

make test

cd build 

make test

安装

cd build 

sudo make install

启动EOS节点

cd build/programs/nodeos

./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin

查看默认配置和创世区块

cd  ~/.local/share/eosio/nodeos/config


a

config.ini

# File to read Genesis State from (eosio::chain_plugin)

genesis-json = "genesis.json"

# override the initial timestamp in the Genesis State file (eosio::chain_plugin)

# genesis-timestamp =

# the location of the block log (absolute path or relative to application data dir) (eosio::chain_plugin)

block-log-dir = "blocks"

# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin)

# checkpoint =

# Override default WASM runtime (eosio::chain_plugin)

# wasm-runtime =

# Maximum size MB of database shared memory file (eosio::chain_plugin)

shared-memory-size-mb = 1024

# Track only transactions whose scopes involve the listed accounts. Default is to track all transactions. (eosio::history_plugin)

# filter_on_accounts =

# The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin)

http-server-address = 127.0.0.1:8888

# The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin)

# https-server-address =

# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)

# https-certificate-chain-file =

# Filename with https private key in PEM format. Required for https (eosio::http_plugin)

# https-private-key-file =

# Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin)

# access-control-allow-origin =

# Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin)

# access-control-allow-headers =

# Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin)

access-control-allow-credentials = false

# The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin)

p2p-listen-endpoint = 0.0.0.0:9876

# An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin)

# p2p-server-address =

# The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin)

# p2p-peer-address =

# The name supplied to identify this node amongst the peers. (eosio::net_plugin)

agent-name = "EOS Test Agent"

# Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. (eosio::net_plugin)

allowed-connection = any

# Optional public key of peer allowed to connect.  May be used multiple times. (eosio::net_plugin)

# peer-key =

# Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin)

# peer-private-key =

# Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin)

max-clients = 25

# number of seconds to wait before cleaning up dead connections (eosio::net_plugin)

connection-cleanup-period = 30

# True to require exact match of peer network version. (eosio::net_plugin)

network-version-match = 0

# number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin)

sync-fetch-span = 100

# maximum sizes of transaction or block messages that are sent without first sending a notice (eosio::net_plugin)

max-implicit-request = 1500

# Enable block production, even if the chain is stale. (eosio::producer_plugin)

enable-stale-production = false

# Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin)

max-transaction-time = 30

# Percent of producers (0-100) that must be participating in order to produce blocks (eosio::producer_plugin)

required-participation = 33

# ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin)

# producer-name =

# Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin)

private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]

# Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin)

txn-reference-block-lag = 0

# The path of the wallet files (absolute path or relative to application data dir) (eosio::wallet_plugin)

wallet-dir = "."

# Timeout for unlocked wallet in seconds (default 900 (15 minutes)). Wallets will automatically lock after specified number of seconds of inactivity. Activity is defined as any wallet command e.g. list-wallets. (eosio::wallet_plugin)

unlock-timeout = 900

# eosio key that will be imported automatically when a wallet is created. (eosio::wallet_plugin)

# eosio-key =

# Plugin(s) to enable, may be specified multiple times

# plugin =


genesis.json

{

  "initial_timestamp": "2018-03-02T12:00:00.000",

  "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",

  "initial_configuration": {

    "max_block_net_usage": 1048576,

    "target_block_net_usage_pct": 1000,

    "max_transaction_net_usage": 524288,

    "base_per_transaction_net_usage": 12,

    "net_usage_leeway": 500,

    "context_free_discount_net_usage_num": 20,

    "context_free_discount_net_usage_den": 100,

    "max_block_cpu_usage": 100000,

    "target_block_cpu_usage_pct": 500,

    "max_transaction_cpu_usage": 100000,

    "base_per_transaction_cpu_usage": 512,

    "base_per_action_cpu_usage": 1024,

    "base_setcode_cpu_usage": 2097152,

    "per_signature_cpu_usage": 102400,

    "cpu_usage_leeway": 2048,

    "context_free_discount_cpu_usage_num": 20,

    "context_free_discount_cpu_usage_den": 100,

    "max_transaction_lifetime": 3600,

    "deferred_trx_expiration_window": 600,

    "max_transaction_delay": 3888000,

    "max_inline_action_size": 4096,

    "max_inline_action_depth": 4,

    "max_authority_depth": 6,

    "max_generated_transaction_count": 16

  },

  "initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000"

}


Docker 快速安装

安装docker镜像

git clone https://github.com/EOSIO/eos.git --recursive

cd eos/Docker

docker build.-t eosio/eos

启动

docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2

查询区块

curl http://127.0.0.1:8888/v1/chain/get_info

上传合约

cleos set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi


参考:https://github.com/EOSIO/eos/wiki/Local-Environment#2-building-eosio

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 215,384评论 6 497
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,845评论 3 391
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 161,148评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,640评论 1 290
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,731评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,712评论 1 294
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,703评论 3 415
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,473评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,915评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,227评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,384评论 1 345
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,063评论 5 340
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,706评论 3 324
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,302评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,531评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,321评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,248评论 2 352

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,320评论 0 10
  • 1.我们最圣神的泪水,从不借双眼宣泄。(Our most sacred tears never seek your...
    九雨农阅读 955评论 0 0
  • 上周五晚,一个看似很平常的晚上,好友小琴姐的孙子在星海音乐厅演出(省实合唱团和日本儿童合唱团),送了两张音乐会的票...
    Sophyzhong阅读 418评论 0 1
  • 我以为,自己足够坚定,坚定到无论何时,面临选择,我都能够义无反顾地做出选择,没有迟疑。 然而,现在的我,却不知道自...
    经纬经纬阅读 314评论 0 0
  • 看了一次落日,顿时感觉生活如此美好,我们没有交流的伙伴,但可以用文字记录我航海的生涯。刚刚看了一部电影《心灵捕手》...
    大皖安利阅读 167评论 3 2