参考ewasm/testnet、2018-11-26 ewasm在以太坊私有链测试和2019-07-04 ewasm在以太坊私有链测试(3)
go get github.com/ethereum/go-ethereum
cd $GOROOT/src/github.com/ethereum/go-ethereum
git remote add gballet git@github.com:gballet/go-ethereum.git
git fetch gballet add-ewasm
git checkout add-ewasm
git fetch gballet add-ewasm可能遇到下面的错误:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
修改.git\config文件中
url = git@github.com:gballet/go-ethereum.git
为
url = https://github.com/gballet/go-ethereum.git
然后继续git fetch gballet add-ewasm
需要额外拉取代码
go get github.com/go-interpreter/wagon
go get github.com/edsrzf/mmap-go
go get github.com/twitchyliquid64/golang-asm
go build ./cmd/geth/...
wget https://raw.githubusercontent.com/ewasm/testnet/master/ewasm-testnet-geth-config.json
./geth --datadir ewasm-testnet-data init ewasm-testnet-geth-config.json
继续初始化账户
./geth \
--datadir ewasm-testnet-data \
--rpc --rpcapi "web3,net,eth,debug" \
--rpcvhosts="*" --rpcaddr "0.0.0.0" \
--rpccorsdomain "*" \
--nodiscover \
--networkid 66 \
--ipcpath geth1.ipc console
personal.newAccount("123")
miner.setEtherbase(eth.accounts[0])
miner.start(1);admin.sleepBlocks(1);miner.stop();
参考2019-07-04 ewasm在以太坊私有链测试(3)4、私有链下使用rpc测试部分 注意发布的账户需要更改为这次新创建的账户