<p>You might want to build your script using <a href="https://github.com/input-output-hk/cardano-node/blob/master/scripts/byron-to-alonzo/mkfiles.sh" rel="nofollow noreferrer">mkfiles.sh</a> script instead.</p>
<p>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 <a href="https://github.com/input-output-hk/cardano-node/blob/master/scripts/byron-to-alonzo/mkfiles.sh#L15-L41" rel="nofollow noreferrer">config options</a> to allow your nodes to fork into specific eras - important to note tho, that when using <code>Cardano</code> mode in config, your Shelley genesis should not include <code>initialFunds</code> - which would break support for that network for components like <code>cardano-db-sync</code>.</p>

CC BY-SA 4.0
2022-03-09T23:49:16.803Z
2022-03-09T23:49:16.803Z
RdLrT
<p>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.</p>
<p>As an FYI I get the same error if I try to force a different mode on my mainnet connection eg --shelley-mode addded:</p>
<pre><code>$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
</code></pre>
<p>Your setup might need --shelley-mode rather than the default --cardano-mode .</p>
<p>eg</p>
<blockquote>
<p>cardano-cli query protocol-parameters --shelley-mode --testnet-magic
777</p>
</blockquote>
<p>I presume that cardano-cli is also version 1.33.0?</p>

CC BY-SA 4.0
2022-03-10T02:53:27.977Z
The guide that you followed is from 2020 and refers to cardano-cli version 1.11.0 - a lot has changed since then.
MC_Brisbane - JUST Pool
CC BY-SA 4.0
2022-03-10T02:17:33.920Z
2022-03-10T02:58:57.927Z
2022-03-10T02:58:57.927Z
MC_Brisbane - JUST Pool
<p>I'm creating a local testnet for development purposes with the following steps:</p>
<pre><code>  # 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 &amp; 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 '{&quot;Producers&quot;: []}' &gt; 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

</code></pre>
<p>Everything seems to work  fine up until this point. However, when I try to query the protocol parameters:</p>
<pre><code>   # Check node status
   export CARDANO_NODE_SOCKET_PATH=/tmp/cardano/db/node.socket
   cardano-cli query protocol-parameters --testnet-magic 777
</code></pre>
<p>I get this error:</p>
<pre><code>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[
</code></pre>
<p>Querying a UTxO also produces the same error:</p>
<pre><code>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
</code></pre>
<p>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 <code>cardano-node</code> versions and I was able to execute local tests very efficiently with this. My current version is:</p>
<pre><code>cardano-node 1.33.0 - linux-x86_64 - ghc-8.10
git rev 814df2c146f5d56f8c35a681fe75e85b905aed5d
</code></pre>
<p>Can anyone help me getting a local blockchain started from scratch? The only documentation I found seems to be outdated (here: <a href="https://cardano-foundation.gitbook.io/stake-pool-course/reference/shelley-genesis" rel="nofollow noreferrer">https://cardano-foundation.gitbook.io/stake-pool-course/reference/shelley-genesis</a>)</p>

<cardano-node>
Error querying protocol parameters in local network created from scratch
# Error querying protocol parameters in local network created from scratch

(Asked by: username_0 on 2022-03-04)

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)

**Tags:** cardano-node

---

## 2 answers

### Answer by username_1 on 2022-03-09. Score: 1

You might want to build your script using [mkfiles.sh](https://github.com/input-output-hk/cardano-node/blob/master/scripts/byron-to-alonzo/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](https://github.com/input-output-hk/cardano-node/blob/master/scripts/byron-to-alonzo/mkfiles.sh#L15-L41) 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`.


---

### Answer by username_2 on 2022-03-10. Score: 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?

> **Comments:**
> **username_2**: The guide that you followed is from 2020 and refers to cardano-cli version 1.11.0 - a lot has changed since then.  

---

