当前位置: 首页 > news >正文

阿里云ethereum

https://geth.ethereum.org/docs/getting-started/installing-geth#linux-and-mac

git clone https://github.com/ethereum/go-ethereum.git
git checkout v1.10.11
cd go-ethereum
# 阿里云添加goproxy
export GOPROXY=https://mirrors.aliyun.com/goproxy/
make geth

创建genesis.json

{"config": {"chainId": 15,"homesteadBlock": 0,"eip150Block": 0, // Fatal: Failed to write genesis block: unsupported fork ordering: eip150Block not enabled, but eip155Block enabled at block 0"eip155Block": 0,"eip158Block": 0},"coinbase" : "0x0000000000000000000000000000000000000000","difficulty" : "0x40000","extraData" : "","gasLimit" : "0xffffffff","nonce" : "0x0000000000000042","mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000","parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000","timestamp" : "0x00","alloc": { }
}
geth --datadir data init genesis.jsongeth --datadir data --nodiscover --port 30304 console 2>>geth.log
> eth.accounts
[]
> personal.newAccount("111")
"0xe03d8dffd8a08de830359dd028eb4c3c9712825b"
> personal.newAccount("222")
"0xdbfb02667770f464516ae1a9d9957cbc526e13ba"
> miner.start()
null # 再开一个终端, tail -f geth.log
> miner.stop()
> eth.getBalance(eth.accounts[0])
130000000000000000000

issues

使用 v1.10.11版本编译没有什么问题。

Fatal: Failed to register the Ethereum service: 'terminalTotalDifficulty' is not set in genesis block
https://blog.csdn.net/qq_17245035/article/details/142492245

Fatal: Error starting protocol stack: listen tcp :30303: bind: address already in use
默认监听30303,如果冲突要改

> personal.newAccount()
ReferenceError: personal is not definedat <eval>:1:1(0)

http://www.lryc.cn/news/518179.html

相关文章:

  • 子父组件传值
  • QT自定义工具条渐变背景颜色一例
  • 2025最新Facebook广告投放常见问题:如何提高广告效果?
  • 双向导航和单向导航
  • Unity3d 基于Barracuda推理库和YOLO算法实现对象检测功能
  • Lambda离线实时分治架构深度解析与实战
  • Spring Boot教程之五十一:Spring Boot – CrudRepository 示例
  • jenkins入门6 --拉取代码
  • CAPL概述与环境搭建
  • Virgo:增强慢思考推理能力的多模态大语言模型
  • 偃动访无穿戴动作捕捉系统:赋能多行业开启动作捕捉新篇章
  • mikro-orm 和typeorm 对比
  • Docker入门之docker基本命令
  • mysql的一些函数及其用法
  • NO.3 《机器学习期末复习篇》以题(问答题)促习(人学习),满满干huo,大胆学大胆补!
  • 黑马跟学.苍穹外卖.Day03
  • js -音频变音(听不出说话的人是谁)
  • 鸿蒙UI(ArkUI-方舟UI框架)
  • 常见的http状态码 + ResponseEntity
  • pikachu - Cross-Site Scripting(XSS)
  • 操作系统之文件系统的基本概念
  • 深入探讨 Android 中的 AlarmManager:定时任务调度及优化实践
  • 西电-算法分析-研究生课程复习笔记
  • 编译时找不到需要的库,如何在PyCharm中为你的项目添加需要的库
  • ip addr 命令给Linux网络接口配置多个IP地址值
  • C#语言的数据库编程
  • 时频分析之S变换
  • 第二十八周学习周报
  • SurfaceFlinger MessageQueue原理
  • component-动态控制 div width 的值 根据传入的变量决定width的值 vue