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

💫💫💫 Rerun testnet tests 20x #5695

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Run only TestQueryStakeAddressInfoCmd query in CliQueries Test

6acc46f
Select commit
Loading
Failed to load commit list.
Draft

💫💫💫 Rerun testnet tests 20x #5695

Run only TestQueryStakeAddressInfoCmd query in CliQueries Test
6acc46f
Select commit
Loading
Failed to load commit list.
IOG Hydra / ci/hydra-build:required failed Nov 5, 2024 in 3m 2s

Build dependency failed

1 failed steps

Details

Failed Steps

Step 1169

Derivation

/nix/store/k1v0zipi1ryn2gbd26pqkhyk7yrrd2lb-cardano-testnet-test-cardano-testnet-test-10.0.0-check.drv

Log

unpacking sources
unpacking source archive /nix/store/czam4m5rsmzl3c8iwmfh0dx8qjja0hzx-source-root-cardano-testnet-test-cardano-testnet-test-root
source root is source-root-cardano-testnet-test-cardano-testnet-test-root
patching sources
building
/nix/store/qnsqd4lybv6f8zc3r0v9qbcxjjmwdkb5-cardano-testnet-test-cardano-testnet-test-10.0.0/bin:
patching script interpreter paths in /tmp/tmp.bF3nyVMVZ0/tmp.lIYZOoxnuQ/bin
test/Spec.hs
  Spec
    Ledger Events
      Sanity Check:                                           OK (35.64s)
          ✓ Sanity Check passed 1 test.
      Governance
        Committee Add New:                                    OK (57.79s)
            ✓ Committee Add New passed 1 test.
        DRep Deposits:                                        OK (16.30s)
            ✓ DRep Deposits passed 1 test.
        DRep Retirement:                                      OK (17.60s)
            ✓ DRep Retirement passed 1 test.
        Propose And Ratify New Constitution:                  OK (55.40s)
            ✓ Propose And Ratify New Constitution passed 1 test.
        Gov Action Timeout:                                   OK (135.37s)
            ✓ Gov Action Timeout passed 1 test.
        Treasury Donation:                                    OK (116.93s)
            ✓ Treasury Donation passed 1 test.
        Treasury Withdrawal:                                  OK (54.80s)
            ✓ Treasury Withdrawal passed 1 test.
        PParam change fails for SPO:                          OK (38.58s)
            ✓ PParam change fails for SPO passed 1 test.
        InfoAction:                                           OK (95.01s)
            ✓ InfoAction passed 1 test.
      Plutus
        PlutusV3:                                             OK (38.76s)
            ✓ PlutusV3 passed 1 test.
    CLI
      Shutdown:                                               OK (12.27s)
          ✓ Shutdown passed 1 test.
      Shutdown On Sigint:                                     OK (35.58s)
          ✓ Shutdown On Sigint passed 1 test.
      Shutdown On SlotSynced:                                 OK (16.17s)
          ✓ Shutdown On SlotSynced passed 1 test.
      stake snapshot:                                         OK (168.42s)
          ✓ stake snapshot passed 1 test.
      simple transaction build:                               OK (39.36s)
          ✓ simple transaction build passed 1 test.
      register deregister stake address in transaction build: OK (17.42s)
          ✓ register deregister stake address in transaction build passed 1 test.
      kes-period-info:                                        OK (165.16s)
          ✓ kes-period-info passed 1 test.
      query-slot-number:                                      OK (34.72s)
          ✓ query-slot-number passed 1 test.
      foldEpochState receives ledger state:                   OK (26.50s)
          ✓ foldEpochState receives ledger state passed 1 test.
      CliQueries:                                             FAIL (55.48s)
          ✗ CliQueries failed at test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Query.hs:304:9
            after 1 test.
            shrink path: 1:
          
            forAll80 =
              Started logging epoch states to: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/logs/ledger-epoch-state.log
              Epoch state diffs are logged to: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/logs/ledger-epoch-state-diffs.log
            
            forAll81 =
              /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/./socket/node1/sock
            
            forAll82 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/current-stake-pools.json ━━━━
              [
                  "pool1mlwtj9v9gngl8wmmj5n2mrdyt64cv9y8dwyxrvu9jpk8ktdgk6p"
              ]
            
            forAll83 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/current-stake-pools.json
            
            forAll84 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest query stake-pools --out-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/current-stake-pools.json
            
            forAll85 =
              /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/current-stake-pools.json
            
            forAll86 =
                                         TxHash                                 TxIx        Amount
              --------------------------------------------------------------------------------------
              26925f5123f8c44f5c3bfcf64ca37be760b3535b6070f666f5a89314c64b5eec     0        15000003000000 lovelace + TxOutDatumNone
            
            forAll87 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest query utxo --address addr_test1vrgl46uhjkz7ph6erqrs9mpcwe54t29nkshy8n6fzgpakaqqjwzag --cardano-mode
            
            forAll88 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.vkey ━━━━
              {
                  "type": "GenesisUTxOVerificationKey_ed25519",
                  "description": "Genesis Initial UTxO Verification Key",
                  "cborHex": "58203dd1859df13dabeebba6bb62ede9e4075154e561521d06c2cfd13846e965275e"
              }
              
            
            forAll89 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.vkey
            
            forAll90 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.skey ━━━━
              {
                  "type": "GenesisUTxOSigningKey_ed25519",
                  "description": "Genesis Initial UTxO Signing Key",
                  "cborHex": "5820d701ee0aff582d827d17b874ddd5ea5b55262856312574b1ea88286f4197ab32"
              }
              
            
            forAll91 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.skey
            
            forAll92 =
                                         TxHash                                 TxIx        Amount
              --------------------------------------------------------------------------------------
              ca8e132bf7fc598e9ffad036337451d824a47cd19e979c964ad30200f2d4fc7c     0        15000003000000 lovelace + TxOutDatumNone
            
            forAll93 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest query utxo --address addr_test1vzv78wd072gknnahve7cyauecfpz2ev8hg4szw30ag02xygq5nad0 --cardano-mode
            
            forAll94 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.vkey ━━━━
              {
                  "type": "GenesisUTxOVerificationKey_ed25519",
                  "description": "Genesis Initial UTxO Verification Key",
                  "cborHex": "58202cb747c3b4a102b8c117fc293ac7a7ffae1322db467c405d8f4bbdc6407a3759"
              }
              
            
            forAll95 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.vkey
            
            forAll96 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.skey ━━━━
              {
                  "type": "GenesisUTxOSigningKey_ed25519",
                  "description": "Genesis Initial UTxO Signing Key",
                  "cborHex": "58205765ffe768cb261e5ffafe8ddf16788efb8fddd4d10201e524b1f726bed54458"
              }
              
            
            forAll97 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.skey
            
            forAll98 =
                                         TxHash                                 TxIx        Amount
              --------------------------------------------------------------------------------------
              ed10cdea990812adb42fe5a56036fe9f6217604049140d365e315d9f4c504dcd     0        15000003000000 lovelace + TxOutDatumNone
            
            forAll99 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest query utxo --address addr_test1vq5unaxrfdg7ejclf4w680frzr8dwm8hrju4cq3m3pgeg7qru83n6 --cardano-mode
            
            forAll100 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.vkey ━━━━
              {
                  "type": "GenesisUTxOVerificationKey_ed25519",
                  "description": "Genesis Initial UTxO Verification Key",
                  "cborHex": "5820210247ce59b780af4e0a8d24d12a2f886c348cd800ee154e9fb194542c4fe37d"
              }
              
            
            forAll101 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.vkey
            
            forAll102 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.skey ━━━━
              {
                  "type": "GenesisUTxOSigningKey_ed25519",
                  "description": "Genesis Initial UTxO Signing Key",
                  "cborHex": "58206c9de4f56be19baccfd9a2b3092e6d442fa7019e1f8b2a52305382f0e1fc9a2f"
              }
              
            
            forAll103 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.skey
            
            forAll104 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.vkey ━━━━
              {
                  "type": "GenesisUTxOVerificationKey_ed25519",
                  "description": "Genesis Initial UTxO Verification Key",
                  "cborHex": "58203dd1859df13dabeebba6bb62ede9e4075154e561521d06c2cfd13846e965275e"
              }
              
            
            forAll105 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.vkey
            
            forAll106 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.skey ━━━━
              {
                  "type": "GenesisUTxOSigningKey_ed25519",
                  "description": "Genesis Initial UTxO Signing Key",
                  "cborHex": "5820d701ee0aff582d827d17b874ddd5ea5b55262856312574b1ea88286f4197ab32"
              }
              
            
            forAll107 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.skey
            
            forAll108 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.vkey ━━━━
              {
                  "type": "GenesisUTxOVerificationKey_ed25519",
                  "description": "Genesis Initial UTxO Verification Key",
                  "cborHex": "58202cb747c3b4a102b8c117fc293ac7a7ffae1322db467c405d8f4bbdc6407a3759"
              }
              
            
            forAll109 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.vkey
            
            forAll110 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.skey ━━━━
              {
                  "type": "GenesisUTxOSigningKey_ed25519",
                  "description": "Genesis Initial UTxO Signing Key",
                  "cborHex": "58205765ffe768cb261e5ffafe8ddf16788efb8fddd4d10201e524b1f726bed54458"
              }
              
            
            forAll111 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.skey
            
            forAll112 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.vkey ━━━━
              {
                  "type": "GenesisUTxOVerificationKey_ed25519",
                  "description": "Genesis Initial UTxO Verification Key",
                  "cborHex": "5820210247ce59b780af4e0a8d24d12a2f886c348cd800ee154e9fb194542c4fe37d"
              }
              
            
            forAll113 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.vkey
            
            forAll114 =
              ━━━━ File: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.skey ━━━━
              {
                  "type": "GenesisUTxOSigningKey_ed25519",
                  "description": "Genesis Initial UTxO Signing Key",
                  "cborHex": "58206c9de4f56be19baccfd9a2b3092e6d442fa7019e1f8b2a52305382f0e1fc9a2f"
              }
              
            
            forAll115 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.skey
            
            forAll116 =
              2024-11-05 16:19:22.205573585 UTC
            
            forAll117 =
              2024-11-05 16:19:47.178229536 UTC
            
            forAll118 =
              2024-11-05 16:19:02.178229536 UTC
            
            forAll119 =
              [ Sprocket
                  { sprocketBase =
                      "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/"
                  , sprocketName = "./socket/node1/sock"
                  }
              , Sprocket
                  { sprocketBase =
                      "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/"
                  , sprocketName = "./socket/node2/sock"
                  }
              , Sprocket
                  { sprocketBase =
                      "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/"
                  , sprocketName = "./socket/node3/sock"
                  }
              ]
            
            forAll120 =
              Waiting for port 42757 to be available before starting node
            
            forAll121 =
              Node name: node3
            
            forAll122 =
              Waiting for port 36705 to be available before starting node
            
            forAll123 =
              Node name: node2
            
            forAll124 =
              Waiting for port 42233 to be available before starting node
            
            forAll125 =
              Node name: node1
            
            forAll126 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/node-data/node3/topology.json
            
            forAll127 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/node-data/node2/topology.json
            
            forAll128 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/node-data/node1/topology.json
            
            forAll129 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/node-data/node3/port
            
            forAll130 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/node-data/node2/port
            
            forAll131 =
              Renaming from "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron-gen-command/delegation-cert.000.json" to "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/pools-keys/pool1/byron-delegation.cert"
            
            forAll132 =
              Renaming from "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron-gen-command/delegate-keys.000.key" to "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/pools-keys/pool1/byron-delegate.key"
            
            forAll133 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/node-data/node1/port
            
            forAll134 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.addr
            
            forAll135 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest address build --payment-verification-key-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.vkey --testnet-magic 42 --out-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo3/utxo.addr
            
            forAll136 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.addr
            
            forAll137 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest address build --payment-verification-key-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.vkey --testnet-magic 42 --out-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo2/utxo.addr
            
            forAll138 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.addr
            
            forAll139 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli latest address build --payment-verification-key-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.vkey --testnet-magic 42 --out-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/utxo-keys/utxo1/utxo.addr
            
            forAll140 =
              Renaming from "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron-gen-command/genesis.json" to "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron/genesis.json"
            
            forAll141 =
              byron
            
            forAll142 =
              delegate-keys
            
            forAll143 =
              byron.genesis.spec.json
            
            forAll144 =
              genesis-keys
            
            forAll145 =
              genesis.alonzo.spec.json
            
            forAll146 =
              byron-gen-command
            
            forAll147 =
              genesis.conway.spec.json
            
            forAll148 =
              pools-keys
            
            forAll149 =
              drep-keys
            
            forAll150 =
              shelley-genesis.json
            
            forAll151 =
              stake-delegators
            
            forAll152 =
              module
            
            forAll153 =
              conway-genesis.json
            
            forAll154 =
              utxo-keys
            
            forAll155 =
              alonzo-genesis.json
            
            forAll156 =
              Listing directory: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/
            
            forAll157 =
              Creating directory if missing: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron
            
            forAll158 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli conway genesis create-testnet-data --spec-shelley /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis-input.shelley.json --spec-alonzo /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis-input.alonzo.json --spec-conway /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis-input.conway.json --testnet-magic 42 --pools 1 --total-supply 100000020000000 --stake-delegators 3 --utxo-keys 3 --drep-keys 3 --start-time 2024-11-05T16:19:02Z --out-dir /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/
            
            forAll159 =
              Number of seeded UTxO keys: 3
            
            forAll160 =
              Number of stake delegators: 1
            
            forAll161 =
              Number of pools: 1
            
            forAll162 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis-input.shelley.json
            
            forAll163 =
              Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis-input.shelley.json
            
            forAll164 =
              Rewriting JSON file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis-input.shelley.json
            
            forAll165 =
              Creating directory if missing: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3
            
            forAll166 =
              "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/configuration.yaml"
            
            forAll167 =
              "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis.conway.spec.json"
            
            forAll168 =
              "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/genesis.alonzo.spec.json"
            
            forAll169 =
              ━━━━ command ━━━━
              /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli byron genesis genesis --protocol-magic 42 --start-time 1730823542 --k 10 --n-poor-addresses 0 --n-delegate-addresses 3 --total-balance 8000000001 --delegate-share 1 --avvm-entry-count 0 --avvm-entry-balance 0 --avvm-balance-factor 1 --protocol-parameters-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron.genesis.spec.json --genesis-output-dir /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron-gen-command
            
            forAll170 =
              Writing file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/byron.genesis.spec.json
            
            forAll171 =
              linux
            
            forAll172 =
              2024-11-05 16:19:02.11927944 UTC
            
            forAll173 =
              2024-11-05 16:18:47.11927944 UTC
          
                ┏━━ test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Query.hs ━━━
             87 ┃ hprop_cli_queries :: Property
             88 ┃ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
                ┃ │ Workspace: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3
             89 ┃   conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) }
             90 ┃     <- mkConf tempAbsBasePath'
                ┃     │ /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3
             91 ┃   let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
             92 ┃ 
             93 ┃   let sbe = ShelleyBasedEraConway
             94 ┃       asbe = AnyShelleyBasedEra sbe
             95 ┃       era = toCardanoEra sbe
             96 ┃       cEra = AnyCardanoEra era
             97 ┃       eraName = eraToString era
             98 ┃       fastTestnetOptions = def { cardanoNodeEra = asbe }
             99 ┃       shelleyOptions = def
            100 ┃         { genesisEpochLength = 100
            101 ┃         -- We change slotCoeff because epochLength must be equal to:
            102 ┃         -- securityParam * 10 / slotCoeff
            103 ┃         , genesisActiveSlotsCoeff = 0.5
            104 ┃         }
            105 ┃       nPools = cardanoNumPools fastTestnetOptions
            106 ┃ 
            107 ┃   TestnetRuntime
            108 ┃     { testnetMagic
            109 ┃     , testnetNodes
            110 ┃     , configurationFile
            111 ┃     , wallets=wallet0:wallet1:_
            112 ┃     }
            113 ┃     <- cardanoTestnetDefault fastTestnetOptions shelleyOptions conf
            114 ┃ 
            115 ┃   let shelleyGeneisFile = work </> Defaults.defaultGenesisFilepath ShelleyEra
            116 ┃ 
            117 ┃   node <- H.headM testnetNodes
            118 ┃   poolSprocket1 <- H.noteShow $ nodeSprocket node
                ┃   │ Sprocket {sprocketBase = "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/", sprocketName = "./socket/node1/sock"}
            119 ┃   execConfig <- mkExecConfig tempBaseAbsPath poolSprocket1 testnetMagic
            120 ┃   let socketPath = nodeSocketPath node
            121 ┃ 
            122 ┃   epochStateView <- getEpochStateView configurationFile socketPath
            123 ┃ 
            124 ┃   H.note_ $ "Sprocket: " <> show poolSprocket1
                ┃   │ Sprocket: Sprocket {sprocketBase = "/tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/", sprocketName = "./socket/node1/sock"}
            125 ┃   H.note_ $ "Abs path: " <> tempAbsBasePath'
                ┃   │ Abs path: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3
            126 ┃   H.note_ $ "Socketpath: " <> unFile socketPath
                ┃   │ Socketpath: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/./socket/node1/sock
            127 ┃   H.note_ $ "Foldblocks config file: " <> unFile configurationFile
                ┃   │ Foldblocks config file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/configuration.yaml
            128 ┃ 
            129 ┃   checkDRepsNumber epochStateView sbe 3
                ┃   │ Operation completed in 0.500930122s
            130 ┃ 
            131 ┃   -- If we don't wait, the leadership-schedule test will say SPO has no stake
            132 ┃   _ <- waitForEpochs epochStateView (EpochInterval 1)
                ┃   │ Operation completed in 0.000008565s
                ┃   │ Operation completed in 0.000007945s
                ┃   │ Operation completed in 0.000009337s
                ┃   │ Operation completed in 0.000012193s
                ┃   │ Operation completed in 0.000009688s
                ┃   │ Operation completed in 0.000011061s
                ┃   │ Operation completed in 0.000009618s
                ┃   │ Operation completed in 0.000010931s
                ┃   │ Operation completed in 0.000009568s
                ┃   │ Operation completed in 0.000008817s
                ┃   │ Operation completed in 0.000007404s
                ┃   │ Operation completed in 0.000008556s
                ┃   │ Operation completed in 0.000008345s
                ┃   │ Operation completed in 0.000009598s
                ┃   │ Operation completed in 0.000007624s
                ┃   │ Operation completed in 0.000013465s
                ┃   │ Operation completed in 0.000009688s
                ┃   │ Operation completed in 0.000011331s
                ┃   │ Operation completed in 0.00001059s
                ┃   │ Operation completed in 0.00001115s
                ┃   │ Operation completed in 0.000011031s
                ┃   │ Operation completed in 0.000009097s
                ┃   │ Operation completed in 0.000008837s
                ┃   │ Operation completed in 0.000011291s
                ┃   │ Operation completed in 0.000008736s
                ┃   │ Operation completed in 0.00001072s
                ┃   │ Operation completed in 0.000008656s
                ┃   │ Operation completed in 0.000011281s
                ┃   │ Operation completed in 0.000009728s
                ┃   │ Operation completed in 0.000011592s
                ┃   │ Operation completed in 0.000009788s
                ┃   │ Operation completed in 0.00001049s
                ┃   │ Operation completed in 0.000013095s
                ┃   │ Operation completed in 0.000010891s
                ┃   │ Operation completed in 0.000011321s
                ┃   │ Operation completed in 0.000016972s
                ┃   │ Operation completed in 0.000013255s
                ┃   │ Operation completed in 0.00001099s
                ┃   │ Operation completed in 0.000012293s
                ┃   │ Operation completed in 0.00001084s
                ┃   │ Operation completed in 0.00001042s
                ┃   │ Operation completed in 0.000009488s
                ┃   │ Operation completed in 0.00001059s
                ┃   │ Operation completed in 0.000012093s
                ┃   │ Operation completed in 0.00001053s
                ┃   │ Operation completed in 0.000011962s
                ┃   │ Operation completed in 0.000012313s
                ┃   │ Operation completed in 0.000011552s
                ┃   │ Operation completed in 0.000011572s
                ┃   │ Operation completed in 0.000012794s
                ┃   │ Operation completed in 0.000012744s
                ┃   │ Operation completed in 0.000011902s
                ┃   │ Operation completed in 0.000011441s
                ┃   │ Operation completed in 0.000009798s
                ┃   │ Operation completed in 0.00001589s
                ┃   │ Operation completed in 0.000012233s
                ┃   │ Operation completed in 0.000012062s
                ┃   │ Operation completed in 0.000011722s
                ┃   │ Operation completed in 0.000013976s
                ┃   │ Operation completed in 0.000011271s
                ┃   │ Operation completed in 0.000012273s
                ┃   │ Operation completed in 0.000009888s
                ┃   │ Operation completed in 0.000009528s
                ┃   │ Operation completed in 0.000011672s
                ┃   │ Operation completed in 0.000011231s
                ┃   │ Operation completed in 0.000012353s
                ┃   │ Operation completed in 0.000009578s
            133 ┃ 
            134 ┃   let filterQ :: Applicative m => (TestQueryCmds -> m ()) -> TestQueryCmds -> m ()
            135 ┃       filterQ f = \case
            136 ┃         TestQueryStakeAddressInfoCmd -> f TestQueryStakeAddressInfoCmd
            137 ┃         _ -> pure ()
            138 ┃ 
            139 ┃   forallQueryCommands . filterQ $ \case
            140 ┃ 
            141 ┃     TestQueryLeadershipScheduleCmd ->
            142 ┃       -- leadership-schedule
            143 ┃       do
            144 ┃         let spoKeys = Defaults.defaultSpoKeys 1
            145 ┃         spoVerificationKey :: VerificationKey StakePoolKey <- readVerificationKeyFromFile AsStakePoolKey work $ verificationKey $ poolNodeKeysCold spoKeys
            146 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "leadership-schedule"
            147 ┃                                        , "--genesis", shelleyGeneisFile
            148 ┃                                        , "--stake-pool-verification-key", T.unpack $ serialiseToBech32 spoVerificationKey
            149 ┃                                        , "--vrf-signing-key-file", unFile $ signingKey $ poolNodeKeysVrf spoKeys
            150 ┃                                        , "--current"
            151 ┃                                        ]
            152 ┃ 
            153 ┃     TestQueryProtocolParametersCmd ->
            154 ┃       -- protocol-parameters
            155 ┃       do
            156 ┃         -- to stdout
            157 ┃         protocolParametersOut <- execCli' execConfig [ eraName, "query", "protocol-parameters" ]
            158 ┃         H.diffVsGoldenFile
            159 ┃           protocolParametersOut
            160 ┃           "test/cardano-testnet-test/files/golden/queries/protocolParametersOut.txt"
            161 ┃         -- protocol-parameters to a file
            162 ┃         let protocolParametersOutFile = work </> "protocol-parameters-out.json"
            163 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "protocol-parameters"
            164 ┃                                        , "--out-file", protocolParametersOutFile ]
            165 ┃         H.diffFileVsGoldenFile
            166 ┃           protocolParametersOutFile
            167 ┃           "test/cardano-testnet-test/files/golden/queries/protocolParametersFileOut.json"
            168 ┃ 
            169 ┃     TestQueryTipCmd ->
            170 ┃       -- tip
            171 ┃       do
            172 ┃         -- to stdout
            173 ┃         tips :: QueryTipLocalStateOutput <- H.noteShowM $ execCliStdoutToJson execConfig [ eraName, "query", "tip" ]
            174 ┃         let changes = fromList (map (, "<redacted>") ["hash", "block", "epoch", "slot", "slotInEpoch", "slotsToEpochEnd"])
            175 ┃             tipsRedacted = redactJsonFields changes (Aeson.toJSON tips)
            176 ┃         H.diffVsGoldenFile
            177 ┃           (TL.unpack . TL.decodeUtf8 $ Aeson.encodePretty tipsRedacted)
            178 ┃           "test/cardano-testnet-test/files/golden/queries/tipOut.json"
            179 ┃          -- to a file
            180 ┃         let tipOutFile = work </> "tip-out.json"
            181 ┃             tipOutRedactedFile = work </> "tip-out-redacted.json"
            182 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "tip"
            183 ┃                                        , "--out-file", tipOutFile]
            184 ┃         _ :: QueryTipLocalStateOutput <- H.readJsonFileOk tipOutFile
            185 ┃         redactJsonFieldsInFile changes tipOutFile tipOutRedactedFile
            186 ┃         H.diffFileVsGoldenFile
            187 ┃           tipOutRedactedFile
            188 ┃           "test/cardano-testnet-test/files/golden/queries/tipOut.json"
            189 ┃         pure ()
            190 ┃ 
            191 ┃     TestQueryStakePoolsCmd ->
            192 ┃       -- stake-pools
            193 ┃       do
            194 ┃         -- to stdout
            195 ┃         stakePoolsOut <- execCli' execConfig [ eraName, "query", "stake-pools" ]
            196 ┃         H.assertWith stakePoolsOut $ \pools ->
            197 ┃           NumPools (length $ lines pools) == nPools
            198 ┃         -- Light test of the query's answer, the ids should exist:
            199 ┃         forM_ (lines stakePoolsOut) $ \stakePoolId -> do
            200 ┃           execCli' execConfig [ eraName, "query", "pool-state"
            201 ┃                               , "--stake-pool-id", stakePoolId ]
            202 ┃         -- to a file
            203 ┃         let stakePoolsOutFile = work </> "stake-pools-out.json"
            204 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "stake-pools" , "--out-file", stakePoolsOutFile]
            205 ┃ 
            206 ┃     TestQueryPoolStateCmd ->
            207 ┃       -- pool-state
            208 ┃       -- Already tested in TestQueryStakePoolsCmd and TestQueryStakeDistributionCmd
            209 ┃       pure ()
            210 ┃ 
            211 ┃     TestQueryStakeDistributionCmd ->
            212 ┃       -- stake-distribution
            213 ┃       do
            214 ┃         -- to stdout
            215 ┃         stakeDistrOut <- execCli' execConfig [ eraName, "query", "stake-distribution" ]
            216 ┃         -- stake addresses with stake
            217 ┃         let stakeAddresses :: [(Text, Text)] =
            218 ┃               map
            219 ┃               ( bimap T.strip T.strip
            220 ┃                 . T.breakOn " " -- separate address and stake
            221 ┃                 . T.strip
            222 ┃                 . fromString )
            223 ┃               . drop 2 -- drop header
            224 ┃               . lines
            225 ┃               $ stakeDistrOut
            226 ┃         H.assertWith stakeAddresses $ \sa ->
            227 ┃           NumPools (length sa) == nPools
            228 ┃         -- Light test of the query's answer, the ids should exist:
            229 ┃         forM_ stakeAddresses $ \(stakePoolId, _) -> do
            230 ┃           execCli' execConfig [ eraName, "query", "pool-state"
            231 ┃                               , "--stake-pool-id", T.unpack stakePoolId ]
            232 ┃         -- to a file
            233 ┃         let stakePoolsOutFile = work </> "stake-distribution-out.json"
            234 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "stake-distribution"
            235 ┃                                        , "--out-file", stakePoolsOutFile ]
            236 ┃ 
            237 ┃     TestQuerySPOStakeDistributionCmd ->
            238 ┃       -- spo-stake-distribution
            239 ┃       do
            240 ┃         -- Query all SPOs - we only have one
            241 ┃         aesonSpoDist :: Aeson.Value <- execCliStdoutToJson execConfig [ eraName, "query", "spo-stake-distribution", "--all-spos" ]
            242 ┃         firstHash <- H.evalMaybe $ T.unpack <$> aesonSpoDist ^? Aeson.nth 0 . Aeson.nth 0 . Aeson._String
            243 ┃         firstAmount <- H.evalMaybe $ aesonSpoDist ^? Aeson.nth 0 . Aeson.nth 1 . Aeson._Number
            244 ┃ 
            245 ┃         -- Query individual SPO using result and ensure result is the same
            246 ┃         firstSpoInfo :: Aeson.Value <- execCliStdoutToJson execConfig [ eraName, "query", "spo-stake-distribution", "--spo-key-hash", firstHash ]
            247 ┃         individualHash <- H.evalMaybe $ T.unpack <$> firstSpoInfo ^? Aeson.nth 0 . Aeson.nth 0 . Aeson._String
            248 ┃         individualAmount <- H.evalMaybe $ firstSpoInfo ^? Aeson.nth 0 . Aeson.nth 1 . Aeson._Number
            249 ┃         firstHash === individualHash
            250 ┃         firstAmount === individualAmount
            251 ┃ 
            252 ┃         -- Query individual SPO using SPOs verification file
            253 ┃         let spoKey = verificationKey . poolNodeKeysCold $ Defaults.defaultSpoKeys 1
            254 ┃         fileQueryResult :: Aeson.Value <- execCliStdoutToJson execConfig [ eraName, "query", "spo-stake-distribution"
            255 ┃                                                                          , "--spo-verification-key-file", unFile spoKey
            256 ┃                                                                          ]
            257 ┃         fileQueryHash <- H.evalMaybe $ T.unpack <$> fileQueryResult ^? Aeson.nth 0 . Aeson.nth 0 . Aeson._String
            258 ┃         fileQueryAmount <- H.evalMaybe $ fileQueryResult ^? Aeson.nth 0 . Aeson.nth 1 . Aeson._Number
            259 ┃ 
            260 ┃         -- Query individual SPO using SPOs bech32 of key and compare to previous result
            261 ┃         delegatorVKey :: VerificationKey StakePoolKey <- readVerificationKeyFromFile AsStakePoolKey work spoKey
            262 ┃         keyQueryResult :: Aeson.Value <- execCliStdoutToJson execConfig [ eraName, "query", "spo-stake-distribution"
            263 ┃                                                                         , "--spo-verification-key", T.unpack $ serialiseToBech32 delegatorVKey
            264 ┃                                                                         ]
            265 ┃         keyQueryHash <- H.evalMaybe $ T.unpack <$> keyQueryResult ^? Aeson.nth 0 . Aeson.nth 0 . Aeson._String
            266 ┃         keyQueryAmount <- H.evalMaybe $ keyQueryResult ^? Aeson.nth 0 . Aeson.nth 1 . Aeson._Number
            267 ┃         fileQueryHash === keyQueryHash
            268 ┃         fileQueryAmount === keyQueryAmount
            269 ┃ 
            270 ┃     TestQueryStakeAddressInfoCmd ->
            271 ┃       -- stake-address-info
            272 ┃       {-
            273 ┃          FIXME: this test is flaky - needs investigation : the reward account balance is changing between multiple executions e.g.
            274 ┃                  │ Reading file: /home/runner/work/_temp/cli-queries-test-bbd8d6517639a66e/stake-address-info-out-redacted.json
            275 ┃                  │ Reading file: test/cardano-testnet-test/files/golden/queries/stakeAddressInfoOut.json
            276 ┃                  │ Golden test failed against the golden file.
            277 ┃                  │ To recreate golden file, run with RECREATE_GOLDEN_FILES=1.
            278 ┃                  ^^^^^^^^^^^^^^^^^^^^^^
            279 ┃                  │ 5c5
            280 ┃                  │ <         "rewardAccountBalance": 0,
            281 ┃                  │ ---
            282 ┃                  │ >         "rewardAccountBalance": 5257141033,
            283 ┃       -}
            284 ┃       do
            285 ┃         -- to stdout
            286 ┃         let delegatorKeys = Defaults.defaultDelegatorStakeKeyPair 1
            287 ┃         delegatorVKey :: VerificationKey StakeKey <- readVerificationKeyFromFile AsStakeKey work $ verificationKey delegatorKeys
            288 ┃         let stakeAddress :: StakeAddress = verificationStakeKeyToStakeAddress testnetMagic delegatorVKey
            289 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "stake-address-info"
                ┃         │ ━━━━ command ━━━━
                ┃         │ /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli conway query stake-address-info --address stake_test1uzlrvs6uqpxhynktlxk3ye0z6m5m0ztz6e53x0npxhpam4qlw8zr4
                ┃         │ [
                ┃         │     {
                ┃         │         "address": "stake_test1uzlrvs6uqpxhynktlxk3ye0z6m5m0ztz6e53x0npxhpam4qlw8zr4",
                ┃         │         "delegationDeposit": 0,
                ┃         │         "rewardAccountBalance": 5142844921,
                ┃         │         "stakeDelegation": "pool1mlwtj9v9gngl8wmmj5n2mrdyt64cv9y8dwyxrvu9jpk8ktdgk6p",
                ┃         │         "voteDelegation": "keyHash-ada01e40f0d2d6b2619b03d52e1f3b76488390cd63ec113cfb638f9c"
                ┃         │     }
                ┃         │ ]
            290 ┃                                        , "--address", T.unpack $ serialiseAddress stakeAddress
            291 ┃                                        ]
            292 ┃         -- to a file
            293 ┃         let stakeAddressInfoOutFile = work </> "stake-address-info-out.json"
            294 ┃             redactedStakeAddressInfoOutFile = work </> "stake-address-info-out-redacted.json"
            295 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "stake-address-info"
                ┃         │ ━━━━ command ━━━━
                ┃         │ /nix/store/y9gmw2xq1wn31x456czkaflhqcfqaiag-cardano-cli-exe-cardano-cli-10.1.1.0/bin/cardano-cli conway query stake-address-info --address stake_test1uzlrvs6uqpxhynktlxk3ye0z6m5m0ztz6e53x0npxhpam4qlw8zr4 --out-file /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/stake-address-info-out.json
            296 ┃                                        , "--address", T.unpack $ serialiseAddress stakeAddress
            297 ┃                                        , "--out-file", stakeAddressInfoOutFile
            298 ┃                                        ]
            299 ┃ 
            300 ┃         redactJsonFieldsInFile
            301 ┃           (fromList (map (, "<redacted>") ["address", "stakeDelegation", "voteDelegation"]))
            302 ┃           stakeAddressInfoOutFile
            303 ┃           redactedStakeAddressInfoOutFile
            304 ┃         H.diffFileVsGoldenFile
                ┃         │ Reading file: /tmp/tmp.bF3nyVMVZ0/cli-queries-test-0872b57d73b9b4d3/stake-address-info-out-redacted.json
                ┃         │ Reading file: test/cardano-testnet-test/files/golden/queries/stakeAddressInfoOut.json
                ┃         │ Golden test failed against the golden file.
                ┃         │ To recreate golden file, run with RECREATE_GOLDEN_FILES=1.
                ┃         ^^^^^^^^^^^^^^^^^^^^^^
                ┃         │ 5c5
                ┃         │ <         "rewardAccountBalance": 5142844921,
                ┃         │ ---
                ┃         │ >         "rewardAccountBalance": 0,
            305 ┃           redactedStakeAddressInfoOutFile
            306 ┃           "test/cardano-testnet-test/files/golden/queries/stakeAddressInfoOut.json"
            307 ┃     TestQueryUTxOCmd ->
            308 ┃       -- utxo
            309 ┃       H.noteM_ $ execCli' execConfig [ eraName, "query", "utxo", "--whole-utxo" ]
            310 ┃ 
            311 ┃     TestQueryLedgerStateCmd ->
            312 ┃       -- ledger-state
            313 ┃       H.noteM_ $ execCli' execConfig [ eraName, "query", "ledger-state" ]
            314 ┃ 
            315 ┃     TestQueryProtocolStateCmd ->
            316 ┃       -- protocol-state
            317 ┃       H.noteM_ $ execCli' execConfig [ eraName, "query", "protocol-state" ]
            318 ┃ 
            319 ┃     TestQueryStakeSnapshotCmd ->
            320 ┃       -- stake-snapshot
            321 ┃       H.noteM_ $ execCli' execConfig [ eraName, "query", "stake-snapshot", "--all-stake-pools" ]
            322 ┃ 
            323 ┃     TestQueryKesPeriodInfoCmd ->
            324 ┃       -- kes-period-info
            325 ┃       -- This is tested in hprop_kes_period_info in Cardano.Testnet.Test.Cli.KesPeriodInfo
            326 ┃       pure ()
            327 ┃ 
            328 ┃     TestQueryTxMempoolCmd ->
            329 ┃       -- tx-mempool
            330 ┃       do
            331 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "tx-mempool", "info" ]
            332 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "tx-mempool", "next-tx" ]
            333 ┃         -- Now we create a transaction and check if it exists in the mempool
            334 ┃         mempoolWork <- H.createDirectoryIfMissing $ work </> "mempool-test"
            335 ┃         txBody <- mkSimpleSpendOutputsOnlyTx execConfig epochStateView sbe mempoolWork "tx-body" wallet0 wallet1 10_000_000
            336 ┃         signedTx <- signTx execConfig cEra mempoolWork "signed-tx" txBody [Some $ paymentKeyInfoPair wallet0]
            337 ┃         submitTx execConfig cEra signedTx
            338 ┃         txId <- retrieveTransactionId execConfig signedTx
            339 ┃         -- And we check
            340 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "tx-mempool", "tx-exists", txId ]
            341 ┃ 
            342 ┃     TestQuerySlotNumberCmd ->
            343 ┃       -- slot-number
            344 ┃       -- This is tested in hprop_querySlotNumber in Cardano.Testnet.Test.Cli.QuerySlotNumber
            345 ┃       pure ()
            346 ┃ 
            347 ┃ 
            348 ┃     TestQueryRefScriptSizeCmd ->
            349 ┃       -- ref-script-size
            350 ┃       do
            351 ┃         -- Set up files and vars
            352 ┃         refScriptSizeWork <- H.createDirectoryIfMissing $ work </> "ref-script-size-test"
            353 ┃         plutusV3Script <- File <$> liftIO (makeAbsolute "test/cardano-testnet-test/files/plutus/v3/always-succeeds.plutus")
            354 ┃         let transferAmount = Coin 10_000_000
            355 ┃         -- Submit a transaction to publish the reference script
            356 ┃         txBody <- mkSpendOutputsOnlyTx execConfig epochStateView sbe refScriptSizeWork "tx-body" wallet1
            357 ┃                     [(ReferenceScriptAddress plutusV3Script, transferAmount)]
            358 ┃         signedTx <- signTx execConfig cEra refScriptSizeWork "signed-tx" txBody [Some $ paymentKeyInfoPair wallet1]
            359 ┃         submitTx execConfig cEra signedTx
            360 ┃         -- Wait until transaction is on chain and obtain transaction identifier
            361 ┃         txId <- retrieveTransactionId execConfig signedTx
            362 ┃         txIx <- H.evalMaybeM $ watchEpochStateUpdate epochStateView (EpochInterval 2) (getTxIx sbe txId transferAmount)
            363 ┃         -- Query the reference script size
            364 ┃         let protocolParametersOutFile = refScriptSizeWork </> "ref-script-size-out.json"
            365 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "ref-script-size"
            366 ┃                                        , "--tx-in", txId ++ "#" ++ show (txIx :: Int)
            367 ┃                                        , "--out-file", protocolParametersOutFile
            368 ┃                                        ]
            369 ┃         H.diffFileVsGoldenFile
            370 ┃           protocolParametersOutFile
            371 ┃           "test/cardano-testnet-test/files/golden/queries/refScriptSizeOut.json"
            372 ┃ 
            373 ┃     TestQueryConstitutionCmd ->
            374 ┃       -- constitution
            375 ┃       do
            376 ┃         output <- execCli' execConfig [ eraName, "query", "constitution" ]
            377 ┃         H.diffVsGoldenFile output "test/cardano-testnet-test/files/golden/queries/queryConstitutionOut.json"
            378 ┃ 
            379 ┃     TestQueryGovStateCmd ->
            380 ┃       -- gov-state
            381 ┃       do
            382 ┃         -- wait for the proposal stage to end
            383 ┃         shelleyGenesisVal <- H.evalEitherM $ readJsonFile shelleyGeneisFile
            384 ┃         newSlot <- waitForFuturePParamsToStabilise epochStateView shelleyGenesisVal
            385 ┃         H.note_ $ "Current slot is: " ++ show newSlot
            386 ┃         -- to stdout
            387 ┃         output <- execCli' execConfig [ eraName, "query", "gov-state" ]
            388 ┃         H.diffVsGoldenFile output "test/cardano-testnet-test/files/golden/queries/govStateOut.json"
            389 ┃         -- to a file
            390 ┃         let govStateOutFile = work </> "gov-state-out.json"
            391 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "gov-state", "--out-file", govStateOutFile ]
            392 ┃         H.diffFileVsGoldenFile
            393 ┃           govStateOutFile
            394 ┃           "test/cardano-testnet-test/files/golden/queries/govStateOut.json"
            395 ┃ 
            396 ┃     TestQueryDRepStateCmd -> pure ()
            397 ┃       -- drep-state
            398 ┃       {- FIXME: the drep state output appears to be not stable, and the expiry and stake value fluctuates
            399 ┃          here, needs investigation
            400 ┃       do
            401 ┃         -- to stdout
            402 ┃         -- TODO: deserialize to a Haskell value when
            403 ┃         -- https://github.com/IntersectMBO/cardano-cli/issues/606 is tackled
            404 ┃         dreps <- H.noteShowM $ execCliStdoutToJson execConfig [ eraName, "query", "drep-state", "--all-dreps", "--include-stake"]
            405 ┃         let drepsRedacted = redactJsonFields (fromList [("keyHash", "<redacted>")]) dreps
            406 ┃         H.diffVsGoldenFile
            407 ┃           (TL.unpack . TL.decodeUtf8 $ Aeson.encodePretty drepsRedacted)
            408 ┃           "test/cardano-testnet-test/files/golden/queries/drepStateOut.json"
            409 ┃ 
            410 ┃         -- to a file
            411 ┃         let drepStateOutFile = work </> "drep-state-out.json"
            412 ┃             drepStateRedactedOutFile = work </> "drep-state-out-redacted.json"
            413 ┃         H.noteM_ $ execCli' execConfig [ eraName, "query", "drep-state", "--all-dreps"
            414 ┃                                        , "--include-stake", "--out-file", drepStateOutFile]
            415 ┃         redactJsonFieldsInFile (fromList [("keyHash", "<redacted>")]) drepStateOutFile drepStateRedactedOutFile
            416 ┃         H.diffFileVsGoldenFile
            417 ┃           drepStateRedactedOutFile
            418 ┃           "test/cardano-testnet-test/files/golden/queries/drepStateOut.json"
            419 ┃       -}
            420 ┃ 
            421 ┃     TestQueryDRepStakeDistributionCmd -> do
            422 ┃       -- drep-stake-distribution
            423 ┃       -- to stdout
            424 ┃       drepStakeDistribution :: [(L.DRep StandardCrypto, L.Coin)] <- H.noteShowM $ execCliStdoutToJson execConfig [ eraName, "query", "drep-stake-distribution", "--all-dreps" ]
            425 ┃ 
            426 ┃       -- TODO: we could check that the Coin amount below is the one reported
            427 ┃       -- by query stake-address-info
            428 ┃ 
            429 ┃       H.assertWith drepStakeDistribution $ \dreps ->
            430 ┃         length dreps == 3 -- Because, by default, 3 DReps are created
            431 ┃ 
            432 ┃       forM_ drepStakeDistribution $ \(_drep, Coin coin) -> do
            433 ┃         let expected = 15_000_003_000_000
            434 ┃             -- FIXME: For some reason the stake distribution fluctuates here.
            435 ┃             -- Where those stake fluctuations come from?
            436 ┃             tolerance =    10_000_000_000
            437 ┃         H.assertWithinTolerance coin expected tolerance
            438 ┃ 
            439 ┃     TestQueryCommitteeMembersStateCmd ->
            440 ┃       -- committee-state
            441 ┃       H.noteM_ $ execCli' execConfig [ eraName, "query", "committee-state" ]
            442 ┃ 
            443 ┃     TestQueryTreasuryValueCmd -> do
            444 ┃       -- treasury
            445 ┃       H.noteM_ $ execCli' execConfig [ eraName, "query", "treasury" ]
            446 ┃ 
            447 ┃   where
            448 ┃   -- | Wait for the part of the epoch when futurePParams are known
            449 ┃   waitForFuturePParamsToStabilise
            450 ┃     :: HasCallStack
            451 ┃     => MonadIO m
            452 ┃     => MonadTest m
            453 ┃     => MonadAssertion m
            454 ┃     => MonadCatch m
            455 ┃     => EpochStateView
            456 ┃     -> ShelleyGenesis StandardCrypto
            457 ┃     -> m SlotNo -- ^ The block number reached
            458 ┃   waitForFuturePParamsToStabilise epochStateView shelleyGenesisConf = withFrozenCallStack $
            459 ┃     H.noteShowM . H.nothingFailM $
            460 ┃       watchEpochStateUpdate epochStateView (EpochInterval 2) $ \(_, slotNo, _) -> do
            461 ┃         pure $ if areFuturePParamsStable shelleyGenesisConf slotNo
            462 ┃                then Just slotNo
            463 ┃                else Nothing
            464 ┃ 
            465 ┃   -- We wait till a slot after: 4 * securityParam / slotCoeff
            466 ┃   -- If we query 'govState' before that we get 'PotentialPParamsUpdate'
            467 ┃   -- in 'futurePParams' field
            468 ┃   areFuturePParamsStable :: ShelleyGenesis StandardCrypto -> SlotNo -> Bool
            469 ┃   areFuturePParamsStable
            470 ┃     ShelleyGenesis{ Api.sgActiveSlotsCoeff = activeSlotsCoeff
            471 ┃                   , Api.sgEpochLength = L.EpochSize epochLength
            472 ┃                   , Api.sgSecurityParam = securityParam
            473 ┃                   }
            474 ┃     (SlotNo slotNo) =
            475 ┃     let firstSlotOfEpoch = slotNo `div` epochLength * epochLength
            476 ┃         slotsInEpochToWaitOut = ceiling (4 * fromIntegral securityParam / unboundRational activeSlotsCoeff) + 1
            477 ┃         minSlotInThisEpochToWaitTo = firstSlotOfEpoch + slotsInEpochToWaitOut + 1
            478 ┃     in slotNo >= minSlotInThisEpochToWaitTo
            479 ┃ 
            480 ┃   readVerificationKeyFromFile :: (HasCallStack, MonadIO m, MonadCatch m, MonadTest m,  HasTextEnvelope (VerificationKey keyrole), SerialiseAsBech32 (VerificationKey keyrole))
            481 ┃     => AsType keyrole
            482 ┃     -> FilePath
            483 ┃     -> File content direction
            484 ┃     -> m (VerificationKey keyrole)
            485 ┃   readVerificationKeyFromFile asKey work =
            486 ┃     H.evalEitherM . liftIO . runExceptT . readVerificationKeyOrFile asKey . VerificationKeyFilePath . File . (work </>) . unFile
            487 ┃ 
            488 ┃   verificationStakeKeyToStakeAddress :: Int -> VerificationKey StakeKey -> StakeAddress
            489 ┃   verificationStakeKeyToStakeAddress testnetMagic delegatorVKey =
            490 ┃     makeStakeAddress (fromNetworkMagic $ NetworkMagic $ fromIntegral testnetMagic) (StakeCredentialByKey $ verificationKeyHash delegatorVKey)
            491 ┃ 
            492 ┃   getTxIx :: forall m era. HasCallStack => MonadTest m => ShelleyBasedEra era -> String -> Coin -> (AnyNewEpochState, SlotNo, BlockNo) -> m (Maybe Int)
            493 ┃   getTxIx sbe txId amount (AnyNewEpochState sbe' newEpochState, _, _) = do
            494 ┃     Refl <- H.leftFail $ assertErasEqual sbe sbe'
            495 ┃     shelleyBasedEraConstraints sbe' (do
            496 ┃       return $ Map.foldlWithKey (\acc (L.TxIn (L.TxId thisTxId) (L.TxIx thisTxIx)) txOut ->
            497 ┃         case acc of
            498 ┃           Nothing | hashToStringAsHex (extractHash thisTxId) == txId &&
            499 ┃                     valueToLovelace (fromLedgerValue sbe (txOut ^. valueTxOutL)) == Just amount -> Just $ fromIntegral thisTxIx
            500 ┃                   | otherwise -> Nothing
            501 ┃           x -> x) Nothing $ L.unUTxO $ newEpochState ^. nesEpochStateL . esLStateL . lsUTxOStateL . utxosUtxoL)
          
            This failure can be reproduced by running:
            > recheckAt (Seed 1653553692078249699 8036593719127852077) "1:" CliQueries
          
        Use "--pattern '$NF ~ /CliQueries/' --hedgehog-replay '1: Seed 1653553692078249699 8036593719127852077'" to reproduce from the command-line.
        
        Use -p '/CliQueries/' to rerun this test only.
  SubmitApi
    transaction:                                              OK (21.48s)
        ✓ transaction passed 1 test.

1 out of 22 tests failed (181.33s)