Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Integration test for marconi indexer using local testnet #714

Merged
merged 57 commits into from
Sep 30, 2022
Merged

Conversation

eyeinsky
Copy link
Contributor

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Formatting, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reference the ADR in the PR and reference the PR in the ADR (if revelant)
    • Reviewer requested

@koslambrou koslambrou requested a review from catch-21 September 20, 2022 14:18
@raduom raduom self-requested a review September 21, 2022 06:52
@eyeinsky eyeinsky marked this pull request as ready for review September 21, 2022 16:43
@eyeinsky
Copy link
Contributor Author

@koslambrou @james-iohk ping for another review.

@eyeinsky eyeinsky requested a review from koslambrou September 27, 2022 16:08
These were introduced by rebasing on new master.

return indexer

utxoVKeyFile <- H.note $ tempAbsPath </> "shelley/utxo-keys/utxo1.vkey"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we scale up number of tests we'll want to reduce and reuse as much as possible. Are we also able to move stuff like this along with other testnet helpers, or does MonadTest prevent this?

-- wants. And although they change again after you correct them,
-- then the procedure converges quickly.
executionUnits = C.ExecutionUnits {C.executionSteps = 500_000, C.executionMemory = 10_000 }
tx2fee = 1000303 :: C.Lovelace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not a way to have this calculated? it could vary with different protocol params or how it's calculated in other eras.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is function constructBalancedTx from this PR IntersectMBO/cardano-node#4446, but it's very recent. The cardano-node we depend on doesn't have it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Until we use this we could use a higher fee (e.g. 2ada) to be certain.

@eyeinsky
Copy link
Contributor Author

@koslambrou trying to satisfy CI I've done the following things (do these look ok?), and at the end there is a new issue again with CI

  • 915d3c0 disable unused-packages warning for the test
  • 441b165 copy configuration/defaults/byron-mainnet/configuration.yaml to marconi/test/ -- this I'm most unsure of. The test runner doesn't run in the full plutus-apps repo so sibling folders to marconi are not available, so I just copied the file to the test folder and referenced it from the cabal file as well. But maybe we have prior art on how to include non-code files.
  • 23e58b6 add back the literal "always succeed" plutus script

The new issue: https://hydra.iohk.io/build/19716407/nixlog/4. It happens to me locally as well (using nix-build -A plutus-apps.haskell.packages.marconi.checks.marconi-test). Also searched if anyone else had something similar and found this: IntersectMBO/cardano-node#4194

@koslambrou
Copy link
Contributor

Alright, fixed it locally. Let's see with CI.

The issue was that cardano-testnet expects to have some env variables available in order to fetch these files. I've set them in Nix. See nix/pkgs/haskell/haskell.nix.

@eyeinsky
Copy link
Contributor Author

eyeinsky commented Sep 30, 2022

The latest error here was that "pokeSockAddr: path is too long" from Network.Socket.Types here. Locally I don't get this and currently the CI job is queued. I suspect it's the node's socket as there are no other sockets in use, but not entirely sure.

Made also a PR here to show more info haskell/network#537.

EDIT: found failing CI report too: https://hydra.iohk.io/build/19720430/nixlog/6

@zeme-iohk
Copy link

zeme-iohk commented Sep 30, 2022

It's not too obvious to me how to pull in your custom network.
I've tried source-repository-package as well, and run into the autoconf problem, which led me here input-output-hk/haskell.nix#778 and then I tried the suggested fix by adding

        ({
          packages = {
            network.components.library.preConfigure = ''
              ${pkgs.autoconf}/bin/autoreconf -i
            '';
          };
        })

to modules in nix/pkgs/haskell/haskell.nix, but to no avail.
I'll keep trying though

@eyeinsky eyeinsky merged commit 41875be into main Sep 30, 2022
@eyeinsky eyeinsky deleted the ml/plt-647 branch September 30, 2022 14:34
koslambrou added a commit that referenced this pull request Apr 6, 2023
Co-authored-by: Konstantinos Lambrou-Latreille <konstantinos.lambrou@iohk.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants