美文网首页
2019-08-01 geth + Wagon环境运行ewasm

2019-08-01 geth + Wagon环境运行ewasm

作者: oracle3 | 来源:发表于2019-08-01 16:02 被阅读0次

    参考ewasm/testnet2018-11-26 ewasm在以太坊私有链测试2019-07-04 ewasm在以太坊私有链测试(3)

    1、代码获取

    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

    2、代码编译

    需要额外拉取代码

    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/...
    

    3、初始化

    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();
    

    4、通过rpc发布ewasm

    参考2019-07-04 ewasm在以太坊私有链测试(3)4、私有链下使用rpc测试部分
    注意发布的账户需要更改为这次新创建的账户

    相关文章

      网友评论

          本文标题:2019-08-01 geth + Wagon环境运行ewasm

          本文链接:https://www.haomeiwen.com/subject/frxcdctx.html