meshplus/pier

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

jgr-great opened this issue · 9 comments

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

你是否提前注册了应用链? 在注册服务之前需要注册应用链,并且该提案需要投票并通过,注册应用链才会生效。注册应用链请参考:注册应用链

注册应用链并投票成功后,再进行应用链服务注册,同样的,注册操作是管理员发起一个提案,仍然需要各中继链管理员进行投票,如果是测试环境下,可以通过更改中继链的bitxhub.toml的投票策略来忽略投票这一步,即 简单多数投票策略(SimpleMajority)变更为0投票策略(ZeroPermission)
[[genesis.strategy]]
module = "node_mgr"
typ = "ZeroPermission"

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

需要注意的是,每一个genesis.strategy都需要更改,更改完毕后保存并重启中继链各节点即可,如果使用的make cluster启动,只需要更改项目下的config/bitxhub/toml即可,如果是每个节点自定义了repo路径,需要同步更改每个节点下的bitxhub.toml

非常感谢,已经部署成功了,但是从fabric到以太坊转账失败 ,以太坊到fabric转账成功.

错误信息:
INFO[2023-03-08T11:05:01.224] [step1] Receive ibtp from plugin id="1356:fabappchain:mychannel&transfer-1356:ethappchain1:0xBB0Cc277b3eE225202a567997525d189DE5D646d-1" index=1 module=exchanger timestamp=0 typ=INTERCHAIN
INFO[2023-03-08T11:05:01.227] Receive ibtp from :appchain:fabappchain ibtp_id="1356:fabappchain:mychannel&transfer-1356:ethappchain1:0xBB0Cc277b3eE225202a567997525d189DE5D646d-1" index=1 module=exchanger type=INTERCHAIN
INFO[2023-03-08T11:05:01.633] [4] Handle interchain tx wrapper count=0 elapse="1.509µs" height=20 index=0 module=bxh_adapter multi IDs="[]" timeout IDs="[]"

ERRO[2023-03-08T11:05:01.734] Receipt result for ibtp fields.msg="call error: 1080013:index already exists, required 2, but 1" ibtp_id="1356:fabappchain:mychannel&transfer-1356:ethappchain1:0xBB0Cc277b3eE225202a567997525d189DE5D646d-1" ibtp_type=INTERCHAIN module=bxh_adapter

总是有这个错误,但是跨链成功

ERRO[2023-03-09T10:39:54.902] send IBTP to Adapt:appchain:ethappchain1%!(EXTRA string=error, string=fail to send ibtp 1356:ethappchain1:0xBB0Cc277b3eE225202a567997525d189DE5D646d-1356:fabappchain:mychannel&transfer-4 with type RECEIPT_SUCCESS: failed to estimate gas needed: execution reverted) module=exchanger

总是有这个错误,但是跨链成功

ERRO[2023-03-09T10:39:54.902] send IBTP to Adapt:appchain:ethappchain1%!(EXTRA string=error, string=fail to send ibtp 1356:ethappchain1:0xBB0Cc277b3eE225202a567997525d189DE5D646d-1356:fabappchain:mychannel&transfer-4 with type RECEIPT_SUCCESS: failed to estimate gas needed: execution reverted) module=exchanger

请问你用的什么版本的fabric插件(pier-client-fabric版本),以及对应的pier、bitxhub版本

@Karenlrx 你好,fabric无法转token到以太坊,可能是由于我将ethereum的合约的_VALIDATORS设置为空,导致事务回滚

@Karenlrx 你好,fabric无法转token到以太坊,可能是由于我将ethereum的合约的_VALIDATORS设置为空,导致事务回滚

2.8版本的ethereum的合约部署较之前的版本有所变动,具体合约部署教程参考:应用链部署跨链合约