Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db-synthesizer does not forge new blocks in Conway #1071

Closed
RenateEilers opened this issue Apr 19, 2024 · 1 comment
Closed

db-synthesizer does not forge new blocks in Conway #1071

RenateEilers opened this issue Apr 19, 2024 · 1 comment

Comments

@RenateEilers
Copy link
Contributor

RenateEilers commented Apr 19, 2024

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 1

reports 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.

@dnadales dnadales changed the title [DRAFT] [BUG] - db-synthesizer not forging new blocks when hardforked into Conway db-synthesizer does not forge new blocks in Conway Apr 19, 2024
@RenateEilers
Copy link
Contributor Author

Closing because this issue is solved by using the correct configuration for db-synthesizer(TestEnableDevelopmentHardForkEras: true). See #1072 for follow-up on unifying the configuration options between db-synthesizer and cardano-node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant