Hot answers tagged

14

It looks like your cabal version is too old. You can make sure you have the right one if you first start a nix-shell at the top-level directory of the plutus-repository, then cd to the code folder of the plutus-pioneer-program-repository and run cabal build from within that nix-shell.


5

Simply install the Haskell extension from inside Visual Studio Code. You'll get there by pressing Ctrl+Shift+X and searching for Haskell. Note that the extension requires a ghc installation (=<8.10.4) on your system. The current release of ghc 9.0.1 is not yet supported.


4

I asked Lars the same question in the Q&A, his answer was that your best bet is to copy one of the Plutus Pioneer Program lectures (preferably the last one), remove the unnecessary modules and create your own ones. So the steps would be: Chose the lecture you prefer (e.g. week06) Copy the hash tag of this lecture and build the Plutus repository, as you ...


4

I had a similar issue and solved it by running nix-shell in the plutus library, then navigating to the plutus-pioneer/code/week01 and running cabal update. I hope this helps!


2

At this stage, it is normal that your node.socket does not yet exist because your launch has not passed the step IPSubscriptionTarget {ispIps = [], ispValency = 0}. It usually happens because your cardano-node has not been gracefully stopped. If it continues from there after 30 min or so (assuming that you have a decent CPU with enough memory) it would be a ...


2

{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# ...


2

You will not be able to build this in less than 8G of RAM. Adding swap to make the total memory at least 8G may help.


1

Why are you using sudo? Try without. And update of course.


1

try "cabal update" before "cabal build".


1

The line Falling back to older state () means you probably need to run cabal update first (which downloads a copy of the current hackage index state).


1

Recommended way to build cardano-wallet is with stack. Check out this manual: https://developers.cardano.org/docs/get-started/installing-cardano-wallet I tried to build wallet recently and it was successful. Let me know if you will still have issues building it with stack. Cheers!


1

I believe there are some compatibility problems with M1s and Docker. It might be worth trying to run Cabal through nix-shell instead.


1

Did you fix this " Warn: Possibly insufficient disk space on /tmp. At least 5000 MB are recommended, but only 698.57 are free. Consider freeing up disk space or setting TMPD> Warn: ...waiting for 10 seconds before continuing anyway, you can still abort... " When you have insufficient diskspace then the compiler may abort with the reason "...


1

That should happen only the first time, when you make the cabal repl because it's building all dependencies. After that, every cabal repl should look like Lars screen.


1

You dont need to compile the code on raspberrypi. It takes 7+ hours. Use the prebuilt binaries from armada-alliance. https://github.com/armada-alliance/cardano-node-binaries/tree/main/static-binaries Join the telegram channel


1

So I solved it. Recollect in lesson 3 where you have to update the plutus repo with the tag in cabal.project (from lesson 10). Then in the plutus repo, nix build -f default.nix plutus.haskell.packages.plutus-core (this may or may not be necessary) and run nix-shell. Then cabal run uniswap-pab in the lesson 10 repo should work.


1

I am new to nix, but my understanding is as follows: Both the plutus and plutus-pioneer-program repos need to be extracted on disk. Check out the plutus commit of the coding week you want to work on (in cabal.project in root of week code folder). Start all the nix-shell instances you require in the root of the plutus repository. I start 3: one each for ...


1

You appear to be having issues resolving the dependencies for that particular build of Plutus. In fact, all Cardano builds depend on libsystemd (on Linux). If you have incompatible versions of libsystemd and libsystemd-journal you get the rejection that you're having in regards to the dependencies. It appears Plutus also depends on these packages. Please see ...


1

Try in the nix-shell try this: cabal update cabal build btw: first time building with cabal can take up some time


1

Yes, the LANGUAGE pragmas are required, best practice is probably following Plutus code examples and having separate pragmas per-file as needed. It is also possible to allow some extensions globally via .cabal file by using default-extensions, e.g.: library default-extensions: DataKinds RankNTypes but this should be done with care and can bite later ...


1

I had the similar problem, this recipe works for me: Run nix-shell inside plutus project and move to plutus-pioneer-program/code/week01 directory from nix shell, then start cabal build. UPD: plutus-pioneer-program repo contains README with steps how to run plutus-playground, one of steps is to clone Plutus repo and to checkout it to the specific commit. ...


1

mkPolicy is an on-chain validator code, is lifted to template Haskell and it gets compiled to core plutus and executed when the UTXO locked by that script is spent. AFAIK, core-plutus is not Haskell, so the breakpoint will be ignored.


Only top voted, non community-wiki answers of a minimum length are eligible