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)