-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Internal/External
Internal
Summary
db-synthesizer does not forge new blocks when using a ChainDB that corresponds to a node that hardforked into Conway.
The command (see next sections for more information on how to reproduce this):
db-synthesizer-ng \
--config state-demo/rundir/node-config.json \
--db state-demo/db-custom/node \
--bulk-credentials-file state-demo/bulk-creds.json \
-a \
-e 1reports that 0 blocks were forged:
--> forger count: 6
--> opening ChainDB on file system with mode: OpenAppend
--> starting at: SlotNo 17299
--> epoch size: EpochSize 1600
--> will process until: ForgeLimitEpoch 1
--> forged and adopted 0 blocks; reached SlotNo 18899
--> done; result: ForgeResult {resultForged = 0}
Steps to reproduce
This works for nix versions>= 2.17. Make sure you have the following in your nix.conf:
substituters = https://cache.iog.io/ https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
experimental-features = nix-command flakes fetch-closure
When you're all set up, run the following:
git clone https://github.com/input-output-hk/sanchonet-demo
nix develop
just run-demo
Wait until your node has forked into Conway. You can check the porgress by running:
export CARDANO_NODE_NETWORK_ID=42
export CARDANO_NODE_SOCKET_PATH=$(pwd)/node.socket
❯ cardano-cli-ng query tip
Once the script has finished running, make sure to stop the node before synthesizing with just stop. Then do the following:
# First preserve the protocolMagicId file
cp state-demo/db-custom/node/protocolMagicId ../
# Prep for synthesis
rm -rf state-demo/db-custom/node/{clean,lock,protocolMagicId}
# Synthesize the desired number of slots
# The output of this command should show 0 blocks forged if the issue reproduced
db-synthesizer-ng \
--config state-demo/rundir/node-config.json \
--db state-demo/db-custom/node \
--bulk-credentials-file state-demo/bulk-creds.json \
-a \
-e 1
# Copy protocolMagicId back to the db dir prior to running node
cp state-demo/db-custom/protocolMagicId state-demo/db-custom/node/
Expected behavior
db-synthesizer should have been forged blocks for one epoch.
System info (please complete the following information):
- OS Name: [e.g. Ubuntu]
- OS Version: [e.g. 20.04]
- Consensus version: [the git commit sha or the tag of the version]
Screenshots and attachments
- If applicable, add screenshots, config files and/or logs to help explain the problem.
Additional context
Add any other context about the problem here.