I'm unable to add a new block to the chain because the sawtooth-validator-default is reporting:
[2019-01-25 18:18:54.029 WARNING block_validator] Block 7f3...370e (block_num:1, state:c3a...954, previous_block_id:0d8...09d) failed validation: Block 7f3...370e (block_num:1, state:c3a...954, previous_block_id:0d8...09d) rejected due to invalid predecessor 0d8...09d (block_num:0, state:66e...ee1, previous_block_id:0000000000000000)
I'm guessing this is a timing issue because it just started happening and still works ok on a colleague's environment.
I tried running through the following sequence of operation 7 times this morning:
- docker-compose down
- gradle clean build fatJar docker
- docker-compose up --build
- GET localhost:8008/blocks --> 1 block as expected
- POST locApplication to chain
- GET localhost:8008/blocks --> shows block added ... or not
- GET localhost:20005/api/v1/lettersofcredit/applications/?id=d26...f2d
Works? Y|N|N|Y|Y|Y|N
I'm not seeing any output from settings_tp, only from the default validator. Every time the new block submission returns 202 ACCEPTED.
I'm running in developer mode, using docker-compose to run all containers on a single Ubuntu 18.0.4 VM. Here's the 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
Any suggestions for how I might go about debugging this issue would be gratefully received. Thanks.