年度归档: 2021年

16 篇文章

以太坊学习备忘录-dev开发模式
dev模式简要说明 主要用来给开发人员提供一个方便的开发测试环境。在dev模式下,可以轻松的获得以太币,方便发起交易,交易也会被快速的打包,节省时间方便验证。在启动命令里面加一个 --dev 即可启动该开发模式。 启动命令 下面提供一条使用dev模式启动的常用命令 geth --datadir ./data --networkid 1337 --n…
以太坊学习备忘录-Trie
主要涉及代码 trie core core/rawdb core/state ethdb/leveldb 需要掌握的知识点 StateDB Trie Account stateObject 账户数据如何存储在Trie中 账户数据的存储是使用SecureTrie中的,主要是使用keecak512(key)作为真实的key存在levelDB中。 由于k…
以太坊学习备忘录-Clique
共识算法选择 eth/ethconfig/config.go CreateConsensusEngine 209 func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, config *ethash.Config, notify []string, …
以太坊学习备忘录-挖矿
计算下一个区块的GasLimit core/block_validator.go CalcGasLimit1559 上一个区块gasLimit - (上一个区块gasLimit / 1024 - 1) 但是不能低于设置的最低区块gasLimit ETH的EIP-1559协议 挖矿关于区块燃料参数 eth/ethconfig/config.go 81…
以太坊学习备忘录01
Goland编译调试go-ethereum项目 在运行配置里面运行种类选软件包。然后包路劲使用github.com/ethereum/go-ethereum/cmd/geth,输出目录与工作目录使用C:\Users\lcq\go\src\github.com\ethereum\go-ethereum\build\bin。 call 调用提示insu…