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

[BUG] - mkfiles in babbage creates empty stake-delegator-keys #5586

Open
jonathangenlambda opened this issue Dec 21, 2023 · 7 comments
Open
Labels
type: bug Something is not working

Comments

@jonathangenlambda
Copy link

Internal/External
External

Summary
When running scripts/babbage/mkfiles.sh from release/8.1.x branch using cardano-cli from cardano-node-8.1.2 it generates files we use successfully to bootstrap a conway-era testnet. However no payment keys are generated in stake-delegator-keys, which was the case with earlier versions of this script/cli. Without these keys it is unclear how to be able to spend the initial ADA.

Steps to reproduce
Steps to reproduce the behavior:

  1. switch to release/8.1.x branch
  2. download cardano-node-8.1.2 and put cardano-cli on path
  3. run sh scripts/babbage/mkfiles.sh from cardano-node root folder
  4. stake-delegator-keys is empty

Expected behavior
It is expected that stake-delegator-keys contains the payment keys that allow to spend the initial ADA.

System info (please complete the following information):

  • OS Name: Ubuntu
  • OS Version 22.04
  • Node version cardano-node 8.1.2 - linux-x86_64 - ghc-8.10
  • CLI version cardano-cli 8.1.2 - linux-x86_64 - ghc-8.10
@jonathangenlambda jonathangenlambda added the type: bug Something is not working label Dec 21, 2023
@smelc
Copy link
Contributor

smelc commented Jan 2, 2024

@jonathangenlambda> could you try updating to a newer version of cardano-node and cardano-cli? The mkfiles.sh script has been modified since version 8.1.2.

@jonathangenlambda
Copy link
Author

jonathangenlambda commented Jan 2, 2024

@smelc thanks for your reply.

I tried it with a newer version of cardano-nodeand cardano-cli, but was not successful:

  1. Switched to release/8.7 branch in cardano-node repo.
  2. Downloaded binaries from https://github.com/IntersectMBO/cardano-node/releases/tag/8.7.1-pre and put them on PATH. Note that I picked 8.7.1 because 8.7.2 https://github.com/IntersectMBO/cardano-node/releases/tag/8.7.2 doesnt have the binaries built in the release bundle (assets).
  3. Ran the mkfiles.sh script by executing ./scripts/babbage/mkfiles.sh ./shared/sockets/node-spo1.sock
  4. Unfortunately the stake-delegator-keys folder is still empty.

Running the mkfiles.sh script as described in 4. seems to be successful, producing the following output on console:

generated genesis with: 3 genesis keys, 3 non-delegating UTxO keys, 3 stake pools, 3 delegating UTxO keys, 3 delegation map entries, 
example/node-spo1.sh
example/node-spo2.sh
example/node-spo3.sh
CARDANO_NODE_SOCKET_PATH=example/node-spo1/node.sock 

When running cardano-cli --version which I put on path (2.) I get the following output:

cardano-cli 8.16.0.1 - linux-x86_64 - ghc-8.10
git rev 7f7a93d248b380d3dbff8c003a3ad66b6d1c770f

@smelc
Copy link
Contributor

smelc commented Jan 3, 2024

@jonathangenlambda> you are witnessing that generation of payment keys in the stake-delegator-keys directory was removed from the create-staked command in #4021. Back in the day, this feature was removed because the benchmarking team asked us to do so (as it was making some of their tests too slow). The create-staked command is what scripts/babbage/mkfiles.sh uses under the hood (at line 109).

Since then, we have introduced a modernized variant of create-staked: create-testnet-data, that brings back the old behavior (this PR).

So one way forward for you be to have mkfiles.sh use create-testnet-data. However, the structure of the files generated by create-testnet-data is a bit different from create-staked, so it wouldn't be a simple renaming. Some of the mv done by mkfiles.sh after line 109 would have to be adapted.

@jonathangenlambda
Copy link
Author

jonathangenlambda commented Jan 3, 2024

@smelc

Thanks for your extensive reply.
I assume this PR is not merged yet into any release? I guess I have to build it myself? How do I do that? Via the cardano-cli repo?

Are there no other options to generate these files/keys? Essentially this means that this functionality has been broken for months.

@smelc
Copy link
Contributor

smelc commented Jan 3, 2024

I assume this PR is not merged yet into any release? I guess I have to build it myself? How do I do that? Via the cardano-cli repo

@jonathangenlambda> We are actually about to release the latest version of create-testnet-data, this is in the making via PR IntersectMBO/cardano-cli#542. So I would recommend that you wait for the release if you want to go the create-testnet-data way (beware that you would need to rework the mkfiles.sh script yourself if you choose this route).

Are there no other options to generate these files/keys?

You can generate those keys using a combination of cardano-cli address key-gen and cardano-cli stake-address key-gen, but then you also need to put into place the delegation. I believe using create-testnet-data would be easier.

It's actually on our roadmap to change a number of users of create-staked to use create-testnet-data instead, but we are busy with other things right now so I can't give you any estimate 🤷

@jonathangenlambda
Copy link
Author

@smelc thanks - I guess I'll wait in this case.

Don't you guys also fix mkfiles.sh when you release the PR?

@smelc
Copy link
Contributor

smelc commented Jan 5, 2024

Don't you guys also fix mkfiles.sh when you release the PR?

@jonathangenlambda> nope it's not planned, since it's not necessary for our short term roadmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants