text:
Building local Plutus documentation
I've been following this guide to build Plutus documentation locally.  The key line is -
[~/plutus] nix-build -A plutus-playground.haddock

This works fine, but I'm following the Pioneer Program and this requires checking out specific commits each week in order to follow the lesson.  When re-building the documentation, the resulting docs doesn't seem to reflect the tag that I've checked out.
My steps are -

git pull origin master to get the latest commits
git checkout of the tag specified for the week
rebuild the documentation using nix-build -A plutus-playground.haddock

I'm guessing that there is some caching going on that I'm not cleaning up but, if I compare the source files in the plutus dir they don't match the source that is linked to in the documentation.
Should mention that I have a superficial understanding of both nix and haddock.
Any guidance appreciated :)

I've not tried building the documentation. But here is what I use

Thanks @Aoaddeola . That works for the latest version, but the API changes quite a lot from week to week. It makes it hard to follow the lectures when the docs that Lars is referencing are different from the latest.  The lectures themselves are a lot to take in, so easier when you can follow what he's pointing out 1:1.

You can say that again, Phil. I also find myself having to figure out the latest signature of functions through searching Github using Keywords... It sure would be nice to know how to build the documentation.

There is also an option to build the documentation using docker, I tried it and it failed when starting it using docker-compose. Have you tried this option? The commands you need are docker-compose build --no-cache followed by docker-compose up in the /docker directory.

I have been building the documentation with
[~/plutus] nix-build -A plutus-playground.haddock

following the Plutus Community guide and
nix build -f default.nix docs.site

from the Plutus repo and they both work as expected, generating the documentation for the current checkout.
The most probable cause for the issue is that git may not have updated as expected, i.e. throwing an error due to changed files in the local repo. That happened to me a few times when I was switching between the pioneer lecture weeks.
And in my opinion it is worth to set up the webserver as per the Plutus Community instructions, it makes the up to date documentation a great resource!

How to build local Plutus document:

cd plutus
nix-shell
nix build -f default.nix docs.site
cd result
python3 -m http.server 8081

Try open http://localhost:8081/haddock/plutus-ledger-api/html/Plutus-V1-Ledger-Value.html#g:1

this worked for me

I keep finding myself coming back here as i hate remembering commands.
So I somewhat automated the process. On Ubuntu (Unless you disable your Firefox browser) the following script will build and launch your plutus docs.
To use it copy the script to your plutus folder and activate your environment with nix-shell.
Then run the bash script from the terminal using the command:
sh Make_Docs.sh
You can get the Make_Docs file from my plutus automation repo.


text:
ZeroKnowledge Proofs in Plutus?
From what I heard Plutus / Smart Contracts will bring also the possibility to do Zero Knowledge Proofs.
But I struggled to find further Details in the Documentation.
So here are my Questions:
Anyone knows where to find more detailed documentation on how / if ZK Proofs will be implemented in Plutus.
If ZK Proofs will be implemented into Plutus are they limited to the domain of ada / token transactions or can they be considered as some sort of ZK Framework to proof other Datasets from other Domains as well (i.e. age)?

Some info can be found in this document: https://iohk.io/en/research/library/papers/soniczero-knowledge-snarks-from-linear-size-universal-and-updateable-structured-reference-strings/
Some bits in this video with Markulf Kohlweiss about Zk-SNARK https://www.youtube.com/watch?v=cAJERtcZamc
And in this video of Charles: https://www.youtube.com/watch?v=M67Z1d-sUug
However looking at it from the perspective of someone trying to apply it to real world problems it all still seems to be in the research phase?

Yes, Plutus makes it possible to validate zero knowledge proofs as it is a Turing-complete language. However, verifying zero knowledge proofs can be very complex, and go over the execution budget. To allow for a more efficient execution of zero knowledge proofs, the IOG team is working in introducing built-in functions of the most expensive operation required when verifying pairing-based zk-proofs, pairings. These type of proofs have the most efficient verifiers. You can find more information on the use cases of pairings in the draft CIP (note that this is a draft as it stands).
https://github.com/cardano-foundation/CIPs/pull/220
There is a bunch of different possible ZK proofs, and implementing a ZK verifier does not necessarily bound the statements that one can verify. IOG is involved in an open source effort of the implementation of Plonk, one such proving system.
https://github.com/ZK-Garage/plonk
However, there are no concrete plans on when this will be used to verify statements on chain.

source: Stack Exchange

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

sort: votes


text:
Plutus Pioneer Cohort 2 Lecture 3
I was going through the lecture on Youtube and this is the one with Vesting example where:

wallet 1 gifts 20 ADA to wallet 2 in 2 different slots
wallet 1 gifts 10 ADA to wallet 3 in a slot
later on, wallets 2 & 3 will grab those gifts after a deadline is passed

So, wallet 1 generates 2 UTXO for wallet 2 to grab & spent. I noticed in the playground that the first UTXO for 10 ADA at script is shown to be spent but the second UTXO is not. But finally, I can see that wallet 2 receives 20 ADA gift in total. Why second UTXO created by wallet 1 to gift wallet 2 is shown unspent although it is spent later on?
Wallet 1 creating gift UTXO for wallet 2 & it is shown spent
Wallet 1 creating gift UTXO for wallet 2 & it is shown unspent
Finally, we can see both UTXO are spent

Unless I'm truly misunderstanding something, this looks like a bug in the playground.

I agree. I think this is a bug in a playground, just needed to make sure.

Please log a github issue for this https://github.com/input-output-hk/plutus-apps
I will make sure it gets followed up on

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.

I logged a ticket for it in github https://github.com/input-output-hk/plutus-apps/issues/244

Most likely a bug in the playground.

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


text:
Pioneer Lecture 4 recursion - how is it not infinite?
In the solution for the Lecture #4 (cohort 1 I guess, I'm following on Youtube)
payContract :: Contract () PaySchema Text ()
payContract = do
      pp <- endpoint @"pay"
      let tx = mustPayToPubKey (ppRecipient pp) $ lovelaceValueOf $ ppLovelace pp
      handleError (\err -> Contract.logInfo $ "caught error: " ++ unpack err) $ void $ submitTx tx
      payContract

It appears that payContract calls itself, and this is required to get the payTest1 and payTest2 functions to actually run.
My question is: how does this not recurse infinitely? Where is the condition that stops it?
I'm still learning Haskell as I go and I come from a C# background, so I'm still getting my head around the functional programming thing.
TIA

payContract blocks on the first line of the do block until the pay endpoint is invoked. The input of the invocation is put in pp.
pp <- endpoint @"pay"

It then executes the endpoint invocation by creating the transaction and submitting it, and returns to the blocked state waiting for the next invocation.
It does recurse indefinitely, thus ensuring that the contract endpoints are available.

Thanks @vcwebco - that makes sense. When I am running the Emulator from the cmd line by calling payTest1:
payTest1 :: IO ()
payTest1 = runEmulatorTraceIO $ payTrace 1000000 2000000
does the payContract fn keep running while it's blocked listening for the endpoint call in a separate thread even after payTrace returns?
How does the Emulator know to stop listening for endpoint calls?

@marcel_g - contracts get activated within the context of a wallet, e.g in payTrace with code line h <- activateContractWallet (Wallet 1) payContract. That makes the endpoint(s) available for invocation, e.g. with callEndpoint @"pay" h $ PayParams. Note that activation is not global. The visual representation in the playground simulator shows wallets with the contract already activated (buttons), and with the ability to add more.

Simply put, it could recurse infinitely.
Haskell doesn't have loops, so this is the equivalent of a while loop or something, where the exit case is the Contract monad throwing an error.
If you want to learn more, check out this page on tail recursion in Haskell.


text:
How does `submitTxConstraintsWith` make usage of the ScriptLookups?
submitTxConstraintsWith :: ScriptLookups a -> TxConstraints (RedeemerType a) (DatumType a) -> Contract w s e Tx
How does submitTxConstraintsWith make usage of the ScriptLookups?
I always see it used like this: ledgerTx <- submitTxConstraints (swapInst oracle) tx
I am wondering why the ScriptLookups?

The family of submitTx functions all create transactions from the constraints submitted in the arguments. The most general implementation of the function is
submitTxConstraintsWith
  :: ScriptLookups a
  -> TxConstraints (RedeemerType a) (DatumType a)
  -> Contract w s e Tx

Here ScriptLookups a takes a lookup of the (Plutus compiled) scripts that are required by the transaction for on-chain execution.
This link gives an overview of the functions that are implemented. I added it as illustration as I don't know what Plutus commit it belongs to.

So, the transaction that ends up being submitted to the network will have as output/UTXO the script, right? instead of say a public key hash for example. ? @vcwebco

Not as output, but as constraint. In the case of a script the constraint is a validator that upon execution must return true for the transaction to succeed. The spending transactions that consume UTXOs from the smart contract need to supply validator script hash and (compiled) code. The producing transactions only need to supply the validator hash. It is explained  in the Plutus Pioneer Program - Iteration #2 - Lecture #2 video at minute 37.


text:
"description error" occurred in Yoro Wallet
description error keeps popping up when I try to delegate or send a full delegation from Yoroi. What is the solution?

Can you please give a more detailed description of what you're trying to do? A screenshot would help too.


text:
Making Dapps with Flutter
I have not used Plutus yet, but I’m in the pioneer program and will start soon. I am wondering if you can integrate the smart contract code with Flutter as a front end?

Sure, as long as you have a backend that runs a full node and can submit your transactions to the network. Or you could use a third party API like https://blockfrost.io to achieve the same.

Checked out blockfrost.io, I see you can send transactions and query the blockchain but I don't see anything about smart contract calls. Sorry I'm a newbie. Hope we get like an ethers.js package

Smart contracts are not supported by the blockfrost API yet since they are not available on the mainnet and testnet yet. But they should add it in the near future I think.


text:
What is the benefit of installing plutus playground locally?
In these instructions for working through the plutus pioneer program, it suggests installing the playground locally:
https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-playground/starting-plutus-playground
However, the end result is to then just use the same web gui but on your localhost instead of running it on:
https://playground.plutus.iohkdev.io/
So, are those docs just outdated or is there some advantage to running it locally?
Thanks!

The Plutus playground deployed on playground.plutus.iohkdev.io is often out of date and might contain bugs that are already fixed in upstream.

Thanks for your answer; however, the latest can sometimes also have fresh bugs.  I would think that the online playground would be a more stable version.  Additionally, from a functionality standpoint are you saying there is no difference?  If there is no functional difference then there would be no functional benefit.


text:
Weird behavior on validation of outputs
So I have a validator that, in particular, checks how many outputs are produced.
os = txInfoOutputs info
mkValidator :: ...
mkValidator = traceIfFalse "Wrong outputs" checkOutput
  where
    info :: TxInfo
    info = scriptContextTxInfo ctx

    checkOutput :: Bool
    checkOutput = let os = txInfoOutputs info in
                  length os == 2

I know, thanks to PAB outputs that there are two outputs from my transaction, so I want my validator to validate that there are indeed two outputs : length os == 2.
When I write length os > 1 it returns True, everything goes as planned, as it should.
When I write length os > 2 it is False, the contract outputs an error and stops, as it should.
But when I write length os == 2 it does not validate but instead I have this :
Slot 00003: W1: TxSubmit: c198a060020e58b3e3df37da4be3e6d265a48caa8dd0aaf256fed18aa4244828
Slot 00003: TxnValidationFail Phase2 c198a060020e58b3e3df37da4be3e6d265a48caa8dd0aaf256fed18aa4244828: ScriptFailure (EvaluationError ["Wrong outputs"])
Slot 00004: *** CONTRACT LOG: "Done"

This "Done" message is defined as following :
ledgerTx <- submitTxConstraintsWith lookups tx
void $ awaitTxConfirmed $ txId ledgerTx
logInfo @String "Done"

So it should only be displayed when the Tx is confirmed. It clearly is not here when I check the balances afterwards. The weird thing is also that I don't have an error but a warning (I see this in PAB log) and the off-chain code goes on as the tx was validated.
Last weird behavior is that after this "semi-validated" tx, Wallet 1 (on which the contract is run) is gone. Its ADA balance is empty, and not just display bug, when I try another Tx after this, I get an error for insufficient funds. Whereas when the Error is real, when the contract stops (for example when the validator is length os > 2) the balance of wallet 1 is unchanged since on Cardano we don't pay fees for invalid transactions.
Plutus tag : 7b5829f2ac57fcfa25a5969ff602b48641b36ac3 (Second Cohort Lecture 10, Plutus Pioneer Program)
Here is a complete PAB output for the transaction, with the Tx details :
[INFO] W1: Balancing an unbalanced transaction:
             Tx:
               Tx 22bbd35920a7a027d367e55b292e4321ede0d7d55939a56bd036cf2e5979f30d:
                 {inputs:
                    - 92abe5e3f5f3f0c5606d3bec6b7d3cb282c83f27cf36af30ad0371dba94b73d9!20
                      <>
                    - 92abe5e3f5f3f0c5606d3bec6b7d3cb282c83f27cf36af30ad0371dba94b73d9!21
                      <>
                 collateral inputs:
                 outputs:
                   - Value (Map [(a37ef7cfe1af45ac35b307abd9c26bad4bbcfe75d0d13ed90b4d8fd4,Map [("NFT3",1)])]) addressed to
                     addressed to ScriptCredential: 88b9547195adbac7487a52e27f48766a2bab50d78e396e18e4bf7574 (no staking credential)
                   - Value (Map [(a37ef7cfe1af45ac35b307abd9c26bad4bbcfe75d0d13ed90b4d8fd4,Map [("NFT1",1)])]) addressed to
                     addressed to PubKeyCredential: bcc083ade3fdd0a372cb6c43ef00ef02fcb52e9532941117d7609d6a (no staking credential)
                 mint: Value (Map [])
                 fee: Value (Map [])
                 mps:
                 signatures:
                 validity range: Interval {ivFrom = LowerBound NegInf True, ivTo = UpperBound PosInf True}
                 data:
                   <<20>, 2, "NFT2">
                   <<20>, 1, "NFT1">}
             Requires signatures:
             Utxo index:
               ( 92abe5e3f5f3f0c5606d3bec6b7d3cb282c83f27cf36af30ad0371dba94b73d9!20
               , - Value (Map [(a37ef7cfe1af45ac35b307abd9c26bad4bbcfe75d0d13ed90b4d8fd4,Map [("NFT1",1)])]) addressed to
                   addressed to ScriptCredential: 88b9547195adbac7487a52e27f48766a2bab50d78e396e18e4bf7574 (no staking credential) )
               ( 92abe5e3f5f3f0c5606d3bec6b7d3cb282c83f27cf36af30ad0371dba94b73d9!21
               , - Value (Map [(a37ef7cfe1af45ac35b307abd9c26bad4bbcfe75d0d13ed90b4d8fd4,Map [("NFT3",1)])]) addressed to
                   addressed to ScriptCredential: 88b9547195adbac7487a52e27f48766a2bab50d78e396e18e4bf7574 (no staking credential) )
             Validity range:
               (-∞ , +∞)
[INFO] W1: Finished balancing. 24d1a8fc3ac99077bed9d04282f18b3f40aff2a89468ca5bfa1a77b52a34d921
[INFO] W1: Submitting tx: 24d1a8fc3ac99077bed9d04282f18b3f40aff2a89468ca5bfa1a77b52a34d921
[WARNING] Slot 121: TxnValidationFail Phase2 24d1a8fc3ac99077bed9d04282f18b3f40aff2a89468ca5bfa1a77b52a34d921: ScriptFailure (EvaluationError ["No other outputs allowed","Pd"] "CekEvaluationFailure")
[INFO] 63e43944-1885-44aa-b7c8-d6aa7f369438: "Done"

Thanks for any opinion on this.

Do you have a complete example to illustrate the described behavior? I tried a simple give/grab contract (similar to the one in lecture 2 of the Plutus Pioneer Program) with the same validator as you, but I don't see the issue. In my case, if the validator fails, then the log message isn't displayed as I get an error and not a warning.

What exactly do you want to know or see? So I don't post too long code here. I'll post the entire PAB output leading to the warning. And I'll try to reproduce the error with a as small as possible code and I'll post the Github link here to it.

have you tried the same code in the plutus playground?
Do you know if the PAB includes gas fees?

It does not work in EMU neither, haven't tried the playground. I had thought of fees but why this in between return? If fees are considered a real output, the return should be a real false. I use this as a workaround length os > 1 && length os <= 3


text:
There is a CPU spike once per hour when logging "TraceLedgerEvent.TookSnapshot". Is it a bug, or is there a fix?
About once an hour, when TraceLedgerEvent.TookSnapshot is written to the log, there is a CPU spike and at the same time the slotMissedNum is increasing. Is this a bug in the node? Or is there a fix?
cardano-node v1.27.0
CPU 6Core
Mem 16GB

+1. Welcome to our new community and thank you so much for contributing your question here! We hope to see much more of you in the future !!! Please take a look at the edits that I suggested since they may improve how well your question is received here.

That CPU usage spike is only at most 8% of the CPU capacity, which is extremely small. I get spikes on my laptop CPU of 100% for longer time intervals than the spikes here, when just casually browsing the web.
If anything is being written anywhere on the computer, or anything is happening such as slotMissedNum increasing, I would  expect a CPU usage spike of around the size of the extremely small spikes you're seeing here.
I hope that takes care of the CPU spikes part of the question. If you believe that the increasing of slotMissedNum is a bug, then that's a different matter, for which I'm not immediately able to offer a solution, but that bug can be addressed entirely independently since the CPU spikes do not create any additional concerns.

Some of you have pointed out the same problem, what do you think?
https://github.com/input-output-hk/cardano-node/issues/2731

To clarify on the above answer, this spike occurs when it rights the state of the ledger in memory to disk at an interval. As the above comment states, it's a very small spike. If we didn't do this periodically, you'd have to rebuild the entire ledger state from scratch every restart of the node.

I think you mean, as the above answer indicates.


text:
How to convert BuiltinData to BuiltinString?
Since I just started to write Plutus code, I want to make some tests of Plutus.
For example, I'd like to know what exactly my redeemer :: BuiltinData value is. However I can't convert BuiltinData to BuiltinString which means I can't use trace :: BuiltinString -> a -> a to log it.
Is it possible to convert BuiltinData to BuiltinString or there is different approach to log redeemer?

Since BuiltinData derives Show:
newtype BuiltinData = BuiltinData PLC.Data
    deriving newtype (Show, Eq, Ord)

and there's the function:
stringToBuiltinString :: String -> BuiltinString found here in PlutusTx/Builtins/Class.hs
Assuming your "variable name" is dummyBuiltinData, you can convert BuiltinData to BuiltinString using:
stringToBuiltinString $ show dummyBuiltinData
EDIT:
As noted by kolam, show isn't INLINABLE and isn't applicable on-chain. Here is a version that should work:
decodeUtf8 $ unsafeDataAsB dummyBuiltinData
both decodeUtf8 and unsafeDataAsB can be found in module PlutusTx.Builtins.Internal

That won't work as show is not an inlinable function and thus cannot be used in the validation (on-chain) part of Plutus.
Those functions you mentioned are meant to be used in the off-chain part of Plutus.

Yes, as @kolam says, you can't use show onchain to print out strings that are built at runtime from onchain code. I think this is because the script's address is derived from the hash of the validator function/onchain code, so it can only use hardcoded strings in traceError or traceIfFalse. -> I did not have any luck getting decodeUtf8 to run on chain either. I'm guessing that's because the hash I was attempting to print out didn't resolve to utf8.

You can't print out strings that are built at runtime in onchain code with Plutus, my guess is that's because the script's address is generated by hashing the validator function, so it only allows hardcoded strings so the hash of that function is always the same.
My solution is to trigger traceIfFalse with a function that gives me a clue about the variable I'm investigating:
...
mkValidator = traceIfFalse getTraceString False

getTraceString :: BuiltinString
getTraceString = case someVar of
                   a -> "it's a"
                   b -> "it's b"
                   _ -> "it's something else"
...

A bit kludgy, but it's working for me.


text:
Failing to set up plutus on windows
So I'm using WSL Windows 10 and I set up IOHK hashes, but everytime I run nix-shell I get following error:
build of '/nix/store/9im4jp068ykqsm4s8996px605p6zrw7q-Agda-plan-to-nix-pkgs.drv' failed. Would greatly appreciate any help.

Solved it by upgrading to wsl 2.


text:
Can smart contracts be used to mint native assets?
Cardano doesn't need to use smart contracts to mint native assets. But is it possible to mint native assets using smart contracts? And if so, is there an example how this can be done?

This is the subject of week 5 of the plutus pioneer program. You can find examples in the Github repo.
In the Signed.hs module, there's an example for how to mint tokens, and the NFT.hs for how to mint Non Fungible Tokens.
There's also a full lecture on that subject by Lars.

Agree to start with Lecture 5.  If you can't wait for the Plutus Application Backend to get deployed, there is also and exercise in Alonzo Purple for minting a NFT using the Command Line Interface CLI.  You can find it at the Alonzo github repository.

What's the link?


text:
Change minted tokens recepient
I am trying to create a dApp in which "accounts" are authenticated using a minting policy script. It should work by only allowing the minting of tokens if they are sent to an arbitrary script with the right Datum and value (since it should receive fees).
The problem I'm facing is that there doesn't seem to be a way of changing a "minting policy" recipient. I thought that if I specified in the transaction constraints that the script should receive N amount of tokens, the transaction would be automatically balanced and the script would receive the tokens, not the user.
let lookups = Constraints.mintingPolicy (policy fees)
    tx =
      Constraints.mustMintValue mintVal
        P.<> Constraints.mustPayToOtherScript vh (Datum $ PlutusTx.toBuiltinData initDatum) val
ledgerTx <- submitTxConstraintsWith @AccountType lookups tx

This didn't work as I intended though and, when I tried to run it, it returned an InsufficientFunds error
Slot 00001: *** CONTRACT LOG: "WalletError (InsufficientFunds \"Total: Value (Map [(,Map [(\\\"\\\",1000000000)]),(aa,Map [(\\\"DSET\\\",1000000)])]) expected: Value (Map [(97b688232555f47743c76605c03aea4ded52c6c20cc0a384f4b9a836,Map [(0x977efb35ab621d39dbeb7274ec7795a34708ff4d25a01a1df04c1f27bef45667a073d99a99a8ee15bd1abea2fc8140d5c00919060cda509e,300000)])])\")"

I suppose this is because the minted tokens were transferred directly to the user and not the script. My question is: Is there any way of making it so that a script, and not a user, receives the amount of tokens minted?

Is there any way of making it so that a script, and not a user, receives the amount of tokens minted?

Yep.
In your tx constraints, you need to both include mustMintValue mintVal and also mustPayToOtherScript that same mintVal. If you don't specify a recipient, it will just default to sending extra value to the transaction's originating wallet.
Not sure if you want separate datums for the minted value or what, but it might look like this:
Constraints.mustPayToOtherScript vh (Datum $ PlutusTx.toBuiltinData initDatum) (val <> mintedVal)

Here is an example from the Plutus Uniswap use cases of doing it with a separate datum. Notice that psC is minted and then included in the lpVal.
It helps to think of the minting as an input of the transaction, rather than an output.


text:
How can I get rewards into payment address?
I have stake pool paymentwithstake.addr which is a composition of payment.addr with stake.addr.
I can query stake.addr for the balance using the following command:
cardano-cli query stake-address-info --mainnet --address $(cat stake.addr)

From the outcome, I can see there is available rewardAccountBalance.
The question is:
How can I move reward to my payment.addr aka transform in a UTXO?

The process of moving your rewards (account balance system) to your payment address (UTXO balance system) is called reward withdrawal.
As per withdraw-rewards.md:
Check the balance of the rewards address:
cardano-cli query stake-address-info \
--mainnet \
--address $(cat stake.addr)

[
    {
        "address": "stake_test1urxx5h9mhey1234566ek6uxqgtlkpvteqjqgaleddevpggfggxw",
        "delegation": "pool1ljq292q5xwz8t3ehmaw3c5p9xpr123456dnrxd40004ns6dy8v0",
        "rewardAccountBalance": 550000000
    }
]

Query the payment address balance
You'll withdraw rewards into a payment.addr wich will pay for the transaction fees.
cardano-cli query utxo --mainnet --address $(cat payment.addr)

                           TxHash                                 TxIx         Amount
----------------------------------------------------------------------------------------
a82f8d2a85cde39118a894306ad7a85ba40af221406064a56bdd9b3c61153527     1         194054070 lovelace

Draft the withdraw transaction to transfer the rewards to a payment.addr
cardano-cli transaction build-raw \
--tx-in a82f8d2a85cde39118a894306ad7a85ba40af221406064a56bdd9b3c61153527#1 \
--tx-out $(cat payment.addr)+0 \
--withdrawal $(cat stake.addr)+0 \
--invalid-hereafter 0 \
--fee 0 \
--out-file withdraw_rewards.draft

Calculate transaction fees
cardano-cli transaction calculate-min-fee \
--tx-body-file withdraw_rewards.draft  \
--tx-in-count 1 \
--tx-out-count 1 \
--witness-count 2 \
--byron-witness-count 0 \
--mainnet \
--protocol-params-file protocol.json

171089

Build the raw transaction.
expr 194054070 - 171089 + 550000000
743882981

cardano-cli transaction build-raw \
--tx-in a82f8d2a85cde39118a894306ad7a85ba40af221406064a56bdd9b3c61153527#1 \
--tx-out $(cat payment.addr)+743882981 \
--withdrawal $(cat stake.addr)+550000000 \
--invalid-hereafter 12345678 \
--fee 171089 \
--out-file withdraw_rewards.raw

Sign and submit the transactions
cardano-cli transaction sign \
--tx-body-file withdraw_rewards.raw  \
--signing-key-file payment.skey \
--signing-key-file stake.skey \
--mainnet \
--out-file withdraw_rewards.signed

cardano-cli transaction submit \
--tx-file withdraw_rewards.signed \
--mainnet


text:
What is the proper way to rotate KES keys?
I would like to rotate my KES keys using cardano-cli (I'm not using cncli or other tools). What would be the proper way to rotate the keys?
is the VRF keys need to be updated also?

VRF keys does not need to be rotated, only KES keys.
To use cardano-cli, follow the KES_period.md, as such:
Create new KES keys:
cardano-cli node key-gen-KES --verification-key-file kes.vkey --signing-key-file kes.skey

To find out how long one period is and for how long a key can evolve, we can look into the genesis file. If that file is called mainnet-shelley-genesis.json,
we can type
cat mainnet-shelley-genesis.json | grep KES
"slotsPerKESPeriod": 129600,
"maxKESEvolutions": 62,

in this example, the key will evolve after each period of 129600 slots and that it can evolve 62 times before it needs to be renewed.
Before we can create an operational certificate for our node, we need to figure out the start of the KES validity period, i.e. which KES evolution period we are in.
We check the current tip of the blockchain:
cardano-cli query tip --mainnet

{
    "epoch": 259,
    "hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
    "slot": 26633911,
    "block": 5580350
}

In this example, we are currently in slot 26633911, and we know from the genesis file that one period lasts for 129600 slots. So we calculate the current period by
expr 26633911 / 129600
> 205

With this we are able to generate an operational certificate for our stake pool:
cardano-cli node issue-op-cert \
--kes-verification-key-file kes.vkey \
--cold-signing-key-file cold.skey \
--operational-certificate-issue-counter cold.counter \
--kes-period 205 \
--out-file node.cert

We need to add KES key creation step: cardano-cli node key-gen-KES
--verification-key-file kes.vkey
--signing-key-file kes.skey

This link is also helpful in this regard: https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/part-iv-administration/kes-rotate-companion-script


text:
Decentralizing an entire website with Cardano?
Is it currently possible to decentralize an entire application using Cardano (with the help of other decentralized services)? Coming from the viewpoint of a traditional Web 2.0 background, what are the best decentralized alternatives? Let's say the application has the following features:

Users can login/sign up, either using a wallet or a traditional Single Sign On method
An alternative to PostgreSQL (i.e. cheap storage with quick read/write). I know IPFS exists, but I've always seen this used to store assets, rather than relational data
Hosting of servers (React frontend, Express backend, Nginx reverse proxy, GitHub actions); ideally in Docker containers

If any of these features are possible, what are the pros/cons of decentralization? I imagine the traditional website would be cheaper and more performant, but I'd love to be wrong. Additionally, are there any resources or templates available for easy implementation?

Have you considered using NoSQL, or are you specifically in need of a relational database?

@intrinsic-values I don't think NoSQL would be suitable for my project. I'm planning to build a collaborative tool for proposers on Project Catalyst, where users can design "routines" for completing specific tasks. There will be a lot of relational data, which I don't think can be stored using NoSQL. I'm also just more familiar with SQL, so I'd rather use it if possible.

You can use Nami Wallet for users to login directly with their Cardano wallets.
OrbitDB is a serverless, distributed, peer-to-peer database built on top of IPFS.
There are different services trying to solve this problem, for example fleek.co.

And yes, you got the cons right - decentralization is useful, but expensive on performance. All depends on your use case. Just because something is decentralized, doesn't mean it is better.

We are working on a decentralized naming solution on Cardano blockchain:
https://www.adadomains.io/


text:
How is it possible to know who I'm staking with in the eUTXO model?
In the eUTXO model, we use a new key each time we receive some ADA (or perhaps not each time, but often anyway). So when someone sends me some ADA to a new address, this address is unused and has never been seen on the network. However, the network somehow knows that this address is mine, as the balance is counted in my stake. How does it work?

You are actually using only one single key. From this key, you can derivate a number of different accounts and addresses.
If you look closely at all these Shelley addresses in the wallet of your choice, you will notice it has two parts, which are:

Payment part, the first part of a Shelley address indicates the ownership of the funds associated with the address.
The second part of a Shelley address indicates the owner of the stake rights associated with the address. We call it, the delegation part.

You will notice that for all your addresses, the delegation part is the same. This is how, even using different addresses for payment, you can have all of them be managed by one single stake key.
Read more in CIP 19: Cardano Addresses.


text:
How to solve the Plutus scalability issue?
This issue is one that'll plague projects trying to build on Cardano.
Let's consider Lecture 10 of the first iteration of the Plutus Pioneers Program (https://www.youtube.com/watch?v=Dg36h9YPMz4&feature=youtu.be&ab_channel=LarsBr%C3%BCnjes), if I want to send a swap transaction, I have to consume the latest pool state (containing the token balances owned by the pool). Does it mean in any block there can be only one transaction per pool? If two or more users are trying to consume the latest UTXO, only one transaction will be successful and other users have to change their transactions to reference the new UTXO.
Here are some links where it's mentioned:- https://twitter.com/LarsBrunjes/status/1390331642103877633?s=19- General approach for allowing multiple smart contract transactions per block

This should not be thought of as a scalability problem, but more as a design parameter for whatever smart contract you are building.
There are many creative ways in which projects are trying to make the liquidity pools work. SundaeSwap is using the Scooper model, which you can read about here. It goes over the tradeoffs for each popular type of DEX, and why they chose the Scooper model. Definitely worth a read.
I think that Cardano's eUTxO architecture is uniquely suited for orderbook DEXes. Since there is no global state to worry about (unlike EVM L1's), it also eliminates several design constraints that you have to worry about in designing EVM apps.
Each project is taking a unique approach, and it's worth looking at all of the major ones as a developer I think. Some of the most interesting DEXes so far are:

SundaeSwap (Scooper model + AMM)
Minswap (another AMM)
Genius Yield (this one is really interesting because it is orderbook-based and Lars himself is the CTO).

So I guess the short answer is, there are definitely ways to get around the issue of many transactions trying to consume the same output, and that isn't necessarily a roadblock for scalability. However, building with UTxO in mind is always better than trying to build a 1-to-1 replica of EVM dApps.

In other discussion, Lars said a real implementation of something like this or the Oracle could use - instead of an NFT - its own currencySymbol, and then have multiple UTxOs which could be grabbed concurrently at one time.
Here there is talk of "read-only" inputs :
https://github.com/Emurgo/Emurgo-Research/blob/master/smart-contracts/Unlocking%20The%20Potential%20Of%20The%20UTXO%20Model.md


text:
Trying to get a Testnet Node Running
Can anyone help me troubleshoot this? I am trying to get a testnet node running. After syncing for quite a while I get this error:
[DESKTOP-:cardano.node.DnsSubscription:Error:70] [2021-08-26 14:36:47.71 UTC] Domain: "relays-new.cardano-testnet.iohkdev.io" Application Exception: 54.151.49.138:3001 HeaderError (At (Block {blockPointSlot = SlotNo 1598400, blockPointHash = 02b1c561715da9e540411123a6135ee319b02f60b9a11a603d3305556c04329f})) (HeaderProtocolError (HardForkValidationErrFromEra S (Z (WrapValidationErr {unwrapValidationErr = ChainTransitionError [OverlayFailure (VRFKeyBadNonce (Nonce "81e47a19e6b29b0a65b9591762ce5143ed30d0261e5d24a3201752506b20f15c") (SlotNo 1598400) (Nonce "e209c5d22fe51d58485759cc9edca776cb505c1afb2ba5f98f8a6a979a7589e4") (CertifiedVRF {certifiedOutput = OutputVRF {getOutputVRFBytes = "t\231\145\196\165ZhA\137S\209{Z<1\194\225]Yq\235\&7#!\161:\147\129Q\236x\207\195z\170\155\182mw\141\182\135\249\209\178\134\&3_:\167b\135\204\&4\205Z\172\230\163\226\EM\DC2\226\182"}, certifiedProof = CertPraosVRF "!\202\180:L)*\DC2\250\SOH\141V \240Z\EOT\n\183\245\141\SUB\191\ETXQ\"\EOT\155A\SOH'\160LD\253\204Z\249\129/i\178\237p\155\140\240\142\183)LG\137q\248\DLE\DC1\130W\183\162\149\DEL6=[5\225/18\154\192=\242\255\181\f\190\190\t"}))]})))) (Tip (SlotNo 1598271) 4b9ea00e776ff866b1e562bc41ea5531090aaa2991891579b32ce691d8b684c6 (BlockNo 1597004)) (Tip (SlotNo 35619383) 8cce4530864892c20e2467f349fb3e22bb7965e620c286b9b01c689e94019520 (BlockNo 2861367))

You need to double check your genesis fine is 100% correct. Do not copy paste it, download it. Even one space of difference can be problematic.

I had changed some values in the config files that solved some other errors I was seeing, but since I do not know enough about how things are setup, I went ahead and started from scratch making sure to download the files as you suggested. Everything is working correctly now. Thanks for the info.

Thank you, I think this is because of the genesis file. I will fill it as an answer, please flag it if helpful.

This could happen when you genesis file is not matching your peers. Make sure you download the file, without editing. Even a single space of difference will result in a different genesis hash.


text:
Can't create keys for an NFT. cardano-cli address key-gen
Having trouble create a key for an nft.
Code:
cardano-cli address key-gen \
 --verification-key-file payment.vkey \
 --signing-key-file payment.skey

Error:
error: Found argument 'address' which wasn't expected, or isn't valid in this context

Any help is appreciated

can you show the output of cardano-cli --version ?

I'm getting the same error for cardano-cli version: 1.0.1.

Do not build/use the client from https://github.com/input-output-hk/cardano-cli

Assuming your cardano-cli version is up to date, if you are typing in the command exactly as typed above, you will need to escape the line breaks like so:
cardano-cli address key-gen \
  --verification-key-file payment.vkey \
  --signing-key-file payment.skey

that was my first thought, but that doesnt lead to this error message


text:
When will fees be finalized on the Alonzo testnet to reflect mainnet experience? Will it be on Sep 1?
I noticed the fees being shown to the Alonzo testnet users haven't been representative.  It was mentioned on Aug Cardano 360 it is being finalized.  Will it be implemented right out of the gate on 1 September with the public testnet release?

It is not confirmed yet, but that is the plan.


text:
How are identities verified on Atala Prism?
I assume as an adult I can get an atala verified identity rather easily, but if a minor wants an identity on atala (for example, to play blockchain games) how is that done?  What information/documentation is needed, etc...

As far as I understand, Atala Prism uses paper-based credentials and plastic ID cards to identify users. In the case of minors, data from the server of the educational institution must be used as proof of their id. Data from the server can be transferred in .csv format.


text:
How is access control managed with smart contracts in (e)UTXO?
I've seen Charles mention this a little bit in some of his videos. He sort of laughs it off like the answer is obvious, but I'm not deep into the technicals. I also had an Ethereum developer bring it up, so I tried to do my own research and could not find the answer. Maybe it's so obvious that it doesn't really require a technical answer, but I'm here for a response either way. Specifically, the Eth dev said:
"Unspent outputs is the issue. Change addresses and smart contract interaction just doesn't vibe. This is exactly why ethereum is account based. Because it's the only rational way to do smart contract interaction."
Now, obviously there are many dapps from many devs running on the testnet right now, so I'm wondering what the technical rebuttal would be to this concern.
Thanks for all your contribution to the Cardano community!

I'm interested in this too. Here is another similar thread: https://cardano.stackexchange.com/questions/722/general-approach-for-allowing-multiple-smart-contract-transactions-per-block/2407#2407
I'm glad you've asked a new question about it, since I still haven't gotten a straight answer either.

Maybe I'm misunderstanding what people mean by "access control". Is Marek Mahut's answer what you were looking for?

If you think about it, your smart contact is attached to a specific UTXO. And somehow, in multi user environment, we need to distinguish the true smart contract output from other outputs that might also include this smart contact.
And the way we do this is to put an specific NFT on the output. Because an NFT can only exist once therefore is unique, there can only be one UTxO at the script address that holds the NFT and thus identities your smart contact.
This article from Robert Kornacki explains it in details, mostly:

(...) dApp UTXOs having no in-built uniqueness property which make
them clearly and reliably identifiable from others. This can be
potentially capitalized on by bad actors, or may simply cause problems
due to bad protocol design of new devs who are just getting their
bearings. This clearly is a major issue that must be addressed,
however we luckily have a great innovation which tackles this problem
precisely, NFTs.
(...) Because each NFT can only be created once and UTXOs have the ability
to hold tokens, this means that if we put an NFT inside of the UTXO of
the dApp we are deploying we can guarantee that no one else can do the
same. The NFT acts as an unforgable unique identifier that makes it
trivial for anyone and everyone to see which UTXO is the true
deployment of the protocol. Each dApp frontend must merely save the
currency ID of the NFT in order to be able to use it to verify that
any UTXO it finds at the smart contract address has the correct NFT
inside. If the UTXO does not, it is treated as invalid and ignored. It
does not matter whether the invalid UTXO was created by mistake or by
a bad actor on purpose, it is not the correct UTXO that we are looking
for and thus filtered out. To ensure that the uniqueness property is
forever held, the smart contract tied to the UTXO must specify that
the NFT is never allowed to leave the dApp. In other words, every time
someone spends the dApp UTXO, the NFT must be held in an output that
is also locked by the same dApp smart contract (this technically
changes in the context of dApp updates, but we can skip over that for
now). This NFT preservation check is the only code required to
guarantee the uniqueness property of the dApp. If this check is not in
place then it may be possible for a bad actor to steal the NFT and put
it in his deployment, thereby destroying all guarantees we had
originally.


text:
hardware wallet
With all the hacking of personal computers, ledger, and t-mobile; what is the safest way to store ADA? I have been hacked through ledger live through a google add-on. Is Yori with ledger safe?
thanks,
totally paranoid

Could you explain how you were hacked in Ledger Live? What Google add-on? What did the hack do? Also, you’ll get better responses if you edit your title and ask a meaningful question, rather than just having “hardware wallet”. Have a look at the titles of other questions as examples.

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.

Ledger live doesn't have a google add-on, you were only scammed.  There isn't a way to get hacked with ledger live unless you accept a transaction. I've been using Ledger since 2017 it works as long as you pay attention to what transaction you're accepting on your ledger device.
Those people who got hacked via a sim swap didn't understand basic cyber security.
First of all, you don't use SMS as 2nd step authentication, use Google Authenticator or the many vendors with a similar app.
You do not leave your bag holding on an exchange PERIOD!. Mt.Gox is a primary example of why and this continues today for those who don't spend the time to learn this lesson.
IF you have over 100k in crypto and don't have a ledger or trezor and a Cryptotag or blockplate, it's only a matter of time before you lose it all.
My ADA is safe with only $230 invested in hardware because I spent extra to get titanium plates to protect my seed phrase sold by Cryptotag. Heed these warnings or get featured in the next "I got hacked from coinbase and I'm mad" article.
also, Charles does not give away free ADA. NEVER!!

Unlike many users I have a slightly different than mainstream view on Trezor & Ledger.
Avoid both. Ledgers internal servers where hacked and all of their customer information was released to the world. Also there was a Shopify leak as well. I know two stake pool operators who's info was released and they are constantly being sent spoofed emails and one of them fell for one.
Trezor link
Hacking users is far easier than hacking secure systems. All they would have to do to is get you to click on something in an email and they can trace that IP to your physical location through your ISP.
For any large sum wallet keep it on paper (Titanium? Need to enter an address to have it shipped).
Create the wallet(3 copies of the seed stored in different locations), add funds, delegate to OTG pool(or some other pool..) Then delete the wallet off the computer. It will earn rewards and can be restored when needed.
If you want a wallet for interacting with the blockchain like buying/trading NFT's create a second smaller wallet with Nami. Nami is single address wallet while Yoroi is multi address so create a new wallet in Nami and add funds to it. Brave browser is nice.
It would also be best to get an open source privacy respecting operating system and encrypt your dns traffic. elementary.io for example is an Ubuntu based OS and secure.
Full paranoid is an old Thinkpad with encrypted Libreboot with Trisquel.
Intel & AMD have backdoors so it depends who you think your adversaries are.
https://hackaday.com/2020/06/16/disable-intels-backdoor-on-modern-hardware/
https://www.flashedtech.com/
Peace & Freedom!

Ledgers' internal servers don't affect the Ledger devices. I was in that hack myself, My crypto was fine the whole time and since I know what a phishing email is like and scam calls, I managed just fine. Also Ledgers use secure element chips.
Also, SPOs should know better about scams and proper key management, it's not acceptable to be in that position of power in the network and to be vulnerable to an email scam.


text:
Pay out your salary from employer to employee in ADA (crypto)
How can I arrange for my company that I can pay my employee's in crypto ADA coins or crypto on the Cardano network?
I would like to facilitate my employee's that they have the option to pay a part of there salary in cryptocurrencies.
What are the possibility's within this matter, what is necessary for me to do or what is still being developed to get to this point?

It depends on your country. You should be well-acquainted with your responsibilities in terms of payroll withholding for taxes.
However, with respect to automating a system to pay your employees, I would recommend that when they would usually provide their banking details for direct-deposit, offer the alternative of instead providing a payment address to a Cardano wallet. At the end of every pay period, you can simply have Ada transferred to the wallet address on file instead of drafting a wire transfer.
If there is some concern that employees might lose access to their wallets, you could also offer to generate wallets with seed phrases for your employees so that both you and the employee knows that employee's seed phrase. Employees can then transfer their funds from their wallets immediately upon receipt; however, if an employee loses access to his or her wallet, you will be able to recover it for him or her.
I would also provide a receipt with the value of Ada upon sending it so that the employee will be able to calculate capital gains and losses to report to your country's version of the IRS. This will also provide you with a copy so that you can do the same.


text:
Best practice when building a private Cardano testnet?
I am using scripts provided by IOHK to help build a private testnet. I have been told (during discussions in the white/blue/purple testnet development) that best practice is to start the network in byron and move through the era's until Alonzo is reached. This is what IOHK seems to do when they launch a new testnet (from part of their new purple testnet announcement, "Please allow ten hours for the network to be ready to test against. This will mean we have made the network move through all the eras to Alonzo correctly".
I have tried to reach out to IOHK for an answer to this but have not received a response back yet - I understand that they are pretty busy right now so i figured I would ask here...
The reason I would like to know is because I am working with one of the IOHK partners and we are trying to create an in-house, automatic, private blockchain tool - similiar to Ganache for Ethereum. We CAN currently start a private network in Alonzo which would make this task relatively simple but with the current best practice to start from Byron and progress to Alonzo, I would like to know what exactly we are giving up in functionality (or anything else) by directly starting in Alonzo instead?

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.

Simply, What functionality do you loose by starting a private network in the Alonzo era vs starting a private network in the Byron era and updating to Alonzo through update proposals?

I received a message from Samuel Leathers about this issue. I am re-posting his response but if anyone would like to add additional information, please feel free to expand on the idiosyncrasies that Sam is talking about:

2 things:
db-sync doesn't work with the shortcut fork all eras in epoch 0 (yet, there's an
open PR adding this finally)
The protocol version will still be 2 if you fork everything at once.
This is something we've reported to the devs to get fixed later, but
essentially, even if you do have the config fork all eras (in 0 or sequentially)
you still need to submit update proposals every epoch to get it updated to 5.
There are some weird idiosyncrasies that can happen if era is Alonzo but
protocol version is less than 5.


text:
Would anyone respond / share who is working in the real estate space with Cardano?
Who is working within real estate on blockchain, and especially within ADA/Cardano?

Here is a comprehensive list of Cardano partners.
It's not immediately obvious which/if any are real estate projects.


text:
Catalyst voting app fund 6 waiting for update, current version can not vote
I can not vote for fund 6 currently because if I start android catalyst voting app, it says there is an update version under construction I have to wait on before I can vote. so my question is: when will this update be available? time is running out, I think voting on fund 6 runs out soon. who can help with this?

This is because Catalyst Fund 6 is not in the voting phase, it starts on 7th of October.
Check Project Catalyst FAQ.

Catalyst voting is a two-step process.

Register in the wallet and generate a QR Code
Scan the QR code in the "voting app"

For the fund 6, the voting will start on 7 Oct 2021 IOHK BLog. The app is custom and will have the proposals being put on the vote, therefore it is likely the app may not be available until the proposals are finalized. The registration is a once in a "wallet lifetime" process. You will be able to reuse the QR code for every fund.


text:
would anyone reply/share who is working on inventory and shipping solutions with Cardano?
would anyone reply/share who is working on inventory and shipping solutions with Cardano?
storage
shipping
automation
price quotes
samples
contracts
distribution

I'm sure there is many more, but top of my head:

We, at Five Binaries, have a customer that is using the cardano-oracle-node to monitoring the supply chain of their products during shipping.
Emurgo is working to port their Traceability Solution to Cardano.

very neat, thank you @Marek Mahut - StakeNuts!

Maybe a little late to the question, but recently Strait Brands announced they will use Cardano's blockchain to manage their supply chain.


text:
What am I missing here- simple Plutus code from tutorial?
re: https://plutus.readthedocs.io/en/latest/plutus/tutorials/basic-apps.html
Given that the explanation is ""The validator checks that the transaction, represented by scriptContextTxInfo, pays half the specified amount to each recipient.", why does the code not simply use ==half in both cases?
validateSplit :: SplitData -> () -> ScriptContext -> Bool
validateSplit SplitData{recipient1, recipient2, amount} _ ScriptContext{scriptContextTxInfo} =
    let half = Ada.divide amount 2 in
    Ada.fromValue (valuePaidTo scriptContextTxInfo recipient1) >= half &&
    Ada.fromValue (valuePaidTo scriptContextTxInfo recipient2) >= (amount - half)```

Ada is an integer under the hood and divide rounds down.
So, if amount is 5, half would be 2 and (amount - half) would be 3 (totaling to 5).


text:
plutus-playground-server: user error (Error evaluating simulation: JsonDecodingError
I'm following the first lecture in the plutus pioneer program but I cannot set up the local environment. The error happens when running npm start on a nix-shell after initializing the playground server.
The following purescript packages are needed by the generated code:

  - plutus-playground-client
  - purescript-either
  - purescript-foreign-generic
  - purescript-maybe
  - purescript-ordered-collections
  - purescript-profunctor-lenses
  - web-common

Successfully created your PureScript modules!
plutus-playground-server: user error (Error evaluating simulation: JsonDecodingError {expected = "EvaluationResult", decodingError = "Error in $: not enough input", input = ""})

I'm using windows 10 with WSL2

I would recommend opening an issue on the plutus issue tracker for this kind of case: https://github.com/input-output-hk/plutus/issues

Might be this? "If you're using Windows and WSL, make sure the plutus repo clone is located in the WSL filesystem" (https://stackoverflow.com/questions/68276780/plutus-playground-client-cannot-run)

No, it is located in the WSL filesystem. I'm planning to switch to ubuntu

Did you ever find the solution? I have the same issue...masOS i7 Monterey.

I recommend installing Virtual Box and using NixOS or just installing NixOS on a flash drive.
Here is an installation guide.

Thanks for your answer, but this is not really a solution to the problem

Are you running in a Nix shell?

Yes, It is activated


text:
How do you send ada from a Byron address to a Shelley address using the CLI?
I am currently working to build a private network from Byron to Alonzo and I think I have some test-ada left in a Byron address.
If I am in the Shelley (Alonzo) era and I am using the cli to conduct transactions, are there: 1) CLI commands to look at the UTXO's at a Byron era address?
2) CLI commands to move ada from the Byron era address to the Shelley era address?
Please let me know if you need any clarification on the questions. Thank You.

As Byron does not change address types, we will be still referring to them as Shelley type addresses.

To look at your UTXOs, using cardano-cli:

cardano-cli query utxo \
  --address $(cat payment.addr) \
  --mainnet
                            TxHash                                 TxIx        Amount
----------------------------------------------------------------------------------------
4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99     4         20000000 lovelace

This is more complicated, but it is well documented in the cardano-cli documentation, as follows:

Create a draft for the transaction and save it in tx.draft
Note that for --tx-in we use the following syntax: TxHash#TxIx where TxHash is the transaction hash and TxIx is the index; for --tx-out we use: TxOut+Lovelace where TxOut is the hex encoded address followed by the amount in Lovelace. For the transaction draft --tx-out, --invalid-hereafter and --fee can be set to zero.
cardano-cli transaction build-raw \
--tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \
--tx-out $(cat payment2.addr)+0 \
--tx-out $(cat payment.addr)+0 \
--invalid-hereafter 0 \
--fee 0 \
--out-file tx.draft

Calculate the fee
A simple transaction needs one input, a valid UTXO from payment.addr, and two outputs:

Output1: The address that receives the transaction.
Output2: The address that receives the change of the transaction.

Note that to calculate the fee you need to include the draft transaction
cardano-cli transaction calculate-min-fee \
--tx-body-file tx.draft \
--tx-in-count 1 \
--tx-out-count 2 \
--witness-count 1 \
--byron-witness-count 0 \
--mainnet \
--protocol-params-file protocol.json

> 167965

Calculate the change to send back to payment.addr,
all amounts must be in Lovelace:
expr <UTXO BALANCE> - <AMOUNT TO SEND> - <TRANSACTION FEE>

For example, if we send 10 ADA from a UTxO containing 20 ADA, the change to send back to payment.addr after paying the fee is: 9.832035 ADA
expr 20000000 - 10000000 - 167965

> 9832035

Determine the TTL (time to Live) for the transaction
To build the transaction we need to specify the TTL (Time to live), this is the slot height limit for our transaction to be included in a block, if it is not in a block by that slot the transaction will be cancelled. So TTL = slot + N slots. Where N is the amount of slots you want to add to give the transaction a window to be included in a block.
Query the tip of the blockchain:
cardano-cli query tip --mainnet

Look for the value of slot
{
    "epoch": 259,
    "hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
    "slot": 26633911,
    "block": 5580350
}

Calculate your invalid-hereafter, for example:  26633911 + 200 slots = 26634111
Build the transaction
We write the transaction in a file, we will name it tx.raw.
cardano-cli transaction build-raw \
--tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \
--tx-out $(cat payment2.addr)+10000000 \
--tx-out $(cat payment.addr)+9832035 \
--invalid-hereafter 26634111 \
--fee 167965 \
--out-file tx.raw

Sign the transaction
Sign the transaction with the signing key payment.skey and save the signed transaction in tx.signed
cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--mainnet \
--out-file tx.signed

Submit the transaction
cardano-cli transaction submit \
--tx-file tx.signed \
--mainnet


text:
Problem with creation of wallet using Javascript
Im using linux-Ubuntu in the WSL of the Windows 10.
I have installed Cardano-node and Cardano-cli. Node v14 (latest stable version) ghc 8.10.6
Im trying to create a wallet but on this command:
node src/create-wallet.js
I get this error:
const paymentVkey = options.paymentVkey
                                ^
TypeError: Cannot read property 'paymentVkey' of undefined
    at CardanocliJs.addressBuild (/home/marcelolinux/minter3/node_modules/cardanocli-js/index.js:316:33)
    at createWallet (/home/marcelolinux/minter3/src/create-wallet.js:7:11)
    at Object.<anonymous> (/home/marcelolinux/minter3/src/create-wallet.js:11:1)

Im following this (maybe) out of date tutorial.
I'have tryed with ghc 8.10.4 , also tryed configure the testnet but did'nt work also.
Can anyone help me to Mint Nft's using Javascript? I'm needing it for my final project of a course of Web Development.

I checked the npm page for cardanocli-js and found that you need to pass an options object to the AddressBuild method.

const createWallet = (account) => {
  cardano.addressKeyGen(account);
  cardano.stakeAddressKeyGen(account);
  cardano.stakeAddressBuild(account);
  cardano.addressBuild(account);
  return cardano.wallet(account);
};

createWallet("ADAPI");

needs to be altered to include an options object per the documentation.
It should be altered to be;

const createWallet = (account) => {
  const payment = cardano.addressKeyGen(account);
  const stake = cardano.stakeAddressKeyGen(account);
  cardano.stakeAddressBuild(account);
  cardano.addressBuild(account, {
    paymentVkey: payment.vkey,
    stakeVkey: stake.vkey,
  });
  return cardano.wallet(account);
};

createWallet("ADAPI");

This worked for me. I hope this helps.

Thank you! Worked for me also. You Rock dude.

I am also having the same problem on window using cardano-node-1.29.0-win64.  cardanocli-js node module has issue on windows doesn't know how to create folder correctly, I need to modified "index.js" file.  After fixing all that I finally run into the same problem you are facing.
For ubuntu, I got some weird problems not able to access my cardano-cli even I have it in my path, node is having trouble accessing.

I tried to build it manually by passing in skey and vkey files but no luck still, any help would be appreciated.


text:
Questions about data storage and unique identifiers
Hi there I have a number of questions i hope you can help answer:

Who binds the public key to the real-world identity and the identifier used for transactions?
Where is confidential data held and how is access to it controlled?
What tools do individuals have to ensure they avoid disastrous errors?
How is access to on-chain metadata controlled to prevent re-identification? Blockchain ‘anonymity’ didn’t help Ross Ulbricht.
When 51% or more of consensus participants validate any transaction for recording on-chain, against what evidence are they validating?

Thank you!
Daren

Welcome @oxsin to Cardano SE. The questions are good, It will be appropriate if they could be posted as separate questions.

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

Who binds the public key to the real-world identity and the identifier used for transactions?

Right now, nobody. However, anybody can see the NFTs at your wallet address, which is tied to each of your transactions. Prism is being developed to create unique and verified NFTs that contain identity information in their metadata. Thus, you will be able to identify the person to whom a wallet belongs should that wallet contain an NFT with identity.

Where is confidential data held and how is access to it controlled?

It depends on the context, but if you include metadata in a transaction, those metadata will be publicly available. However, you can always encrypt your metadata. When you encrypt metadata and attach it to a UTXO, whoever else has the secret key to decrypt those metadata will be able to read decipher it, but nobody else will be able to.

What tools do individuals have to ensure they avoid disastrous errors?

We recommend that you keep your mnemonics, spending passwords, and keys private and in secure locations. You might etch your mnemonics into aluminum so that even if your house burns down you will be able to recover your wallet. Otherwise, keep yourself educated, and do not fall for scams!!

How is access to on-chain metadata controlled to prevent re-identification? Blockchain ‘anonymity’ didn’t help Ross Ulbricht.

Everything on the blockchain is publicly viewable. Everyone downloads a copy to run a full node. Cardano is a way to validate and secure transactions. If privacy is your goal, we do not have very many tools set up for that yet. Feel free to develop some =^). You could even submit a Catalyst proposal.

When 51% or more of consensus participants validate any transaction for recording on-chain, against what evidence are they validating?

Each transaction is broadcast, and the slot leader creates a block from all of the transactions in a given slot. That block is then broadcast to the rest of the network. The network relays the blocks until everyone has a copy, and each time a block is relayed, information about the sender is verified. See Ouroboros Praos for the set of properties tested when receiving a transaction.
I hope that was helpful =^)

Thank you Noah!

Hey i have some additional info I should have provided to add clarity to my questions; hoping they can be answered.

For holding confidential data: I see how encrypting data on chain can keep it confidential for some years until the crypto is broken and maybe that’s OK for some data and expectations of confidentiality. Quorum (when last I spoke to them) don’t put encrypted data on chain since they share my assumption that crypto works for a limited time. How would access to the secret key you mention be tied to UTXO? I don’t see that linkage.

For the last question: 1/2 What I really wanted to explore was whether the data required for truly validating the correctness of any transaction is viewable to the participants or if it’s held confidential (like it might be encrypted) would that validation really mean anything? With bitcoin, everyone can see whether you have enough coin to give away what you propose to give;

last question 2/2 but if there’s a scheme where information like that is confidential, then the validation means nothing and few would want to participate in a transaction that cannot be validated. There will be some contradictions that will find their ways into these new systems.

i can add as separate questions if that makes it easy


text:
Access Control for my company's vehicle
I wish to delegate access control with a Phone-As-A-Key DApp for vehicles (for sharing the vehicle, P2P rentals and more).
When delegating access control, the DApp will update a smart contract which needs to be downloaded in the vehicle (so it knows a new user should be whitelisted and so they Phone as a Key will open the vehicle).
Question: how many transactions do you foresee here and what shall the cost be.  Obviously, we cannot have customers (or us) paying large amounts of ADA to delegate access control.

This is hard to answer without an intricate understanding of the business logic around the vehicle unlocking.
I assume each car has its own smart contract and you want to whitelist a user for a pre-determined time. For simplicity I assume that we're happy for time to be measured in slots, with the business logic working out time->slots happening off-chain. This would mean all we need to do is send a users identifier to the smart-contract with the time-frame. By checking the users time-frame against the node when unlocking the car you'd be able to limit this to a single transaction like:
{
    user  Address
    start Slot
    end   Slot
}

Another way to go would be to update a smart contract with Lock and Unlock events setting an Address value and checking this value against the users phone when they attempt to unlock the car. However this would require two transactions and constant internet access to receive the second event.
In terms of transaction spend, one of the perks of Plutus is that you can calculate the cost of a contract up-front and failed transactions don't cost anything. That way you can show the user the fee at the checkout without any surprises. It also means you can prototype this contract and check the cost yourself. As I said without really understanding how you want this contract to work it's difficult to come up with a $$$ value.


text:
Official Cardona Telegram Channel?
Is this an official Cardano Telegram channel?
https://t.me/Cardonacommunitychat

I’m voting to close this question because it is not a question on technology or systems using cardano.

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

No that is a scam! No one is ever going to "return ada to your wallet". There will never be an ada giveaway from IOG or Charles Hoskinson.

Thank you. I imagined this to be the issue. It should be taken down and reported.

I have reported this Telegram Channel. This was an important security question in my opinion


text:
What is the cost (in ADA) of transferring ownership of NFTs?
I have a project underway using private Eth network (zero tx costs) where NFTs transfer ownership very frequently between various owners.  I wish to move to Cardano for its completeness and security but am concerned about the TX fees for attempting to accomplish this.  Can we presently calculate the price of transferring ownership of an NFT?

A good way to answer your question would be to find a transaction on the Cardano mainnet and see how much it cost.
Cardano Scan has a great lookup tool to see all token transactions
I picked a transaction at random which contained the transfer of a single native asset.
This shows that there were:

16.0 Ada of Inputs
A fee of 0.234405
"Change" of 14.265595 sent back to the sending address

This means a total transaction "cost" of 1.734405
That cost consists of:

The fee of 0.234405
A minimum Ada cost of 1.5

There are a few good references to understand how these costs are derived, as it depends on Cardano parameters but hopefully this example gave you an idea of the cost.
If you want to port your application across to Cardano, there is a great Technical Dev Guide you can use specific to minting NFTs.
Maybe the NFT will be worth more now that it is in a stack exchange answer!? :)

Ouch, that pretty much halts any hopes I had for moving onto Cardano.  I am not saying Cardano is expensive, I was just hoping it would be a little less so.  Thank you for your help on this!

Note that the minimum ADA cost isn't a fee. You can ask the NFT buyer to send the minADA with his request, and you send him back the NFT + minADA. Costs on Cardano are deterministic, so you should be able to calculate the minADA required for a specific NFT.

Thank you for this, I was not aware of this fact.  Ok, so the 1,5 ADA can be sent back and forth, and the fee is only 0.23 ADA (in the above use case).  However, this unfortunately is still very expensive for using ADA for something like access control, we could hardly expect customers to pay 0,23 ADA for doing something simple like granting vehicle access to others.  Then again, this will be even more, as it will be interacting with a smart contract, and the above fees are only for moving NFTs... I wonder how expensive smart contracts will be to use... Thanks again!

It should be possible to do this for no cost in an hydra head when hydra will be available.


text:
Does the staking pool deposit of 500ADA count towards the stake?
Does the staking pool deposit of 500ADA count towards the total stake of the pool, or is it a separate deposit that does not count towards the total stake?

I would recommend expanding the text in your question's body.

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.

Thanks, I have worded it a little better.

No it is a separate deposit which will be returned when the pool is retired.

So to clarify it does not count towards the total staked amount of the stake pool? That's disappointing. I have more than enough to cover it but it would definitely reduce my total stake substantially and hinder my ability to mint blocks.

That is correct. You will need around 1 million staked to average 1 block per epoch. There will be many epochs with zero, 2 and even 3 but it will average.

Haha well I have nowhere near that amount! I've read that a block can net around 1000 ADA or more depending on fees in the block. I only have a couple of thousand ADA. With the staking rewards I currently get can I deduce the probability of minting a block? Say if I get 100ADA/year, could I deduce that with my stake alone I would have to run a pool for up to 10 years to mint a single block?

Something along those lines. pool operator rewards on one block with 340 and 1% is around 380 ada. Luck is a factor as well. If I make 3 when I should make one I get more.

Yeah so it's more or less like trying to mine proof of work coins solo, you may get one in the end but you'll need to wait a lot of time and spend a lot of money to do so. And it won't even cover the 10-15k of server costs you spend doing it haha. Damn well that puts that dream to bed. If only I had a few friends with a million ADA!

Theres a cheaper way! armada-alliance.com. So cheap you can run an active relay and learn how to use the software for around $150

That's really interesting, I'll look into it. I guess there key here is I'm going to have to attract as many delegates as possible, maybe I'll reach out to a few forums and see if I can attract people who want to join a fixed fee only pool or start a community pool. Thanks so much for your help mate, it's people like you that make the cardano community great!


text:
Is it possible to withdraw rewards with smart-contracts?
I would like to automatically withdraw my rewards and send it in different wallets. Is it already technically possible?
Thanks,
Regards,
Anthony
Edit - A Use Case for this:
A possible use case for this would be if you were a SPO (Stake Pool Operator) with multiple pool owners (or multiple pledging wallets). A stake pool can only have 1 reward address, therefore every time there are rewards, a manual distribution must take place to distribute to all owners/pledgers. With a smart contract, you could potentially automate this distribution to the owners/pledgers.

You do not need a smart contract. Rewards from staking/delegating are never "locked" on Cardano, you can send immediately at any time.

There's no need for a smart contract when you withdraw rewards. Staking and everything related to it does not block funds in your wallet. You are free to transfer your money, including staking rewards, to another wallet at any time. As far as you know, to begin staking, every new validator must freeze 2 ADA, that’s a register key deposit. You’ll get 2 ADA back when you undelegate.


text:
Could Project Catalyst explain why the iOS release process is so poor?
The IOHK dev team is very impressive and it is somewhat startling that the Project Catalyst iOS App (and maybe Android as well?) has a janky release process.
There is no visibility and I wonder if there are  some specific Github issue that explains the problem?  My assumption is that this is because the code is written in react-native?
Any clarification will be help.

The Catalyst app is a work in progress and has been improving over time. What was once just IOHK is now many development teams working on scores of projects, and the team responsible for Catalyst may be prioritizing the website over the iOS app, and this is not even to mention that they have to develop an Android app simultaneously as well. It is a lot of work =^).

Sure. I understand. I have been invested in ADA for a few years and I'm an iOS developer.  But this is a process level issue.  The versions of the Catalyst app have no continuity.  The fact that there is no good process to retain the QR code and PIN is not the best trade-off.  FWIW, the other teams have really nothing to do with the iOS and Android teams.


text:
How will stake pools be prevented from cheating the fixed fee?
Cardano, as opposed to Ethereum, has a fixed transaction fee (currently 0.17ADA). There has been no problem with this fixed fee and no-one tried to cheat. Probably it is because there is not much to get from cheating, because it seems to me that stake pool could cheat the fixed cost if they wanted to:

For example, Binance holds a big part of the stake. So, they could offer you a refund for say 50% of your fees if you do your transaction with them (instead of sending your transaction to the network, you send it to them). So you would have to wait a little bit (but not so much) but you would get lower transaction fees. Binance would receive more transactions to handle, but if they have at least roughly twice more transactions it is profitable for them.

If the network becomes saturated, stake pools will be able to ask people to pay a subscription fee to see their transactions processed.

I think there is not much of a mechanism to prevent that to happen. Is there?

The reward for Stake Pool Operator (SPO) depends upon three factors :-

Amount of ADA Pledged by the SPO
Deligation from other wallets
Percentage he sets while registering the pool.
The reward is calculated by the network in a decentralized manner and paid to the relevant address. This reward does not depend on the fees included in the transactions forming part of the block minted by a SPO. For example in a block even if there is no transaction he still gets his reward.

Therefore there is no incentive for selecting transactions that include a higher fee. The transactions which will be from part of a part are selected irrespective of the number of fees in them. This is a major improvement over Bitcoin protocol which had a utopian view that few minors will include transactions with 0 fees. The fee decoupling from the network consensus mechanism is a major innovation of the ouroboros protocol.

No I think you are wrong for two reasons. First, the fees are taken into account in the SPO reward. They are just not significant now because the issuance rewards are way higher. Second, if the number of transaction are saturated, they can use any off-chain channel to make people pay higher fees.

This link explains the formula for calculating the rewards https://forum.cardano.org/t/understanding-shelley-reward-formula-and-k-a0-parameters/33391. I could see no component of the fees of transactions processed by a particular node. R is the total reward available for epoch which is made up of complete fees collected and inflation component. Moreover, an off-chain channel makes no sense since after 20 seconds a block is likely to clear the transaction with network fees. If more than 50 %(in terms of stake) of pool owners join a cartel then it's a different story.

So now I understand better what you meant by "This reward does not depend on the fees included in the transactions forming part of the block minted by a SPO.". It explains that the SPO cannot offer to take transactions with significantly lower fees (which might be the problem right now). But it does not explain why the SPO could not ask (off-chain) for higher fees once there are much more transactions (which is not the case right now).

There is no benefit to any SPO to try and put transactions into the blocks they create.  All transaction fees are aggregated at the end of the epoch then distributed proportionally to SPOs based on number of blocks created in that epoch.
You can have a centralized actor like Binance be a payment processor, they can construct transactions with multiple outputs which tend to be smaller per payment, but it would only help if your funds were already in Binance, which is bad for you.


text:
What is the minting cost of an NFT?
What is the minting cost of an NFT? If it depends on some factors, can they be made explicit?

All fees on Cardano are deterministic, so you'll always know the cost of the tx before you submit it. NFTs usually have metadata, depending on the amount of metadata included in the NFT will be factored into the fee and presented to you.
This article goes into detail on how the fee is calculated, keep in mind that the metadata size while reading this.
https://iohk.io/en/blog/posts/2017/10/19/how-cardanos-transaction-fees-work/


text:
Hypothetically, could someone other than the Cardano Foundation or IO publish an application back end first?
The Plutus Application Backend remains to be published.
Could someone else put one up first?
What would happen?

There would simply be two competing libraries and users could simply choose which one they prefer.


text:
Will Hydra (or anything else) reduce transaction times for Cardano in the future?
It's been brought to my attention that Hydra will offer all the scaling necessary but will it also make the blockchain faster?
Is it likely Cardano will ever reach an under 10 second time which could be useful in some areas like gaming.

The short answer is: no.
The longer answer is, Hydra is a layer-2 solution which means that by definition, it operates on top of the existing network and does not require, nor implies, changes to that base layer. It means that any improvements to the settlement time of transaction in the layer 1 won't come from Hydra.
Having said that, Hydra allows you to create parallel networks with smaller sets of participants. So it could be leveraged by a decentralized game to move all their traffic onto that parallel network, only to settle at the end of each day for instance. In that sense, they would be offloading traffic from the layer 1 to the layer 2.

As much as I understand, Hydra is the name of the sharding solution of Cardano. I see it as a form of parallel computation: it can handle separately some unrelated computations/transactions. Parallel computation improves the computation/time rate, but it does so without decreasing the amount of time taken by any elementary operation: ten people wash more dishes in one hour than one, but washing one individual dish still takes as much time with 10 people as with one person. It is probably the same for Hydra, so I guess the answer is no.

Hydra's state channels (layer-two solution) use the scripting language of the underlying blockchain. State channels allow off-chain parallel Tx and smart contracts processing. It is quite obvious that more Hydra's heads can be opened for improving the throughput and latency of the ledger. I am 100% sure that in the future in Cardano we can go below the 10-sec processing barrier.

Yes, Hydra will reduce tx times. When it's live, you'll be able to have payments that live in a hydra state channel, there you can receive Lovelaces as tips and have it happen instantly while paying low or no fees, that depends on the owner of the channel.
It does this by housing most small tx into hydra channels that will settle with the base layer at a later time.
All Plutus smart contracts will work automatically in hydra channels so no changes have to be made to any contracts existing today.


text:
Query latest pool of stake address from cardano db sync
How do i query latest pool of all the stake address when using cardano db sync?

The following will give you a list of pools with associated stake addresses.
  SELECT ph.view AS "pool_id", sa.view AS "stake_address"
  FROM stake_address sa
    JOIN stake_registration sr ON (sr.addr_id = sa.id)
    JOIN delegation d ON (d.addr_id = sa.id)
    JOIN pool_hash ph ON (ph.id = d.pool_hash_id)
  WHERE d.id = (
      SELECT MAX(id)
      FROM delegation
      WHERE addr_id = sa.id
    )
    AND sr.tx_id = (
      SELECT MAX(tx_id)
      FROM stake_registration
      WHERE addr_id = sa.id
    )
    AND (
      sr.tx_id > (
        SELECT COALESCE(MAX(tx_id), 0) -- handles IS NULL option so we don't have to run that query again
        FROM stake_deregistration
        WHERE addr_id = sa.id
      )
    )
    ORDER by pool_id;

Which will result.
                         pool_id                          |                        stake_address
----------------------------------------------------------+-------------------------------------------------------------
 pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp | stake1u9nc4zs4wapwzg6lmrmc8uulngg5slphtd9zl8hzptsdhrcsph992
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1u9mmge8895vp5hsyutxuu0lhze5egj2ltszkqx9vtfwtc5c7llhe6
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1uykx3da7j9v0gp0ae2faxr27arlgfcrv4y980k0jgjemz8cy3m260
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1uxxqarsyyu6dt2c558qeza8fzwdsnqtkhdhts88gs8vy6sqfl3dq7
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1u8vygrzl9d3yfnf0scqx5vwe8yguyjyqljcrpy2tn0tq4pqffqv2d
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1uyp58nm4749e3dkdasyef52th308sytgx2j9yd7rl8c8efga46r7k
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1uxkxkdsehergfanuxu7p0rvdxkjflnllyhnjdrw7hudv5ush8nqlf
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1uxem4w0uuanqu0q9kedm250w0vfzfyylttf06kg4rn696jc6vj4kq
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1u9x3sppud2y3uztgzhq9qsq9wc8059fnqeaxelta92jjlmcneg6dg
 pool1026f3pyjhxjafmtjyyny5ytuh2kraxakfa8eu5h844uv2upzxvq | stake1ux5l7l829vjylmlmpj5jmlnwg9ryqatl5gjltvzlyhpq09qn874qt
 pool102kv4jtzs5cp2s58qa8esmdxc6awsu4a8smtlgkyylq7gvzgdwv | stake1uxzgxaygqmmus994yucrdwfgqg0ugn97pvlq7zeyzhhkhec8a2jm4
 pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m | stake1u80u89wyha0ylkngfwdy9u9qermm64lpdfuy5uvjrfg8vvshahmgx

(...)


text:
Questions about the ISO Model (Sundae Swap)
I have two questions about ISO project launches, such as Sundae Swap:

What happens to the ADA security model if more and more people re-delegate their stake into the Sundae Swap ISO stake pool for their rewards, possibly drastically reducing the number of other pools?  Are we just hoping this won't happen?
Pools can only stake so many ADA before they earn reduced/zero additional gains, so how can Sundae Swap simply tell everyone to jump into a single pool?  If too many jump in, won't this be a waste of reward earning potential?  Or shall they have numerous pools running?
Thank you

There are several pools doing this, for example the MELD pools are also doing this. There is no reason that everyone would just choose one project among them and stake with them. And anyway, those projects have no interest in doing so because then the cardano blockchain, and thus their project, has no value anymore.
Moreover, it is not very different from mining pool that mine in one cryptocurrency (say ETH) and pay miners in another (say BTC). As long as there is a competition for rewards the game theory remains the same.

Yes, they can just create more pools. There are 8 MELD pools for example.