運作nodeos時候報錯
Q:下邊代碼是用于異常停止服務的恢複
A:
nodeos --data-dir /opt/eosio/bin/data-dir --hard-replay-blockchain --truncate-at-block [有問題的區塊編号] -e
Q:nodeos啟動失敗
:std::exception::what: unrecognised option '--resync-blockchain'
A:删除block,重新同步
nodeos --replay-blockchain --hard-replay-blockchain --delete-all-blocks
Q:部分版本插件名稱錯誤
std::exception::what: unable to find plugin: eosio::account_history_api_plugin
A:
plugin = eosio::account_history_api_plugin
替換為
plugin = history_api_plugin
Q:get_actions和get_transaction接口使用後沒有傳回值?
A:啟動的時候添加–filter-on "*"或者在config.ini中添加filter-on = *
Q:釋出交易失敗
Error 3090003: provided keys, permissions, and delays do not satisfy declared authorizations
A:将私鑰導入錢包中或者私鑰錯誤
Q:公網同步區塊失敗,報錯如下圖
A:修改genesis.json,将這個修改為"initial_key": “EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3”,保證genesis.json檔案中的公鑰和主網一緻。
Q:交易逾時
Error 3040005: Expired Transaction
Please increase the expiration time of your transaction!
A:注意伺服器系統時間是否準确,并且可以修改config.ini中max-transaction-time = 30000。如果是連接配接主鍊,則先确認是否同步區塊到最新高度或者解決于最新高度。兩者的時間差小于最大的逾時時間。
Q:自動化部署失敗
Beginning build version: 1.2
Thu Jul 12 06:33:42 UTC 2018
User: root
git head id: f947a6daa6fac1891bd5bb5b2c88a08025c6e740
Current branch: HEAD
ARCHITECTURE: Linux
OS name: CentOS Linux
OS Version: 7
CPU speed: 2397Mhz
CPU cores: 4
Physical Memory: 16048 Mgb
Disk install: /dev/mapper/rootvg-root
Disk space total: 62G
Disk space available: 57G
Checking Yum installation
Yum installation found at /bin/yum.
Checking installation of Centos Software Collections Repository.
Centos Software Collections Repository found.
Enabling Centos devtoolset-7.
Unable to enable Centos devtoolset-7 at this time.
Exiting now
A:
參考網址:https://blog.csdn.net/lizhengjava/article/details/80269484
//現在依賴
sudo yum -y --enablerepo=extras install centos-release-scl
sudo yum install -y devtoolset-7
sudo yum install -y python33.x86_64
//配置系統環境
source /opt/rh/devtoolset-7/enable
Q:交易時提示
A:config.ini檔案中修改http-validate-host屬性,關閉主機驗證,并且重新啟動nodeos
"http-validate-host = 1" 改成 "http-validate-host = false"
Q:編譯abi檔案失敗
A:找不到相關依賴,需要在build/中執行sudo make install。
Q:遇到kill nodeos導緻資料錯誤,無法在進行同步區塊,需要删除全部區塊,重新開始同步的問題。
A:kill nodeos的時候選擇kill -2 $(pid),而不是kill -9 $(pid),強制中斷會導緻資料錯誤問題。
Q:
A:在genesis.json檔案中,max_transaction_cpu_usage必須max_block_cpu_usage
安利個私貨:EOS智能合約與DApp開發入門教程:
xc.hubwiz.com/course/5b52c0a2c02e6b6a59171ded
本課程幫助你快速入門EOS區塊鍊去中心化應用的開發,内容涵蓋EOS工具鍊、賬戶與錢包、發行代币、智能合約開發與部署、使用代碼與智能合約互動等核心知識點,最後綜合運用各知識點完成一個便簽DApp的開發。