2019.01.26部署经历记录

这几天正在部署plasma,写一下学习心得。

依旧对两条链是如何接入的感到迷惑(plasma链作为子链,Ganache作为母链)

准备工作

关于部署私链以及智能合约的文档
1.https://blog.csdn.net/sportshark/article/category/6278182 李赫的专栏
这个博主有好些不错的文章,虽然里面的代码可能有些问题,稍微改一改就ok了
2.https://blog.csdn.net/ljfphp/article/details/81288961 【以太坊】深入理解智能合约(合约调合约)
3.https://blog.csdn.net/zxs9999/article/details/79118556 010 以太访可视化私有链ganache
4.https://www.jianshu.com/p/9233c214e205 以太坊开发(二)使用Ganache CLI在私有链上搭建智能合约

为了防止忘记,记录一下我的Ganache私链实践代码存放路径:“F:\Ethereum-Mist\Geth\private_net\test1使用记录.txt”,请忽略此部分

简介、原理

1.深入理解Plasma(一)Plasma 框架
2.深入理解Plasma(2):Plasma 细节剖析
3.深入理解Plasma(3):Plasma MVP
4.深入理解Plasma(四)Plasma Cash
5. https://ethresear.ch/t/minimal-viable-plasma/426 (一个像是论坛的东西)
6.以太坊扩容方案大清单

部署进度

关于plasma-MVP

Github上关于plasma-MVP的源码链接:
1.https://github.com/kyokan/plasma (Go)
windows部署进度:

D:\GoLand\helloworld\src\github.com\kyokan\plasma\contracts>generate.js
–network ganache 提示JScript编译错误,错误码800A03EB

Linux部署进度:

~/go_project/src/github.com/kyokan/plasma/contracts$ truffle test
(node:8463) V8:
/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:3
Invalid asm.js: Invalid member of stdlib Error parsing
/home/xxx/go_project/src/github.com/kyokan/plasma/contracts/contracts/Migrations.sol: > ParsedContract.sol:11:14: ParserError: Expected identifier, got ‘LParen’ constructor() public {
^ Compilation failed. See above.

2.https://github.com/omisego/plasma-mvp#cli-documentation (Python)
辅助参考:ethereum开发环境构建(client端基于python) https://www.cnblogs.com/bigdata2013lee/p/8366684.html
Linux部署进度:

$ make test python -m pytest ImportError
while loading conftest
‘/home/gyz/Desktop/ethereum/plasma-mvp/tests/conftest.py’.

// 暂时跳过test,直接编译root chain
$ make root-chain
solc.exceptions.SolcError: ByteUtils.sol:8:1: ParserError: Source file requires different compiler version (current compiler is 0.5.2+commit.1df8f40c.Linux.g++ - note that nightly builds are considered to be strictly less than the released version
系统自带的g++版本过高?

3.https://github.com/FourthState/plasma-mvp-sidechain (侧链代码,GO)
https://github.com/FourthState/plasma-mvp-rootchain (主链代码,GO)
Linux部署进度:rootchain安装完成,sidechain存在问题:

$ go install …/…/app/app.go:16:2: cannot find package
github.com/cosmos/cosmos-sdk/baseapp” in any of:
// 直接访问对应页面,则提示404。。。

4.https://github.com/ethereum-plasma/plasma (Solidity)
windows部署进度:

D:\Blockchain\Ethereum_project\plasma>truffle.cmd compile
Error parsing
D:\Blockchain\Ethereum_project\plasma\contracts\PlasmaChainManager.sol:
ParsedContract.sol:82:13: ParserError: Literal, identifier or
instruction expected.
if lt(sigV, 27) { sigV := add(sigV, 27) }
^ Compilation failed. See above.

Linux部署进度:

~/Desktop/ethereum/plasma$ truffle compile (node:10011) V8:
/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:3
Invalid asm.js: Invalid member of stdlib
Error parsing /home/gyz/Desktop/ethereum/plasma/contracts/PlasmaChainManager.sol: ParsedContract.sol:82:3: ParserError: Literal, identifier or instruction expected.
if lt(sigV, 27) {
^Compilation failed. See above.

5.https://github.com/wolkdb/go-plasma (待测)

再贴几个文档供日后参考:

  1. https://github.com/ethereum/go-ethereum/wiki
  2. https://www.learnplasma.org/en/learn/mvp.html

关于plasma-cash

1.https://github.com/omisego/plasma-cash
windows系统
(1)安装vcpkg:参考 https://blog.csdn.net/earbao/article/details/80481794 vcpkg安装指南
(2)sodility环境:此前已经配置好
(3)Ganache:此前也已经配置好
(4)Python3.5+:最新版下载地址 https://www.python.org/downloads/ 目前最新是3.7.2

Linux系统
(1)安装plyvel:参考 https://plyvel.readthedocs.io/en/latest/installation.html
(2)安装LevelDB
似乎是要安装leveldb,暂时停一下

2.https://github.com/loomnetwork/plasma-cash
运行官方测试成功

3.https://github.com/luciditytech/lucidity-plasma-cash
运行官方测试成功

可能没什么用的资料:
1.https://www.learnplasma.org/en/build
2.https://loomx.io/zh/https://github.com/loomnetwork/plasma-cash

其他

一些细碎的东西
1.声明是node可执行文件: #!/usr/bin/env node
2.使用安装一些js模块:npm install 要安装模块的名字
3.node执行js文件时传入参数: node generate.js --network ganache
4.使用truffle编译文件时,建议使用truffle.cmd compile
5.Linux中make用法:在执行 make 之前,需要一个命名为 Makefile 的特殊文件来告诉 make 需要做什么,该怎么做,因此要进入Makefile所在的目录再执行。具体参考:https://www.cnblogs.com/zhoading/p/8523288.html

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值