Mist: 相当于一个web浏览器,只不过是针对以太坊平台。 它用作GUI来显示与之交互的帐户和合约。 它还允许在图形用户界面中创建和交互合同,而无需使用命令行。 如果你不是开发人员,只是想存储ether和与Ethereum合约交互,那么你可以使用Mist程序。
Geth ( Go-Ethereum ) Geth是由以太坊基金会积极开发的 Go 语言实现,因此被认为是以太坊客户端的“官方”实现。 通常,每个基于以太坊的区块链都有自己的Geth实现。 以太坊的 Geth github 仓库链接: https://github.com/ethereum/go-ethereum JSON-RPC 以太坊客户端提供了API 和一组远程调用(RPC)命令,
命令1: personal.newAccount(password) - 新建账户
转账完成后,eth.getBalance(eth.accounts[1])查询余额,发现余额没有增加。
如果要深入了解go-ethereum项目的实现与机制,看源代码是必不可少的。今天这篇博客就简单介绍一下如何在本地搭建项目的开发环境。 导入项目 下载项目 通过git客户端,下载github上的go-ethereum项目(https://github.com/ethereum/go-ethereum.git)。 这是因为go-ethereum对项目的目录有一定的要求。 基础的目录结构需要按照以下路径: -bin(可省略) -pkg(可省略) -src -github.com -ethereum -go-ethereum -project2(其他项目) -golang.org 因此,把下载之后的go-ethereum按照目录要求,放到指定的层级位置。
最近一段时间忙于工作,就没来得及发表博客,但一直没有停止对区块链的研究。周末抽时间分享一下近期比较重大的收获之一——使用docker来搭建和使用以太坊的节点。本人已经顺利搭建出,开发环境,测试环境,Full node环境。后续会逐个以博客的形式分析出来,希望大家多多关注,共同探讨进步。
问题 以太坊go-ethereum客户端是没有根据地址查询交易列表的API的。然而,在使用过程中我们往往会用到类似的API。针对是否要在客户端上添加此API,github已经有激励的讨论了。 点击一下网址可以了解一下: https://github.com/ethereum/go-ethereum/issues/1897 解决方案 那么既然有此需求,即使没有针对性的API也需要找到相应的解决方案
2、goland启动go-ethereum 参考2018-11-22 Debug以太坊go-ethereum实战配置,然后启动,当然如果选择debug一定退出 3、使用dlv调试 启动一个终端,执行ps (dlv) funcs SendTransaction github.com/ethereum/go-ethereum/eth. (*peer).AsyncSendTransactions github.com/ethereum/go-ethereum/eth. (*peer).SendTransactions github.com/ethereum/go-ethereum/ethclient. (*Client).SendTransaction github.com/ethereum/go-ethereum/internal/ethapi.
Go-ethereum 是包含了 Geth 在内的一个代码库,它包含了 Geth,以及编译 Geth 所需要的其他代码。 在本系列中,我们会深入 Go-ethereum 代码库,从 High-level 的 API 接口出发,沿着 Ethereum 主 Workflow,从而理解 Ethereum 具体实现的细节。 Go-ethereum Codebase 结构 为了更好的从整体工作流的角度来理解 Ethereum,根据主要的业务功能,我们将 go-ethereum 划分成如下几个模块来分析。 目前,go-ethereum 项目的主要目录结构如下所示: cmd/ ethereum相关的Command-line程序。该目录下的每个子目录都包含一个可运行的main.go。 bridge.go |── console.go Geth Web3 控制台的入口 ethdb/ Ethereum 本地存储的相关实现, 包括leveldb的调用 |── leveldb/ Go-Ethereum
在2019-02-26 在ubuntu上调试go-ethereum中,goland无法在ubuntu下调试,但是dlv调试又太复杂,因此参考以太坊 (go-ethereum) 编译调试环境的搭建,搞定了 /geth", "args": ["--datadir", "/home/elikong/go/src/github.com/ethereum/go-ethereum ethapi\api.go,找到函数func (s *PublicTransactionPoolAPI) SendTransaction 在函数第一行设置断点 参考2018-11-22 Debug以太坊go-ethereum
在文件rpc/handler.go,函数handleMsg中添加日志log.Warn(注意下面添加了两处):
以太坊和比特币使用了同样的 spec256k1 曲线,在实际的代码中,我们也可以看到在 go-Ethereum 直接调用了比特币的 secp256k1 的 C 语言代码。 这个类型在 go-ethereum 中被大量使用,通常用于表示 32 字节长度的数据,比如 Keccak256 函数的哈希值。
/eth/filters github.com/ethereum/go-ethereum/light github.com/ethereum/go-ethereum/eth/protocols/eth /ethereum/go-ethereum/eth/tracers github.com/ethereum/go-ethereum/graphql github.com/ethereum/go-ethereum /js github.com/ethereum/go-ethereum/eth/tracers/native github.com/ethereum/go-ethereum/miner github.com /ethereum/go-ethereum/eth/ethconfig github.com/ethereum/go-ethereum/eth github.com/ethereum/go-ethereum /ethereum/go-ethereum/ethstats github.com/ethereum/go-ethereum/cmd/utils github.com/ethereum/go-ethereum
/vendor/github.com/syndtr/goleveldb/leveldb/util.go:30 +0x14d github.com/ethereum/go-ethereum/vendor/ /vendor/github.com/syndtr/goleveldb/leveldb/version.go:395 +0x4b3 github.com/ethereum/go-ethereum/vendor /vendor/github.com/syndtr/goleveldb/leveldb/version.go:279 +0x7a github.com/ethereum/go-ethereum/vendor /ethdb/database.go:72 +0x363 github.com/ethereum/go-ethereum/node. /cmd/utils/flags.go:1065 +0x3d github.com/ethereum/go-ethereum/node.
在上一篇博客中,讲述了基于docker怎么搭建一个go-ethereum节点。作为开发人员,如果只是单纯的拥有一个Full node,还无法满足正常的开发。
前几篇博客主要介绍了go-ethereum客户端不同环境的搭建,今天这篇博客是建立在前几排博客的基础上。
构造交易 import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/common " "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/crypto" "github.com /ethereum/go-ethereum/common/hexutil" ) const ( GAS_LIMIT = 21000 GAS_PRICE =
1、安装 Golang 可以直接使用 yum 这个包管理器安装Golang yum install golang 2、下载 go-ethereum git clone https://github.com /ethereum/go-ethereum 3、编译 go-ethereum cd go-ethereum && make geth github.com/naoina/go-stringutil github.com /naoina/toml/ast github.com/naoina/toml github.com/ethereum/go-ethereum/internal/jsre github.com/ethereum /go-ethereum/eth/tracers/js github.com/ethereum/go-ethereum/console github.com/ethereum/go-ethereum/cmd 4、配置环境变量 export PATH=$PATH:/root/go-ethereum/build/bin 5、验证成功 执行命令 geth version 输出结果: Geth Version
通过各方资料了解学习之后,决定自己开始搭建基于以太坊go-ethereum的私有链环境。 go-ethereum客户端 下载地址&参考手册 首先,可以查看一下go-ethereum项目在git上的地址: https://github.com/ethereum/Go-ethereum 可以在点击项目上的 wiki标签,也可以通过一下地址访问wiki: https://github.com/ethereum/Go-ethereum/wiki/Building-Ethereum 在wiki页面选择ubuntu 系统的安装说明,也可以直接访问下面链接: https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu
geth sync goroutine 16678 [IO wait]: …… goroutine 8 [chan receive, 4822 minutes]: github.com/ethereum/go-ethereum (*nonrecursiveTree).internal(0xc420064360, 0xc420064300) /home/bertrand/go-ethereum/build/_workspace /src/github.com/ethereum/go-ethereum/vendor/github.com/rjeczalik/notify/tree_nonrecursive.go:81 +0x94 created by github.com/ethereum/go-ethereum/vendor/github.com/rjeczalik/notify.newNonrecursiveTree /home/bertrand/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/github.com/rjeczalik