1

I'm creating a local testnet for development purposes with the following steps:

  # create genesis files:
  mkdir /tmp/cardano
  cd /tmp/cardano
  cardano-cli genesis create --testnet-magic 777 --gen-genesis-keys 1 --gen-utxo-keys 1 --supply 1000000000 --genesis-dir /tmp/cardano/

  # KES keys
  cardano-cli node key-gen-KES --verification-key-file /tmp/cardano/kes.vkey --signing-key-file /tmp/cardano/kes.skey

  # Operational certificate (VRF keys created automatically under /tmp/cardano/delegate-keys/)
    cardano-cli node issue-op-cert --kes-verification-key-file /tmp/cardano/kes.vkey --cold-signing-key-file /tmp/cardano/delegate-keys/delegate1.skey --operational-certificate-issue-counter /tmp/cardano/delegate-keys/delegate1.counter --kes-period 0 --out-file /tmp/cardano/op.cert

  # download & tweak node configuration
    wget https://raw.githubusercontent.com/input-output-hk/cardano-node/master/configuration/defaults/byron-mainnet/configuration.yaml
    sed -i 's/Protocol: RealPBFT/Protocol: TPraos/' configuration.yaml
    sed -i 's/minSeverity: Info/minSeverity: Debug/' configuration.yaml

   # create a topology file (empty because I'm not conneting to anyone)
    echo '{"Producers": []}' > node-topology.json

   # start the node:
     cardano-node run \
      --config configuration.yaml \
      --topology node-topology.json \
      --database-path /tmp/cardano/db \
      --socket-path /tmp/cardano/db/node.socket \
      --shelley-kes-key /tmp/cardano/kes.skey \
      --shelley-vrf-key /tmp/cardano/delegate-keys/delegate1.vrf.skey \
      --shelley-operational-certificate /tmp/cardano/op.cert \
      --port 7777

Everything seems to work fine up until this point. However, when I try to query the protocol parameters:

   # Check node status
   export CARDANO_NODE_SOCKET_PATH=/tmp/cardano/db/node.socket
   cardano-cli query protocol-parameters --testnet-magic 777

I get this error:

cardano-cli: encodeFailure: local state query: using acquire without a Point must be conditional on negotiating v8 of the node-to-client protocol
CallStack (from HasCallStack):
  error, called at src/Ouroboros/Network/Protocol/LocalStateQuery/Codec.hs:80:7 in ouroboros-network-0.1.0.0-IeuFKu6VZwxK0UqIEQ0YeE:Ouroboros.Network.Protocol.LocalStateQuery.Codec[

Querying a UTxO also produces the same error:

cardano-cli query utxo --testnet-magic 777 --cardano-mode --address addr_test1vz9vqpp232vpgh9w7m86qwy48a0e2c99thvqkp6jvatutecfngfmt

cardano-cli: encodeFailure: local state query: using acquire without a Point must be conditional on negotiating v8 of the node-to-client protocol
CallStack (from HasCallStack):
  error, called at src/Ouroboros/Network/Protocol/LocalStateQuery/Codec.hs:80:7 in ouroboros-network-0.1.0.0-IeuFKu6VZwxK0UqIEQ0YeE:Ouroboros.Network.Protocol.LocalStateQuery.Codec

I'm not exactly sure what this error means and what can be done to make these commands work. It used to work fine with older cardano-node versions and I was able to execute local tests very efficiently with this. My current version is:

cardano-node 1.33.0 - linux-x86_64 - ghc-8.10
git rev 814df2c146f5d56f8c35a681fe75e85b905aed5d

Can anyone help me getting a local blockchain started from scratch? The only documentation I found seems to be outdated (here: https://cardano-foundation.gitbook.io/stake-pool-course/reference/shelley-genesis)

2 Answers 2

1

You might want to build your script using mkfiles.sh script instead.

While TPraos based networks will stand up and function for basic node/CLI commands, there are a lot of nuances and not all tools/components built around will support the network. Instead you can make use of config options to allow your nodes to fork into specific eras - important to note tho, that when using Cardano mode in config, your Shelley genesis should not include initialFunds - which would break support for that network for components like cardano-db-sync.

0

You could increase the node logging to 'debug' and restart it, then retry the CLI command while monitoring the log. Could be some more detailed info in the node log.

As an FYI I get the same error if I try to force a different mode on my mainnet connection eg --shelley-mode addded:

$cardano-cli query protocol-parameters --shelley-mode --mainnet

cardano-cli: encodeFailure: local state query: using acquire without a Point must be conditional on negotiating v8 of the node-to-client protocol
CallStack (from HasCallStack):
  error, called at src/Ouroboros/Network/Protocol/LocalStateQuery/Codec.hs:80:7 in ouroboros-network-0.1.0.0-12...12:Ouroboros.Network.Protocol.LocalStateQuery.Codec

Your setup might need --shelley-mode rather than the default --cardano-mode .

eg

cardano-cli query protocol-parameters --shelley-mode --testnet-magic 777

I presume that cardano-cli is also version 1.33.0?

1
  • The guide that you followed is from 2020 and refers to cardano-cli version 1.11.0 - a lot has changed since then. Mar 10, 2022 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.