Closed tbidne closed 2 years ago
Hi @koslambrou, thanks for working on this! I went to run the the tests after pulling in the latest main
, and I still get the same error. However, this may be because I ran the curl command before the chain index was synced. The problem is, my chain index does not appear to sync at all.
Specifically, when I run cabal exec plutus-pab-local-cluster
, I see many logs like:
[chain-index:Info:1754] [2022-06-22 11:25:00.38 UTC] Still in sync. Processed 1 blocks, 0 rollbacks in the last 0s. Current tip is Point(Slot 1337, BlockId 2f3ffec5199bc2568ccb67ad02a276e26c0e4fcf96a9a6b8027d76258ad54a3b)
I have left the test running for an hour, and it does not seem to progress past this point. Is this expected, or am I doing something wrong? Thanks!
@tbidne You're right, it doesn't work. I'm working on a PR right now which needs the plutus-pab-local-cluster
to work, so I'll fix it there.
Thank you!
@koslambrou I still see the same issue i.e. endless Still in sync...
logs, thus the integration test fails to complete. I see there is ongoing discussion/development regarding a "proper" fix (i.e. #550), so if I should wait until that is resolved then no problem. I just wanted to provide an update.
@tbidne Did you pull from main
? Just tried it out and it works. Here's the log:
[pab:Info:1746] [2022-07-14 18:32:33.67 UTC] 8ab95710-e00f-4562-8a8e-ad582d6fb299: "Starting integration test"
[pab:Info:1746] [2022-07-14 18:32:33.67 UTC] Initialising contract IntegrationTest with ID 8ab95710-e00f-4562-8a8e-ad582d6fb299
[pab:Info:1746] [2022-07-14 18:32:33.69 UTC] Activated instance 8ab95710-e00f-4562-8a8e-ad582d6fb299 on W2d4cc31
[chain-index:Info:1736] [2022-07-14 18:32:34.74 UTC] Still in sync. Processed 1 blocks, 0 rollbacks in the last 2s. Current tip is Point(Slot 296, BlockId 2817e2dce95cc19dc5ef7df4d662c7e9d917d910f738253b73b026c4caefe9f9)
[...]
[chain-index:Info:1736] [2022-07-14 18:32:36.76 UTC] Still in sync. Processed 1 blocks, 0 rollbacks in the last 0s. Current tip is Point(Slot 301, BlockId 9fcaf44a573133da9d545a3a93fcff4ad6496ed7586dd86bfe970eb82bd071a2)
[pab:Info:1748] [2022-07-14 18:33:36.85 UTC] 8ab95710-e00f-4562-8a8e-ad582d6fb299: "pubKey contract complete:"
[pab:Info:1748] [2022-07-14 18:33:37.51 UTC] 8ab95710-e00f-4562-8a8e-ad582d6fb299: "Waiting for tx d1f6aa19a91bc043f41dd071ffc0617d1c815248ea131c8a47163d47d669164b to complete"
[chain-index:Info:1736] [2022-07-14 18:33:37.58 UTC] Still in sync. Processed 1 blocks, 0 rollbacks in the last 2s. Current tip is Point(Slot 608, BlockId 0d3924be1837093381117fca9474d46d6a9ac74ce1fc2929185b7c15532ee346)
[chain-index:Info:1736] [2022-07-14 18:33:37.61 UTC] Still in sync. Processed 1 blocks, 0 rollbacks in the last 0s. Current tip is Point(Slot 611, BlockId e7b6c23ef2b40f17eae072ce1b894e17001d0453ca81505af0a1f0205029c718)
[pab:Info:1748] [2022-07-14 18:33:37.95 UTC] 8ab95710-e00f-4562-8a8e-ad582d6fb299: "Tx confirmed. Integration test complete."
@koslambrou apologies, I thought I posted a response. I am afraid I see the same behavior. Endless logs like:
[chain-index:Info:1704] [2022-07-25 22:15:53.66 UTC] Still in sync. Processed 7 blocks, 0 rollbacks in the last 2s. Current tip is Point(Slot 389, BlockId c049a8c20a4e347eb0a51a02608453c11822f83b44b2790ffc8d341cc86865f7)
I can in fact start the test:
[pab:Info:1714] [2022-07-25 22:15:41.62 UTC] 3e04c5fa-a3f1-42f2-9a57-77738f001725: "Starting integration test"
[pab:Info:1714] [2022-07-25 22:15:41.62 UTC] Initialising contract IntegrationTest with ID 3e04c5fa-a3f1-42f2-9a57-77738f001725
[pab:Info:1714] [2022-07-25 22:15:41.63 UTC] Activated instance 3e04c5fa-a3f1-42f2-9a57-77738f001725 on W2d4cc31
However I never see it finish, presumably due to the chain index syncing. This is on the latest main
with a fresh checkout: 69988b041ba661f4364f7534c03efc32cf9835ae
.
Summary
The integration test as described in
plutus-apps/plutus-pab-executables
fails. I believe this is the cause of #451.Steps to reproduce the behavior
Copying these instructions from the README:
Get config data:
Clone https://github.com/input-output-hk/cardano-wallet/ to $DIR and set the
SHELLEY_TEST_DATA
environment variable:Run the local cluster:
Wait until the message
Starting PAB backend server on port 9080
appears.Run the integration test:
Actual Result
Error in logs:
Expected Result
From the README:
In particular, this is what successful logs look like:
Describe the approach you would take to fix this
I performed a bisection and obtained the following results. Unfortunately the tests fail in several different ways depending on the hash, so there are multiple "causes" to look at.
First, the last commit that works for me is 7f543e21d4945a2024e46c572303b9c1684a5832. The integration test passes as expected.
1st Error
Starting with 93f629344e5a4b32daf0c61d9adf6c43d26cb386, I no longer see the success message
Integration test complete
. Note: I do not see an error, either. Instead, I see continuous logs like:Perhaps it would finish if I waited long enough.
2nd Error
The behavior changes with 63deb7d7ebd1c8c8ddf2640e1873d8f0f49559a1. Instead of hanging, I see:
I tried the migrations described in the same README i.e.
But I receive the same result.
3rd (Current) Error
Finally, we have the cause of the current issue: ffa0cd4806250c742e53e253899dd485002b1f6d. This leads to the
TxOutRefNotFound
error.Is this a bug? Or does the documentation need to be updated? Incidentally, I wonder if the setup for
export SHELLEY_TEST_DATA=...
should be changed to useplutus-pab/local-cluster/cluster-data/cardano-node-shelley
instead ofcardano-wallet/...
. It's unclear to me why the data dir in this repository is not sufficient (indeed it appears to work, the problems in this issue notwithstanding).System info
OS: NixOS (nix 2.7.0) Plutus:
main
(37c54aac5e2c6f765a6fff2503447b8ad0c0d259)