Code Monkey home page Code Monkey logo

pier's Introduction

Pier

build codecov

Build

Using the follow command to install necessary tools.

make prepare

And then install pier using the following command.

make install

Initialization

Using the follow command to initialize pier.

pier init

Default repo path is ~/.pier. If you want to specify the repo path, you can use --repo flag.

pier init --repo=$HOME/.pier

After initializing pier, it will generate the follow directory:

~/.pier
├── pier.toml
├── key.json

Configuration

title = "pier"

[port]
pprof = 44555

[log]
level = "debug"
dir = "logs"
filename = "pier.log"
report_caller = false

[bitxhub]
addr = "localhost:60011"
validators = [
      "0x000f1a7a08ccc48e5d30f80850cf1cf283aa3abd",
      "0xe93b92f1da08f925bdee44e91e7768380ae83307",
      "0xb18c8575e3284e79b92100025a31378feb8100d6",
      "0x856E2B9A5FA82FD1B031D1FF6863864DBAC7995D",
]

[appchain]
plugin = "fabric-client-1.4.so"
config = "fabric"

port.pprof: the pprof server port

log.level: log level: debug, info, warn, error, fatal

bitxhub.addr: bitxhub grpc server port

bitxhub.validators: bitxhub validator's addresses

appchain.plugin: relative path in pier repo of appchain plugin

appchain.config: relative path of appchain config directory

Usage

More details about usage is in Pier handbook

License

The Pier library (i.e. all code outside of the cmd and internal directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the LICENSE.LESSER file.

The Pier binaries (i.e. all code inside of the cmd and internal directory) is licensed under the GNU General Public License v3.0, also included in our repository in the LICENSE file.

pier's People

Contributors

4ever9 avatar 99mycql avatar alburtwang avatar alexader avatar dawn-to-dusk avatar diyiwi avatar guozhuang333 avatar jiuhuche120 avatar johnsonwyj avatar jzhe886 avatar karenlrx avatar levi9311 avatar peterzhuzhuzhuz avatar pigxiaolei avatar sandyzhou avatar treasersimplifies avatar xiaochenl avatar yzyzzzz23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pier's Issues

Build error

Bug Report

build failed

1. What did you do?

kaichen@Kais-MacBook-Pro pier % make prepare
go: finding github.com/meshplus/bitxhub-kit v0.0.0-20200329124935-585edb85ca63
go: github.com/meshplus/[email protected]: unknown revision 585edb85ca63
go: error loading module requirements
cd scripts && bash prepare.sh
===> 1. Install packr
go: finding github.com/meshplus/bitxhub-kit v0.0.0-20200329124935-585edb85ca63
go: github.com/meshplus/[email protected]: unknown revision 585edb85ca63
go: error loading module requirements
===> 2. Install golangci-lint
go: finding github.com/meshplus/bitxhub-kit v0.0.0-20200329124935-585edb85ca63
go: github.com/meshplus/[email protected]: unknown revision 585edb85ca63
go: error loading module requirements
===> 3. Install go mock tool
go: finding github.com/meshplus/bitxhub-kit v0.0.0-20200329124935-585edb85ca63
go: github.com/meshplus/[email protected]: unknown revision 585edb85ca63
go: error loading module requirements
go: finding github.com/meshplus/bitxhub-kit v0.0.0-20200329124935-585edb85ca63
go: github.com/meshplus/[email protected]: unknown revision 585edb85ca63
go: error loading module requirements
make: *** [prepare] Error 1

2. What did you expect to see?

Build success

3. What did you see instead?

go: error loading module requirements

4. What version of BitXHub are you using? (bitxhub version on BitXHub)

master branch

Dockerfile build的镜像pier运行问题

pier不能运行的问题

当使用master分支v1.1.0-rc1 的dockerfile build镜像后,run镜像后,使用命令报错
image

~ # pier --repo=/root/.pier appchain register --name=${APPCHAIN_NAME} --type=fabric --validators=/root/.pier/${PLUGIN_CONFIG}/fabric.validators --desc="appchain for test" --version=1.4.3
invoke bvm contract: send tx error: failed to retrieve account nonce: rpc error: code = Unimplemented desc = unknown method GetPendingNonceByAccount for service pb.ChainBroker

pier fabric interchain tx index wrong panic

Bug Report

1. What did you do?

When starting a pier for fabric blockchain, the network between pier and bitxhub is broken. And when pier recover its connection, pier missed onw interchain tx from bitxhub when synchronizing interchain txs. Then pier got "Wrong ibtp index" panic.

2. What did you expect to see?

All interchain txs got synchronized sequently by its index.

3. What did you see instead?

One interchain tx got missed and got panic.
image

4. What version of BitXHub are you using? (bitxhub version on BitXHub)

bitxhub commit hash: bedbc5be35175cca9d88eb4db6f2a6706b555e62

receive header error panic

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

2. What did you expect to see?

3. What did you see instead?

image

4. What version of BitXHub are you using? (bitxhub version on BitXHub)

Pier version: 1.0.0-f1e5082
App build date: 2020-06-03T17:22:10
System version: linux/amd64
Golang version: go1.14.2

应用链注册报错

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

按手册操作,v1.0.0版本:
pier appchain register --key=~/goproj/src/github.com/meshplus/.pier/key.json --name=fab --type=fabric --validators=$HOME/.pier/fabric/fabric.validators --desc="fabric appchain for test" --version=1.4.3

2. What did you expect to see?

正常注册

3. What did you see instead?

flag provided but not defined: --key

4. What version of BitXHub are you using? (bitxhub version on BitXHub)

v1.0.0-rc1

appchainA transfer to appchainA amount reduction

  1. What did you do?

    Try appchainA transfer to appchainA

  2. What did you expect to see?

    The amount remains the same

  3. What did you see instead?

    The amount reduction

  4. What version of BitXHub are you using? (bitxhub version on BitXHub)
    version 1.1

Pier support fabric2.0 to be appchain

Feature Request

Describe the feature you'd like:
Pier only supports ethereum private chain and fabric1.4 for now. The support to fabric2.0 is wanted.

Teachability, Documentation, Adoption, Migration Strategy:
To support fabric2.0, we should have coded broker chaincode and transfer chaincode compatible with fabric2.0. The example of chaincode for fabric1.4 can be found here. For next, we should choose right version of fabric-sdk to interact with broker chaincode on fabric2.0. This part of code should be written in project pier-client-fabric.

注册服务时提示没有管理员,无权限。请教一下这是什么原因

General Question

我在部署合约的时候,已经设置了管理员,

Command

pier --repo /root/pier_ether appchain service register --appchain-id "ethappchain1" --service-id "0xf3bC07C161aC5198844C85EaF9D31Be7bef33D24" --name "ethServer" --intro "" --type CallContract --permit "" --details "test" --reason "reason" --ordered 1

错误提示

Error

register service info faild: call error: 1060001:regulatorAddr(0x8E8Cdd1DD64d4453b66d18154BE71706Bd53707d) does not have the permission: cross invoke GetAppchainAdmin error:2000000:call error: 1040013:there is no admin for the appchain(ethappchain1)

broker合约参数

ethappchain1
["0xc7F999b83Af6DF9e67d0a37Ee7e900bF38b3D013","0x79a1215469FaB6f9c63c1816b45183AD3624bE34","0x97c8B516D19edBf575D72a172Af7F418BE498C37","0xc0Ff2e0b3189132D815b8eb325bE17285AC898f8"]
1
["0x4bff341fc1c9beb0869099f49b9151d11a0cddf6"]
1
0xA6985BCE4A6A1fB80192444F585f5977cD219C34

BitxHub的配置使用的是默认的
image

register pier to bitxhub error

when I follow the guidance of quickly start doc to register pier to bitxhub, there is a error:
invoke bvm contract: rpc error code=unknownn desc = not found in DB

I see the code achieving register cmd function, but I can't find where the error is

Send interchain transaction from Ethereum to Fabric ERROR!

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

Send interchain transaction from Ethereum to Fabric

2. What did you expect to see?

Transfer successful

3. What did you see instead?

image

4. What version of BitXHub are you using? (bitxhub version on BitXHub)

image

json-rpc supports https

赛题5:网关接入中继链证书准入机制

在联盟链场景下,需要对接入的成员有相应的准入许可。在跨链场景下也是类似,网关代表应用链接入到跨链系统中时,必须获取到中继链联盟的许可,才可以获取相应的跨链交易数据。

解题思路:

增加准入机制时,主要涉及到两个部分:客户端SDK和中继链。跨链网关在中继模式启动时需要向中继链请求许可,中继链收到SDK/跨链网关的请求时,也必须检查相应的许可是否正确。这里许可机制一般采用证书来实现。

网关执行应用链注册操作报错

General Question

pier --repo ./ appchain register --appchain-id "appchain1" --name "fabric1" --type "Fabric V1.4.3" --trustroot $HOME/.goduck/pier/.pier_fabric/fabric/fabric.validators --broker-cid mychanncel --broker-ccid broker --broker-v 1 --desc "desc" --master-rule "0x00000000000000000000000000000000000000a2" --rule-url "http://github.com" --admin 0x02E2De5aF4E06fC74D2EB34B87539F6fD57d777D --reason "reason"

报错如下:
panic: invalid Go type *types.Address for field pb.BxhTransaction.from

goroutine 1 [running]:
google.golang.org/protobuf/internal/impl.newSingularConverter(0x219d0c0, 0x1e58920, 0x219d540, 0xc00023b8f0, 0x8, 0xc0004a0b20)
/home/runner/go/pkg/mod/google.golang.org/[email protected]/internal/impl/convert.go:143 +0xf17
google.golang.org/protobuf/internal/impl.NewConverter(0x219d0c0, 0x1e58920, 0x219d540, 0xc00023b8f0, 0x203000, 0x203000)
/home/runner/go/pkg/mod/google.golang.org/[email protected]/internal/impl/convert.go:60 +0xdc

Pier should verify the signature of blockheader of bitxhub

Feature Request

Describe the feature you'd like:
Pier should verify the signature of blockheader from bitxhub before persisting.

Describe alternatives you've considered:
Lite module of Pier is responsible for synchronizing blockheader from bitxhub. But for now the blockheader is not verified.
The verification of signatures can be done with the help of out crypto module in bitxhub-kit project.

Pier loads multiple plugin when starting

Feature Request

Describe the feature you'd like:
When i have two appchains running, pier should be able to connect to two appchains at the same time.

Describe alternatives you've considered:
Load two plugin when pier is started, and run two set of modules(like executor and monitor)

Pier starts without appchain started

Feature Request

Describe the feature you'd like:
When Pier is starting, it can start without appchain started first. For now, pier has to wait for readiness of a running appchain.

Describe alternatives you've considered:
Pier can start polling for the appchain to start

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.