Marconi integration test intermitently fails on CI
koslambrou opened this issue · comments
koslambrou commented
Summary
During CI, the prop_script_hash_in_local_testnet_tx_match
of the marconi
Haskell package occasionally fails.
Steps to reproduce the behavior
Run cabal test marconi
. May need to run it a few times to trigger the error. Unclear how to totally reproduce the behavior.
Below is the error we sometimes get on CI.
Actual Result
unpacking sources
unpacking source archive /nix/store/dvwvpribwsnjaiyclmzqf4q9p2y46mnw-marconi-test-marconi-test-0.1.0.0
source root is marconi-test-marconi-test-0.1.0.0
building
Marconi
prop_script_hashes_in_tx_match: OK (10.27s)
✓ getTxBodyScriptsRoundtrip passed 100 tests.
Integration
prop_script_hash_in_local_testnet_tx_match: FAIL (21.97s)
✗ testIndex failed at test/Integration.hs:299:47
after 1 test.
forAll0 =
Unable to run finally: Failure (Just (Span "src/Testnet/Cardano.hs" (LineNo 781) (ColumnNo 21) (LineNo 781) (ColumnNo 30))) "\9473\9473\9473 Exception (IOException) \9473\9473\9473\nlsof: readCreateProcess: posix_spawnp: does not exist (No such file or directory)\n" Nothing
forAll1 =
Unable to run finally: Failure (Just (Span "src/Testnet/Cardano.hs" (LineNo 781) (ColumnNo 21) (LineNo 781) (ColumnNo 30))) "\9473\9473\9473 Exception (IOException) \9473\9473\9473\nlsof: readCreateProcess: posix_spawnp: does not exist (No such file or directory)\n" Nothing
forAll2 =
Unable to run finally: Failure (Just (Span "src/Testnet/Cardano.hs" (LineNo 826) (ColumnNo 21) (LineNo 826) (ColumnNo 30))) "\9473\9473\9473 Exception (IOException) \9473\9473\9473\nlsof: readCreateProcess: posix_spawnp: does not exist (No such file or directory)\n" Nothing
forAll7 =
2022-10-21 11:56:17.019489842 UTC
forAll8 =
/build/chairman/test-4050a387eb6acc46//logs/node-pool1.stdout.log
forAll9 =
/build/chairman/test-4050a387eb6acc46//logs/node-bft2.stdout.log
forAll10 =
/build/chairman/test-4050a387eb6acc46//logs/node-bft1.stdout.log
forAll11 =
"/build/chairman/test-4050a387eb6acc46/./socket/node-pool1"
forAll12 =
Sprocket {sprocketBase = "/build/chairman/test-4050a387eb6acc46", sprocketName = "./socket/node-pool1"}
forAll13 =
"/build/chairman/test-4050a387eb6acc46/./socket/node-bft2"
forAll14 =
Sprocket {sprocketBase = "/build/chairman/test-4050a387eb6acc46", sprocketName = "./socket/node-bft2"}
forAll15 =
"/build/chairman/test-4050a387eb6acc46/./socket/node-bft1"
forAll16 =
Sprocket {sprocketBase = "/build/chairman/test-4050a387eb6acc46", sprocketName = "./socket/node-bft1"}
forAll17 =
2022-10-21 11:57:29.952039462 UTC
forAll18 =
2022-10-21 11:55:59.952039462 UTC
forAll19 =
Command line: /nix/store/04rg8yfvm8f4sca15617ahyfn05rxw8a-cardano-node-exe-cardano-node-1.35.3/bin/cardano-node run --config /build/chairman/test-4050a387eb6acc46/configuration.yaml --topology /build/chairman/test-4050a387eb6acc46/node-pool1/topology.json --database-path /build/chairman/test-4050a387eb6acc46/node-pool1/db --socket-path ./socket/node-pool1 --shelley-kes-key /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/kes.skey --shelley-vrf-key /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/vrf.skey --shelley-operational-certificate /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/node.cert --host-addr 127.0.0.1 --port 49643
forAll20 =
CWD: Just "/build/chairman/test-4050a387eb6acc46"
forAll21 =
Reading file: /build/chairman/test-4050a387eb6acc46/node-pool1/port
forAll22 =
Opening file: /build/chairman/test-4050a387eb6acc46//logs/node-pool1.stderr.log
forAll23 =
Opening file: /build/chairman/test-4050a387eb6acc46//logs/node-pool1.stdout.log
forAll24 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/./socket
forAll25 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/db/node-pool1
forAll26 =
Sprocket {sprocketBase = "/build/chairman/test-4050a387eb6acc46", sprocketName = "./socket/node-pool1"}
forAll27 =
/build/chairman/test-4050a387eb6acc46//logs/node-pool1.stderr.log
forAll28 =
/build/chairman/test-4050a387eb6acc46//logs/node-pool1.stdout.log
forAll29 =
"/build/chairman/test-4050a387eb6acc46/db/node-pool1"
forAll30 =
Just 241
forAll31 =
Command line: /nix/store/04rg8yfvm8f4sca15617ahyfn05rxw8a-cardano-node-exe-cardano-node-1.35.3/bin/cardano-node run --config /build/chairman/test-4050a387eb6acc46/configuration.yaml --topology /build/chairman/test-4050a387eb6acc46/node-bft2/topology.json --database-path /build/chairman/test-4050a387eb6acc46/node-bft2/db --socket-path ./socket/node-bft2 --shelley-kes-key /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/kes.skey --shelley-vrf-key /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/vrf.skey --shelley-operational-certificate /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/node.cert --port 50145 --delegation-certificate /build/chairman/test-4050a387eb6acc46/node-bft2/byron/delegate.cert --signing-key /build/chairman/test-4050a387eb6acc46/node-bft2/byron/delegate.key
forAll32 =
CWD: Just "/build/chairman/test-4050a387eb6acc46"
forAll33 =
Reading file: /build/chairman/test-4050a387eb6acc46/node-bft2/port
forAll34 =
Opening file: /build/chairman/test-4050a387eb6acc46//logs/node-bft2.stderr.log
forAll35 =
Opening file: /build/chairman/test-4050a387eb6acc46//logs/node-bft2.stdout.log
forAll36 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/./socket
forAll37 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/db/node-bft2
forAll38 =
Sprocket {sprocketBase = "/build/chairman/test-4050a387eb6acc46", sprocketName = "./socket/node-bft2"}
forAll39 =
/build/chairman/test-4050a387eb6acc46//logs/node-bft2.stderr.log
forAll40 =
/build/chairman/test-4050a387eb6acc46//logs/node-bft2.stdout.log
forAll41 =
"/build/chairman/test-4050a387eb6acc46/db/node-bft2"
forAll42 =
Just 240
forAll43 =
Command line: /nix/store/04rg8yfvm8f4sca15617ahyfn05rxw8a-cardano-node-exe-cardano-node-1.35.3/bin/cardano-node run --config /build/chairman/test-4050a387eb6acc46/configuration.yaml --topology /build/chairman/test-4050a387eb6acc46/node-bft1/topology.json --database-path /build/chairman/test-4050a387eb6acc46/node-bft1/db --socket-path ./socket/node-bft1 --shelley-kes-key /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/kes.skey --shelley-vrf-key /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/vrf.skey --shelley-operational-certificate /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/node.cert --port 45951 --delegation-certificate /build/chairman/test-4050a387eb6acc46/node-bft1/byron/delegate.cert --signing-key /build/chairman/test-4050a387eb6acc46/node-bft1/byron/delegate.key
forAll44 =
CWD: Just "/build/chairman/test-4050a387eb6acc46"
forAll45 =
Reading file: /build/chairman/test-4050a387eb6acc46/node-bft1/port
forAll46 =
Opening file: /build/chairman/test-4050a387eb6acc46//logs/node-bft1.stderr.log
forAll47 =
Opening file: /build/chairman/test-4050a387eb6acc46//logs/node-bft1.stdout.log
forAll48 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/./socket
forAll49 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/db/node-bft1
forAll50 =
Sprocket {sprocketBase = "/build/chairman/test-4050a387eb6acc46", sprocketName = "./socket/node-bft1"}
forAll51 =
/build/chairman/test-4050a387eb6acc46//logs/node-bft1.stderr.log
forAll52 =
/build/chairman/test-4050a387eb6acc46//logs/node-bft1.stdout.log
forAll53 =
"/build/chairman/test-4050a387eb6acc46/db/node-bft1"
forAll54 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli transaction sign --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo1.skey --signing-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.skey --signing-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/owner.skey --signing-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.skey --testnet-magic 1805 --tx-body-file /build/chairman/test-4050a387eb6acc46/tx1.txbody --out-file /build/chairman/test-4050a387eb6acc46/tx1.tx
forAll55 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli transaction build-raw --invalid-hereafter 1000 --fee 0 --tx-in 09f85873983b6b85f2eb9d3176b4713ded8fcfadc68af5b1d85241ec3d3a3292#0 --tx-out addr_test1qz2n3znxs9xyay9hlz68dfhs8sugq5f0pwz4z544dmz04ta26y7wgmu7cpnduzunj80gzam9hlywsw3upggstsjf2lzqnt37kz+1000000000000 --certificate-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.reg.cert --certificate-file /build/chairman/test-4050a387eb6acc46/node-pool1/registration.cert --certificate-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.reg.cert --certificate-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.deleg.cert --out-file /build/chairman/test-4050a387eb6acc46/tx1.txbody
forAll56 =
Reading file: /build/chairman/test-4050a387eb6acc46/addresses/user1.addr
forAll57 =
09f85873983b6b85f2eb9d3176b4713ded8fcfadc68af5b1d85241ec3d3a3292#0
forAll58 =
"09f85873983b6b85f2eb9d3176b4713ded8fcfadc68af5b1d85241ec3d3a3292#0"
forAll59 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli genesis initial-txin --testnet-magic 1805 --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo1.vkey
forAll60 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-pool registration-certificate --testnet-magic 1805 --pool-pledge 0 --pool-cost 0 --pool-margin 0 --cold-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.vkey --vrf-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/vrf.vkey --reward-account-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/owner.vkey --pool-owner-stake-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/owner.vkey --out-file /build/chairman/test-4050a387eb6acc46/node-pool1/registration.cert
forAll61 =
"pool-owner1-stake.skey"
forAll62 =
"pool-owner1.skey"
forAll63 =
"pool-owner1.vkey"
forAll64 =
"user1-stake.reg.cert"
forAll65 =
"pool-owner1-stake.reg.cert"
forAll66 =
"pool-owner1-stake.addr"
forAll67 =
"pool-owner1.addr"
forAll68 =
"pool-owner1-stake.vkey"
forAll69 =
"user1-stake.vkey"
forAll70 =
"user1.skey"
forAll71 =
"user1-stake.addr"
forAll72 =
"user1.vkey"
forAll73 =
"user1-stake.deleg.cert"
forAll74 =
"user1.addr"
forAll75 =
"user1-stake.skey"
forAll76 =
Listing directory: /build/chairman/test-4050a387eb6acc46/addresses
forAll77 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-pool1/owner.skey" to "/build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.skey"
forAll78 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-pool1/owner.vkey" to "/build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.vkey"
forAll79 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address delegation-certificate --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.vkey --cold-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.vkey --out-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.deleg.cert
forAll80 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address registration-certificate --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.vkey --out-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.reg.cert
forAll81 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address build --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.vkey --testnet-magic 1805 --out-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.addr
forAll82 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli address build --payment-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1.vkey --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.vkey --testnet-magic 1805 --out-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1.addr
forAll83 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2-stake.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2-stake.skey
forAll84 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo-stake.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo-stake.skey
forAll85 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1-stake.skey
forAll86 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2.skey
forAll87 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/addresses/pool-owner1.skey
forAll88 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address registration-certificate --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.vkey --out-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.reg.cert
forAll89 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address build --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.vkey --testnet-magic 1805 --out-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.addr
forAll90 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli address build --payment-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1.vkey --stake-verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.vkey --testnet-magic 1805 --out-file /build/chairman/test-4050a387eb6acc46/addresses/user1.addr
forAll91 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2-stake.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2-stake.skey
forAll92 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo-stake.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo-stake.skey
forAll93 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli stake-address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1-stake.skey
forAll94 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo2.skey
forAll95 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli address key-gen --verification-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/addresses/user1.skey
forAll96 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/addresses
forAll97 =
Listing directory: /build/chairman/test-4050a387eb6acc46/node-pool1/byron
forAll98 =
"delegate.cert"
forAll99 =
"delegate.key"
forAll100 =
Listing directory: /build/chairman/test-4050a387eb6acc46/node-bft2/byron
forAll101 =
"delegate.cert"
forAll102 =
"delegate.key"
forAll103 =
Listing directory: /build/chairman/test-4050a387eb6acc46/node-bft1/byron
forAll104 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node issue-op-cert --kes-period 0 --kes-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/kes.vkey --cold-signing-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.skey --operational-certificate-issue-counter-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.counter --out-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/node.cert
forAll105 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node key-gen-KES --verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/kes.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/kes.skey
forAll106 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node issue-op-cert --kes-period 0 --kes-verification-key-file /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/kes.vkey --cold-signing-key-file /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/operator.skey --operational-certificate-issue-counter-file /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/operator.counter --out-file /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/node.cert
forAll107 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node key-gen-KES --verification-key-file /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/kes.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/node-bft2/shelley/kes.skey
forAll108 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node issue-op-cert --kes-period 0 --kes-verification-key-file /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/kes.vkey --cold-signing-key-file /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/operator.skey --operational-certificate-issue-counter-file /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/operator.counter --out-file /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/node.cert
forAll109 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node key-gen-KES --verification-key-file /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/kes.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/node-bft1/shelley/kes.skey
forAll110 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft2/shelley/vrf.skey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate2.vrf.skey"
forAll111 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft2/shelley/vrf.vkey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate2.vrf.vkey"
forAll112 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft2/shelley/operator.counter" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate2.counter"
forAll113 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft2/shelley/operator.vkey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate2.vkey"
forAll114 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft2/shelley/operator.skey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate2.skey"
forAll115 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft1/shelley/vrf.skey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate1.vrf.skey"
forAll116 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft1/shelley/vrf.vkey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate1.vrf.vkey"
forAll117 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft1/shelley/operator.counter" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate1.counter"
forAll118 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft1/shelley/operator.vkey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate1.vkey"
forAll119 =
Creating link from "/build/chairman/test-4050a387eb6acc46/node-bft1/shelley/operator.skey" to "/build/chairman/test-4050a387eb6acc46/shelley/delegate-keys/delegate1.skey"
forAll120 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node key-gen-VRF --verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/vrf.vkey --signing-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/vrf.skey
forAll121 =
/build/chairman/test-4050a387eb6acc46/node-pool1/shelley/staking.skey
forAll122 =
/build/chairman/test-4050a387eb6acc46/node-pool1/shelley/staking.vkey
forAll123 =
/build/chairman/test-4050a387eb6acc46/node-pool1/shelley/vrf.skey
forAll124 =
/build/chairman/test-4050a387eb6acc46/node-pool1/shelley/vrf.vkey
forAll125 =
/build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.skey
forAll126 =
/build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.vkey
forAll127 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli node key-gen --cold-verification-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.vkey --cold-signing-key-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.skey --operational-certificate-issue-counter-file /build/chairman/test-4050a387eb6acc46/node-pool1/shelley/operator.counter
forAll128 =
━━━━ File: /build/chairman/test-4050a387eb6acc46/shelley/genesis.alonzo.json ━━━━
{
"collateralPercentage": 150,
"costModels": {
"PlutusV1": {
"addInteger-cpu-arguments-intercept": 197209,
"addInteger-cpu-arguments-slope": 0,
"addInteger-memory-arguments-intercept": 1,
"addInteger-memory-arguments-slope": 1,
"appendByteString-cpu-arguments-intercept": 396231,
"appendByteString-cpu-arguments-slope": 621,
"appendByteString-memory-arguments-intercept": 0,
"appendByteString-memory-arguments-slope": 1,
"appendString-cpu-arguments-intercept": 150000,
"appendString-cpu-arguments-slope": 1000,
"appendString-memory-arguments-intercept": 0,
"appendString-memory-arguments-slope": 1,
"bData-cpu-arguments": 150000,
"bData-memory-arguments": 32,
"blake2b_256-cpu-arguments-intercept": 2477736,
"blake2b_256-cpu-arguments-slope": 29175,
"blake2b_256-memory-arguments": 4,
"cekApplyCost-exBudgetCPU": 29773,
"cekApplyCost-exBudgetMemory": 100,
"cekBuiltinCost-exBudgetCPU": 29773,
"cekBuiltinCost-exBudgetMemory": 100,
"cekConstCost-exBudgetCPU": 29773,
"cekConstCost-exBudgetMemory": 100,
"cekDelayCost-exBudgetCPU": 29773,
"cekDelayCost-exBudgetMemory": 100,
"cekForceCost-exBudgetCPU": 29773,
"cekForceCost-exBudgetMemory": 100,
"cekLamCost-exBudgetCPU": 29773,
"cekLamCost-exBudgetMemory": 100,
"cekStartupCost-exBudgetCPU": 100,
"cekStartupCost-exBudgetMemory": 100,
"cekVarCost-exBudgetCPU": 29773,
"cekVarCost-exBudgetMemory": 100,
"chooseData-cpu-arguments": 150000,
"chooseData-memory-arguments": 32,
"chooseList-cpu-arguments": 150000,
"chooseList-memory-arguments": 32,
"chooseUnit-cpu-arguments": 150000,
"chooseUnit-memory-arguments": 32,
"consByteString-cpu-arguments-intercept": 150000,
"consByteString-cpu-arguments-slope": 1000,
"consByteString-memory-arguments-intercept": 0,
"consByteString-memory-arguments-slope": 1,
"constrData-cpu-arguments": 150000,
"constrData-memory-arguments": 32,
"decodeUtf8-cpu-arguments-intercept": 150000,
"decodeUtf8-cpu-arguments-slope": 1000,
"decodeUtf8-memory-arguments-intercept": 0,
"decodeUtf8-memory-arguments-slope": 8,
"divideInteger-cpu-arguments-constant": 148000,
"divideInteger-cpu-arguments-model-arguments-intercept": 425507,
"divideInteger-cpu-arguments-model-arguments-slope": 118,
"divideInteger-memory-arguments-intercept": 0,
"divideInteger-memory-arguments-minimum": 1,
"divideInteger-memory-arguments-slope": 1,
"encodeUtf8-cpu-arguments-intercept": 150000,
"encodeUtf8-cpu-arguments-slope": 1000,
"encodeUtf8-memory-arguments-intercept": 0,
"encodeUtf8-memory-arguments-slope": 8,
"equalsByteString-cpu-arguments-constant": 150000,
"equalsByteString-cpu-arguments-intercept": 112536,
"equalsByteString-cpu-arguments-slope": 247,
"equalsByteString-memory-arguments": 1,
"equalsData-cpu-arguments-intercept": 150000,
"equalsData-cpu-arguments-slope": 10000,
"equalsData-memory-arguments": 1,
"equalsInteger-cpu-arguments-intercept": 136542,
"equalsInteger-cpu-arguments-slope": 1326,
"equalsInteger-memory-arguments": 1,
"equalsString-cpu-arguments-constant": 1000,
"equalsString-cpu-arguments-intercept": 150000,
"equalsString-cpu-arguments-slope": 1000,
"equalsString-memory-arguments": 1,
"fstPair-cpu-arguments": 150000,
"fstPair-memory-arguments": 32,
"headList-cpu-arguments": 150000,
"headList-memory-arguments": 32,
"iData-cpu-arguments": 150000,
"iData-memory-arguments": 32,
"ifThenElse-cpu-arguments": 1,
"ifThenElse-memory-arguments": 1,
"indexByteString-cpu-arguments": 150000,
"indexByteString-memory-arguments": 1,
"lengthOfByteString-cpu-arguments": 150000,
"lengthOfByteString-memory-arguments": 4,
"lessThanByteString-cpu-arguments-intercept": 103599,
"lessThanByteString-cpu-arguments-slope": 248,
"lessThanByteString-memory-arguments": 1,
"lessThanEqualsByteString-cpu-arguments-intercept": 103599,
"lessThanEqualsByteString-cpu-arguments-slope": 248,
"lessThanEqualsByteString-memory-arguments": 1,
"lessThanEqualsInteger-cpu-arguments-intercept": 145276,
"lessThanEqualsInteger-cpu-arguments-slope": 1366,
"lessThanEqualsInteger-memory-arguments": 1,
"lessThanInteger-cpu-arguments-intercept": 179690,
"lessThanInteger-cpu-arguments-slope": 497,
"lessThanInteger-memory-arguments": 1,
"listData-cpu-arguments": 150000,
"listData-memory-arguments": 32,
"mapData-cpu-arguments": 150000,
"mapData-memory-arguments": 32,
"mkCons-cpu-arguments": 150000,
"mkCons-memory-arguments": 32,
"mkNilData-cpu-arguments": 150000,
"mkNilData-memory-arguments": 32,
"mkNilPairData-cpu-arguments": 150000,
"mkNilPairData-memory-arguments": 32,
"mkPairData-cpu-arguments": 150000,
"mkPairData-memory-arguments": 32,
"modInteger-cpu-arguments-constant": 148000,
"modInteger-cpu-arguments-model-arguments-intercept": 425507,
"modInteger-cpu-arguments-model-arguments-slope": 118,
"modInteger-memory-arguments-intercept": 0,
"modInteger-memory-arguments-minimum": 1,
"modInteger-memory-arguments-slope": 1,
"multiplyInteger-cpu-arguments-intercept": 61516,
"multiplyInteger-cpu-arguments-slope": 11218,
"multiplyInteger-memory-arguments-intercept": 0,
"multiplyInteger-memory-arguments-slope": 1,
"nullList-cpu-arguments": 150000,
"nullList-memory-arguments": 32,
"quotientInteger-cpu-arguments-constant": 148000,
"quotientInteger-cpu-arguments-model-arguments-intercept": 425507,
"quotientInteger-cpu-arguments-model-arguments-slope": 118,
"quotientInteger-memory-arguments-intercept": 0,
"quotientInteger-memory-arguments-minimum": 1,
"quotientInteger-memory-arguments-slope": 1,
"remainderInteger-cpu-arguments-constant": 148000,
"remainderInteger-cpu-arguments-model-arguments-intercept": 425507,
"remainderInteger-cpu-arguments-model-arguments-slope": 118,
"remainderInteger-memory-arguments-intercept": 0,
"remainderInteger-memory-arguments-minimum": 1,
"remainderInteger-memory-arguments-slope": 1,
"sha2_256-cpu-arguments-intercept": 2477736,
"sha2_256-cpu-arguments-slope": 29175,
"sha2_256-memory-arguments": 4,
"sha3_256-cpu-arguments-intercept": 0,
"sha3_256-cpu-arguments-slope": 82363,
"sha3_256-memory-arguments": 4,
"sliceByteString-cpu-arguments-intercept": 150000,
"sliceByteString-cpu-arguments-slope": 5000,
"sliceByteString-memory-arguments-intercept": 0,
"sliceByteString-memory-arguments-slope": 1,
"sndPair-cpu-arguments": 150000,
"sndPair-memory-arguments": 32,
"subtractInteger-cpu-arguments-intercept": 197209,
"subtractInteger-cpu-arguments-slope": 0,
"subtractInteger-memory-arguments-intercept": 1,
"subtractInteger-memory-arguments-slope": 1,
"tailList-cpu-arguments": 150000,
"tailList-memory-arguments": 32,
"trace-cpu-arguments": 150000,
"trace-memory-arguments": 32,
"unBData-cpu-arguments": 150000,
"unBData-memory-arguments": 32,
"unConstrData-cpu-arguments": 150000,
"unConstrData-memory-arguments": 32,
"unIData-cpu-arguments": 150000,
"unIData-memory-arguments": 32,
"unListData-cpu-arguments": 150000,
"unListData-memory-arguments": 32,
"unMapData-cpu-arguments": 150000,
"unMapData-memory-arguments": 32,
"verifyEd25519Signature-cpu-arguments-intercept": 3345831,
"verifyEd25519Signature-cpu-arguments-slope": 1,
"verifyEd25519Signature-memory-arguments": 1
}
},
"executionPrices": {
"prMem": 5.77e-2,
"prSteps": 7.21e-5
},
"lovelacePerUTxOWord": 34482,
"maxBlockExUnits": {
"exUnitsMem": 50000000,
"exUnitsSteps": 40000000000
},
"maxCollateralInputs": 3,
"maxTxExUnits": {
"exUnitsMem": 10000000,
"exUnitsSteps": 10000000000
},
"maxValueSize": 5000
}
forAll129 =
Reading file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.alonzo.json
forAll130 =
━━━━ File: /build/chairman/test-4050a387eb6acc46/shelley/genesis.json ━━━━
{"activeSlotsCoeff":0.2,"epochLength":1500,"genDelegs":{"14218e63c7746a2987a4b50a5f1d2bfbd980609af85edb669e30ed86":{"delegate":"bd492ee473c7877ea10d084dde268f189cadc76178146919e5eeb42a","vrf":"20704a0b5033a2d8e5aa6668a538d46729befc2b30f52deaeff112da485d5f6e"},"85a42a00dcf710b89b8b64377d01f3153cb5b137621678e210d768f4":{"delegate":"81b8f35f8e8fa5dcde99f8249063d70b2acbadbbc13f1c2a1cc63524","vrf":"f79f725546f235f307dac91b00a614b3841eaba69c14a52dfa7f79fb0ba02f82"},"b1360e2c7fbb7957db5f2a860e4a422d53ef0d6d4317a3fc2ec08fb4":{"delegate":"b408409534e759da66fc3c43b13bafffde987e7f0a52e771999f5c0e","vrf":"46c546341beba1b6128772632ebfe2cc11b8a583ea82d6a8f19bfa73fe054e61"}},"initialFunds":{"604f8b14d069a26a3881a66c9420867c9af7f9707bde392cd5a0677bbe":900000000000},"maxKESEvolutions":60,"maxLovelaceSupply":1000000000000,"networkId":"Testnet","networkMagic":1805,"protocolParams":{"a0":0.0,"decentralisationParam":0.7,"eMax":18,"extraEntropy":{"tag":"NeutralNonce"},"keyDeposit":0,"maxBlockBodySize":65536,"maxBlockHeaderSize":1100,"maxTxSize":16384,"minFeeA":1,"minFeeB":0,"minPoolCost":0,"minUTxOValue":0,"nOpt":100,"poolDeposit":0,"protocolVersion":{"major":6,"minor":0},"rho":0.1,"tau":0.1},"securityParam":10,"slotLength":0.2,"slotsPerKESPeriod":129600,"staking":{"pools":{},"stake":{}},"systemStart":"2022-10-21T11:56:14Z","updateQuorum":2}
forAll131 =
Reading file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.json
forAll132 =
Writing file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.json
forAll133 =
Reading file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.json
forAll134 =
Rewriting JSON file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.json
forAll135 =
"delegate-keys"
forAll136 =
"utxo-keys"
forAll137 =
"genesis-keys"
forAll138 =
"genesis.alonzo.json"
forAll139 =
"genesis.json"
forAll140 =
"genesis.spec.json"
forAll141 =
"genesis.alonzo.spec.json"
forAll142 =
Listing directory: /build/chairman/test-4050a387eb6acc46/shelley
forAll143 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli genesis create --testnet-magic 1805 --genesis-dir /build/chairman/test-4050a387eb6acc46/shelley --gen-genesis-keys 2 --start-time 2022-10-21T11:56:14Z --gen-utxo-keys 1
forAll144 =
Writing file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.spec.json
forAll145 =
Reading file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.spec.json
forAll146 =
Rewriting JSON file: /build/chairman/test-4050a387eb6acc46/shelley/genesis.spec.json
forAll147 =
Command: /nix/store/4lg0af6pfq8dirsxss1l0s0gr709kqvn-cardano-cli-exe-cardano-cli-1.35.3/bin/cardano-cli genesis create --testnet-magic 1805 --genesis-dir /build/chairman/test-4050a387eb6acc46/shelley --start-time 2022-10-21T11:56:14Z
forAll148 =
/build/chairman/test-4050a387eb6acc46//shelley/genesis.alonzo.spec.json
forAll149 =
Creating directory if missing: /build/chairman/test-4050a387eb6acc46/shelley
forAll150 =
"genesis-keys.001.key"
forAll151 =
"address-001"
forAll152 =
"genesis-address-000"
forAll153 =
"delegation-cert.001.json"
forAll154 =
"delegate-keys.000.key"
forAll155 =
"delegation-cert.000.json"
forAll156 =
"genesis.spec.json"
forAll157 =
"genesis-keys.000.key"
forAll158 =
"genesis.json"
forAll159 =
"delegate-keys.001.key"
forAll160 =
"address-000"
forAll161 =
"genesis-address-001"
forAll162 =
"payment-keys.000.key"
forAll163 =
"payment-keys.001.key"
forAll164 =
Listing directory: /build/chairman/test-4050a387eb6acc46/byron
(other forAll...)
┏━━ test/Integration.hs ━━━
79 ┃ testIndex :: Property
80 ┃ testIndex = H.integration . HE.runFinallies . workspace "chairman" $ \tempAbsBasePath' -> do
┃ │ Workspace: /build/chairman/test-4050a387eb6acc46
81 ┃
82 ┃ base <- HE.noteM $ liftIO . IO.canonicalizePath =<< HE.getProjectBase
┃ │ /nix/store/b3bpi3sksd9yhgihvxvjrqs5a6zbjkh5-plutus-apps
83 ┃ (socketPathAbs, networkId, tempAbsPath) <- startTestnet base tempAbsBasePath'
84 ┃
85 ┃ -- Create a channel that is passed into the indexer, such that it
86 ┃ -- can write index updates to it and we can await for them (also
87 ┃ -- making us not need threadDelay)
88 ┃ indexedTxs <- liftIO IO.newChan
89 ┃ let writeScriptUpdate (ScriptTx.ScriptTxUpdate txScripts _slotNo) = case txScripts of
90 ┃ (x : xs) -> IO.writeChan indexedTxs $ x :| xs
91 ┃ _ -> pure ()
92 ┃
93 ┃ -- Start indexer
94 ┃ let sqliteDb = tempAbsPath </> "script-tx.db"
95 ┃ indexer <- liftIO $ do
96 ┃
97 ┃ coordinator <- M.initialCoordinator 1
98 ┃ ch <- IO.atomically . IO.dupTChan $ M._channel coordinator
99 ┃ (loop, indexer) <- M.scriptTxWorker_ (\_ update -> writeScriptUpdate update $> []) (ScriptTx.Depth 0) coordinator ch sqliteDb
100 ┃
101 ┃ -- Receive ChainSyncEvents and pass them on to indexer's channel
102 ┃ void $ IO.forkIO $ do
103 ┃ let chainPoint = C.ChainPointAtGenesis :: C.ChainPoint
104 ┃ c <- defaultConfigStdout
105 ┃ withTrace c "marconi" $ \trace -> let
106 ┃ indexerWorker = withChainSyncEventStream socketPathAbs networkId chainPoint $ S.mapM_ $
107 ┃ \chainSyncEvent -> IO.atomically $ IO.writeTChan ch chainSyncEvent
108 ┃ handleException NoIntersectionFound = logError trace $ renderStrict $ layoutPretty defaultLayoutOptions $
109 ┃ "No intersection found for chain point" <+> pretty chainPoint <> "."
110 ┃ in indexerWorker `catch` handleException :: IO ()
111 ┃
112 ┃ -- Start indexer worker loop
113 ┃ void $ IO.forkIO loop
114 ┃
115 ┃ return indexer
116 ┃
117 ┃ utxoVKeyFile <- H.note $ tempAbsPath </> "shelley/utxo-keys/utxo1.vkey"
┃ │ /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo1.vkey
118 ┃ utxoSKeyFile <- H.note $ tempAbsPath </> "shelley/utxo-keys/utxo1.skey"
┃ │ /build/chairman/test-4050a387eb6acc46/shelley/utxo-keys/utxo1.skey
119 ┃
120 ┃ let
121 ┃ -- Create an always succeeding validator script
122 ┃ plutusScript :: C.PlutusScript C.PlutusScriptV1
123 ┃ plutusScript = C.PlutusScriptSerialised $ SBS.toShort . LBS.toStrict $ serialise $ Plutus.unValidatorScript validator
124 ┃ where
125 ┃ validator :: Plutus.Validator
126 ┃ validator = Plutus.mkValidatorScript $$(PlutusTx.compile [|| \_ _ _ -> () ||])
127 ┃
128 ┃ plutusScriptHash = C.hashScript $ C.PlutusScript C.PlutusScriptV1 plutusScript :: C.ScriptHash
129 ┃ plutusScriptAddr :: C.Address C.ShelleyAddr
130 ┃ plutusScriptAddr = C.makeShelleyAddress networkId (C.PaymentCredentialByScript plutusScriptHash) C.NoStakeAddress
131 ┃
132 ┃ -- Step 1: Create a tx ouput with a datum hash at the script address. In order for a tx ouput to be locked
133 ┃ -- by a plutus script, it must have a datahash. We also need collateral tx inputs so we split the utxo
134 ┃ -- in order to accomodate this.
135 ┃
136 ┃ genesisVKey :: C.VerificationKey C.GenesisUTxOKey <-
137 ┃ readAs (C.AsVerificationKey C.AsGenesisUTxOKey) utxoVKeyFile
138 ┃ genesisSKey :: C.SigningKey C.GenesisUTxOKey <-
139 ┃ readAs (C.AsSigningKey C.AsGenesisUTxOKey) utxoSKeyFile
140 ┃
141 ┃ let
142 ┃ paymentKey = C.castVerificationKey genesisVKey :: C.VerificationKey C.PaymentKey
143 ┃ address :: C.Address C.ShelleyAddr
144 ┃ address = C.makeShelleyAddress
145 ┃ networkId
146 ┃ (C.PaymentCredentialByKey (C.verificationKeyHash paymentKey :: C.Hash C.PaymentKey))
147 ┃ C.NoStakeAddress :: C.Address C.ShelleyAddr
148 ┃
149 ┃ -- Boilerplate codecs used for protocol serialisation. The number
150 ┃ -- of epochSlots is specific to each blockchain instance. This value
151 ┃ -- what the cardano main and testnet uses. Only applies to the Byron
152 ┃ -- era.
153 ┃ let epochSlots = C.EpochSlots 21600
154 ┃ localNodeConnectInfo =
155 ┃ C.LocalNodeConnectInfo
156 ┃ { C.localConsensusModeParams = C.CardanoModeParams epochSlots
157 ┃ , C.localNodeNetworkId = networkId
158 ┃ , C.localNodeSocketPath = socketPathAbs
159 ┃ }
160 ┃
161 ┃ (tx1in, C.TxOut _ v _ _) <- do
162 ┃ utxo <- findUTxOByAddress localNodeConnectInfo (C.toAddressAny address)
163 ┃ headM $ Map.toList $ C.unUTxO utxo
164 ┃ let totalLovelace = C.txOutValueToLovelace v
165 ┃
166 ┃ pparams <- H.leftFailM . H.leftFailM . liftIO
167 ┃ $ C.queryNodeLocalState localNodeConnectInfo Nothing
168 ┃ $ C.QueryInEra C.AlonzoEraInCardanoMode
169 ┃ $ C.QueryInShelleyBasedEra C.ShelleyBasedEraAlonzo C.QueryProtocolParameters
170 ┃
171 ┃ let scriptDatum = C.ScriptDataNumber 42 :: C.ScriptData
172 ┃ scriptDatumHash = C.hashScriptData scriptDatum
173 ┃
174 ┃ tx1fee = 271 :: C.Lovelace
175 ┃ amountPaid = 10_000_000 :: C.Lovelace -- 10 ADA
176 ┃ -- Must return everything that was not paid to script and that didn't went to fees:
177 ┃ amountReturned = totalLovelace - amountPaid - tx1fee :: C.Lovelace
178 ┃
179 ┃ txOut1 :: C.TxOut ctx C.AlonzoEra
180 ┃ txOut1 =
181 ┃ C.TxOut
182 ┃ (C.AddressInEra (C.ShelleyAddressInEra C.ShelleyBasedEraAlonzo) plutusScriptAddr)
183 ┃ (C.TxOutValue C.MultiAssetInAlonzoEra $ C.lovelaceToValue amountPaid)
184 ┃ (C.TxOutDatumHash C.ScriptDataInAlonzoEra scriptDatumHash)
185 ┃ C.ReferenceScriptNone
186 ┃ txOut2 :: C.TxOut ctx C.AlonzoEra
187 ┃ txOut2 =
188 ┃ C.TxOut
189 ┃ (C.AddressInEra (C.ShelleyAddressInEra C.ShelleyBasedEraAlonzo) address)
190 ┃ (C.TxOutValue C.MultiAssetInAlonzoEra $ C.lovelaceToValue amountReturned)
191 ┃ C.TxOutDatumNone
192 ┃ C.ReferenceScriptNone
193 ┃ txBodyContent :: C.TxBodyContent C.BuildTx C.AlonzoEra
194 ┃ txBodyContent =
195 ┃ C.TxBodyContent {
196 ┃ C.txIns = [(tx1in, C.BuildTxWith $ C.KeyWitness C.KeyWitnessForSpending)],
197 ┃ C.txInsCollateral = C.TxInsCollateralNone,
198 ┃ C.txInsReference = C.TxInsReferenceNone,
199 ┃ C.txOuts = [txOut1, txOut2],
200 ┃ C.txTotalCollateral = C.TxTotalCollateralNone,
201 ┃ C.txReturnCollateral = C.TxReturnCollateralNone,
202 ┃ C.txFee = C.TxFeeExplicit C.TxFeesExplicitInAlonzoEra tx1fee,
203 ┃ C.txValidityRange = (C.TxValidityNoLowerBound, C.TxValidityNoUpperBound C.ValidityNoUpperBoundInAlonzoEra),
204 ┃ C.txMetadata = C.TxMetadataNone,
205 ┃ C.txAuxScripts = C.TxAuxScriptsNone,
206 ┃ C.txExtraKeyWits = C.TxExtraKeyWitnessesNone,
207 ┃ C.txProtocolParams = C.BuildTxWith $ Just pparams,
208 ┃ C.txWithdrawals = C.TxWithdrawalsNone,
209 ┃ C.txCertificates = C.TxCertificatesNone,
210 ┃ C.txUpdateProposal = C.TxUpdateProposalNone,
211 ┃ C.txMintValue = C.TxMintNone,
212 ┃ C.txScriptValidity = C.TxScriptValidityNone
213 ┃ }
214 ┃ tx1body :: C.TxBody C.AlonzoEra <- H.leftFail $ C.makeTransactionBody txBodyContent
215 ┃ let
216 ┃ kw :: C.KeyWitness C.AlonzoEra
217 ┃ kw = C.makeShelleyKeyWitness tx1body (C.WitnessPaymentKey $ C.castSigningKey genesisSKey)
218 ┃ tx1 = C.makeSignedTransaction [kw] tx1body
219 ┃
220 ┃ submitTx localNodeConnectInfo tx1
221 ┃
222 ┃ -- Second transaction: spend the UTXO specified in the first transaction
223 ┃
224 ┃ _ <- liftIO $ IO.readChan indexedTxs -- wait for the first transaction to be accepted
225 ┃
226 ┃ tx2collateralTxIn <- headM . Map.keys . C.unUTxO =<< findUTxOByAddress localNodeConnectInfo (C.toAddressAny address)
227 ┃
228 ┃ (scriptTxIn, C.TxOut _ valueAtScript _ _) <- do
229 ┃ scriptUtxo <- findUTxOByAddress localNodeConnectInfo $ C.toAddressAny plutusScriptAddr
230 ┃ headM $ Map.toList $ C.unUTxO scriptUtxo
231 ┃
232 ┃ let lovelaceAtScript = C.txOutValueToLovelace valueAtScript
233 ┃ assert $ lovelaceAtScript == 10_000_000 -- script has the 10 ADA we put there in tx1
234 ┃
235 ┃ redeemer <- H.forAll CGen.genScriptData -- The script always returns true so any redeemer will do
┃ │ ScriptDataNumber 0
236 ┃ let
237 ┃ -- The following execution unit and fee values were found by
238 ┃ -- trial and error. When the transaction which we are in the
239 ┃ -- process of creating, fails, then it will report the values it
240 ┃ -- wants. And although they change again after you correct them,
241 ┃ -- then the procedure converges quickly.
242 ┃ executionUnits = C.ExecutionUnits {C.executionSteps = 500_000, C.executionMemory = 10_000 }
243 ┃ tx2fee = 1000303 :: C.Lovelace
244 ┃
245 ┃ scriptWitness :: C.Witness C.WitCtxTxIn C.AlonzoEra
246 ┃ scriptWitness = C.ScriptWitness C.ScriptWitnessForSpending $
247 ┃ C.PlutusScriptWitness C.PlutusScriptV1InAlonzo C.PlutusScriptV1 (C.PScript plutusScript)
248 ┃ (C.ScriptDatumForTxIn scriptDatum) redeemer executionUnits
249 ┃
250 ┃ collateral = C.TxInsCollateral C.CollateralInAlonzoEra [tx2collateralTxIn]
251 ┃
252 ┃ tx2out :: C.TxOut ctx C.AlonzoEra
253 ┃ tx2out =
254 ┃ C.TxOut
255 ┃ (C.AddressInEra (C.ShelleyAddressInEra C.ShelleyBasedEraAlonzo) address)
256 ┃ -- send ADA back to the original genesis address ^
257 ┃ (C.TxOutValue C.MultiAssetInAlonzoEra $ C.lovelaceToValue $ lovelaceAtScript - tx2fee)
258 ┃ C.TxOutDatumNone
259 ┃ C.ReferenceScriptNone
260 ┃
261 ┃ tx2bodyContent :: C.TxBodyContent C.BuildTx C.AlonzoEra
262 ┃ tx2bodyContent =
263 ┃ C.TxBodyContent {
264 ┃ C.txIns = [(scriptTxIn, C.BuildTxWith scriptWitness)],
265 ┃ C.txInsCollateral = collateral,
266 ┃ C.txInsReference = C.TxInsReferenceNone,
267 ┃ C.txOuts = [tx2out],
268 ┃ C.txTotalCollateral = C.TxTotalCollateralNone,
269 ┃ C.txReturnCollateral = C.TxReturnCollateralNone,
270 ┃ C.txFee = C.TxFeeExplicit C.TxFeesExplicitInAlonzoEra tx2fee,
271 ┃ C.txValidityRange = (C.TxValidityNoLowerBound, C.TxValidityNoUpperBound C.ValidityNoUpperBoundInAlonzoEra),
272 ┃ C.txMetadata = C.TxMetadataNone,
273 ┃ C.txAuxScripts = C.TxAuxScriptsNone,
274 ┃ C.txExtraKeyWits = C.TxExtraKeyWitnessesNone,
275 ┃ C.txProtocolParams = C.BuildTxWith $ Just pparams,
276 ┃ C.txWithdrawals = C.TxWithdrawalsNone,
277 ┃ C.txCertificates = C.TxCertificatesNone,
278 ┃ C.txUpdateProposal = C.TxUpdateProposalNone,
279 ┃ C.txMintValue = C.TxMintNone,
280 ┃ C.txScriptValidity = C.TxScriptValidityNone
281 ┃ }
282 ┃
283 ┃ tx2body :: C.TxBody C.AlonzoEra <- H.leftFail $ C.makeTransactionBody tx2bodyContent
284 ┃ let tx2 = C.signShelleyTransaction tx2body [C.WitnessGenesisUTxOKey genesisSKey]
285 ┃
286 ┃ submitTx localNodeConnectInfo tx2
287 ┃
288 ┃
289 ┃ {- Test if what the indexer got is what we sent.
290 ┃
291 ┃ We test both of (1) what we get from `onInsert` callback and (2)
292 ┃ with `query` (what ends up in the sqlite database). For the `query`
293 ┃ we currently need to use threadDelay and poll to query the database
294 ┃ because the indexer runs in a separate thread and there is no way
295 ┃ of awaiting the data to be flushed into the database. -}
296 ┃
297 ┃ (ScriptTx.TxCbor tx, indexedScriptHashes) :| _ <- liftIO $ IO.readChan indexedTxs
298 ┃
299 ┃ ScriptTx.ScriptAddress indexedScriptHash <- headM indexedScriptHashes
┃ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
┃ │ Cannot take head of empty list
300 ┃
301 ┃ indexedTx2 :: C.Tx C.AlonzoEra <- H.leftFail $ C.deserialiseFromCBOR (C.AsTx C.AsAlonzoEra) tx
302 ┃
303 ┃ plutusScriptHash === indexedScriptHash
304 ┃ tx2 === indexedTx2
305 ┃
306 ┃ -- The query poll
307 ┃ queriedTx2 :: C.Tx C.AlonzoEra <- do
308 ┃ let
309 ┃ queryLoop n = do
310 ┃ H.threadDelay 250_000 -- wait 250ms before querying
311 ┃ txCbors <- liftIO $ ScriptTx.query indexer (ScriptTx.ScriptAddress plutusScriptHash) []
312 ┃ case txCbors of
313 ┃ result : _ -> pure result
314 ┃ _ -> queryLoop (n + 1)
315 ┃ ScriptTx.TxCbor txCbor <- queryLoop (0 :: Integer)
316 ┃ H.leftFail $ C.deserialiseFromCBOR (C.AsTx C.AsAlonzoEra) txCbor
317 ┃
318 ┃ tx2 === queriedTx2
┏━━ test/Integration.hs ━━━
322 ┃ startTestnet :: FilePath -> FilePath -> H.Integration (String, C.NetworkId, FilePath)
323 ┃ startTestnet base tempAbsBasePath' = do
324 ┃ configurationTemplate <- H.noteShow $ base </> "configuration/defaults/byron-mainnet/configuration.yaml"
┃ │ "/nix/store/b3bpi3sksd9yhgihvxvjrqs5a6zbjkh5-plutus-apps/configuration/defaults/byron-mainnet/configuration.yaml"
325 ┃ conf@TC.Conf { TC.tempBaseAbsPath, TC.tempAbsPath } <- HE.noteShowM $
326 ┃ TC.mkConf (TC.ProjectBase base) (TC.YamlFilePath configurationTemplate)
327 ┃ (tempAbsBasePath' <> "/")
328 ┃ Nothing
┃ │ Conf {tempAbsPath = "/build/chairman/test-4050a387eb6acc46/", tempRelPath = ".", tempBaseAbsPath = "/build/chairman/test-4050a387eb6acc46", logDir = "/build/chairman/test-4050a387eb6acc46//logs", base = "/nix/store/b3bpi3sksd9yhgihvxvjrqs5a6zbjkh5-plutus-apps", socketDir = "./socket", configurationTemplate = "/nix/store/b3bpi3sksd9yhgihvxvjrqs5a6zbjkh5-plutus-apps/configuration/defaults/byron-mainnet/configuration.yaml", testnetMagic = 1805}
329 ┃ assert $ tempAbsPath == (tempAbsBasePath' <> "/")
330 ┃ && tempAbsPath == (tempBaseAbsPath <> "/")
331 ┃ tn <- TN.testnet TN.defaultTestnetOptions conf
332 ┃ let networkId = C.Testnet $ C.NetworkMagic $ fromIntegral (TN.testnetMagic tn)
333 ┃ socketPath <- IO.sprocketArgumentName <$> headM (TN.nodeSprocket <$> TN.bftNodes tn)
334 ┃ socketPathAbs <- H.note =<< (liftIO $ IO.canonicalizePath $ tempAbsPath </> socketPath)
┃ │ /build/chairman/test-4050a387eb6acc46/socket/node-bft1
335 ┃ pure (socketPathAbs, networkId, tempAbsPath)
This failure can be reproduced by running:
> recheck (Size 0) (Seed 15560572519242086820 10847290834014284631) testIndex
Use '--hedgehog-replay "Size 0 Seed 15560572519242086820 10847290834014284631"' to reproduce.
Use -p '/prop_script_hash_in_local_testnet_tx_match/' to rerun this test only.
Expected Result
No errors.
Describe the approach you would take to fix this
No response
System info
Plutus 6b8bd0d