text:
Online Playground does not appear in Safari
Using macOS Catalina 10.15.7 and Safari v 15.2 (15612.3.6.1.8). The Playground URL (https://playground.plutus.iohkdev.io) generates a blank page. It loads fine on Chrome and Brave (haven't actually run anything yet). Is this known? Is this fixable? I primarily use Brave, but it's worth fixing this issue if it is fixable.
Related: I tried tagging this with {playground safari macos catalina blank} Only "macOS" was accepted, as I do not have 150 reputation points (ie. could not post until I removed those very useful tags). This seems shortsighted, as the newbies who are facing challenges are more likely to generate tags that newbies who are facing challenges might find helpful. If someone is experienced enough to have 150 reputation points, s/he is less likely to be having newbie problems, and less likely to create tags that will help newbies. Is this an IOHK limitation, or a stackexchange limitation?

fwiw, confirming same results in Safari using macOs 12.1 Monterey. Reported errors: [Error] Viewport argument key "minimal-ui" not recognized and ignored. (playground.plutus.iohkdev.io, line 1)
[Error] SyntaxError: Invalid regular expression: invalid group specifier name (anonymous function) (vendors.fe7bf06144dfb083c610.js:2)

I can't help confirm this bug as I am on macOS >10.15 (and I don't see the same problem) but I'd recommend raising a new Issue here.
That seems like the appropriate place to report this issue based on this:

User feedback is important because it helps us improve the Plutus Playground. We want to hear from you about any usability issues or bugs that you encounter, or any suggestions for improvement you may have.
If you would like to provide your feedback, please raise an issue in the Plutus GitHub repository. Use the issue template provided and include the requested information as it helps our team understand what went wrong, or what we could do better.


text:
Error when installing nix : the group 'nixbld' specified in 'build-users-group' does not exist
I am trying to install nix/plutus following the below instructions :
https://docs.plutus-community.com/docs/setup/Ubuntu.html
The first step to install curl when fine. I get below error when installing nix :
sh <(curl -L https://nixos.org/nix/install) --no-daemon
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4046  100  4046    0     0   8376      0 --:--:-- --:--:-- --:--:--  8376
downloading Nix 2.5.1 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.5.1/nix-2.5.1-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.4wSWtNaOSw'...
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100 27.1M  100 27.1M    0     0  7549k      0  0:00:03  0:00:03 --:--:-- 7549k
Note: a multi-user installation is possible. See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation
warning: installing Nix as root is not supported by this script!
performing a single-user installation of Nix...
copying Nix to /nix/store...........................................
warning: the group 'nixbld' specified in 'build-users-group' does not exist
warning: the group 'nixbld' specified in 'build-users-group' does not exist
installing 'nix-2.5.1'
error: the group 'nixbld' specified in 'build-users-group' does not exist
/tmp/nix-binary-tarball-unpack.4wSWtNaOSw/unpack/nix-2.5.1-x86_64-linux/install: unable to install Nix into your default profile
How can I can get past this ?
Thanks!

Don't run the installer as root! Run it as a normal user.

I used the command:
sh <(curl -L https://nixos.org/nix/install)
(it seems to work)
I had to remove the:   --no-daemon  qualifier from the command I used previously

I always install as root. I get error with all the scripts. Except this one (multi-user):
sh <(curl -L https://nixos.org/nix/install) --daemon

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
VSCode/Docker Setup Starter Pack problems
I'm trying to implement the 4th option of the starter pack setup using docker/vscode on my mac M1.  I followed the instructions carefully from the github repository, but I'm getting errors.  I'm new to cabal so please forgive me if I'm making a basic error.
When I run the cabal build command (from my regular mac terminal, not within vscode container), I get the following message at the end:
Warning: Requested index-state2021-08-14T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-08-13T22:58:51Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Win32-network)
[__2] next goal: base-deriving-via (user goal)
[__2] rejecting: base-deriving-via-0.1.0.0 (conflict:
base==4.13.0.0/installed-4.13.0.0, base-deriving-via => base>=4.14)
[__2] fail (backjumping, conflict set: base, base-deriving-via)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, Win32-network, base-deriving-via

I tried cabal update and got the following:
Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2022-01-11T17:07:35Z'

(Note that I accidentally ran cabal update before opening the container in vscode the first time.  I'm assuming this doesn't matter).
I'm not sure if it's installed correctly or not.  I'm surprised that it's looking for Win32, considering this is a mac.
Finally, I tried testing the PAB example to see if I could simply ignore the previous errors, and got this:
Warning: Requested index-state2021-08-14T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2021-08-13T22:58:51Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.13.0.0/installed-4.13.0.0 (dependency of Win32-network)
[__2] next goal: base-deriving-via (user goal)
[__2] rejecting: base-deriving-via-0.1.0.0 (conflict:
base==4.13.0.0/installed-4.13.0.0, base-deriving-via => base>=4.14)
[__2] fail (backjumping, conflict set: base, base-deriving-via)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, Win32-network, base-deriving-via

Any help would be appreciated.

Did you try to run the command:
cabal v2-update 'hackage.haskell.org,2022-01-11T17:07:35Z'

→ This is communicated after your update command and should install the correct version.

I tried this with no effect.  It said it was downloading the latest package, and then displayed the exact same message about reverting to 'hackage.haskell.org,2022-01-11T17:07:35Z'.  I think nothing actually happened.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
segmentation fault when building Plutus-playground.server
I'm following the instructions for installing the Plutus-playground found here
I discovered I must execute the following before step 10
git clone https://github.com/input-output-hk/plutus-apps.git

I cd into plutus-apps/ and this then worked fine (note: in zsh):
[zsh]$ pwd
/Users/jwb/plutus/plutus-apps
[zsh]$ nix-build -A plutus-playground.client

But I got a "segmentation fault" with this:
[zsh]$ nix-build -A plutus-playground.server

Here is the output for clarity:
[zsh]$ nix-build -A plutus-playground.server
zsh: segmentation fault

I switched to bash after the error, but that too failed:
[bash]$ nix-build -A plutus-playground.server
Segmentation fault: 11

Is the plutus-apps repository corrupted? Why would the client build just fine but not the server?

Could you try running GC_DONT_GC=1 nix-build -A plutus-playground.server.

Running macOS Big Sur and this answer solved it for me


text:
Setting GitHub ID in plutus-playground-server local env
I have been able to get my local nix install of the server and client running on my ubuntu distro. However, I can't find where I can set the GitHub ID for the local server configuration and that is one of 2 errors when the server starts. I already have set my git config --global user.name before the nix setup, but I don't think it is calling that git info. Is this doable with a local nix/playground install? If so, how?
Thanks for any advice you may have!

I have resolved this. If you have wanted to debug these errors like myself, don't sweat it.
After watching Lars complete the build and the output on his screen after Lesson#1, Part#3 (L1P3) video, I realized these errors seem 'normal' at this point in the build. Please verify for yourself, but I believe there is nothing to see here.


text:
VSCode + Docker setup problems on Windows
I'm trying to setup the local enviroment by the VSCode + Docker way, because i find it easier for a newbie like me.
I open the cloned repository on VSCode but when y click on the button to reopen it in the Docker container y get this error:

I think that the problem is in the devcontainer.json file, exactly for this setting:
"settings": {
    // Note: don't change from bash so it runs .bashrc
    "terminal.integrated.shell.linux": "/bin/bash"
},

I think this is an incorrect property because i'm on Windows, not Linux, but i have no idea of what i should put in there to replace it.
I wil appreciate any help because i'm a total newbie to all this environment.

I think it will help if you actually describe how you are running the installation. Question: Have you installed the Remote Development extension pack for VS?

I had the same problem. Look at line 11 of devcontainer.json:
"source=${localEnv:HOME}/.cabal/packages,target=/home/plutus/.cabal/packages,type=bind,consistency=cached"

Believe it or not, I solved this error by going into my environment variables and creating a variable name HOME that points to my user directory C:\Users\$username.
This is also mentioned in an answer to another Windows-specific issue: Problem starting a plutus devcontainer in windows where the solution is to change the variable from HOME to USERPROFILE.


text:
I am getting a strange error when I try to start the playground server localy:
plutus-playground-server: for development use only
error: creating symlink from '/plutus/plutus-playground-server/result.tmp-10234-376872119' to '/nix/store/hf815gz6hs5px2nrnnvsdjcpf8m0dvwg-ghc-shell-for-packages-ghc-8.10.2.20201118-env': Permission denied
error: creating symlink from '/plutus/plutus-playground-server/result.tmp-10236-1766163927' to '/nix/store/a1g0yvyi27qjkapb04z75d5s8gf8jx6k-plutus-playground-server-exe-plutus-playground-server-0.1.0.0': Permission denied
/nix/store/rm5268gvw75mmh8mhcbb9rs817wvnfhj-plutus-playground-server/bin/plutus-playground-server: line 10: /bin/plutus-playground-server: No such file or directory

Any ideas? Why permission is denied and why it says No such file or directory?

I have same error error: creating symlink from... access denied

Do you have the directory "/bin/plutus-playground-server"?
You can search in bash like:
$ls /bin/plutus-playground-server
That command should return a result/output.
→ It now result is returned the directory "/bin/plutus-playground-server" is set wrong.


text:
nix-shell did not create the server/client directories
I am trying to follow the instructions in https://docs.plutus-community.com/docs/setup/Ubuntu.html
The nix-shell command completes without any errors. But, I cannot cd to plutus-plaground-server or plutus-playground-client because these two directories were not created.
Below is the output of running nix-shell :
[nix-shell:~/plutus]$ nix-shell
trace: To materialize project.plan-nix for Agda entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: To materialize project.plan-nix for cabal-install entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: To materialize project.plan-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: To materialize project.plan-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
nix-pre-commit-hooks: hooks up to date
pid 6368's current affinity list: 0-11
pid 6368's new affinity list: 0-11

These are the entries in plutus directory :
Any idea what I may be doing wrong ?
[nix-shell:~/plutus]$ ls
cabal.project       flake.lock  papers             plutus-metatheory           release.nix  result-5    stubs
ci.nix              flake.nix   plutus-benchmark   plutus-report               result       result-6    word-array
CONTRIBUTING.adoc   LICENSE     plutus-core        plutus-tx                   result-1     result-7
default.nix         nix         plutus-core-spec   plutus-tx-plugin            result-2     scripts
doc                 notes       plutus-errors      prettyprinter-configurable  result-3     shell.nix
extended-utxo-spec  NOTICE      plutus-ledger-api  README.adoc                 result-4     stack.yaml

It looks like those folders are not in the git repo. I am running into same problem.
I am following instructions for MacOS from here:
https://docs.plutus-community.com/docs/setup/MacOS.html
And didn't realize it until i tried to build the playground client and server.
When i try to build with this command:
$ nix-build -A plutus-playground.client --option system x86_64-darwin
I get this error:
error: attribute 'plutus-playground' in selection path 'plutus-playground.client' not found
because the folder isn't there.
It looks like it has been removed. From this doc, I checked out the commit they mention:
https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-playground/cloning-plutus-repository
Like this:
$ git checkout 3746610e53654a1167aeb4c6294c6096d16b0502
Now the folders are there.

This is documentation drift. Those two applications have moved to the plutus-apps repository. If you do the same exact steps cloning plutus-apps instead of plutus repository, it will work.

Thank you! Builds now. plutus-pab not building with this command: $ nix-build -A plutus-pab
error is:
error: attribute 'plutus-pab' in selection path 'plutus-pab' not found

Please open another question for pan is you need assistance

You have to create these directories yourself and the "nix.conf" file with the contents from https://github.com/input-output-hk/plutus#iohk-binary-cache.
Maybe this video will help you:
https://www.youtube.com/watch?v=Cdu0gzCiYbY&t=758s

The nix.conf is fine. The video did not help.


text:
Blockfrost and Plutus Application Backend
I am wondering if anyone has tried both backend services to develope smart contracts? I am aware that IOHK's PAB is compatible only with Plutus whereas Blockfrost's API allows to use other programming languages to build the off-chain part of dApps.
Can someone share their experience with either option?

The reference implementation most projects are using is the Spacebudz project which uses of Nami Wallet dapp connector, smart contract and blockfrost.
https://github.com/Berry-Pool/spacebudz
We're using something similar and have not encountered any issues.


text:
WSL2 Plutus env setup - docker load error: attribute 'devcontainer' in selection path
docker load < $(nix-build default.nix -A devcontainer)
error: attribute 'devcontainer' in selection path 'devcontainer' not found
-bash: $(nix-build default.nix -A devcontainer): ambiguous
redirect
I'm following these instructions...
https://docs.plutus-community.com/docs/setup/WindowsWSL.html
Where should the command below be called? What directory? docker load < $(nix-build default.nix -A devcontainer)

I've run into this issue as well. Looks like that container that is referenced is in the Plutus Application Framework Repo according to the answer here: Plutus devcontainer build fails with 'devcontainer' not found
To get this to work, clone the plutus-apps repo found here: https://github.com/input-output-hk/plutus-apps
Run the steps from there with the following changes:
Building Plutus and a dev container

Step 2: the repo needs to be updated to https://github.com/input-output-hk/plutus-apps

The devcontainer folder was moved to that repo

Step 6: in creating the /etc/nix/nix.conf file, sandbox = false and use-sqlite-wal = false as the first two lines of that file. When I tried to run nix build it was choking on something to do w/ SQLite so I removed those 2 lines and that got past that
Step 8: This command needs to be updated to the following:

nix build -f default.nix plutus-apps.haskell.packages.plutus-pab.components.library

Step 11: If this fails with an error related to not having the kvm feature go to your /etc/nix/nix.conf file and add this line:

system-features = nixos-test benchmark big-parallel kvm
Go back to your repo and re run the command

As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.


text:
testing the English Auction example
I've been toying around with the English Auction example and I have two questions:

After an invalid bid (less than the minimum bet set for the auction) from a wallet, a second valid bid from the same wallet is also not successful. Is this intended? The trace shows the first invalid bid but not the second one, the last trace message is "Contract instance stopped with error: "bid lower than minimal bid 10000000".

Considering the following sequence of actions: auction starts, wallet 2 bids, wallet 3 outbids wallet 2, wallet 2 outbids wallet 3, auction closes. The image below shows the transaction corresponding to the second bid of wallet 2. Why do we have wallet 2 twice as an input of the transaction? I thought only wallet 2 created by slot 3 should appear as an input.

For (1), anytime someone bids < minumum, the contract does "throwError" which seems to cause this problem. I would have thought that just the wallet/transcation that bids would fail, not the entire smart contract !

You're right, this should be two questions (you will get twice the votes and reputation).  It will probably help you to write a better title for the questions too.  e.g. "English auction: Is prevention of valid bid by previous invalid bid intended behavior?"

For question 1: It seems to be an issue with the way the English Auction contract is written. I believe this is a bug that someone with more knowledge of Plutus would be able to fix in the contract code.
For question 2:
When Wallet 2 was outbid, the script created a UTxO to give it back Wallet 2's original 11000000 bid.
When Wallet 2 bid again, it bid 15000000. First the unspent 11000000 was used as an input, but that's not enough to cover the 15000000 bid. So Wallet 2's other UTxO containing 88991363 is needed as an additional input.

Note: I have suggested the original poster break this into two questions.

Q1: As @Travis mentioned, that's the way the offchain code was implemented. Try as follows and you'll have a second opportunity to bid.
bid :: forall w s. BidParams -> Contract w s Text ()
bid BidParams{..} = do
  (oref, o, d@AuctionDatum{..}) <- findAuction bpCurrency bpToken
  logInfo @P.String $ printf "found auction utxo with datum %s" (P.show d)

  if (bpBid < minBid d)
    then logError @P.String $ printf "bid lower than minimal bid %d" (minBid d)
    else do
        pkh <- ownPaymentPubKeyHash
        let b  = Bid {bBidder = pkh, bBid = bpBid}
            d' = d {adHighestBid = Just b}
            v  = Value.singleton bpCurrency bpToken 1 <> Ada.lovelaceValueOf (minLovelace + bpBid)
            r  = Redeemer $ PlutusTx.toBuiltinData $ MkBid b

            lookups = Constraints.typedValidatorLookups typedAuctionValidator P.<>
                    Constraints.otherScript auctionValidator                P.<>
                    Constraints.unspentOutputs (Map.singleton oref o)
            tx      = case adHighestBid of
                        Nothing      -> Constraints.mustPayToTheScript d' v                            <>
                                        Constraints.mustValidateIn (to $ aDeadline adAuction)          <>
                                        Constraints.mustSpendScriptOutput oref r
                        Just Bid{..} -> Constraints.mustPayToTheScript d' v                            <>
                                        Constraints.mustPayToPubKey bBidder (Ada.lovelaceValueOf bBid) <>
                                        Constraints.mustValidateIn (to $ aDeadline adAuction)          <>
                                        Constraints.mustSpendScriptOutput oref r
        ledgerTx <- submitTxConstraintsWith lookups tx
        void $ awaitTxConfirmed $ getCardanoTxId ledgerTx
        logInfo @P.String $ printf "made bid of %d lovelace in auction %s for token (%s, %s)"
            bpBid
            (P.show adAuction)
            (P.show bpCurrency)
            (P.show bpToken)


text:
plutus-playground-client npm start error (MacOs Intel i7)
[Updated]
✖ ｢wdm｣: ERROR in Error: Child compilation failed:
  Module not found: Error: Can't resolve '/Users/fanik/development/plutus_pioneer_program/plutus-apps/plutus-playground-client/undefined/static/index.html' in '/User  s/fanik/development/plutus_pioneer_program/plutus-apps/plutus-playground-client'
  ModuleNotFoundError: Module not found: Error: Can't resolve '/Users/fanik/development/plutus_pioneer_program/plutus-apps/plutus-playground-client/undefined/static/  index.html' in '/Users/fanik/development/plutus_pioneer_program/plutus-apps/plutus-playground-client'

  - Compilation.js:1765
    [plutus-playground-client]/[webpack]/lib/Compilation.js:1765:28

  - NormalModuleFactory.js:730
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:730:13

  - NormalModuleFactory.js:273
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:273:22

  - NormalModuleFactory.js:402
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:402:22

  - NormalModuleFactory.js:117
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:117:11

  - NormalModuleFactory.js:646
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:646:24

  - NormalModuleFactory.js:800
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:800:8

  - NormalModuleFactory.js:920
    [plutus-playground-client]/[webpack]/lib/NormalModuleFactory.js:920:5

  - child-compiler.js:169
    [plutus-playground-client]/[html-webpack-plugin]/lib/child-compiler.js:169:18

  - Compiler.js:536
    [plutus-playground-client]/[webpack]/lib/Compiler.js:536:11

  - Compiler.js:1103
    [plutus-playground-client]/[webpack]/lib/Compiler.js:1103:17

  - task_queues.js:95 processTicksAndRejections
    internal/process/task_queues.js:95:5

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors

I had tried the below guides to reinstall several times, but still cannot connect server
https://github.com/renzwo/cardano-plutus-apps-install-m1/blob/main/README.md
http://blog.punkbit.com/hacking/plutus-developer-environment-setup-on-macos-monterey/
git repo that I tested:
41149926c108c71831cfe8d244c83b0ee4bf5c8a
7f53f18dfc788bf6aa929f47d840efa1247e11fd
6aff97d596ac9d59460aab5c65627b1c8c0a1528
My recent setting:
/etc/nix/nix.conf
build-users-group = nixbld
experimental-features = nix-command
substituters        = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6N$

Stack 2.7.3
HLS   1.5.1
cabal 3.6.2.0
GHC   8.10.7
nix (Nix) 2.5.1
macOS Monterey 12.1
[PASS] PATH contains only one nix version.
[PASS] All profiles are gcroots.
[PASS] Client protocol matches store protocol.

Server status
plutus-playground-server: for development use only
[Info] Running: (Nothing,Webserver {_port = 8080, _maxInterpretationTime = 80s})
Initializing Context
Initializing Context
Warning: GITHUB_CLIENT_ID not set
Warning: GITHUB_CLIENT_SECRET not set
Warning: JWT_SIGNATURE not set
Interpreter ready

I'm running into issues too with my macbook 2015 macOS Monterey i7.  Did you ever get it to work?

Found this helpful link also for my macOS i7 install.
https://github.com/Til-D/cardano-plutus

Sorry for a late reply, I gave up on mac installation and installed virtualbox to figure out the playground

https://github.com/FanikIsLearning/ubuntu-plutus/blob/main/README.md

If you want this question answered, please upvote it or put a bounty on it (if you have enough reputation).

No I don't have enough reputation. But I think I figured out the installation with virtualbox and ubuntu. Thanks

You want to run GC_DONT_GC=1 npm start
We're working on improving this UX going forward, but many community members have been able to get this to work with this flag.

Thanks for the reply, I tried this comment on mac as well, but still do not work. Therefore, I gave up installation on mac and shifted to ubuntu, which works right there.

https://github.com/FanikIsLearning/ubuntu-plutus/blob/main/README.md


text:
IOHK Dev Workflow
Is there a standardised workflow for testing our smart contracts (i.e. something different than copy and paste from Vim into the playground) ?
All the best !

Welcome to Cardano SE! As a new user be sure to take the [Tour].

In the first video introducing the first lecture Lars talks about "ways" to test our smart contacts... I think I remember he says that this will be part of the program but later on...
On the other hand he said that there are no best practices yet because plutus (and the playground) is a brand new language (and Dev environment/ ecosystem)...
I hope we can find out all these topics soon.


text:
English Auction Compilation Failure. Need help understanding the compile error message
I need help.
Followed the lecture up to the compile.
Got this failure :
ConnectionError (HttpExceptionRequest Request { host = "localhost" port = 8080 secure = False requestHeaders = [("Accept","application/json;charset=utf-8,application/json"),("Content-Type","application/json;charset=utf-8")] path = "/runghc" queryString = "" method = "POST" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 proxySecureMode = ProxySecureWithConnect } **ResponseTimeout)**

UPDATE: Since the message appeared to me to be a timeout issue (I'm a mainframe programmer so I'm crash coursing on understanding thrown error messages on this paltform), I took a chance and simply re-submitted my compile.
It has now compiled SUCCESSFULLY!! Woohoo. I need small successes like this every now and then to keep the hope alive and trudge on.

You should accept your own answer.


text:
What is the minimum amount of Ada needed to stake?
What is the minimum (lowest) amount of Ada needed to stake?
Could you have the delegation fee + 0.00001 Ada?  Where is this referenced?

There is an initial 2.17 ADA fee when delegating a wallet for the first time.
Here's the breakdown of that: 2 ADA deposit goes towards registering your stake address on the blockchain and ~0.17 ADA is the transaction fee.
Note: the 2 ADA deposit is refundable upon unstaking
Happy staking!
The 2 ADA (current configuration of "keyDeposit") comes from the mainnet genesis file.

This is great.  Do you know the source of info for this, in the specs?

The 2 ADA deposit comes from the "keyDeposit" param here

There is no staking minimum, but there is a UTXO minimum. With current protocol parameters, any UTXO on Cardano must have a minimum of 1 ADA (minUTXOvalue).
So while possible in principle, there is currently no way to create a UTXO, and thus to stake, anything less than 1 ADA.

Thanks. I helped onboard a friend to setup a Cardano wallet, had 2.83 Ada in there, had him setup staking.  The .833 Ada delegation fee went thru, however the 2 Ada never appeared back in his wallet, although on the blockchain the transaction went thru.  I opened up a ticket in ccvault wallet to perhaps fix this display or add a warning.  https://github.com/ccwalletio/tracker/issues/68

Just to be clear - the staking certificate (delegation) fee is 2 ADA. Whatever is leftover in the wallet will then be staked, plus whatever you add to the wallet. If you'd like to receive the 2 ADA back you would have to de-register your staking key. Think of the 2 ADA as a deposit for staking that you will get back if you choose to unstake.


text:
Blockfrost doesn't find address
I'm trying to query address details of a yet unused address via blockfrost. If I enter the Address in cardanoscan.io, it shows me the stake key of the address, well and fine. But on Blockfrost it responds with an error "The requested component has not been found". Is there any way to extract the stake key from an unused address (assuming that the unused part is what makes blockfrost stumble), either via blockfrost or via some linux tooling?
Let's assume the address "addr1qyxfhv5dncxmeel2gdsjawv2q2mm73gtdh3ekdxshc557q39v2hfvwfdrl00k3r8x9qwk63fj9d96zlhudvmwsy0j0xse7zj29"
Cardanoscan can lookup the stake key for this https://cardanoscan.io/address/010c9bb28d9e0dbce7ea43612eb98a02b7bf450b6de39b34d0be294f022562ae96392d1fdefb44673140eb6a29915a5d0bf7e359b7408f93cd
I tried to extract via https://hub.docker.com/r/inputoutput/cardano-addresses via
echo "addr1qyxfhv5dncxmeel2gdsjawv2q2mm73gtdh3ekdxshc557q39v2hfvwfdrl00k3r8x9qwk63fj9d96zlhudvmwsy0j0xse7zj29" | docker run --rm -i cardano-address address inspect
but I don't receive the stake key in the format I expect it ("stake1....") but like
{
    "stake_reference": "by value",
    "stake_key_hash_bech32": "stake_vkh1y432a93e950aa76yvuc5p6m29xg45hgt7l34nd6q37fu6t4h543",
    "stake_key_hash": "2562ae96392d1fdefb44673140eb6a29915a5d0bf7e359b7408f93cd",
    "spending_key_hash_bech32": "addr_vkh1pjdm9rv7pk7w06jrvyhtnzszk7l52zmduwdnf597998sy0j4pt2",
    "address_style": "Shelley",
    "spending_key_hash": "0c9bb28d9e0dbce7ea43612eb98a02b7bf450b6de39b34d0be294f02",
    "network_tag": 1,
    "address_type": 0
}

I'm looking for a format like "stake1uyjk9t5k8yk3lhhmg3nnzs8tdg5ezkjap0m7xkdhgz8e8ngj8tttk"
any pointers here?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

db-sync based API services such as blockfrost and koios can't find unused addresses because they are not "db-synched"
Cardanoscan uses his own backend and library, to decode the bech32 and extract the stake key, even if it is not used yet.

Here is the answer of the blockfrost  support team:

Our API returns 404 Not Found for any resource that does not exist on
chain a the moment, even when in theory, it could exist. These are
typically addresses that haven't been used yet. We can't know that
someone has generated a new address unless we see it on blockchain.
Once someone makes a transaction, it will appear on blockchain and
hence in our API. And it'll stay there forever, even with 0 balance.
The thing is, there's an infinite number of addresses which can be
generated. And unless they make a transaction of some sort, they are
basically "non-existent".

If you want to extract the staking address you can follow these instructions:
Extract the bech32 stake address from a shelly address in javascript


text:
Can I manually install cardano-graphql using local data?
I'm running a relay node and have dbsync pushing data into postgresql.
To build the graphql data, do I have to use the weekly restore snapshot as described in the github page for cardano-graphql or can I cut that corner and use my local data somehow?
Does the docker instance run it's own cardano node or just the graphql API?
As a related side question - will my postgresql database be redundant when I have graphql up and running? My use case is extracting transaction metadata.
Thanks!

Welcome to Cardano SE! As a new user be sure to take the [Tour].

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.


text:
How do I run doctests?
I copied the plutus-starter template: https://github.com/input-output-hk/plutus-starter and created a file BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file).
Then I started copying over all the code from the introductory tutorial: https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html
which includes doctests. What do I need to add to the .cabal file to run these doctests?

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.

To run doctest, you don't need to add that to your cabal file. You need to install the doctest executable, and then run cabal repl --with-ghc=doctest. See the doctest documentation.

IIUC, I can only use things that are installed with Nix in this project. How do I find and install the doctest package for Nix?


text:
"No unfolding" error in Visual Studio Code
I copied the Plutus starter template, Plutus Platform starter project, and created a file, BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file).
Then I started copying over all the code from the introductory tutorial, Using Plutus Tx.
When I added the code,
functions :: CompiledCode Integer
functions = $$(compile [|| myProgram ||])

it caused Visual Studio Code to complain, giving an error at the top of the file:
Program error: GHC Core to PLC plugin: E043:Error: Reference to a name which is not a local, a builtin, or an external INLINABLE function: Variable PlutusTx.Builtins.addInteger
            No unfolding
Context: Compiling expr: PlutusTx.Builtins.addInteger
Context: Compiling expr: PlutusTx.Builtins.addInteger
                           (PlutusTx.Builtins.addInteger 1 1)
Context: Compiling expr: PlutusTx.Builtins.addInteger
                           (PlutusTx.Builtins.addInteger 1 1) (BasicPlutusTx.plusOne 1)
Context: Compiling definition of: BasicPlutusTx.myProgram
Context: Compiling expr: BasicPlutusTx.myProgram
Context: Compiling expr at "main:BasicPlutusTx:(76,16)-(76,41)"compile

However, cabal build still works.

If I recall correctly, this error can happen during the first evaluation, but will be gone during subsequent ones. This is due to unfolding not be available from the start, but only once the module has been compiled for the first time.

@angerman Am I running VSCode wrong? I'm starting nix-shell and then calling code from there

I see there's a flag in the project which enables the fix, but I don't see how or why VSCode would enable this flag

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.


text:
nix-shell : getting error "Index state found was 2021-10-20T00:00:00Z and no `index-sha256` was provided."
I'm having issues starting nix-shell from the plutus-apps directory.
I have followed the steps provided here: https://docs.plutus-community.com/docs/setup/WindowsCohort2.html.
Below is the full output of what I see when I try to start nix-shell with the --show-trace flag:
/mnt/c/dev/workspace/plutus-apps$ nix-shell --show-trace
error: Index state found was 2021-10-20T00:00:00Z and no `index-sha256` was provided.

       … while evaluating anonymous lambda

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/call-cabal-project-to-nix.nix:9:1:

            8| in
            9| { name          ? src.name or null # optional name for better error messages
             | ^
           10| , src

       … from call site

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:487:36:

          486|               args = { caller = "cabalProject'"; } // args';
          487|               callProjectResults = callCabalProjectToNix args;
             |                                    ^
          488|               plan-pkgs = importAndFilterProject {

       … while evaluating anonymous lambda

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/import-and-filter-project.nix:5:1:

            4| { pkgs, haskellLib }:
            5| { projectNix, sourceRepos, src }:
             | ^
            6| let

       … from call site

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:488:27:

          487|               callProjectResults = callCabalProjectToNix args;
          488|               plan-pkgs = importAndFilterProject {
             |                           ^
          489|                 inherit (callProjectResults) projectNix sourceRepos src;

       … while evaluating the attribute 'hsPkgs.shellFor'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:510:43:

          509|               project = addProjectAndPackageAttrs rec {
          510|                   inherit (pkg-set.config) hsPkgs;
             |                                           ^
          511|                   inherit pkg-set;

       … while evaluating 'shellFor'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:612:24:

          611|             #
          612|             shellFor = shellArgs:
             |                        ^
          613|               let

       … from call site

       at /mnt/c/dev/workspace/plutus-apps/shell.nix:115:1:

          114| in
          115| haskell.project.shellFor {
             | ^
          116|   nativeBuildInputs = nixpkgsInputs ++ localInputs ++ [ sphinxTools ];

       … while evaluating anonymous lambda

       at /mnt/c/dev/workspace/plutus-apps/shell.nix:1:1:

            1| { system ? builtins.currentSystem
             | ^
            2| , enableHaskellProfiling ? false

       … from call site

I am using Windows 11 wsl2 with Debian distro

This very much looks like your plutus-apps checkout is corrupted? Can you provide the git rev of your plutus-apps checkout (e.g. git rev-parse HEAD) and what ever git status lists?

With some help from a few fellow plutus pioneers that also ran into this issue, it has been resolved.
This was the solution:
For Windows users who encounter the following error in Docker or wsl:
 "Index state found was 2021-02-24T00:00:00Z and no index-sha256 was provided."
It turns out, you have to git clone Plutus with autocrlf disabled:
git config --global core.autocrlf false
prior to cloning.

Another option is to clone using git inside wsl or Docker, which implicitly checks out with Linux line endings.

The automatic eol conversion seems to mess something up. No clue what exactly. See [here](https://github.com/input-output-hk/plutus/issues/2983) for details.

As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

The proposed solution works.


text:
clarifying awaitTxConfirmed behavior
Question for Plutus Pioneer cohort 3 Q&A week 1
I'm new to plutus dev and trying to clarify the behavior of awaitTxConfirmed. From the docs and other questions I've seen, it seems that the line
void $ awaitTxConfirmed $ getCardanoTxId ledgerTx

taken from the EnglishAuction example blocks until the Tx has been added to the ledger.
Questions

can I trust that after this returns the Tx is definitely on the chain and won't be rolled back? In other words does it unblock after the Tx has been added to the tip of the ledger by the slot leader or after so many blocks have been added and the network has consensus (it's on the chain permanently) ? (pls note as I'm new to this, I might not be using all the terms correctly)

typically how long does this take on the mainnet ?

what happens if the Tx is not added to the chain ?  Does it still unblock?

These questions are from a UI dev perspective. In general I'm trying to work out how long would an end user have to wait from pressing a button in a GUI (that generates a Tx via the API and backend) and getting a response that the intended action has confirmed (is permanently on the chain) or is rejected.

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.

can I trust that after this returns the Tx is definitely on the chain and won't be rolled back? In other words does it unblock after the Tx has been added to the tip of the ledger by the slot leader or after so many blocks have been added and the network has consensus (it's on the chain permanently) ? (pls note as I'm new to this, I might not be using all the terms correctly)

No, you cannot trust that it won't be rolled back. It only returns after the Tx is added to the ledger. Only 1 confirmation. It's just not deep enough in the ledger.

typically how long does this take on the mainnet ?

A block is added every 20 seconds on average. For irreversibility, 15-30 blocks needed so 5-10 minutes.

what happens if the Tx is not added to the chain ? Does it still unblock?

Nope, it never returns if Tx is not added, thus blocking forever.


text:
Pioneer Q&A question: Where is datum actually stored?
Question for Plutus Pioneer cohort 3 Q&A week 1
I'm new to Plutus dev and trying to work out where the datum value is actually stored in a typical Plutus application.
From various sources (docs/blogs/videos) it seems that the value can be stored in the EUTxO or provided in the Tx (from the off-chain Tx creation code)?
I understand that initially the datum is provided in the Tx when the first script EUTxO is created, but when the datum is updated after the mechanics of querying/updating the datum are confusing/unclear. Some of the sources I've looked at use code to explain what's happening, but I'm not yet that skilled with Haskell so they don't help.
Can someone walk through an example or two and clarify where the data value comes from and where it is stored?
For example (with my limited understanding), it seems like in the EnglishAuction example the datum could be actually stored in the EUTxO (with the first Tx) - not just a hash of the datum - and then when future Tx's are created (by off-chain code) the Plutus app code would read this datum value from the EUTxO, update it and pass it with the new Tx.
First, is this correct?  Or does it work differently?
This interpretation sort of makes sense, but how does this relate/work with the Datum hash that people/docs say is stored in the EUTxO?
Also the EnglishAuction example seems to make sense where there's only one script EUTxO at any time (for a script instance), but how does this work in applications where the applications state is split across multiple EUTxOs (multiple datums - fragmented state)?

This was Lars response to this question in the ppp Q&A on 25/Jan/22. Recording timestamp 0:53:57

The datum is not stored in UTxO but in the transaction. Even if the
datum was included in the transaction it is not completely trivial to
get your hands on it. The Cardano node, for example, does not know it,
the Cardano node sees it during validation but then sort of forgets
about it, so you can't ask the node what's the datum for a transaction
or a UTxO.
There are tools such as DbSync, which scans and writes all your
blockchain transaction to a database, including the datum, so there is
one way to get to the datum by hand.
Also the Plutus apps team has come up with a lightweight option of
DbSync called chainindex, so that's exactly for that reason, also
keeps track of all the datums.
There also 3rd party providers, blockfrost, a website where they
run dbSync for you, you just do REST calls to their server, give a TX
ID, or some reference UTxO and they give you the datum. It is stored
in the transaction and somehow it disappears in the wherever the
blockchain stores it on the machine.
If the datum was not stored with the transaction, then people that
don't know it have no way of consuming this UTxO, if the person that
created this UTxO, the default is to include just the hash of the
datum then other people normally wouldn't be able to spend the UTxO,
because in order to spend it you have to provide the Datum, in this
case there must be another channel to communicate the datum. Maybe by
design you don't want people to spend your UTxO, but if do you want
them to spend it and you don't include the Datum just the datum hash,
then you must put the datum on your website or something, so  people
is able to spend the UTxO.
Last question, I'm not too sure if I understand the question, if there
are more than one instances:
Yes it can happen or also it should happen, that's one way of handling
concurrency in Plutus, to do this: that you don't just rely only in
one specific UTxO that carries all the state, you fragment the state
and then you can achieve massive concurrency, but I'm not really sure
of what the question is about how does it work? The stated is
fragmented.
It depends on the specific example: in the auction example in the
first iteration, there was a question of what happens if it is a
popular auction and lots of people want to bid, in the way the example
is written, there can only be one bid per block, so basically 3 bits
per minute. Small auctions should be fine, but if it is highly
contentious then maybe that's too slow and then you will have this
concurrency issue because only one bid can successfully consume the
current UTxO and produce a new one, so you can only have one bid per
block in this setup.
One way to sort this issue is to split the auction into several, for
example ten auction UTxOs, and if you want to make a bid you can do
that on each of those, but then you wont know globally what's the
highest bidder, each of the 10 could keep track of the highest bid
that that one has seen, but it is not aware of the other, in that
specific example, in the end, in the close, you would combine all of
them and find out which one is the highest bid and then reimburse the
others. but it is a specific example. It depends on your business
case.
In the auction example you achieve concurrency but you need to
recombine again. For a DEX for example, on a decentralized exchange,
in Uniswap in Ethereum for one token pair they have one pool normally,
and that would be horrible on Cardano because it would mean one swap
per pair per block, so one idea would be to split the liquidity pools
into several UTxOs and you may not need to recombine, they could
happily coexist, each pool doing their own thing, it could be one
option.
But it always depends on  your use case, what fragmented state even
means and whether it is feasible.

Thanks, this was helpful in understanding where ChainIndex comes from. It's not used in PPP iteration 2 (the code I'm referencing) but is used in the Plutus Starter project (what I'm using as a template for my projects). The plutus branch with ChainIndex is also not included in main yet, so it took me a while to find the right plutus commit to match my Plutus repo with the plutus-starter set up.


text:
How do I `:reload` in `ghci`
I copied the plutus-starter template: https://github.com/input-output-hk/plutus-starter and created a file BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file).
Then I started copying over all the code from the introductory tutorial: https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html
As I work with the tutorial, I like being able to make changes to the code and then see how that affects things in ghci. I usually use stack and hpack and run ghci with stack ghci. When I do this, I can just type :reload in ghci and it recompiles any changes I've made. But that doesn't seem to work here. Even if I run cabal build in a separate tab, it doesn't. It seems like I have to quit ghci, run cabal build, and then re-run ghci and re-import everything again. Is there a better way?

cabal repl loads the necessary context or something so that :reload works as expected

Other answer was deleted because it was not an answer.  It was a suggestion if "something to try".  It should have been a comment.  This is also not an acceptable answer according to: [answer]

As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

It answered the question. It probably would have been appropriate to suggest an improvement, rather than deleting it. This site will be most successful when people feel comfortable participating.


text:
Does a script always have the same address forever?
When creating a script, the script is given a script address. If I would like to run multiple scripts in parallel, how to go about that? Do I have to define a nonce variable just to make the address different?

Does a script always have the same address forever?

Yes. But the script doesn't live at the address, transactions spending UTxOs at the address must be validated by the script to be spent.

When creating a script, the script is given a script address.

A script address literally is just a hash of script code. It's not given, it can be deterministically derived by anyone with the script code.

If I would like to run multiple scripts in parallel, how to go about that?

For Validator scripts, the script is only "run" when trying to redeem a Datum at the script address. You can have many Datums at a validator address though. That could be thought of as many parallel instances at the same address--depending on how the contract is written. Although, some scripts might require multiple Datums are spent simultaneously, etc.

Do I have to define a nonce variable just to make the address different?

Yes. Depending on how you write your script, it might be useful to have separate scripts for separate parameters (see here). But if you want exactly the same behavior for each "instance" I suggest you think of the Datum as being the separate instance.


text:
Error compiling Week01
I'm on commit: 41149926c108c71831cfe8d244c83b0ee4bf5c8a of the plutus-apps repo (I've also tried 7f53f18dfc788bf6aa929f47d840efa1247e11fd, doesn't seem to make a difference).
When running cabal build from plutus-pioneers-program/code/week01, I eventually run into this error:
Failed to build plutus-tx-plugin-0.1.0.0.
Build log (
    /home/me/.cabal/logs/ghc-8.10.4/plutus-tx-plugin-0.1.0.0-9c412f3bdd63445e3f9183c31cb9e0b26d503f4e4d00f925b065e9d46a4950e8.log
):
Configuring library for plutus-tx-plugin-0.1.0.0..
Preprocessing library for plutus-tx-plugin-0.1.0.0..
Building library for plutus-tx-plugin-0.1.0.0..
[ 1 of 14] Compiling PlutusTx.Compiler.Error ( src/PlutusTx/Compiler/Error.hs, dist/build/PlutusTx/Compiler/Error.o, dist/build/PlutusTx/Compiler/Error.dyn_o )
[ 2 of 14] Compiling PlutusTx.PIRTypes ( src/PlutusTx/PIRTypes.hs, dist/build/PlutusTx/PIRTypes.o, dist/build/PlutusTx/PIRTypes.dyn_o )
[ 3 of 14] Compiling PlutusTx.PLCTypes ( src/PlutusTx/PLCTypes.hs, dist/build/PlutusTx/PLCTypes.o, dist/build/PlutusTx/PLCTypes.dyn_o )
[ 4 of 14] Compiling PlutusTx.Compiler.Types ( src/PlutusTx/Compiler/Types.hs, dist/build/PlutusTx/Compiler/Types.o, dist/build/PlutusTx/Compiler/Types.dyn_o )
[ 5 of 14] Compiling PlutusTx.Compiler.Utils ( src/PlutusTx/Compiler/Utils.hs, dist/build/PlutusTx/Compiler/Utils.o, dist/build/PlutusTx/Compiler/Utils.dyn_o )
[ 6 of 14] Compiling PlutusTx.Compiler.Type[boot] ( src/PlutusTx/Compiler/Type.hs-boot, dist/build/PlutusTx/Compiler/Type.o-boot, dist/build/PlutusTx/Compiler/Type.dyn_o )
[ 7 of 14] Compiling PlutusTx.Compiler.Laziness ( src/PlutusTx/Compiler/Laziness.hs, dist/build/PlutusTx/Compiler/Laziness.o, dist/build/PlutusTx/Compiler/Laziness.dyn_o )
[ 8 of 14] Compiling PlutusTx.Compiler.Kind ( src/PlutusTx/Compiler/Kind.hs, dist/build/PlutusTx/Compiler/Kind.o, dist/build/PlutusTx/Compiler/Kind.dyn_o )
[ 9 of 14] Compiling PlutusTx.Compiler.Names ( src/PlutusTx/Compiler/Names.hs, dist/build/PlutusTx/Compiler/Names.o, dist/build/PlutusTx/Compiler/Names.dyn_o )
[10 of 14] Compiling PlutusTx.Compiler.Builtins ( src/PlutusTx/Compiler/Builtins.hs, dist/build/PlutusTx/Compiler/Builtins.o, dist/build/PlutusTx/Compiler/Builtins.dyn_o )
[11 of 14] Compiling PlutusTx.Compiler.Binders ( src/PlutusTx/Compiler/Binders.hs, dist/build/PlutusTx/Compiler/Binders.o, dist/build/PlutusTx/Compiler/Binders.dyn_o )
[12 of 14] Compiling PlutusTx.Compiler.Type ( src/PlutusTx/Compiler/Type.hs, dist/build/PlutusTx/Compiler/Type.o, dist/build/PlutusTx/Compiler/Type.dyn_o )
[13 of 14] Compiling PlutusTx.Compiler.Expr ( src/PlutusTx/Compiler/Expr.hs, dist/build/PlutusTx/Compiler/Expr.o, dist/build/PlutusTx/Compiler/Expr.dyn_o )

src/PlutusTx/Compiler/Expr.hs:775:41: error:
    Not in scope: type constructor or class ‘GHC.GenTickish’
    Perhaps you meant one of these:
      ‘GHC.Tickish’ (imported from GhcPlugins),
      ‘GHC.Tickish’ (imported from CoreSyn)
    Neither ‘Class’, ‘CoreSyn’, ‘CostCentre’, ‘FV’, ‘GhcPlugins’,
            ‘MkId’ nor ‘PrelNames’ exports ‘GenTickish’.
    |
775 | getSourceSpan :: Maybe GHC.ModBreaks -> GHC.GenTickish pass -> Maybe GHC.RealSrcSpan
    |                                         ^^^^^^^^^^^^^^
cabal: Failed to build plutus-tx-plugin-0.1.0.0 (which is required by
plutus-pioneer-program-week01-0.1.0.0). See the build log above for details.

Any idea how to workaround this issue?

I am having the same issue, restarting the machine doesn't help as suggested above

What version og GHC are you using. You should be using at least ghc-8.10.4 but preferably ghc-8.10.7. You should not be using anything later than 8.10.7.

I'm using 8.10.4

yeah still seeing the issue with 8.10.7

I was having the same error while running cabal build for the first time. Not sure if my process is what resolved it for me, but it was able to build.
Restart console and make sure nix binary caches are correct,
#> . /home/yourusernamehere/.nix-profile/etc/profile.d/nix.sh
cd plutus-apps
nix-build -A plutus-playground.server

Open new session, again verify binary caches,
#> . /home/yourusernamehere/.nix-profile/etc/profile.d/nix.sh,
cd plutus-apps
nix-shell
cd path/to/plutus-pioneers-program/code/week01
cabal build


text:
Problem connecting to localhost: Error occurred while trying to proxy request /api/oauth/status from localhost:8009 to http://localhost:8080
Built on mac. Just got localhost working
Same problem as Playground client can't connect to playground server (all localhost) but the answer is not working for me. I tried the suggestion but its the same problem
The only way I can get the development server working is with GC_DONT_GC=1 npm start
I can then visit localhost but in the terminal I see
70 WARNINGS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 71 warnings
ℹ ｢wdm｣: Compiled with warnings.
[HPM] Error occurred while trying to proxy request /api/oauth/status from localhost:8009 to http://localhost:8080 (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)

Welcome to Cardano SE! As a new user be sure to take the [Tour].

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.


text:
Why can any wallet close a bid?
I setup a simple start, bid, close in Plutus Playground where the following occurs:

Wallet 1 starts the bidding
Wallet 2 makes a bid above the min amount
Wallet 3 calls close

In the end Wallet 2 gets the token and Wallet 1 gets the amount in the script. But why is wallet 3 allowed to end the bidding when they weren't the one to start the bidding?

Any party can end the bidding according to the code in this contract. The constraints for what needs met is defined at this part in the contract: https://github.com/input-output-hk/plutus-pioneer-program/blob/ecafd204b56defceed9fd3a69ebede09256c12c0/code/week01/src/Week01/EnglishAuction.hs#L320. There is no incentive though for wallet 3 or any other wallet other than 1 or 2 to close bidding as those are the only two wallets that would benefit from the auction being closed after the deadline is reached.

Closing the auction makes you pay a fee. Thus, only interested parties are likely to actually perform the action. Moreover, it is not possible to close the auction before its deadline, even if you are the one who started the auction - valid bids after close but before the deadline will still be taken into account.


text:
Why don't outbid wallets always have two inputs for their next bid?
I created a bidding war in Plutus Playground between 5 wallets.
Wallet 2 bids first and then is outbid by Wallet 3 and got refunded as usual. Later on when Wallet 2 went to bid again with a higher amount only the first unspent Tx was used as an input.
However later on Wallet 3 was outbid by Wallet 4 which was outbid again a few slots after. Wallet 4 then placed another bid, but this time when Wallet 4 placed its bid, it used 2 inputs (the previous change amount plus the refunded amount) to cover the bid.
In both scenarios, both wallets had enough in their first unspent Tx after their initial bid to cover the next bid they put in. This would make me think that the wallets don't necessarily spent their lowest UTxO first since only one wallet used their refunded bid in addition to their first unspent Tx.
Why is this?
Images below show what happened.

Welcome to Cardano SE! As a new user be sure to take the [Tour].

How coins are selected isn't defined in the playground. Probably the easiest algorithm is largest utxo first (since it's a playground you don't need to worry about fragmentation). If that's the case then as long as the initial change is large enough for a bid the tx wouldn't need to consume both inputs.
In practice on chain the user (or more likely the user's wallet) is responsible for choosing the utxo that is the input for the transaction. Cardano wallet for example uses a random coin selection algorithm. Other wallets use a largest utxo algorithm and others may have something entirely different. From the perspective of plutus though the tx outputs into the contract is all it cares about though.

On chain wouldn't it be best to go with smallest UTxO first in order to minimize data by having fewer "change" UTxOs? Or am I thinking of it wrong?

Depending on fragmentation of wallet and how big of output you're sending you could end up in a state where you can't make a successful transaction anymore because tx size is exhausted combining all the small utxos.


text:
Formatted error messages in Playground
Is there any way to get the Playground errors with proper indentations?
This can help read better the issue at hand.
Instead of getting one huge line:
(Tx {txInputs = fromList [TxIn {txInRef = TxOutRef {txOutRefId = 183d5544f89d5e0a5cfcbd8330c73a5f629925ed5f076b5a1b06e60a35147d4c, txOutRefIdx = 2}, txInType = Just ConsumePublicKeyAddress}], txCollateral = fromList [], txOutputs = [TxOut {txOutAddress = Address {addressCredential = PubKeyCredential a2c20c77887ace1cd986193e4e75babd8993cfd56995cd5cfce609c2, addressStakingCredential = Nothing}, txOutValue = Value (Map [(,Map [(\"\",100000000000)])]), txOutDatumHash = Nothing},TxOut {txOutAddress = Address {addressCredential = ScriptCredential 8c770b7ff9ed4a5df36ca914d18723596df69556597678d9872e2158, addressStakingCredential = Nothing}, txOutValue = Value (Map [(66,Map [(\"T\",1)])]), txOutDatumHash = Just 50536f27f0948527e1df0489a97781d16155f92623b8559e00e7341f2fb0f24d}], txMint = Value (Map []), txFee = Value (Map []), txValidRange = Interval {ivFrom = LowerBound NegInf True, ivTo = UpperBound PosInf True}, txMintScripts = fromList [], txSignatures = fromList [(8d9de88fbf445b7f6c3875a14daba94caee2ffcbc9ac211c95aba0a2f5711853,b129c9922646ca3d0b1fb5349ce515d4b4aca392825794478df4479182f8e2d53c5157829cf1c72628bb7b419cafd131cfcab251188af2c9e9c5064e03045d08)], txRedeemers = fromList [], txData = fromList [(50536f27f0948527e1df0489a97781d16155f92623b8559e00e7341f2fb0f24d,Datum {getDatum = Constr 0 [Constr 0 [B \"\\162\\194\\fw\\136z\\206\\FS\\217\\134\\EM>Nu\\186\\189\\137\\147\\207\\213i\\149\\205\\\\\\252\\230\\t\\194\",I 1596059101,I 100000000,B \"f\",B \"T\"],Constr 1 []]})]}) (Lovelace {getLovelace = 2000000})))" ]

To get more something more like:
Tx {
  txInputs = fromList [
    TxIn {txInRef = TxOutRef {txOutRefId = 183d5..47d4c, txOutRefIdx = 2}, txInType = Just ConsumePublicKeyAddress}
  ],
  txCollateral = fromList [],
  txOutputs = [
      TxOut {
        txOutAddress = Address {addressCredential = PubKeyCredential a2c20c778..09c2, addressStakingCredential = Nothing},
        txOutValue = Value (Map [(,Map [(\"\",100000000000)])]),
        txOutDatumHash = Nothing
      },

Welcome to Cardano SE! As a new user be sure to take the [Tour].

I don't think there is a pretty printer for this (yet). But you could file an issue/feature request with plutus.

Great thank you Angeman!


text:
On-chain and Off-chain code
I've seen the existing similar questions on this topic. I probably still don't get it. So a question:
Is it a correct analogy to the JS-Solidity world that

the On-chain code corresponds to the SmartContract code I write in Solidity (and lives and executes on each node), while,
the Off-chain code corresponds to the JS client code that shows the UI, prepares and invokes the transaction calls made into the blockchain, and executed by the Smart Contract?

Yes, that's correct. On-chain is exactly what it says. It's logic that happens on every validator syncing the chain. The unique thing with plutus is the on-chain and off-chain code can live together and share e the same types/imports.


text:
Not in scope: type constructor or class ‘PaymentPubKeyHash’ - Week 1 Pioneers Exercise
I'm trying to compile the week 1 code on plutus playground hosted locally, but I'm getting this error:
 error:
    Not in scope: type constructor or class ‘PaymentPubKeyHash’
   |
57 |     { aSeller   :: !PaymentPubKeyHash
   |

              ^^^^^^^^^^^^^^^^^

This is the code that originates the compilation error:
data Auction = Auction
    { aSeller   :: !PaymentPubKeyHash
    , aDeadline :: !POSIXTime
    , aMinBid   :: !Integer
    , aCurrency :: !CurrencySymbol
    , aToken    :: !TokenName
    } deriving (P.Show, Generic, ToJSON, FromJSON, ToSchema)

I have followed the steps on the week1 videos, but I'm getting this error, any help is welcomed. Thank you.

What gitrev of plutus-apps are you using? Can you gist your entire code file? I'm guessing either a version mismatch or a typo.

@SamuelLeathers I just got it working. I ran cabal update in the week1 code folder and the code compiled. Thank you.

Also, I was running the plutus playground on a old version of plutus repository not plutus-apps

import Ledger.Address qualified as Address          (Address, PaymentPubKeyHash(..))
import PaymentPubKeyHash .


text:
Auction contract example with metadata
In the example of NFT Auction, I am thinking about potential scenarios where certain JSON metadata an NFT was minted with, happens to be required in some arbitrary logic within auction process (artist info, description, etc.).
Could NFT metadata be extracted/parsed straight from Plutus offchain code or should this info be handled completely "offchain" and then putting back into datuum when auction starts off?
Also, is it already possible in Plutus to mint NFT tokens with arbitrary JSON metadata in a similar fashion as cardano-cli already does?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.


text:
Pioneer Q&A question: How does the off-chain code get passed to the Wallet for execution
In the Week 1 lectures, Lars mentions that the off-chain code is to be executed by the Wallet; this makes sense as the Wallet has access to the Private Keys that would be essential in signing the transactions prior to submitting to the blockchain.
My question is, by what mechanism does the Wallets get the off-chain code to execute? How does the Wallet then know what order said code needs to be executed in (i.e., on the EnlishAuction a user needs to first 'start' the action prior to anyone being able to actually bid for the NFT).
Lastly, and this is probably covered in later lectures, how would Plutus off-chain code handle transactions that require signing from multiple Private Keys?

My intuition tells me it's being handled by Plutus Schema: Schema This is just a guess however.

This should be edited to be a couple of generic questions (if not already asked).  There is nothing "Plutus-Pioneer" specific about "How does off-chain code get passed to the wallet for execution"

[ask] and [help/dont-ask] have good guidelines


text:
Error evaluating Simulation in playground
I was finally able to run the playground and I was following exactly what the instructor was saying on the video, adding the wallets and actions but only the genesis transaction shows up when I evaluate it at the end

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

Welcome to Cardano SE! As a new user be sure to take the [Tour].

This is a minutxo failure. Likely wallet 1 doesn't have enough Lovelace in the initial genesis for holding the minted NFT. Try assigning at least 2000000 (2 Ada) to that wallet.


text:
English Auction rejected translations are not shown
I have made a sample scenario:

Start auction with a deadline of +10 slots
wait for 12 slots
Bid
Wait for 1 slot to allow TX to be processed

The third transaction is not shown - which is understandable since the transaction should not be happening.
My question is: how can I figure out what was wrong, and why did the TX was not made.
There is no error log in the log/trace.

Did you do this in repl before simulation?
import Data.Default
import Ledger.TimeSlot
slotToEndPOSIXTime def 10

The last command will give you the correct value  for spDeadline after 10 slots.

What exatly the cabal repl does?

Yes I have. I put in the correct timeslot, and deliberately went over the deadline. The TX did not go through, but I could find any reference (log/trace) to the reason the TX failed

What about waiting for 2 slots at the end?


text:
Localhost not displaying anything after running npm start in plutus-playground-client
I'm on a Mac running Big Sur with the intel chip. I've followed all the steps to set up the local Plutus environment as suggested by Lars in the Plutus Pioneer 3rd iteration.
Next step is to get the playground client running in the browser. I ran npm start in a plutus-playground-client folder within my nix-shell. The app appears to have been compiled successfully:

However, when I navigate to localhost in the browser it says that 'This page isn't working. Localhost didn't send any data.' I've tried accessing the app on Brave and Safari with no luck. No additional info is presented in the terminal. Any ideas?

I figured it out. Localhost has to be accessed at https://localhost:8009, not http. To get to the app I had to bypass some warnings about accessing it on https.


text:
Cannot find definitions of tx___ functions in English Auction script
I might be missing some thing but in the English Auction script I am unable to find the definitions of the function that starts with tx:
txOutDatumHash
txInInfoResolved
txOutValue
txInInfoResolved
...

Does anyone know where these functions are defined?

Since they're not defined directly in EnglishAuction.hs, they must be imported from somewhere else. You can see all the imports starting on line 32.
The haddock docs for Plutus can give some more information. Look at the index for the letter "T"  and scroll down until you start seeing things that start with "tx".
For example, txOutDatumHash and txOutValue are part of the constructor for the TxOut datatype.

Thanks. that answers other questions I have regarding the script.


text:
Web Resources and Tutorials?
Does anyone have any reccomendations on tutorials to create token minting websites?  I have learned how to mint nfts to the chain and need to expand my knowledge.  any help appreciated.  thank you!

Welcome to Cardano SE! As a new user be sure to take the [Tour].

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.

This one shoud be a good start
https://developers.cardano.org/docs/native-tokens/minting/


text:
Where is the Haskell course mentioned by Lars?
In the welcome video, Lars mentions about a 10-week Haskell course recording. Where can I get the link for that course? It would be good for other beginners as well.

Lars's courses are spread around various Youtube channels. I think that the one you are referring to is "Crypto Mongolia". Here it is:
https://youtube.com/playlist?list=PLJ3w5xyG4JWmBVIigNBytJhvSSfZZzfTm
And here is another course on Haskell that I found useful:
https://youtube.com/playlist?list=PLe7Ei6viL6jGp1Rfu0dil1JH1SHk9bgDV


text:
What is the difference between "cabal build" and "cabal repl"?
What does "cabal repl" does and how it differentiates from "cabal build"?
the documentation says:

loads all of the modules of the target into GHCi as interpreted bytecode

But I dont fully understand when do I need to use that command

In our context of smart contracts, cabal build builds the executables needed for doing cabal run, which we use to build the Plutus validator.
cabal repl, in the other hand loads all the modules that are in your project into GHCi, which is ready to be used in interpreted code. In this context you can test your validator or your off-chain code in an interactive way, which is useful to test behavior of specific functions in your code.


text:
How do you publish on-chain code to mainnet and testnet?
I've understand that the on-chain code is stored in the blockchain through Playground module which is in sync against a local node. But how to "publish" this code to run anywhere? It's an accessible process, It must have some "certification"?

First of all on-chain code isn't stored in the blockchain, the hash of on-chain code is.
To use on-chain validator on testnet or mainnet steps are:

Compile on-chain code into plutus script
Generate address from plutus script
Lock funds into plutus script address (Don't forget Datum!!!)
Pass plutus script for validation to unlock funds from plutus script address

You can try going trough Alonzo exercises for an example how to do all of these steps.
And as for certification I don't think there is an official available certification yet

I think that statement - that on-chain code is not stored on the blockchain - can be a little misleading. It might not be stored (or even executed) directly in that first locking transaction, but when you compose a transaction to spend those funds that transaction will hold the script, which will be stored and made visible on the blockchain and it is also executed directly on-chain by every node validating the transaction. Please correct me if Im wrong here.

(Looking at cardano-db-sync it even creates a table for the scripts that it takes directly from the blockchain: https://github.com/input-output-hk/cardano-db-sync/blob/2a0600a16425bce26b4973debc28cddfb45c6eb3/doc/schema.md#script)

To add to the answer, here's two resources on how to publish the on-chain code: https://plutus.readthedocs.io/en/latest/plutus/howtos/exporting-a-script.html
https://docs.cardano.org/plutus/Plutus-transactions (scroll down to 3. Create your transaction with the accompanying Plutus script(s))

Yeah, that seems to be true. The --tx-in-script-file param of cardano-cli transaction build is saving the file in the transaction, so a given node can run the script code from that transaction.


text:
cardano-wallet-js
I'd like to play around with cardano-wallet-js and see what can be automated with transactions and better understand how things work.
I get that I need first to install cardano-wallet and this is the only instruction I found on how to install it. But I incur in problems as I don't know how to use Docker ERROR: Couldn't connect to Docker at http+docker://localhost - is it running? even though docker service is running.
Is there any more throughout instruction on how to install cardano-wallet and then cardano-wallet-js?
Is there any other way to use cardano-wallet-js?
are there other tools that make it easier for a non very technical guy as me to make scripts for transactions and wallets?

If you don't have experience with docker, don't use it. It just adds another layer of complications. The easiest way to get a wallet up and running is to get the release binaries from the assets at the bottom of this page for your architecture: https://github.com/input-output-hk/cardano-wallet/releases/tag/v2021-12-15
Then you'll need to start both the node and wallet processes on your system. At that point you can run your nodejs code that talks to the API.
On the node side, read this to get a working node:
https://developers.cardano.org/docs/get-started/running-cardano/
On the wallet side, it's the serve command here that you want to run: https://input-output-hk.github.io/cardano-wallet/user-guide/cli:
At that point you can use cardano-wallet CLI to test it out and eventually point your nodejs code at wallet API to run your custom application.


text:
Error on "cabal build" - Week01 - warning is in EnglishAuction.hs
My cabal build ended in a warning - yet not sure if this needs to be resolved or if build completed ?
Seems like build aborted over a warning ?
Below is the warning that seems to have aborted the build
src/Week01/EnglishAuction.hs:43:1: warning: [-Wunused-imports]
    The import of ‘IO’ from module ‘Playground.Contract’ is redundant

Do I need to ignore working, or force build to continue with warnings, or of course try and remedy the code causing the warning.

Welcome to Cardano SE! As a new user be sure to take the [Tour].  I also suggest that you take a look at [ask]

Build was actually successful it seems - was just taken a back by the compiler warning.
I re-ran cabal build and then it just game me an output Up to date

This warning is not an error.
It was a complete build with some warning that could be ok in most of the cases. The compiler will tell you about unused variables or unused imports, like this case. Sometimes that is useful because it might lead you to identify an error.
This kind of warning are only shown the first time the file is compiled, that is why it didnt appear the second time you did the build.


text:
Nodejs Native token transaction
I am looking to build a native token transaction in nodeJS using either Cardanocli-Js or Cardano-wallet js but the documentation is massively lacking can anyone give me an example i can look over to understand what i will need to do.

Welcome to Cardano SE! As a new user be sure to take the [Tour].

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.


text:
Seller pays the fees?
Is it always the case the seller pays the fees? Is this built in the protocol or is it possible to have buyer pay the fees?

Can you please elaborate, what protocol are you talking about specifically?

What I saw in the English Auction sample is that who executes the action pays that action's fees.
The Start action is paid by who starts the action.
The Bid fees are paid by each bidder respectively

When you create a transaction to transfer ADA from an address to another address, you also pay the transaction fees.
If you mean other type of "seller" and "buyer", please give more details.

When you create a transaction to transfer ADA from an address to another address, you also pay the transaction fees. If you mean other type of "seller" and "buyer", please give more details.

Alice sends ADA to Bob for 1 of Bob's NFT token. Alice is buyer and Bob is seller. But now I can see that Bob can't sell anything anyway without the transaction to sell being in the network and to be in the network he has to pay the fees. At any rate if the buyer does agree to pay the fees, they can just both agree on a rebate on the sell price.


text:
Funds not appearing in wallets for highly separate generated addresses
We noticed this situation with sending ADA to a wallet using addresses generated from cardano-address (according to the specifications on https://github.com/input-output-hk/cardano-addresses) which are separated by more than several hundred.
Situation
When we send a payment (from Nami or CCVault or wallet-server for example) to an address that is generated by the 2000th key (for example, it just needs to be something more than a few hundred above 0), we see that the transaction posts to the blockchain but is not recognized by any wallet (Nami or CCVault).
However, when you send payment to an that is recognized (something within about 200 addresses from 0th address or 200 addresses from the previously wallet-recognized transaction), you can sequentially increase the addresses by about 200 until you reach within 200 of the initial high-numbered address and then the transaction to the high-numbered address will suddenly appear (even if it is days later).
Question
Can we be certain that the high-n incremented addresses will post to a wallet for verification?
Here is an example of two days worth of transactions.
Day 1 Jan 16
2000th addr tx 2000th address /0/2000 DATUM MSG 2000 - JAN 16, 18:16 PST
200th addr tx 200th address /0/200 DATUM MSG 200 - JAN 16, 18:21 PST

200 SHOWN IN WALLET 18:22 PST
2000 NOT SHOWN IN WALLET 18:22 PST

400th addr tx 400th addr /0/400 DATUM MSG 400th - JAN 16, 18:32 PST

400 SHOWN IN WALLET 18:32 PST
2000 NOT SHOWN IN WALLET 18:32 PST

600th addr tx 600th addr /0/600 DATUM MSG 600th - JAN 16, 18:33 PST

600 SHOWN IN WALLET 18:33 PST
2000 NOT SHOWN IN WALLET 18:33 PST

800th addr tx 800th addr /0/800 DATUM MSG 800th - JAN 16, 19:20 PST

800 SHOWN IN WALLET 19:20 PST
2000 NOT SHOWN IN WALLET 19:20 PST

Day 2 Jan 17
1000th addr tx 1000th addr /0/1000 DATUM MSG 1000th - JAN 17, 09:49 PST

1000 SHOWN IN WALLET 09:49 PST
2000 NOT SHOWN IN WALLET 09:49 PST

1200th addr tx 1200th addr /0/1200 DATUM MSG 1200th - JAN 17, 09:53 PST

1200 SHOWN IN WALLET 09:53 PST
2000 NOT SHOWN IN WALLET 09:53 PST

1400th addr tx 1400th addr /0/1400 DATUM MSG 1400th - JAN 17, 09:57 PST

1400 SHOWN IN WALLET 09:57 PST
2000 NOT SHOWN IN WALLET 09:57 PST

1600th addr tx 1600th addr /0/1600 DATUM MSG 1600th - JAN 17, 09:59 PST

1600 SHOWN IN WALLET 09:59 PST
2000 NOT SHOWN IN WALLET 09:59 PST

1800th addr tx 1800th addr /0/1800 DATUM MSG 1800th - JAN 17, 10:02 PST

1800 SHOWN IN WALLET 10:02 PST
2000 NOT SHOWN IN WALLET 10:02 PST

2000 SHOWN IN WALLET JAN 17, 10:17 PST

Cardano addresses use the BIP-32 standard for key derivation. This allows a very large (2^31-1) number of addresses to be created per account index, per master seed.
Being that most computers running wallet software do not have enterprise level specs, it is not feasible (nor necessary) for them to query the chain for such a large number of addresses. For this reason, wallet software(s)' "address discovery" is throttled by an address-gap parameter that limits how many address indexes are derived and queried, as described in BIP-44. In short,

If N is the gap-parameter

And X is the highest index with UTXO's currently recognized by the wallet

Then the wallet software will check all indexes from 0 to X+N

Most wallet software has this limit set to 20 by default, but my guess is yours was set to 200, since your examples are all separated by 200 indexes. In case funds live at a very high index number that you don't want to query all the way up to, you can always manually derive the spending key for that single address using cardano-addresses.

20 as the gap is probably configurable. We see in both Nami wallet and CCVault wallet that they will pick up even with a gap of 200.


text:
Can one find the English Auction Example on the Playground somewhere?
I want to open the English Auction example. I was looking for it on the playground, but couldn't find it. Where did I go wrong?
First I have checked out the commit with SHA1 hash 41149926c108c71831cfe8d244c83b0ee4bf5c8a in the plutus-apps repo. Then I have build the playground server with nix-build -A plutus-playground.server as was suggested in a hint on the IOHK discord server (no link unfortunately, since not accessible from everywhere). I do not know what this did, but I remember it worked. Then I opened another terminal and inside this same repo I ran nix-shell and then changed directory to the plutus-playground-client. I ran plutus-playground-server, which seemed to have started the server without any mentionable warnings or errors:
$ plutus-playground-server
plutus-playground-server: for development use only
[Info] Running: (Nothing,Webserver {_port = 8080, _maxInterpretationTime = 80s})
Initializing Context
Initializing Context
Warning: GITHUB_CLIENT_ID not set
Warning: GITHUB_CLIENT_SECRET not set
Warning: JWT_SIGNATURE not set
Interpreter ready

Then I opened another terminal window, navigated to the plutus-apps repo again, ran nix-shell. cd-ed into the plutus-playground-client again and ran npm run start, which resulted in this output:
$ npm run start

> plutus-playground-client@1.0.0 start /home/myname/plutus-apps/plutus-playground-client
> plutus-playground-generate-purs && npm install && npm run install:spago && npm run build:webpack:dev

[Info] Running: (Nothing,PSGenerator {_outputDir = "generated"})
The following purescript packages are needed by the generated code:

  - plutus-playground-client
  - purescript-argonaut-codecs
  - purescript-either
  - purescript-enums
  - purescript-lists
  - purescript-maybe
  - purescript-newtype
  - purescript-ordered-collections
  - purescript-prelude
  - purescript-profunctor-lenses
  - purescript-tuples
  - web-common

Successfully created your PureScript modules!

Successfully created your servant API purescript functions!
Please make sure you have purescript-servant-support and purescript-bridge-json-helpers installed

Done: generated
npm WARN ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN monaco-emacs@0.2.2 requires a peer of monaco-editor@^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0 || ^0.19.3 || ^0.20.0 but none is installed. You must install peer dependencies yourself.
npm WARN plutus-playground-client@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 752 packages in 4.172s

42 packages are looking for funding
  run `npm fund` for details

found 29 vulnerabilities (2 low, 17 moderate, 10 high)
  run `npm audit fix` to fix them, or `npm audit` for details

> plutus-playground-client@1.0.0 install:spago /home/myname/plutus-apps/plutus-playground-client
> spago install

> plutus-playground-client@1.0.0 build:webpack:dev /home/myname/plutus-apps/plutus-playground-client
> webpack-cli serve --progress --inline --hot --mode=development --node-env=development

10% building 0/1 entries 0/0 dependencies 0/0 modulesℹ ｢wds｣: Project is running at https://localhost:8009/
ℹ ｢wds｣: webpack output is served from /
ℹ ｢wds｣: Content not from webpack is served from /home/myname/plutus-apps/plutus-playground-client/dist
⚠ ｢wdm｣: WARNING in Src   Lib    All
Warnings   0     0/28   0/28
Errors     0     0      0

70 WARNINGS in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 71 warnings
ℹ ｢wdm｣: Compiled with warnings.

If I remember correctly I then could already see stuff running on the https://localhost:8009 (ignoring the warnings about the self-signed certificate). Anyways I continued following the week01 instructions and opened the plutus-apps once more, executed the nix-shell again and then navigated to the repo of the plutus-pioneer-program, which I had cloned earlier. There I changed directory to code/week01 and
$ cabal update
$ cabal build

the project. However the auction game is not visible anywhere. The plutus playground is visible on https://localhost:8009, but I do not see the auction game. Help anyone?

You have to copy the file plutus-pioneer-program/code/week01/src/Week01/EnglishAuction.hs manually and paste it in the playground running in the Browser(you can delete the text in an example contract that is in the playground already and paste it in its place) and compile.
For example one handy cli method in 2 steps is
step-1: xclip -i plutus-pioneer-program/code/week01/src/Week01/EnglishAuction.hs
step-2: simultaneous right and left mouseclick to paste and erase from clipboard.(Paste in the playground running in the browser)
cabal build command is useful so that you can run cabal repl from the terminal for an interactive session with the auction contract.

Typo in xclip

add two empty spaces after a line for new-line so that steps 1 and 2 start at new lines.

Thanks. Where should I copy the EnglishAuction.hs into? Into the plutus-apps/plutus-playground-client directory? Why can I not just use cp ? Where do I run the cabal build? and when? before or after I run the server?

Should one typically run the cabal build inside the nix-shell, I guess so right?

I copied the EnglishAuction.hs into the plutus-playground-client directory (actually with cp, the double clicking thing didnt work for me the first time) and cabal build everthing inside a nix-shell again in that directory (dont know whether that was necessary). Then I started the server and npm run start in another nix shell. The playground opens up again, but I do not see the EnglishAuction. I see (as before):  "Demo files",  "Hello, world", "Starter", "Game", "Vesting", "Crowd Funding" and "Error Handling". But no English Auction. Maybe I'm looking in the wrong place?


text:
Plutus local haddock server not working
The problem: when I run build-and-serve-docs from within a nix-shell and inside the plutus-app repository, the server runs up and on the CLI i get the message Serving HTTP on 0.0.0.0 port 8002 (http://0.0.0.0:8002/) .... But, when I try to navigate to this address, I get a Not possible to access error message. As if the server was not even running, because I don't even get an HTTP error response.
My environment: WSL2.

Maybe try http://127.0.0.1:8002/ ? Both that and 0.0.0.0 work for me

Once the shell tells you this:

Serving HTTP on 0.0.0.0 port 8002 (http://0.0.0.0:8002/)

Just go to this location:
http://localhost:8002/haddock/
The given 0.0.0.0:8002 does not work, however these do work:
http://localhost:8002/haddock/
http://localhost:8002/
(Im using WSL too)

This did the trick, but I had to do a cabal build first as well. Forgot about it.

One more comment. 127.0.0.1 also works (of course).


text:
Plutus Cohort 3: slot count why 11 and not 14
I ran the auction exactly as shown. The slot count at the closing (after the additional wait) comes up to 14, not 11, as shown in the video. (if I add all the waits, the result is, indeed, 14). If the wait after Wallet3 bids is set to 8 (instead of 1), the final count is 11. Just puzzled! Thanks

Can you share a screenshot of your playground steps that are being executed?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

I believe in step 6 you're probably not setting the wait to "wait until" slot 11, but instead your waiting "for" 11 slots.
(The reason for setting this to 11 was to wait until right after the deadline (spDeadline) which was set to slot 10)


text:
plutus playground simulator wait action question
When using the plutus playground simulator:

I'm having trouble finding documentation on the simulator wait actions.  What are the differences in functionality between the "wait for" and "wait until" actions?
Why did the week 1 auction example require a "wait for" 1 slot action after the close function?

"wait for" will wait for x slots until the next transaction is processed. "wait until" will wait until slot x is reached and will then process the next transaction.

You need a block that includes the close transaction. Without this extra block the close action is never executed.


text:
PPP Cohort 3 - Q&A Week1: How are eUTXOs prioritised?
As you perform transactions on the blockchain, you generate unspent transaction outputs of various sizes. When you create a new transaction, how are the UTXOs prioritised, i.e. which ones will be used first? Is it possible to specify which of your UTXOs you want to use? If I have one large UTXO and one small UTXO and I want to make a transaction with:
large UTXO > transaction value > small UTXO
Will the large UTXO automatically be used, or may I end up using both, and therefore leaving only a single UTXO as a result?

Welcome to Cardano SE! As a new user be sure to take the [Tour].

You can find a great quick read on this topic here: https://cips.cardano.org/cips/cip2/#algorithms (or a big long one here https://iohk.io/en/blog/posts/2018/07/03/self-organisation-in-coin-selection/)
Basically it's the job of the wallet (or whoever composes the transaction) to implement such a selection strategy.
Two of those strategies proposed are "Largest-First" (similar to what you mentioned) and another is "Random-Improve".
If you're interested, here's how the cardano-serialization-lib implemented the algorithms in practice in rust: https://github.com/Emurgo/cardano-serialization-lib/blob/6a8c67a0fdb2ac6d72132d9693b87a6734f3fed5/rust/src/tx_builder.rs#L329
While Cardano Wallet gives priority to Random-Improve, there might be cases where you need to use Largest First, e.g. when creating multi-asset transactions with this lib (https://github.com/Emurgo/cardano-serialization-lib/blob/6a8c67a0fdb2ac6d72132d9693b87a6734f3fed5/rust/src/tx_builder.rs#L370).
When you create the transaction yourself, eg through the Cardano CLI, you can also freely select which utxo to spend.

I believe it's the same as with paying with cash: you have in principle the option of paying with the largest bill you have, so you make sure the amount is covered and you don't have to do a lot of maths, of getting rid of all the small coins you need to spend to reach the desired amount so you don't have to carry them in your pocket, or even of paying with the bill that is closest to the amount you have to pay to make it easy for the one giving you the change. As far as I know, wallets usually implement heuristics combining (at least the) first two options, so not just one strategy. I don't think it makes that much of a difference though, in the end money is money.


text:
How does setting up our environment for the course differ from what we'd be doing in production?
I was able to set up my development environment for the course thanks to the help from others in the discord and the guides they developed.  I understand that this helps us set up the plutus playground in our local environment for the course.
My question is: How does this setup differ from what we'd end up using for a contract in a production environment?  Is there additional infrastructure required to run smart contracts in mainnet production?

Later in the course, I think we'll get into using PAB and submitting smart contracts on-chain. At the first stage here, the focus is on simulated contracts. There's some additional steps to get the hashes that need to go into the tx and other things.

I did the Plutus Pinoer Cohort 3 and can confirm there is an End-2-End example in the course that comes out near the end.
As the previous cohorts are online there's no reason you cant watch those videos in advance: https://www.youtube.com/watch?v=TfWKxdli4eI&list=PLNEK_Ejlx3x2sBWXHdFBRgkzPF6N-1LVi


text:
Q&A English Auction- if a wallets under bids then provides a valid bid, why doesn't it count the second good bid?
if you set up the english auction with three wallets and do the following:

Wallet 1 min bid 10
Wallet 2 bids 15
wallet 3 bids 9
wallet 3 bids 20
wallet 1 closes
It will got to wallet 2 and wallet three's second bid never shows up. Is this a bug or intended?

It is a bug in the off-chain code. In step 3 in your example, wallet 3 bids under the minimum. This throws an error which triggers a bug that causes all subsequent bids from wallet 3 to be ignored.
It happens on lines 280-281 when the error is thrown.
If you replace those 2 lines with this, it should work:
if (bpBid < minBid d)
  then logError @P.String $ printf "bid lower than minimal bid %d" (minBid d)
  else do

Credit to @kindofdev for showing me the fix.


text:
HLS Compiler Error PPP (WSL2 + VSCode)
I'm trying to get HLS (Haskell Language Server) working in VSCode using WSL2 so I can get type hints. I've already ran through the week01 instructions so I have a working nix installation. However, when I run code within nix-shell to start the VSCode workspace, EnglishAuction.hs code fails in compilation. I tried removing the module section, suggested in this answer but the same error appears.
Here's the error message:
loadObj "/nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z-persistent-sqlite-lib-persistent-sqlite-2.13.0.3/lib/x86_64-linux-ghc-8.10.4.20210212/persistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4/HSpersistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4.o": failedcompiler

Edit:
Here's the entire output when I run haskell-language-server in the week01 directory:

haskell-language-server version: 1.3.0.0 (GHC: 8.10.4.20210212) (PATH: /nix/store/1f5m9aq39by56hbky1pz7dd52f4ikam8-haskell-language-server-exe-haskell-language-server-1.3.0.0/bin/haskell-language-server)
 ghcide setup tester in /home/pioneer/plutus/plutus-pioneer-program/code/week01.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/pioneer/plutus/plutus-pioneer-program/code/week01
Found 1 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  (/home/pioneer/plutus/plutus-pioneer-program/code/week01/hie.yaml)

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files
2022-01-17 22:25:09.635127929 [ThreadId 68] INFO hls:   Consulting the cradle for "src/Week01/EnglishAuction.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/pioneer/plutus/plutus-pioneer-program/code/week01", cradleOptsProg = CradleAction: Cabal}
> Build profile: -w ghc-8.10.4.20210212 -O1
> In order, the following will be built (use -v for more details):
>  - plutus-pioneer-program-week01-0.1.0.0 (lib) (first run)
> Preprocessing library for plutus-pioneer-program-week01-0.1.0.0..
2022-01-17 22:25:10.848135893 [ThreadId 68] INFO hls:   Using interface files cache dir: /home/pioneer/.cache/ghcide/plutus-pioneer-program-week01-0.1.0.0-inplace-2ae4e5079a2a61a27b33a1e5e2d7b5d8b0af7455
2022-01-17 22:25:10.848331503 [ThreadId 68] INFO hls:   Making new HscEnv[plutus-pioneer-program-week01-0.1.0.0-inplace]
GHC runtime linker: fatal error: I found a duplicate definition for symbol
   sqlite3_fts3_may_be_corrupt
whilst processing object file
   /nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z-persistent-sqlite-lib-persistent-sqlite-2.13.0.3/lib/x86_64-linux-ghc-8.10.4.20210212/persistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4/HSpersistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4.o
The symbol was previously defined in
   /nix/store/si95pc9hb5hr1yiyj7b2s75hl4bkn9g2-direct-sqlite-lib-direct-sqlite-2.3.26/lib/x86_64-linux-ghc-8.10.4.20210212/direct-sqlite-2.3.26-Gg0YVBPVrMk3LDxZxB2Bzf/HSdirect-sqlite-2.3.26-Gg0YVBPVrMk3LDxZxB2Bzf.o
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
2022-01-17 22:25:13.842245999 [ThreadId 205] INFO hls:  File:     /home/pioneer/plutus/plutus-pioneer-program/code/week01/src/Week01/EnglishAuction.hs
Hidden:   no
Range:    1:1-2:1
Source:   compiler
Severity: DsError
Message:
  loadObj
  "/nix/store/jmhwwzn1yfjzlxavz16afkf1r4shmp8z-persistent-sqlite-lib-persistent-sqlite-2.13.0.3/lib/x86_64-linux-ghc-8.10.4.20210212/persistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4/HSpersistent-sqlite-2.13.0.3-8rnIaulr0SMFWDeiU7TZN4.o":
  failed
2022-01-17 22:25:13.842471029 [ThreadId 222] INFO hls:  finish: User TypeCheck (took 2.97s)
2022-01-17 22:25:13.842626898 [ThreadId 226] INFO hls:  finish: GetHie (took 0.00s)
Files that failed:
 * /home/pioneer/plutus/plutus-pioneer-program/code/week01/src/Week01/EnglishAuction.hs

Completed (0 files worked, 1 file failed)
2022-01-17 22:25:13.842743468 [ThreadId 228] INFO hls:  finish: GenerateCore (took 0.00s)

Edit2:
The workaround from this answer allowed me to view more documentation, but still waiting for a complete solution.

there is a workaround how to replace that error by GHC Core to PLC plugin; E043:Error Haskell Language Server - linker error: symbol sqlite3_fts3_may_be_corrupt
other error should be solvable using this: https://github.com/input-output-hk/plutus-apps/blob/main/doc/plutus/troubleshooting.rst
but it didn't work for me

There are guidelines for referring to external sources in the [help]

Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.