代码拉取完成,页面将自动刷新
检查日期: 2020.06.21
https://geth.ethereum.org/downloads
https://github.com/ethereum/go-ethereum/wiki
1、解压缩文件
tar -xvf geth-alltools-linux-amd64-1.8.23-c9427004.tar.gz --warning=no-timestamp
2、启动节点
/data/eth/geth --maxpeers 100 --rpc --rpcaddr "127.0.0.1" --rpcport 8333 --nat=none --rpcapi db,eth,net,web3,personal --datadir "/data/eth-data"
* 第一次启动增加 --syncmode "fast" 来加快同步速度
1、下载新版本
2、备份旧版本程序
3、更换程序文件
4、重启服务
1、创建地址
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"personal_newAccount","params":[]}'
2、备份 /数据目录/keystore/
目录下的keystore文件
1、获取最新的区块高度
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_blockNumber","params":[]}'
2、根据区块Hash获取交易列表
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_getBlockByNumber","params":["0x区块高度数字的HEX"]}'
3、根据TxId获取具体信息
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_getTransactionByHash","params":["交易TxId"]}'
4、根据TxId获取具体收据
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_getTransactionReceipt","params":["交易TxId"]}'
* 验证收据的 `result/status` 的值为 0x1,交易成功的标志
1、解锁账户
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"personal_unlockAccount","params":["交易TxId"]}'
2、获得Gas单价
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_gasPrice","params":[]}'
3、估算Gas数量
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_estimateGas","params":[{"from":"本地归集地址","to":"接收地址","value":"0x交易金额的Hex"}]}'
4、发送RAW交易
curl -X POST -H 'content-type:application/json' http://127.0.0.1:8333/ \
-d '{"jsonrpc":"2.0","id":"随便写","method":"eth_sendTransaction","params":[{"from":"本地归集地址","to":"接收地址","value":"0x交易金额的Hex","gas":"Gas数量","gasPrice":"Gas单价"}]}'
/数据目录/keystore
下的文件和相应地址的账户密码此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。