EOS環(huán)境安裝

EOS架構(gòu)簡單介紹

比較有價值的網(wǎng)站?

http://www.eosdata.io

https://steemit.com/


nodeos:區(qū)塊服務(wù)端組件

cleos :和區(qū)塊鏈網(wǎng)絡(luò)交互以及錢包管理的命令行接口

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節(jié)點(diǎn)

cd build/programs/nodeos

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

查看默認(rèn)配置和創(chuàng)世區(qū)塊

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

查詢區(qū)塊

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子用含,更是在濱河造成了極大的恐慌盾鳞,老刑警劉巖,帶你破解...
    沈念sama閱讀 211,123評論 6 490
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件诗茎,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)谱秽,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,031評論 2 384
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來摹迷,“玉大人疟赊,你說我怎么就攤上這事∠康铮” “怎么了近哟?”我有些...
    開封第一講書人閱讀 156,723評論 0 345
  • 文/不壞的土叔 我叫張陵,是天一觀的道長鲫寄。 經(jīng)常有香客問我吉执,道長,這世上最難降的妖魔是什么地来? 我笑而不...
    開封第一講書人閱讀 56,357評論 1 283
  • 正文 為了忘掉前任戳玫,我火速辦了婚禮,結(jié)果婚禮上未斑,老公的妹妹穿的比我還像新娘咕宿。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,412評論 5 384
  • 文/花漫 我一把揭開白布荠列。 她就那樣靜靜地躺著类浪,像睡著了一般。 火紅的嫁衣襯著肌膚如雪肌似。 梳的紋絲不亂的頭發(fā)上费就,一...
    開封第一講書人閱讀 49,760評論 1 289
  • 那天,我揣著相機(jī)與錄音川队,去河邊找鬼力细。 笑死,一個胖子當(dāng)著我的面吹牛固额,可吹牛的內(nèi)容都是我干的眠蚂。 我是一名探鬼主播,決...
    沈念sama閱讀 38,904評論 3 405
  • 文/蒼蘭香墨 我猛地睜開眼斗躏,長吁一口氣:“原來是場噩夢啊……” “哼逝慧!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起啄糙,我...
    開封第一講書人閱讀 37,672評論 0 266
  • 序言:老撾萬榮一對情侶失蹤笛臣,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后隧饼,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體沈堡,經(jīng)...
    沈念sama閱讀 44,118評論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,456評論 2 325
  • 正文 我和宋清朗相戀三年燕雁,在試婚紗的時候發(fā)現(xiàn)自己被綠了诞丽。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,599評論 1 340
  • 序言:一個原本活蹦亂跳的男人離奇死亡拐格,死狀恐怖僧免,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情捏浊,我是刑警寧澤猬膨,帶...
    沈念sama閱讀 34,264評論 4 328
  • 正文 年R本政府宣布,位于F島的核電站呛伴,受9級特大地震影響勃痴,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜热康,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,857評論 3 312
  • 文/蒙蒙 一沛申、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧姐军,春花似錦铁材、人聲如沸尖淘。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,731評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽村生。三九已至,卻和暖如春饼丘,著一層夾襖步出監(jiān)牢的瞬間趁桃,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,956評論 1 264
  • 我被黑心中介騙來泰國打工肄鸽, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留卫病,地道東北人。 一個月前我還...
    沈念sama閱讀 46,286評論 2 360
  • 正文 我出身青樓典徘,卻偏偏與公主長得像蟀苛,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子逮诲,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,465評論 2 348

推薦閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,306評論 0 10
  • 1.我們最圣神的淚水帜平,從不借雙眼宣泄。(Our most sacred tears never seek your...
    九雨農(nóng)閱讀 950評論 0 0
  • 上周五晚梅鹦,一個看似很平常的晚上罕模,好友小琴姐的孫子在星海音樂廳演出(省實(shí)合唱團(tuán)和日本兒童合唱團(tuán)),送了兩張音樂會的票...
    Sophyzhong閱讀 416評論 0 1
  • 我以為蒿讥,自己足夠堅(jiān)定蝶念,堅(jiān)定到無論何時,面臨選擇芋绸,我都能夠義無反顧地做出選擇媒殉,沒有遲疑。 然而摔敛,現(xiàn)在的我廷蓉,卻不知道自...
    經(jīng)緯經(jīng)緯閱讀 312評論 0 0
  • 看了一次落日,頓時感覺生活如此美好马昙,我們沒有交流的伙伴桃犬,但可以用文字記錄我航海的生涯。剛剛看了一部電影《心靈捕手》...
    大皖安利閱讀 164評論 3 2