gpt4 book ai didi

java - Sawtooth 1.1.2 添加区 block 到创世区 block 时获取 'rejected due to invalid predecessor'

转载 作者:行者123 更新时间:2023-12-01 19:43:43 25 4
gpt4 key购买 nike

我无法向链添加新 block ,因为锯齿 validator 默认正在报告:[2019-01-25 18:18:54.029 警告 block_validator] 区 block 7f3...370e(block_num:1,state:c3a...954,previous_block_id:0d8...09d)验证失败:区 block 7f3。 ..370e (block_num:1, state:c3a...954, previous_block_id:0d8...09d) 由于前驱无效 0d8...09d (block_num:0, state:66e...ee1, previous_block_id:0000000000000000 而被拒绝)

我猜这是一个时间问题,因为它刚刚开始发生,并且在同事的环境中仍然可以正常工作。

今天早上我尝试运行以下操作序列 7 次:

  1. docker-compose 下来
  2. gradle clean 构建 fatJar docker
  3. docker-compose up --build
  4. GET localhost:8008/blocks --> 1 个区 block 如预期
  5. 将 locApplication 发布到链
  6. GET localhost:8008/blocks --> 显示已添加的 block ...或未添加
  7. 获取本地主机:20005/api/v1/lettersofcredit/applications/?id=d26...f2d

有效吗? Y|N|N|Y|Y|Y|N

我没有看到来自 settings_tp 的任何输出,仅来自默认 validator 。每次新的区 block 提交都会返回202 ACCEPTED。

我正在开发人员模式下运行,使用 docker-compose 在单个 Ubuntu 18.0.4 VM 上运行所有容器。这是 docker-compose.yaml:

version: "2.1"

services:

settings-tp:
image: hyperledger/sawtooth-settings-tp:1.1
container_name: sawtooth-settings-tp-default
depends_on:
- validator
entrypoint: settings-tp -vv -C tcp://validator:4004

intkey-tp-python:
image: hyperledger/sawtooth-intkey-tp-python:1.1
container_name: sawtooth-intkey-tp-python-default
depends_on:
- validator
entrypoint: intkey-tp-python -vv -C tcp://validator:4004

xo-tp-python:
image: hyperledger/sawtooth-xo-tp-python:1.1
container_name: sawtooth-xo-tp-python-default
depends_on:
- validator
entrypoint: xo-tp-python -vv -C tcp://validator:4004

validator:
image: hyperledger/sawtooth-validator:1.1
container_name: sawtooth-validator-default
expose:
- 4004
ports:
- "4004:4004"
# start the validator with an empty genesis batch
entrypoint: "bash -c \"\
sawadm keygen && \
sawtooth keygen my_key && \
sawset genesis -k /root/.sawtooth/keys/my_key.priv && \
sawadm genesis config-genesis.batch && \
sawtooth-validator -vv \
--endpoint tcp://validator:8800 \
--bind component:tcp://eth0:4004 \
--bind network:tcp://eth0:8800 \
--bind consensus:tcp://eth0:5050 \
\""

devmode-engine:
image: hyperledger/sawtooth-devmode-engine-rust:1.1
container_name: sawtooth-devmode-engine-rust-default
depends_on:
- validator
entrypoint: devmode-engine-rust -C tcp://validator:5050

rest-api:
image: hyperledger/sawtooth-rest-api:1.1
container_name: sawtooth-rest-api-default
expose:
- 8008
ports:
- "8008:8008"
depends_on:
- validator
entrypoint: sawtooth-rest-api -C tcp://validator:4004 --bind rest-api:8008

shell:
image: hyperledger/sawtooth-all:1.1
container_name: sawtooth-shell-default
depends_on:
- rest-api
entrypoint: "bash -c \"\
sawtooth keygen && \
tail -f /dev/null \
\""

importer-webserver:
image: sawtooth-trade-finance/importer-web:latest
container_name: importer-webserver
depends_on:
- rest-api
ports:
- "20005:8080"

importer-processor:
container_name: importer-processor
image: sawtooth-trade-finance/importer-processor:latest
build:
context: .
dockerfile: ./tf_processor/Dockerfile
depends_on:
- validator

任何有关我如何调试此问题的建议将不胜感激。谢谢。

最佳答案

要在 Developer Mod 中使用,您应该安装并运行 DevMod 共识。
安装

sudo apt-get install sawtooth-devmode-engine-rust   

启动 validator 后,在另一个终端开始共识

sudo -u sawtooth devmode-engine-rust -vv --connect tcp://localhost:5050

关于java - Sawtooth 1.1.2 添加区 block 到创世区 block 时获取 'rejected due to invalid predecessor',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54372292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com