text:
How to make relay node receive mempool txs without becoming a spo?
I want my relay to receive mempool txs just like how a stakepool operator's relay nodes work (preferably in p2p), i have tried topology updater before but as people are moving to p2p, peers i get connected are not consistent (sometimes i got incoming txs sometimes no other relays connect to me).
-What im thinking is talking to spos to connect their relays to mine so their incoming txs would be forwarded to my relay, but i dont have anything to offer in return so i dont get much their attention.
-Or is it possible to create a bp node that have 0 relay, is p2p enabled, 0 pledge, lowest minimum ada staked just so it can be qualified as bp node. so their is no security issues since the bp i created have no chance to produce a block. Just running 24/7, will that be discovered by other spos running with p2p?

Pretty sure all you have to do is set up a stake pool with zero stake.

0 relay? Because renting 2 cloud compute just for mempool is kind of overkill for me

Probably your best option for the moment would be to run the topology updater script on your node. This should bring you a few incoming connections, enough to have the mempool populated with transactions.
You can also create a stake pool with just the BP registered as a relay, but this is not best practice. But technically you can do it, probably many people are doing it on testnet.


text:
How to connect cardano-db-sync to cardano node running on private cardano network?
After trying to connect cardano-db-sync to a cardano node running on a private cardano network, we are encountering multiple errors regarding the config files used. For example, missing keys in the config file and this error: cardano-db-sync: Error SNErrDefault: "insertValidateGenesisDist: Genesis data mismatch."
Could you help me understand if the errors I'm encountering stem from misconfigured config files or from using incompatible versions of cardano node and cardano db sync?
I am running a cardano node which was setup by following steps 1, 2 and 3 of the README.md file of this repo: https://github.com/mostafachegeni/UZH-Cardano-Network
Then, I cloned the cardano-foundation/cardano-graphql (https://github.com/cardano-foundation/cardano-graphql) repo and tried to run it using the docker-compose.yml file by doing the following adjustments:

commenting the service which runs the cardano-node-ogmios
modifying the socket path to point to our node's socket file
loaded a volume with our node's config files, like config.json, dbsync.json, topology.json, alonzo-genesis.json, etc.
generated the genesis file hashes and added the appropriate keys to the dbsync.json file

We have tried using the following different cardano-db-sync image versions:

13.2.0.1
sancho-4-2-1

source: Stack Exchange

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

sort: votes


text:
How do I generate cardano wallet offline
quick question. for the wallet generation with address and private keys.
can we do it without setting up our node or using any public node, just by using algorithms or any client library? in any language?

Lucid has a nice example and instruction:
https://cardano.stackexchange.com/questions/12578/how-do-i-generate-cardano-wallet-offline

Hi Kayvan, the link you added is redirecting to same page, I think you've mistakenly provided wrong link, can you please share the correct link again, thanks

oops, my bad, Here is the link for wallet selection/generation:
https://lucid.spacebudz.io/docs/getting-started/choose-wallet/

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


text:
Installed node and stuck with wallet error
I'm using this link https://developers.cardano.org/docs/get-started/installing-cardano-wallet/ And All is done except this step "cabal install cardano-wallet" When i try to execute it all i get is. picture attaced.
Something about extra/Plutus missing. What is this? and how to move forward?
Thanks


text:
Read transaction history
I have a full node installed and i have ogmios installed also, but i can't find a way to read full transaction history for any address. Is this even possible with cli or ogmios? Closest i found was this method in ogmios: "queryLedgerState/utxo" but that returns just some basic data, and not even close to any full transaction history.
Do I have to dig further into cardano-wallet API or even Cardano-graphql?
Any other ways i do not know?
I'm looking for native ways only, I want to learn everything myself, so I'm not interested in any third-paty APIs.

No, you cannot read the full transaction history for an address just from the node (with or without Ogmios). You need an indexing service like Kupo (or cardano-db-sync, but it's much heavier) for that.

Ogmios only interfaces with the ledger state which only tracks the current state of the chain. You need a full chain indexer like db-sync or a chain indexing wallet like cardano-wallet.

If you have Daedalus running you can use this:
https://forum.cardano.org/t/dump-wallet-transactions-with-cardano-cli/40651/6?u=erikd


text:
Eternl not able to send ADA to Kucoin (Error 400)
I'm not sure where the problem is. I'm trying to send some tokens from my eternl wallet to my kucoin address. I've copied the address using the copy button from kucoin so I don't think it's because it's the wrong address.
I enter my password to sign the transaction, and it always fails.
Some transactions failed to submit (400)
failed:
723ae8bdfde988437f80f9ca4fxxxxxxxxxxxxxxxxx533e18f84ac3dc8c2bb4
Bad Request
[object Object]
The hash changes, the error always the same.
I'm from Canada, and I know Kucoin has some legal issues here and new Canadian's can't get verified. But my account shows fully verified and I was able to send other tokens 2-3 months ago.
Thoughts?


text:
Cardano full node disk space needed
Was looking around and didn't find such answer for today. How much space do you need to run cardano full node?

Today full node require 184 GB of disk space.
Detailed output:
4.0K    db/gsm
5.1G    db/ledger
45M     db/volatile
178G    db/immutable


text:
Are old cardano node versions invalidated
Just checked one server which is running old node version Cardano Node 8.9.0 and i can see it has stuck and stopped syncing at 1st september. Are any old node versions invalidated now?
bam@nsserver:~$ cardano-cli query tip --mainnet
{
    "block": 10781330,
    "epoch": 506,
    "era": "Babbage",
    "hash": "e757d57eb8dc9500a61c60a39fadb63d9be6973ba96ae337fd24453d4d15c343",
    "slot": 133660799,
    "slotInEpoch": 431999,
    "slotsToEpochEnd": 1,
    "syncProgress": "99.80"

You need 9.1.1 to cross the hard fork.

To add extra context to Sam's answer, the old version of node will not be able to follow the Chang HF which happened on Sep 2nd.

That what i understoood from logs, and already updated. Just wondering why id havent seen anywhere that ALL old node versions will be invalid as this hard fork. If i understand it right it wasnt the case with previous versions right?

I remember seeing it.


text:
Do the validator params become part of the validator code, and are therefore included in the script address?
Re https://plutus.cardano.intersectmbo.org/docs/auction-smart-contract/on-chain-code

Note that AuctionParams is not an argument of the compiled validator. AuctionParams contains contract properties that don't change, so it is simply built into the validator by partial application.

This means that if I create multiple auctions with different parameters, each will have a different script address, correct?

Yes, that's right. The parameter values you provide gets set in the validator resulting in different script CBORs for different values. Script address is derived from the hash of a script's CBOR.
Different Script CBOR -> Different Script Hash -> Different Script Address.


text:
Aiken-lang Smart Contract Research with with features and functions
I am very interested about Aiken-lang Smart Contract. so i researched developed and experiment...Here is my research Book based on Aiken-Lang and Some codes snippets plz have a look and give me some peer review

Research Book: https://heyzine.com/flip-book/cf82988484.html
￼
Development Code Process: [![enter image description here][1]][1]https://github.com/Plutus-art/Aiken-Research

Questions:
1.Blockchain: why we are we developing aiken-lang smart contract for cardano Blockchain?
Answer: Developing smart contracts in Aiken for the Cardano blockchain offers several advantages, particularly for building decentralized applications (dApps) and executing complex business logic. Here are some key aspects of why you might choose Aiken for Cardano:

Smart Contract Capabilities
Custom Logic: You can implement custom logic for various use cases, such as decentralized finance (DeFi), non-fungible tokens (NFTs), and gaming.
State Management: Manage state changes, track ownership, and interact with on-chain data effectively.
Safety and Formal Verification
Type Safety: Aiken's strong type system helps prevent common errors, leading to safer contracts.
Formal Verification: Cardano supports formal methods, which means contracts can be mathematically verified for correctness, reducing vulnerabilities.
Integration with Cardano
Native Tokens: Aiken allows easy creation and management of native tokens on Cardano, making it suitable for tokenomics.
Interoperability: Leverage Cardano's unique features, such as its extended UTXO model, to create complex financial instruments.
Efficiency and Scalability
Performance: Aiken compiles to efficient code that runs well on the Cardano blockchain.
Low Fees: Cardano’s architecture allows for relatively low transaction fees, making it cost-effective for users and developers.
Community and Ecosystem
Growing Community: As Cardano continues to expand, there is an increasing community of developers and users, providing support and collaboration opportunities.
Ecosystem Tools: Access to a range of tools and libraries that enhance development efficiency and deployment.
User-Focused Applications
DApp Development: Build user-friendly decentralized applications that can leverage Cardano’s strengths, like identity verification and secure transactions.
Decentralization: Promote trust and transparency through decentralized solutions in various sectors, including finance, supply chain, and voting.
Education and Resources
Documentation and Tutorials: Aiken has growing documentation and resources that make it easier for developers to get started with Cardano smart contracts.
Experimentation: Developers can use testnets to deploy and test their contracts without financial risk.

2.Development: What is the necessary for developing aiken-lang smart contract and new features and functions oif it?
Answer: To develop smart contracts using Aiken for the Cardano blockchain, you need to understand the necessary tools, features, and functions. Here's a detailed overview:
Necessary Requirements
Development Environment
Aiken Compiler: Install the Aiken compiler, which is used to compile your Aiken code into Plutus Core (the underlying language for Cardano smart contracts).
Text Editor or IDE: Use a code editor like Visual Studio Code, which supports Aiken syntax highlighting and extensions for development.
Cardano Wallet and Node
Cardano Wallet: Set up a Cardano wallet to manage your funds and interact with the blockchain.
Node Access: You might want to run your own Cardano node or use a third-party service to interact with the Cardano blockchain for deploying and testing contracts.
Familiarity with Blockchain Concepts
Understand blockchain fundamentals, especially related to UTXOs (Unspent Transaction Outputs) and how Cardano handles transactions and state.
Aiken Language Syntax
Familiarize yourself with the Aiken syntax and semantics, which includes types, functions, and contract structure.
Testing Framework
Use testing frameworks available for Aiken to write and run tests for your contracts, ensuring correctness before deployment.
Key Features of Aiken
Strong Typing System
Aiken's type system helps catch errors at compile time, improving the reliability of smart contracts.
Functional Programming Paradigm
Aiken is designed around functional programming principles, enabling concise and clear code structure.
Pattern Matching
Simplified handling of complex data structures, making it easier to write robust and maintainable code.
Concurrency Support
Manage multiple operations efficiently, which is crucial for dApps that require responsiveness.
Interoperability with Cardano
Aiken facilitates easy integration with Cardano's native tokens and on-chain data, enhancing your contracts' capabilities.
New Features and Functions (Hypothetical)
Enhanced Data Structures
Future versions might introduce more complex data types (e.g., tuples, lists) for better modeling of real-world entities.
Improved Error Handling
Advanced error handling mechanisms could be added, such as custom exceptions or logging features for better debugging.
In-built Libraries
Libraries for common functionalities (like cryptographic operations, date-time handling, etc.) could simplify development.
Deployment Tools
Enhanced tooling for easier deployment and migration of contracts, including automated scripts and templates.
User Interface Components
Potential integration with frontend frameworks or libraries to build user interfaces that interact with Aiken contracts directly.
Better Integration with Cardano Ecosystem
Features that facilitate integration with other Cardano projects, such as oracles or cross-chain interactions.
3. what is the relation between aiken-lang smart contract and block-explorer
Answer: The relationship between Aiken-lang smart contracts and block explorers is foundational for the functionality and usability of blockchain applications. Block explorers serve as the front-end interface for users and developers to interact with the underlying smart contracts deployed on the Cardano blockchain, providing essential transparency, tracking, and verification capabilities.
4. what is aiken-lang smart contract and what it need for developing?>
Answer: Developing Aiken-lang smart contracts for the Cardano blockchain requires a solid understanding of the development environment, tools, and the Aiken language itself. The strong typing, functional programming capabilities, and integration with Cardano's architecture make Aiken an appealing choice for building reliable and efficient smart contracts. With the right setup and resources, you can create decentralized applications that leverage the unique features of the Cardano ecosystem.
5. what is aiken-lang smart contract and what it need for developing?>
Answer: Proof of Stake (PoS) is a consensus mechanism used in blockchain networks, including Cardano, to validate transactions and secure the network. While PoS itself is a network-level protocol, its principles can influence how smart contracts, such as those written in Aiken, interact with the blockchain. Here’s an overview of how PoS relates to Aiken-lang smart contracts:

Understanding Proof of Stake
Mechanism: In PoS, validators are chosen to create new blocks and confirm transactions based on the number of coins they hold and are willing to "stake" as collateral. This contrasts with Proof of Work (PoW), where miners solve complex mathematical problems to validate transactions.
Incentives: Validators receive rewards in the form of transaction fees or newly minted coins for their participation in the network. The more coins a validator stakes, the higher their chances of being selected to validate transactions.
How Aiken-lang Smart Contracts Interact with PoS
Transaction Validation: When Aiken smart contracts are deployed or executed, their transactions must be validated by the Cardano network, which operates on a PoS mechanism. This means that any state changes or interactions facilitated by the smart contract will rely on the consensus achieved through staking.
Native Tokens: Aiken contracts can manage and create native tokens on Cardano, which can be staked by users. These tokens can have their own rules and conditions, allowing for various use cases, such as governance, rewards, or incentives within the dApp.
Governance Mechanisms: Smart contracts can implement governance mechanisms that allow token holders to vote on decisions affecting the contract, such as upgrades or changes in parameters. In a PoS system, voting power could be proportional to the amount of tokens staked.
Potential Use Cases for Aiken-lang Smart Contracts in PoS Environments
Staking Pools: Smart contracts can facilitate the creation and management of staking pools, allowing users to pool their tokens together for more significant staking rewards.
Decentralized Finance (DeFi): Aiken contracts can enable DeFi applications that leverage staked assets for lending, borrowing, or liquidity provision.
Incentive Structures: Contracts can define and automate reward distribution for participants who stake their tokens, aligning incentives within the network.
Benefits of Using Aiken-lang in a PoS Context
Security and Reliability: Aiken's strong typing and functional programming paradigm contribute to writing robust contracts that minimize vulnerabilities, crucial in a PoS environment where financial assets are often involved.
Efficiency: The integration of Aiken contracts with Cardano's PoS mechanism allows for efficient transaction processing and lower fees compared to traditional systems.
Community Engagement: By leveraging staking and governance through smart contracts, developers can create more engaging and participatory dApps, enhancing user involvement in the ecosystem.

plz support me to give me peer-review
check all the research and codes here

Research Book: https://heyzine.com/flip-book/cf82988484.html
￼
Development Code Process: https://github.com/Plutus-art/Aiken-Research

This is not appropriate for this forum as it is not asking any question. Please, remove.


text:
Code Developing processing with aiken-lang smart contract
Question-1.Are my code in git repo?
Answer: yes it is the link: https://github.com/Plutus-art/Aiken-Research

The official Aiken-lang GitHub repository serves as the primary
source for the Aiken programming language, which is designed for
developing smart contracts on the Cardano blockchain. Here's an
overview of what you might find in the repository:
##1. Source Code Compiler: The core compiler for the Aiken language, which translates Aiken code into Plutus Core, the smart contract
language used by Cardano. Standard Library: A collection of reusable
functions, data types, and modules that provide essential
functionality for developers.
##2. Documentation Getting Started Guide: Instructions on how to install Aiken, set up the development environment, and write your
first smart contract. Language Reference: Detailed descriptions of
Aiken's syntax, semantics, and built-in functions, helping developers
understand how to effectively use the language.
##3. Examples and Tutorials Sample Contracts: Example smart contracts that demonstrate various features and functionalities of Aiken, such
as token contracts, NFT minting, and decentralized applications
(dApps). Tutorials: Step-by-step guides that walk developers through
the process of building specific types of applications or using
particular Aiken features.
##4. Testing and Tools Testing Framework: Tools and libraries for writing and running tests for Aiken contracts, ensuring they function
as expected. Deployment Scripts: Scripts that facilitate the
deployment of Aiken contracts to the Cardano blockchain, making the
process smoother for developers.
##5. Community Contributions Issue Tracking: A space for users to report bugs, request features, or ask questions, fostering community
engagement. Pull Requests: Contributions from the community that can
enhance the Aiken language, adding new features or fixing issues.
##6. Release Notes Changelog: Information about updates, improvements, and new features introduced in different versions of Aiken, allowing
developers to stay informed about the latest changes.
##7. License Information Open Source License: Details about the licensing under which Aiken is released, usually allowing developers
to use, modify, and distribute the software within the terms of the
license.
##2. are we try to process new code experiment with new functions and features of aiken-lang smart contract? Answer Yes here is some  o
develop smart contracts using Aiken for the Cardano blockchain, you
need to understand the necessary tools, features, and functions.
Here's a detailed overview:
Necessary Requirements Development Environment
Aiken Compiler: Install the Aiken compiler, which is used to compile
your Aiken code into Plutus Core (the underlying language for Cardano
smart contracts). Text Editor or IDE: Use a code editor like Visual
Studio Code, which supports Aiken syntax highlighting and extensions
for development. Cardano Wallet and Node
Cardano Wallet: Set up a Cardano wallet to manage your funds and
interact with the blockchain. Node Access: You might want to run your
own Cardano node or use a third-party service to interact with the
Cardano blockchain for deploying and testing contracts. Familiarity
with Blockchain Concepts
Understand blockchain fundamentals, especially related to UTXOs
(Unspent Transaction Outputs) and how Cardano handles transactions
and state. Aiken Language Syntax
Familiarize yourself with the Aiken syntax and semantics, which
includes types, functions, and contract structure. Testing Framework
Use testing frameworks available for Aiken to write and run tests for
your contracts, ensuring correctness before deployment. Key Features
of Aiken Strong Typing System
Aiken's type system helps catch errors at compile time, improving the
reliability of smart contracts. Functional Programming Paradigm
Aiken is designed around functional programming principles, enabling
concise and clear code structure. Pattern Matching
Simplified handling of complex data structures, making it easier to
write robust and maintainable code. Concurrency Support
Manage multiple operations efficiently, which is crucial for dApps
that require responsiveness. Interoperability with Cardano
Aiken facilitates easy integration with Cardano's native tokens and
on-chain data, enhancing your contracts' capabilities. New Features
and Functions (Hypothetical) Enhanced Data Structures
Future versions might introduce more complex data types (e.g.,
tuples, lists) for better modeling of real-world entities. Improved
Error Handling
Advanced error handling mechanisms could be added, such as custom
exceptions or logging features for better debugging. In-built
Libraries
Libraries for common functionalities (like cryptographic operations,
date-time handling, etc.) could simplify development. Deployment
Tools
Enhanced tooling for easier deployment and migration of contracts,
including automated scripts and templates. User Interface Components
Potential integration with frontend frameworks or libraries to build
user interfaces that interact with Aiken contracts directly. Better
Integration with Cardano Ecosystem
Features that facilitate integration with other Cardano projects,
such as oracles or cross-chain interactions.
3. Invalid Type Error
    entrypoint main(x: Int) -> Bool {
        x + "string"  -- Invalid operation between Int and String
    } } ```

**Error:**

```shell Error: Invalid operand types for `+` (Int, String) ```

**Solution:**   Fix the type mismatch by removing the string concatenation.

```aiken contract FixedContract {
    entrypoint main(x: Int, y: Int) -> Int {
        x + y
    } } ```

---

Conditional_logic.ak

contract ConditionalContract {
    entrypoint main(x: Int) -> Bool {
        if x > 10 {
            True
        } else {
            False
        }
    } } no2:

test_Conditional_logic.ak

test ConditionalTest {
    assert_eq!(ConditionalContract::main(11), True)
    assert_eq!(ConditionalContract::main(5), False) } no:3 simple.ak

contract Simple {
    entrypoint main() -> Bool {
        True
    } } ```

Test_simple.ak

test SimpleTest {
    assert_eq!(Simple::main(), True) }

the rest you can find on github repo Development Code
Process: https://github.com/Plutus-art/Aiken-Research

Question-2: What is the New on Aiken-lang?
Answer: here are some recent developments and features that may be included in

Aiken-lang:

Language Enhancements Improved Syntax and Features: Ongoing updates may include new language constructs, syntactic sugar, and
features that enhance developer experience and code readability.

Standard Library Updates Expanded Functions: New utility functions and data structures might be added to the standard library, making it
easier to implement common patterns in smart contracts.

Improved Compiler Performance Optimization: Enhancements to the compiler that improve performance, error reporting, and code
optimization for better execution on the Cardano blockchain.

Documentation and Learning Resources Comprehensive Guides: Updates to official documentation, including more tutorials, code examples,
and best practices to help new developers get started and improve
their skills.

Testing and Tooling New Testing Frameworks: Introduction of better testing frameworks or tools that streamline the process of writing,
running, and managing tests for Aiken contracts.

Community Engagement Workshops and Webinars: Increased community outreach through educational events, workshops, or webinars to help
developers learn about Aiken and its capabilities.

Integration with Other Ecosystems Cross-Chain Functionality: Potential developments in interoperability with other blockchain
ecosystems, enabling Aiken contracts to interact with various
platforms.

User Feedback Incorporation Feature Requests: Regular updates based on community feedback, addressing user-requested features or
improvements.
Question-3. Can we create Dex-Swap System with aiken-lang smart contract?
Answer: Yes

here is some basic developing process for Dex swap in aiken
mint.ak
// native_token_minting.aiken
validator {   // Validates minting rules for the native token   fn
validate_minting(tx: Tx, minting_policy: PubKeyHash, amount: Value)
-> Bool {
let mint = tx.mint[0] // Access the first minting transaction
// Ensure that only the allowed policy can mint the token
let valid_minter = mint.policy == minting_policy

// Ensure the minting amount is positive
let valid_amount = mint.amount > 0

// Both conditions must be true for the mint to be valid
valid_minter && valid_amount   } }

parameter.ak
// native_token_parameters.aiken
// Define token parameters const TOKEN_POLICY: PubKeyHash =
"your_policy_id_here" const TOKEN_NAME: ByteArray =
"YourTokenName".as_bytes()
// Minting function, called when creating new tokens fn
mint_native_token(tx: Tx) -> Bool {   validate_minting(tx,
TOKEN_POLICY, 1000)  // Mint 1000 units of the token }
Minting_control.ak
// native_token_minting_control.aiken
validator {   // Validates that the minting transaction is signed by
the correct key   fn validate_minting_with_authorization(tx: Tx,
authorized_pubkey: PubKeyHash, minting_policy: PubKeyHash, amount:
Value) -> Bool {
let signer = tx.signatories[0]  // First signer of the transaction
// Ensure the signer is the authorized minter and validate the mint
let valid_signer = signer == authorized_pubkey
let valid_minting = validate_minting(tx, minting_policy, amount)

// Both conditions must be true for the minting to be valid
valid_signer && valid_minting   } }

native_token_burning.ak // native_token_burning.aiken
validator {   // Validates burning of the native token   fn
validate_burning(tx: Tx, burn_policy: PubKeyHash, amount: Value) ->
Bool {
let burn = tx.burn[0]  // Access the first burn transaction
// Ensure that only the allowed policy can burn the token
let valid_burner = burn.policy == burn_policy

// Ensure the burning amount is positive (burning should always be less than total supply)
let valid_amount = burn.amount > 0

// Both conditions must be true for the burn to be valid
valid_burner && valid_amount   }

Native_token_deploy.ak
// native_token_deploy.aiken
validator {   // Combines minting and burning logic into a single
smart contract   fn mint_or_burn(tx: Tx, authorized_pubkey:
PubKeyHash, policy: PubKeyHash, amount: Value) -> Bool {
let is_mint = tx.mint.len > 0
let is_burn = tx.burn.len > 0
if is_mint {
  validate_minting_with_authorization(tx, authorized_pubkey, policy, amount)
} else if is_burn {
  validate_burning(tx, policy, amount)
} else {
  // No valid mint or burn action detected
  false
}   } }

Question-4: Can we create NFT marketplace with aiken-lang smart contract?
answer:

marketplace.ak
contract NFTMarketplace {
// Data structures
record NFT {
id: Int,
owner: Address,
price: Int,
isListed: Bool,
auctionEndTime: Maybe(Time),
highestBid: Maybe<(Address, Int)>,
}
// Storage
storage nfts: Map<Int, NFT> = {}
storage stakingBalances: Map<Address, Int> = {}

// List NFT for sale
entrypoint listNFT(nftId: Int, price: Int) {
    let nft = nfts[nftId]

    // Check if the NFT exists and is owned by the caller
    if nft.owner != caller {
        abort("You do not own this NFT.")
    }

    // Update NFT to be listed
    nfts[nftId] = { nft with price = price, isListed = True }
}

// Delist NFT
entrypoint delistNFT(nftId: Int) {
    let nft = nfts[nftId]

    // Check if the NFT is listed and owned by the caller
    if !nft.isListed || nft.owner != caller {
        abort("Cannot delist this NFT.")
    }

    // Update NFT to be unlisted
    nfts[nftId] = { nft with isListed = False }
}

// Buy NFT
entrypoint buyNFT(nftId: Int) {
    let nft = nfts[nftId]

    // Check if NFT is listed and payment is correct
    if !nft.isListed || amount != nft.price {
        abort("Cannot buy this NFT.")
    }

    // Transfer NFT ownership
    nfts[nftId] = { nft with owner = caller, isListed = False }
}

// Start Auction
entrypoint startAuction(nftId: Int, duration: Int) {
    let nft = nfts[nftId]

    if nft.owner != caller {
        abort("You do not own this NFT.")
    }

    // Set auction parameters
    nfts[nftId] = { nft with auctionEndTime = Just(currentTime + duration), highestBid = Nothing }
}

// Place Bid
entrypoint bid(nftId: Int, bidAmount: Int) {
    let nft = nfts[nftId]

    // Check if auction is active
    if nft.auctionEndTime == Nothing || currentTime >= nft.auctionEndTime {
        abort("Auction is not active.")
    }

    // Check if bid is higher than the current highest bid
    let highestBid = nft.highestBid
    if highestBid != Nothing && bidAmount <= snd(highestBid) {
        abort("Bid must be higher than the current highest bid.")
    }

    // Update highest bid
    nfts[nftId] = { nft with highestBid = Just((caller, bidAmount)) }
}

// Claim NFT after auction ends
entrypoint claimNFT(nftId: Int) {
    let nft = nfts[nftId]

    // Check if auction has ended
    if nft.auctionEndTime == Nothing || currentTime < nft.auctionEndTime {
        abort("Auction has not ended yet.")
    }

    // Transfer NFT ownership to the highest bidder
    let highestBid = nft.highestBid
    if highestBid == Nothing {
        abort("No bids were placed.")
    }

    nfts[nftId] = { nft with owner = fst(highestBid), auctionEndTime = Nothing, highestBid = Nothing }
}

// Staking functionality
entrypoint stake(amount: Int) {
    // Update staking balances
    stakingBalances[caller] = (stakingBalances[caller] + amount)
}

entrypoint unstake(amount: Int) {
    // Check if caller has enough staked
    if stakingBalances[caller] < amount {
        abort("Not enough staked to unstake.")
    }

    // Update staking balances
    stakingBalances[caller] = (stakingBalances[caller] - amount)
} }

Here's a simplified version of an NFT marketplace smart contract in
Aiken-lang that includes features for listing, delisting, buying,
selling, auction bidding, and staking. This example focuses on the
structure and logic; in a real implementation, you'd need to handle
many additional aspects like security, error handling, and state
management.
NFT Marketplace Smart Contract in Aiken-lang aiken Copy code contract
NFTMarketplace {
// Data structures
record NFT {
id: Int,
owner: Address,
price: Int,
isListed: Bool,
auctionEndTime: Maybe(Time),
highestBid: Maybe<(Address, Int)>,
}
// Storage
storage nfts: Map<Int, NFT> = {}
storage stakingBalances: Map<Address, Int> = {}

// List NFT for sale
entrypoint listNFT(nftId: Int, price: Int) {
    let nft = nfts[nftId]

    // Check if the NFT exists and is owned by the caller
    if nft.owner != caller {
        abort("You do not own this NFT.")
    }

    // Update NFT to be listed
    nfts[nftId] = { nft with price = price, isListed = True }
}

// Delist NFT
entrypoint delistNFT(nftId: Int) {
    let nft = nfts[nftId]

    // Check if the NFT is listed and owned by the caller
    if !nft.isListed || nft.owner != caller {
        abort("Cannot delist this NFT.")
    }

    // Update NFT to be unlisted
    nfts[nftId] = { nft with isListed = False }
}

// Buy NFT
entrypoint buyNFT(nftId: Int) {
    let nft = nfts[nftId]

    // Check if NFT is listed and payment is correct
    if !nft.isListed || amount != nft.price {
        abort("Cannot buy this NFT.")
    }

    // Transfer NFT ownership
    nfts[nftId] = { nft with owner = caller, isListed = False }
}

// Start Auction
entrypoint startAuction(nftId: Int, duration: Int) {
    let nft = nfts[nftId]

    if nft.owner != caller {
        abort("You do not own this NFT.")
    }

    // Set auction parameters
    nfts[nftId] = { nft with auctionEndTime = Just(currentTime + duration), highestBid = Nothing }
}

// Place Bid
entrypoint bid(nftId: Int, bidAmount: Int) {
    let nft = nfts[nftId]

    // Check if auction is active
    if nft.auctionEndTime == Nothing || currentTime >= nft.auctionEndTime {
        abort("Auction is not active.")
    }

    // Check if bid is higher than the current highest bid
    let highestBid = nft.highestBid
    if highestBid != Nothing && bidAmount <= snd(highestBid) {
        abort("Bid must be higher than the current highest bid.")
    }

    // Update highest bid
    nfts[nftId] = { nft with highestBid = Just((caller, bidAmount)) }
}

// Claim NFT after auction ends
entrypoint claimNFT(nftId: Int) {
    let nft = nfts[nftId]

    // Check if auction has ended
    if nft.auctionEndTime == Nothing || currentTime < nft.auctionEndTime {
        abort("Auction has not ended yet.")
    }

    // Transfer NFT ownership to the highest bidder
    let highestBid = nft.highestBid
    if highestBid == Nothing {
        abort("No bids were placed.")
    }

    nfts[nftId] = { nft with owner = fst(highestBid), auctionEndTime = Nothing, highestBid = Nothing }
}

// Staking functionality
entrypoint stake(amount: Int) {
    // Update staking balances
    stakingBalances[caller] = (stakingBalances[caller] + amount)
}

entrypoint unstake(amount: Int) {
    // Check if caller has enough staked
    if stakingBalances[caller] < amount {
        abort("Not enough staked to unstake.")
    }

    // Update staking balances
    stakingBalances[caller] = (stakingBalances[caller] - amount)
} } Key Features Implemented Listing NFTs: Users can list their NFTs for sale with a specific price. Delisting NFTs: Users can remove

their NFTs from the marketplace. Buying NFTs: Users can buy listed
NFTs by sending the correct amount. Auction Management: Users can
start auctions, place bids, and claim NFTs after auctions end.
Staking: Users can stake and unstake tokens, allowing for potential
rewards in a full implementation.

Question-5.Can we create decentralized-applications with aiken lang smart contract?
Answer: Yes Here is  Some Example codes with aiken New Features

Certainly! Here are five example code snippets for potential
functions and features you might include in a decentralized
application (dApp) using Aiken-lang smart contracts. Each snippet
showcases a different functionality relevant to dApp development.
1. User Registration
registerUser(username: String) {
    // Check if username is unique
    if (usernames[username] != Nothing) {
        abort("Username already exists.")
    }
    // Register user
    usernames[username] = caller } ```

### 2. Voting Mechanism

```aiken // Voting feature for a simple governance dApp record Vote {
    proposalId: Int,
    voter: Address,
    choice: Bool, }

entrypoint castVote(proposalId: Int, choice: Bool) {
    // Ensure the voter has not voted yet
    if (votingRecords[caller][proposalId] != Nothing) {
        abort("You have already voted.")
    }
    // Record the vote
    votingRecords[caller][proposalId] = Just({ proposalId, caller, choice }) } ```

### 3. Token Transfer

```aiken // Function to transfer tokens between users entrypoint
transferTokens(to: Address, amount: Int) {
    let balance = tokenBalances[caller]

    // Ensure sufficient balance
    if (balance < amount) {
        abort("Insufficient balance.")
    }

    // Update balances
    tokenBalances[caller] = balance - amount
    tokenBalances[to] = (tokenBalances[to] + amount) } ```

### 4. Loyalty Rewards

```aiken // Reward users for transactions entrypoint
rewardUser(rewardAmount: Int) {
    // Check if user has made a transaction recently
    if (recentTransactions[caller] == Nothing) {
        abort("No recent transactions to reward.")
    }

    // Update reward balance
    rewardBalances[caller] = (rewardBalances[caller] + rewardAmount) } ```

### 5. NFT Minting

```aiken // Function to mint a new NFT entrypoint mintNFT(metadata:
String) {
    let newId = nextNftId

    // Create the NFT
    nfts[newId] = { id = newId, owner = caller, metadata = metadata, isMinted = True }
    nextNftId = nextNftId + 1 } ```


text:
Comprehensive Research on Aiken-lang Smart Contracts: Features, Functions, and Advancements
Researching Aiken-lang Smart Contracts: Insights and Developments
I’m deeply invested in exploring Aiken-lang for building smart contracts on Cardano. Over time, I’ve researched, developed, and experimented with the language, compiling my insights into a research book and development guide. I would appreciate any peer reviews on these resources:
Research Book: Flip-book link
Development Code Repository: GitHub Plutus-art Aiken Research

Why Develop Smart Contracts in Aiken-lang for Cardano?

Developing smart contracts with Aiken-lang for Cardano offers unique benefits, particularly for building decentralized applications (dApps) with advanced business logic. Here’s a breakdown of the advantages:
Smart Contract Capabilities
New: Advanced Features – Enables rich, custom logic ideal for decentralized finance (DeFi), non-fungible tokens (NFTs), and blockchain gaming.
Old: Basic Contract Functions – Limited functionality for more complex use cases.
Safety and Formal Verification
New: Enhanced Safety – Aiken's strong type system reduces bugs, while formal verification can mathematically prove contract correctness.
Old: Standard Type Systems – Fewer tools to catch and prevent vulnerabilities.
Integration with Cardano
New: Native Token Support – Seamlessly integrates with Cardano’s native tokens, ideal for tokenomics.
Old: Limited Token Interoperability – Required complex setups for handling tokens.
Efficiency and Scalability
New: High Performance, Low Fees – Efficient code with lower transaction fees thanks to Cardano’s architecture.
Old: Higher Costs – Less optimized, resulting in higher execution costs.
Growing Community and Ecosystem
New: Expanding Resources – More libraries and community support for faster development.
Old: Isolated Efforts – Fewer tools and less support, making development slower.
User-Focused Applications
New: Broad Application Support – Ideal for applications needing identity verification and secure transactions.
Old: Limited Decentralization – Harder to build user-friendly, decentralized solutions.

Development: Essential Tools, Features, and Functions in Aiken-lang

To create smart contracts in Aiken for Cardano, a specific setup is required:
Necessary Tools
Aiken Compiler – Compiles Aiken code to Plutus Core, optimized for Cardano.
Text Editor or IDE – Visual Studio Code, with Aiken support, streamlines coding.
Key Features of Aiken-lang
New: Strong Typing System – Reduces runtime errors by catching issues early.
Old: Weak Typing – Lacks compile-time checks for potential issues.
New Features and Functions (Hypothetical)
Looking ahead, Aiken could bring even more powerful tools to developers:

Enhanced Data Structures – Tuples, lists, and more complex data types.

Improved Error Handling – Custom exceptions, logging for better debugging.

Built-In Libraries – Ready-to-use libraries for cryptography, date-time handling.

Deployment Tools – Automated scripts and templates for streamlined deployment.

User Interface Components – Integrations with frontend libraries for interactive dApps.

Improved Ecosystem Integration – Built-in support for oracles and cross-chain capabilities.

Relationship Between Aiken-lang and Block Explorers

Block explorers are critical to interacting with Aiken-lang smart contracts, serving as a front-end interface for users and developers. By connecting contracts to Cardano’s blockchain, block explorers offer transparency, tracking, and verification of each contract's actions.

Understanding Aiken-lang and the Development Process

Creating reliable, efficient Aiken smart contracts requires mastery of the development environment and Aiken’s unique features. The language’s strong typing and functional programming principles make it ideal for building dApps that utilize Cardano’s blockchain features.

Proof of Stake (PoS) and Aiken-lang Smart Contracts

PoS Mechanism Overview
PoS vs. PoW – Unlike Proof of Work (PoW), PoS selects validators based on their stake, increasing energy efficiency.
How Aiken Smart Contracts Interact with PoS
Transaction Validation – When Aiken contracts are deployed, their transactions rely on Cardano’s PoS consensus.
Native Tokens – Aiken contracts can create and manage native tokens, allowing for custom staking rules.
Governance – Enable token holders to vote on decisions related to contract parameters.
Use Cases in a PoS Environment

Staking Pools – Manage collective staking efforts.
DeFi Solutions – Provide lending and borrowing on staked assets.
Incentive Mechanisms – Distribute rewards to participants proportionally based on staked assets.

Benefits of Using Aiken-lang in PoS Systems
Security and Reliability – Strong typing and functional design reduce vulnerabilities.
Efficiency – PoS compatibility reduces transaction fees, making it cost-effective.
Community Engagement – Token staking enhances user participation in dApp ecosystems.
strong text


text:
How to get Minswap "Pool composition" info from Cardano blockchain?
I am trying to find a way to get the Minswap liquidity pool data on the Cardano blockchain.
The pool info page (e.g. https://minswap.org/pools/min-ada) provides the following data:

LP policy ID: f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c
LP token name:
82e2b1fd27a7712a1a9cf750dfbea1a5778611b20e06dd6a611df7a643f8cb75

Is it possible to get the token reserves in the pool (section Pool composition) from the blockchain based on this data, as well as the token addresses that make up the pool's liquid pair (e.g. using 'pycardano' or another method)?


text:
How can i make a transaction where I don't pay Fees
I'm trying to make a transaction where a user can claim x amount of tokens, without me (project's wallet) having to pay anything
This is the setup:
I'm trying to send a user 100 $TOKEN without me creating a new UTXO (so i don't have to send dust ADA along with it)
at the same time i want the user to pay the transaction fee not me.
does the setup in the attachment work? if yes how can i do that in mesh?
if no what's wrong with it, and how can i fix it. any help would be appreciated

I think the wording is a bit off - since you always create a new UTXO when you spend some of your tokens in the transaction - but what you're trying to achieve is entirely feasible and your illustration explains it well
Fees must be payed, but it does not matter which party ultimately pays them, as long as you get both to sign the tx.
You could additionally increase the throughput by splitting up the 1000 $Token on multiple UTXOs.
You also don't necessarily need a smart contract for this type of transaction. Your project backend can compose the transaction, and then have both parties (your project and the user) sign it

Got it thanks, but in this case, who pays the fees? which signer, both?

In your case it's the claiming user (blue) who pays the fees.
That's probably also the person who initiates the transaction on a website or so - so its like the "default" I'd say for most apps, if I'm not mistaken.
But in practice, you can compose the transaction any way you want; just subtract the calculated fees from any of the outputs (change utxos). When both parties agree (and sign the tx), it should work fine.
(also keep in mind that the UTXO with the new $Token balance needs to have a certain amount of min Ada in it as well)

I really do not think that is possible. Forcing the payment of fees is how the Cardano network avoids DDOS attacks.

Yea but the user is paying fee for the transaction. Sorry if my wording was inaccurate, it meant that the project's wallet not pay anything, and the user pays the transaction fees.


text:
Error: Inputs do not conform to this spec or are otherwise invalid. (Building Cardano Transaction with dAPP wallet using Vanilla JS)
I'm trying to build a transaction with dApp wallet(s). Following is my code:
async function buildAndSignTransaction(api, recipientAddressStr, amount) {
    try {
        // Convert recipient address from Bech32
        const recipientAddress = wasm.Address.from_bech32(recipientAddressStr);
        console.log("Recipient Address From Bech32:", recipientAddress);

        // Step 1: Get used address (sender)
        const usedAddresses = await api.getUsedAddresses();
        const senderAddressHex = usedAddresses.length > 0 ? usedAddresses[0] : null;

        if (!senderAddressHex) {
            throw new Error("No sender address found.");
        }

        // Step 2: Create transaction builder
        const linearFee = wasm.LinearFee.new(
            wasm.BigNum.from_str("44"), // constant fee
            wasm.BigNum.from_str("155381")    // fee per byte
        );

        const minUtxoValue = wasm.BigNum.from_str("34482"); // minimum UTXO value of 1 ADA
        const poolDeposit = wasm.BigNum.from_str("500000000");
        const keyDeposit = wasm.BigNum.from_str("2000000");
        const coinsPerUtxoWord = wasm.BigNum.from_str("34482");
        const maxValueSize = 5000;
        const maxTxSize = 16384;

        const txBuilder = wasm.TransactionBuilder.new(
            linearFee,
            minUtxoValue,
            poolDeposit,
            keyDeposit,
            maxValueSize,
            maxTxSize
        );

        // Step 3: Get UTXOs and log them
        const utxos = await api.getUtxos();

        if (utxos.length === 0) {
            throw new Error("No UTXOs found for the sender.");
        }

        let totalInputValue = wasm.BigNum.from_str("0");
        let requiredAmount = wasm.BigNum.from_str(amount.toString());

        // Convert sender's address once before the loop
        const senderAddress = wasm.Address.from_bytes(hexToBytes(senderAddressHex));

        // Step 4: Select UTXOs
        for (const utxoHex of utxos) {
            const utxo = wasm.TransactionUnspentOutput.from_bytes(hexToBytes(utxoHex));
            const txInput = utxo.input();
            const outputValue = utxo.output().amount();

            const txHash = Buffer.from(txInput.transaction_id().to_bytes()).toString('hex');  // Transaction hash in hex
            const txIndex = txInput.index();  // Index of the input in the transaction

            console.log(". "+txHash + " #" + txIndex + " = " + outputValue.coin().to_str());

            // Ensure UTXO is valid and meets minimum value
            if (outputValue.coin().compare(minUtxoValue) < 0) {
                console.log("Skipping UTXO below minimum UTXO value:", outputValue.coin().to_str());
                continue; // Skip UTXOs that do not meet minimum value
            }

            txBuilder.add_input(
                senderAddress,
                txInput,
                outputValue
            );

            totalInputValue = totalInputValue.checked_add(outputValue.coin());
        }

        console.log("Total Input Value:", totalInputValue.to_str());
        console.log("Required Amount (Lovelace):", requiredAmount.to_str());

        // Step 5: Check if total input is enough
        const minFee = txBuilder.min_fee();
        console.log("Minimum Fee:", minFee.to_str());

        if (totalInputValue.compare(requiredAmount.checked_add(minFee)) < 0) {
            throw new Error('Not enough UTXO balance to cover the amount and fees.');
        }

        // Step 6: Add output for recipient
        const recipientAmount = wasm.BigNum.from_str(amount.toString());
        const outputAddress = wasm.Address.from_bytes(recipientAddress.to_bytes());

        console.log("Recipient Amount (Lovelace):", recipientAmount.to_str());
        console.log("Minimum UTXO Value (Lovelace):", minUtxoValue.to_str());

        if (recipientAmount.compare(minUtxoValue) < 0) {
            throw new Error(`Output amount ${recipientAmount.to_str()} is less than the minimum UTXO value ${minUtxoValue.to_str()}.`);
        }

        txBuilder.add_output(wasm.TransactionOutput.new(outputAddress, wasm.Value.new(recipientAmount)));
        console.log("Added Output - Recipient Address:", outputAddress, "Amount:", recipientAmount);

        // Step 7: Set the change (if any)
        const totalOutputValue = recipientAmount.checked_add(minFee);
        const changeAmount = totalInputValue.checked_sub(totalOutputValue);

        if (changeAmount.compare(wasm.BigNum.from_str("0")) > 0) {
            txBuilder.add_output(wasm.TransactionOutput.new(
                wasm.Address.from_bytes(hexToBytes(senderAddressHex)),
                wasm.Value.new(changeAmount)
            ));
            const senderAddress = wasm.Address.from_bytes(hexToBytes(senderAddressHex)).to_bech32().toString();
            console.log("Added Change - Address:", senderAddress, "Change Amount:", changeAmount.to_str());
        }

        // Step 8: Set fee
        txBuilder.set_fee(minFee);

        // Step 9: Build transaction
        const txBody = txBuilder.build();
        console.log("Transaction body built:", txBody);

        // Log the outputs manually
        const txOutputs = txBody.outputs();
        for (let i = 0; i < txOutputs.len(); i++) {
            const output = txOutputs.get(i);
            console.log(`Output ${i + 1}: Address: ${output.address().to_bech32()}, Amount: ${output.amount().coin().to_str()}`);
        }

        // Step 10: Build the full transaction with witness set
        const witnesses = wasm.TransactionWitnessSet.new();
        const transaction = wasm.Transaction.new(txBody, witnesses);
        console.log("Transaction with witnesses built:", transaction);

        // Step 11: Sign the transaction
        const signedTx = await api.signTx(transaction.to_bytes());
        console.log("Signed Transaction:", signedTx);

        // Step 12: Submit the signed transaction
        const txHash = await api.submitTx(signedTx);
        console.log("Transaction submitted. TX Hash:", txHash);
    } catch (error) {
        console.error("Error building and signing transaction:", error);
    }
}

here API is nami, eternl, flint etc
I'm getting following error:
Inputs do not conform to this spec or are otherwise invalid.
Please note I'm using cardano-serialization-lib because I want to achieve this requirement in Vanilla JS, and for that I could only use this following cdn:
https://cdn.jsdelivr.net/npm/@emurgo/cardano-serialization-lib-asmjs@9.1.2/cardano_serialization_lib.min.js
I see so many examples where people are using ReactJS and their transaction builder looks something like this:
const txBuilder = TransactionBuilder.new(
            TransactionBuilderConfigBuilder.new()
                .fee_algo(LinearFee.new(BigNum.from_str(this.protocolParams.linearFee.minFeeA), BigNum.from_str(this.protocolParams.linearFee.minFeeB)))
                .pool_deposit(BigNum.from_str(this.protocolParams.poolDeposit))
                .key_deposit(BigNum.from_str(this.protocolParams.keyDeposit))
                .coins_per_utxo_word(BigNum.from_str(this.protocolParams.coinsPerUtxoWord))
                .max_value_size(this.protocolParams.maxValSize)
                .max_tx_size(this.protocolParams.maxTxSize)
                .prefer_pure_change(true)
                .build()
        );

But In my case I cannot use TransactionBuilderConfigBuilder as it is undefined in my cdn.
Please help me understand why I'm getting the error: Inputs do not conform to this spec or are otherwise invalid.
And if you guys can help me achieve this requirement in Vanilla JS that would be great!!
I appreciate your time reading this to help people like me.


text:
Cardano API key HttpClient Authorization
ers
I've obtained a free API key (FreeApiKey) in order to find all my transactions easily. I've written this query in C# using .NET but I'm stuck on how to specify the authorization using this key.  I've got as far as:
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("apiKey", FreeApiKey);
but when I issue the HttpResponseMessage request I get "Unauthorized access" etc. etc.
What am I doing wrong? All suggestions gratefully received.
Thanks


text:
transfering business account limit in cashapp to personal account in cashap
how do I transfer funds from business account to personal account in the same from the same account
Prompted 98.5% of your portfolios Only you can see this $1,136,277.00 18 shares Day gain +$5,472.00 0.48% Total gain -...
6:39 PM • Details


text:
Cardano-node fully synced but very high CPU load
I moved my deadalus node to debian VM with 12 Xeon E5-2660 v4 cores and 20GiB of RAM.
But after it fully synced, the CPU load is even higher, constantly at 95-100%, dropping to 0 for a few minutes, and then back to max load.
https://prnt.sc/AoWJVQK_Nwf4
What could be the issue?


text:
Retrieving funds from Vesting smart contract using Kuber throws missing Utxo error
I am stuck in the PPP 0403 Off-chain Code with Kuber.
While I can successfully make transaction using Kuber Playground and vesting smart contract to vest ADA from my wallet, I cannot retrieve them afterwards. I always get the following error ❌ KubærApi [Status 400] : Input Utxo missing in utxo map : 4b761ef95c14c0a2e8721b3e406e20ba0f2cceb2d2c1507e9615448aa67253e4#0. I have checked using both Cardanoscan and Blockfrost that the utxos I am refering to are available. Has anyone faced a similar problem or has any suggestions on troubleshooting?


text:
被诈骗者 诈骗所有ada虚拟资产
你好，cardano官方, 我被截图中的youtuber（诈骗者）冒充cardano CEO的诈骗者诈骗了我的所有ada虚拟资产，原本我是不相信的，可是当我看到了神似Charles Hoskinson大神的在直播，于是我相信了，那是我仅有的全部资产，希望官方能够从技术角度协助我找回我的资产，由衷的感谢

Sorry, we aren't a recovery service.

Hi, I'm sorry to hear what happened to you. We are no "Cardano officials" but a community forum. These type of scams are always on the rise when interest in cryptocurrencies increases. Unfortunately there's little you can do except for working with your local authorities.

诈骗者的钱包地址：stake1u8ll2l7yqpsmsys8zn3gh5xn95fhpusdeahdchasl3xgfqqpt3w48，

我已经联系了我当地警方、以及交易所平台方、youtube方，他们都愿意协助我找回资产，我来提供证明 恳请你们通过技术层面或者更高层面帮助我，找回我的个人虚拟资产，由衷的感谢！


text:
Recover Staked Ada from Byron Wallet
Everything I read online states I was never able to stake ADA using a Byron era wallet. But I most certainly did back in 2021. Now, after installing Daedalus again, as that's all I ever used. I am confronted with needing to open a shelly wallet to utilize the staking.
https://cardanoscan.io/transaction/57a8f5bc4a2cdcb1a70d4b5aef04ea5953e8b3dbe9ecf77a7b14ea7d6599d8c7
I have only ever used Daedalus and no other wallet interface, why is it I cannot utilize the staking and unstake my ADA? Is this ADA just lost forever due to the Shelly upgrade?

Byron era accounts never supported staking. The staking functionality was introduced in the Shelley era. To restore your account, you should use the seed phrase (usually 24 words).

Looking at your stake-key history, your wallet is staked since Aug 21, 2021 and you have earned 47.179736 ADA in staking rewards during that time. As far as I know this means you upgraded your wallet to a Shelley wallet at some point.
https://cardanoscan.io/stakeKey/stake1u9qd5nzm4fyeky2vs4terdavyc30nudnx9u8x4uymrgp05chu4stx?tab=stakekeyhistory
The ADA is surely not lost. You could try to use the seed phrase (12 words) in another wallet and see if you can use the staking features there.
There are plenty of wallets to chose from. My personal favorite is Eternl where you can restore a 12 word Shelley wallet:


text:
How to incorporate a 3rd party signature transaction using the Cardano CLI tools?
I'm trying to use the HEX encoded signature I've received from Fireblocks API when using their Raw Signing functionality, however I'm not sure how to use the encoded content when it comes to signing the transaction using the Cardano CLI tools. I've tried creating a witness using the binary data, however I've got an invalid format message which probably means that Cardano expects the signing file to be in a similar format (or maybe the same one) as the payment.skey used to normally sign transactions when there's no 3rd party wallet/API involved.
Given that Fireblocks probably isn't the only provider of such services, I'm guessing this feature is something more people encountered, and had to figure out depending on the signature provided by a 3rd party. Any information will be greatly appreciated! :)


text:
Can’t get cardano-wallet to work
I’m trying to get cardano-wallet to run on a local server to test out an application that I’m working on. I’m interested in using the wallet backend API. I had an issue while trying to build cardano-node from source so I’ve resorted to using the docker containers for both the node and wallet.
Command to run cardano-node:
sudo docker run \
--rm \
-v ./preview_testnet_node_config:/configuration \
-p 1337:1337 \
ghcr.io/intersectmbo/cardano-node:8.9.2 run \
--topology /configuration/topology.json \
--database-path /configuration/db \
--socket-path /configuration/db/preview_testnet_node.socket \
--host-addr 0.0.0.0 \
--port 1337 \
--config /configuration/config.json

This seems to work fine. I’m getting some errors but they don’t seem fatal (please correct me if I’m wrong).
[d0953d4d:cardano.node.InboundGovernor:Info:73] [2024-05-28 01:38:28.44 UTC] TrInboundGovernorCounters (InboundGovernorCounters {coldPeersRemote = 3, idlePeersRemote = 2, warmPeersRemote = 0, hotPeersRemote = 0})
[d0953d4d:cardano.node.ConnectionManager:Info:73] [2024-05-28 01:38:28.44 UTC] TrConnectionManagerCounters (ConnectionManagerCounters {fullDuplexConns = 0, duplexConns = 4, unidirectionalConns = 0, inboundConns = 1, outboundConns = 3})
[d0953d4d:cardano.node.InboundGovernor:Info:73] [2024-05-28 01:38:28.44 UTC] TrDemotedToColdRemote (ConnectionId {localAddress = 172.17.0.2:1337, remoteAddress = 3.70.89.92:3001}) (OperationSuccess CommitTr)
[d0953d4d:cardano.node.InboundGovernor:Info:73] [2024-05-28 01:38:28.44 UTC] TrInboundGovernorCounters (InboundGovernorCounters {coldPeersRemote = 3, idlePeersRemote = 1, warmPeersRemote = 0, hotPeersRemote = 0})
[d0953d4d:cardano.node.ConnectionManager:Info:73] [2024-05-28 01:38:28.44 UTC] TrConnectionManagerCounters (ConnectionManagerCounters {fullDuplexConns = 0, duplexConns = 3, unidirectionalConns = 0, inboundConns = 0, outboundConns = 3})
[d0953d4d:cardano.node.InboundGovernor:Info:73] [2024-05-28 01:38:28.44 UTC] TrDemotedToColdRemote (ConnectionId {localAddress = 172.17.0.2:1337, remoteAddress = 18.185.163.167:3001}) (OperationSuccess CommitTr)
[d0953d4d:cardano.node.InboundGovernor:Info:73] [2024-05-28 01:38:28.44 UTC] TrInboundGovernorCounters (InboundGovernorCounters {coldPeersRemote = 3, idlePeersRemote = 0, warmPeersRemote = 0, hotPeersRemote = 0})
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:28.50 UTC] Chain extended, new tip: 462d0cd0e1cbcffb3f0ed3c0f7f0d3d66244c6ce08963f49686d3eb5ef9512cd at slot 50139156
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:29.75 UTC] Chain extended, new tip: cb232af3ed7c2b521d6efd8b0ef53f1d9d9ddc4fa41261d76af872627b379319 at slot 50143366
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:31.01 UTC] Chain extended, new tip: 45e8830219d76c701e94cf9cdcc924b8421e2f17fc1ddbf3fe66ad32b89900a7 at slot 50147299
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:32.26 UTC] Chain extended, new tip: 4d5e68d3d8ee562b72f2a700903bd01110824ed99f60e4abb43b26b84d915c5d at slot 50150025
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:33.51 UTC] Chain extended, new tip: 2cca1fdad991a47027d146ccad7af962ebb08aaa5bb47cc679daf659ae073403 at slot 50154444
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:34.76 UTC] Chain extended, new tip: b2c757fac985ccc61df338de2916f88d5b3a33efcd76a4c08eed29b044f18650 at slot 50158674
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:36.02 UTC] Chain extended, new tip: 16b857160b39a4ef11fb8823d15e624ae6c756a0b1866394945ba6004d887089 at slot 50161192
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:37.31 UTC] Chain extended, new tip: e9fda28d1c4b80dbd60fccc5421d80f5976bf6e56ec705fb68722acc76d3faad at slot 50165298
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:38.56 UTC] Chain extended, new tip: 9ebe02da870c040a070d3041968532301ed635085fe8366f2e837a3aa4d227a9 at slot 50168583
[d0953d4d:cardano.node.ChainDB:Info:47] [2024-05-28 01:38:38.87 UTC] Took ledger snapshot DiskSnapshot {dsNumber = 50120552, dsSuffix = Nothing} at a6b8a1f9e57b8c4e36b8bad359815e4403f2fd4532b7e80504f86482f96df727 at slot 50120552
[d0953d4d:cardano.node.ChainDB:Info:43] [2024-05-28 01:38:38.88 UTC] Valid candidate f43534e2576440e86c5013ed5bdb88ee40b7fa9068a2ee74fbd33b540b83345b at slot 50169560
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:38.88 UTC] Chain extended, new tip: f43534e2576440e86c5013ed5bdb88ee40b7fa9068a2ee74fbd33b540b83345b at slot 50169560
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:38.96 UTC] Chain extended, new tip: 15d99ac48cd62e895c7f891966a0fee8f4b8a1ca9a3692182ed1629fe5521ab8 at slot 50169594
[d0953d4d:cardano.node.ChainDB:Notice:43] [2024-05-28 01:38:40.23 UTC] Chain extended, new tip: 319c6f4689259b54f5d3ddf21bf74339367c60800022ed42e9d3351640e06fad at slot 50176686

Command to run cardano-wallet:
sudo docker run \
--rm \
-v ./preview_testnet_node_config:/configuration \
-p 8090:8090 \
cardanofoundation/cardano-wallet:latest serve \
--port 8090 \
--node-socket /configuration/db/preview_testnet_node.socket \
--testnet /configuration/byron-genesis.json \
--database /configuration/wallet_db \
--token-metadata-server https://metadata.cardano-testnet.iohkdev.io

I see what seem to be network errors, but from looking online, others get the same errors without any effect on the wallet’s operation.
[cardano-wallet.pools-engine:Info:38] [2024-05-26 19:10:46.76 UTC] Still in sync. Applied 10 blocks, 0 rollbacks in the last 300.001243712s. Current tip is [point f0833601 at slot 50094608].
[cardano-wallet.ntp-client:Notice:122] [2024-05-26 19:10:48.78 UTC] ntp client experienced error Network.Socket.ByteString.sendManyTo: does not exist (Network unreachable) when sending packet
[cardano-wallet.ntp-client:Notice:123] [2024-05-26 19:10:49.88 UTC] ntp client experienced timeout using IPv6 protocol

In my case, however, I can’t seem to get any response when I try to use the wallet API.
Trying from localhost:
mohamed@austin:~$ curl -X GET http://localhost:8090/v2/network/information
curl: (56) Recv failure: Connection reset by peer
mohamed@austin:~$ curl -X GET http://127.0.0.1:8090/v2/network/information
curl: (56) Recv failure: Connection reset by peer
mohamed@austin:~$ netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:8090            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:1337            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN
tcp6       0      0 :::8090                 :::*                    LISTEN
tcp6       0      0 :::1337                 :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN

Trying from system on local network:
mohamed@sahara-dev:~$ curl -X GET http://192.168.2.61:8090/v2/network/information
curl: (7) Failed to connect to 192.168.2.61 port 8090 after 3 ms: Connection refused
mohamed@sahara-dev:~$ ping 192.168.2.61
PING 192.168.2.61 (192.168.2.61) 56(84) bytes of data.
64 bytes from 192.168.2.61: icmp_seq=1 ttl=63 time=2.99 ms
64 bytes from 192.168.2.61: icmp_seq=2 ttl=63 time=2.47 ms
64 bytes from 192.168.2.61: icmp_seq=3 ttl=63 time=2.38 ms
64 bytes from 192.168.2.61: icmp_seq=4 ttl=63 time=2.40 ms
64 bytes from 192.168.2.61: icmp_seq=5 ttl=63 time=3.46 ms
64 bytes from 192.168.2.61: icmp_seq=6 ttl=63 time=3.85 ms
64 bytes from 192.168.2.61: icmp_seq=7 ttl=63 time=2.29 ms
64 bytes from 192.168.2.61: icmp_seq=8 ttl=63 time=2.72 ms
64 bytes from 192.168.2.61: icmp_seq=9 ttl=63 time=2.91 ms
64 bytes from 192.168.2.61: icmp_seq=10 ttl=63 time=2.47 ms
64 bytes from 192.168.2.61: icmp_seq=11 ttl=63 time=2.34 ms
64 bytes from 192.168.2.61: icmp_seq=12 ttl=63 time=2.50 ms
^C
--- 192.168.2.61 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11022ms
rtt min/avg/max/mdev = 2.288/2.730/3.845/0.469 ms
mohamed@sahara-dev:~$ curl -X GET http://192.168.2.61:8090/v2/network/information
curl: (7) Failed to connect to 192.168.2.61 port 8090 after 5 ms: Connection refused

Any ideas on what could be going wrong?

The issue had to do with the port configuration with my docker containers. I was able to just download a release cardano-wallet package and run the node and wallet API directly from there without any issues (by using the same commands in my original post).

I recommend building cardano-node using Nix https://github.com/input-output-hk/cardano-node-wiki/wiki/building-the-node-using-nix
Alternatively, use the cardano-cli directly with the environment configuration files. Same for cardano-wallet.
If you open a ticket  https://iohk.zendesk.com/hc/en-us/requests/new you can receive support


text:
Get the the balance snapshot of an address at a specific point in time
I need to be able to disclose the balance of an address, including all the tokens in it, at a specific point in time to the tax authorities. How can I achieve this?

The could be done with the right SQL query against the database populated by cardano-db-sync.


text:
Help with local development environment and suggestions
I'm developing a Cardano application using nextjs setup with MeshJS template project. I'm using MeshJS in the frontend for its better React hooks etc. Although it's possible to use it fully, for the backend (Next.js API routes), I'm trying to use Lucid, as it is suggested by Aiken, which I use for the contract development. Also note that I'm using YACI with Kupos, and I'm trying to make lucid use Kupmios Provider to connect to YACI. However, I encounter the following error:
Error: TypeError: Cannot read properties of undefined (reading 'costModels')
    at client.addEventListener.once (file:///mnt/BACKUP/programming-free-time/blockchain/cardano/cofeemonks/frontend/node_modules/lucid-cardano/esm/src/provider/kupmios.js:34:40)

Development Stack:

Next.js for both frontend and API routes
MeshJS for frontend Cardano interactions (used for its better React support)
Lucid-cardano library for backend Cardano interactions (in Next.js API routes)
YACI (Yet Another Cardano Index) as the local Cardano node and indexer for development
Kupmios provider in Lucid to connect to YACI
Blockfrost provider planned for production environment

Code Structure:

Project structure based on the MeshJS Next.js template
Frontend: Using MeshJS for Cardano interactions
Backend (API routes): Attempting to use Lucid for Cardano operations
Using a LucidService class to manage Lucid initialization in API routes
Attempting to use different providers (Kupmios for development, Blockfrost for production)

Environment:

Development: Local machine with YACI running
Production: Planning to use Blockfrost

Current Approach:

Using environment variables to configure YACI/Kupmios URLs
Trying to create a new Lucid instance for each API route call
MeshJS for frontend, Lucid for backend operations

Specific Questions:

Is there a known compatibility issue between Lucid, YACI, and Next.js API routes?
Are there any specific considerations for using WebSocket-based providers (like Ogmios/Kupmios) in a serverless environment like Next.js API routes?
How can I properly debug the Kupmios provider initialization in this setup?
Are there any recommended best practices for using Lucid in Next.js API routes while using MeshJS in the frontend?
Are there potential issues in using different libraries (MeshJS and Lucid) for frontend and backend Cardano interactions in the same project?

Any insights or suggestions on resolving this error and setting up a robust Cardano development environment with this specific setup (MeshJS for frontend, Lucid for backend in Next.js) would be greatly appreciated. Additionally, any advice on best practices for this dual-library approach would be very helpful.


text:
Cardano fullnode not syncing
I am using the following config files after downloading cardano-node & cardano-cli from GitHub
However, when I run the following command to run cardano-node:
 cardano-node run \
   --topology $HOME/config-files/topology.json \
   --database-path $HOME/config-files/db \
   --socket-path $HOME/config-files/db/node.socket \
   --host-addr 127.0.0.1 \
   --port 3001 \
   --config $HOME/config-files/config.json

It tries to find peers but I get a typical error:
cardano.node.PeerSelection:Info:64] [2024-07-08 13:32:40.65 UTC] TracePromoteColdFailed 3 0 3.15.67.21:3001 158.938876633654s Network.Socket.connect: <socket: 29>: invalid argument (Invalid argument)

and
[ed-:cardano.node.PeerSelection:Info:64] [2024-07-08 13:48:43.75 UTC] TracePromoteColdPeers 3 0 (fromList [3.78.8.215:3001])
[ed-:cardano.node.ConnectionManager:Info:710] [2024-07-08 13:48:43.75 UTC] TrConnectionManagerCounters (ConnectionManagerCounters {fullDuplexConns = 0, duplexConns = 0, unidirectionalConns = 0, inboundConns = 0, outboundConns = 0})
[ed-:cardano.node.ConnectionManager:Info:710] [2024-07-08 13:48:43.75 UTC] TrConnectError (Just 127.0.0.1:3001) 3.78.8.215:3001 Network.Socket.connect: <socket: 29>: invalid argument (Invalid argument)

Also when I do the query:
   cardano-cli query tip --mainnet --socket-path $HOME/config-files/db/node.socket

I get:
{
    "block": 0,
    "epoch": 0,
    "era": "Byron",
    "hash": "d2d90d10993b3eb309f5485a5413cb9c9fe4f088e79b7b4e815dbbe8fcb8e4b7",
    "slot": 0,
    "slotInEpoch": 0,
    "slotsToEpochEnd": 21600,
    "syncProgress": "0.00"
}

Please help us setting up a full node (not a validator though). What is missing in it?
Thanks.

I tested this version and it started syncing on mainnet. The error Network.Socket.connect: <socket: 29>: invalid argument (Invalid argument) states that there may be an issue with one or more of the arguments you are providing in the CLI command is invalid. Can you check the arguments you are providing most likely an issue with $HOME environment variables? This one works for me:
./bin/cardano-node run --topology topology.json --database-path db --socket-path node.socket --port 6001 --config config.json

Thanks; yes, there was the issue with $HOME variables.


text:
Using CIP30 wallets in native apps
I want to integrate Cardano into a native application, where users should be able to sign documents using their wallet's private key.
Is there a CLI that enables to call any CIP-30 browser wallets for such a use case?


text:
How do I track the latest UTXO when sending a transaction?
AFAIK, Cardano has data inside the UTXO, which means in order to update the data, UTXO has to be spent and the new UTXO will contain updated data, so my question is how do I keep track of latest utxo as they are thousands of transactions getting processed?
What are the techniques used to get the latest utxo?
Additionally, I want to learn more about the transaction processing so can any about kindly point out where I should look?

Do you mean the total UTxO set or just the UTxOs associated with a particular private key?

Utxo associated with the particular private key. Let suppose I want to make a change to a program and hence for state to change, the old utxo will be spent and new utxo with state will be mined. How do users keep track of the lastest utxo in this case?

Pretty sure cardano-cli can dump a text representation of all UTxO associated with a specific private key. cardano-db-sync may also be useful.

If the aim is to track the latest state change after updating the UTxO datum (for example, as in the oracle problem), then one solution is to first mint and attach an NFT to it and have that track the latest update.


text:
Plutus Playground and Marlowe Playground Are Down — Any Updates?
I've noticed that both the Plutus Playground and Marlowe Playground are currently down and inaccessible. Does anyone have information on why these services are unavailable and when they might be back online? Are there any ongoing maintenance or updates that we should be aware of?
I rely on these tools for testing and developing smart contracts, so any insights or official updates would be greatly appreciated.
Thanks in advance!


text:
I am getting an error creating a simple transaction. I am following Gimbalab tutorial
I have created several transaction on Nami but I have not been able to successfully process a transaction using the CLI.
cardano-cli conway transaction build
--testnet-magic 1
--tx-in $tx_in
--tx-out $receiver+1000000
--change-address $sender
--out-file simple-tx.draft

Here is the error.
Size mismatch when decoding Record RecD.\nExpected 31, but found 30.
Here is the current cardano-node and cardano cli version
cardano-cli 8.20.3.0
cardano-node 8.9.0

I am using Demeter.
Here is the course I am following
https://www.andamio.io/course/ppbl2024/102/lesson/2
Does anyone know how I can overcome this error? I don't want to just move on from this lesson as it's things like this where you learn the most.

Update to 9! 8.12 shouldn't be used anymore.


text:
I am trying to write a smart contract using plutus but i am facing this problem
Couldn't match type ‘ScriptContext’ with ‘BuiltinData’
Expected type: template-haskell-2.16.0.0:Language.Haskell.TH.Syntax.Q
(template-haskell-2.16.0.0:Language.Haskell.TH.Syntax.TExp
(PlutusTx.Code.CompiledCode
(BuiltinData -> BuiltinData -> BuiltinData -> ())))
Actual type: th-compat-0.1.4:Language.Haskell.TH.Syntax.Compat.SpliceQ
(PlutusTx.Code.CompiledCode
(GameDatum -> GameRedeemer -> ScriptContext -> ()))
In the expression: compile [|| validateGuess ||]

Hi, for people to be able to understand your issue and help you, it would be great if you could provide more details. In what step of the process did this error occur? What are you trying to do? How does your code look like? Otherwise the likelihood of someone answering your question is very low.


text:
What is the invalidAfter function in the token Policy?
I’m looking to play around with creating a native token.
When building out the token policy script, I’m looking to add a time-lock with the invalidAfter function but I’m unable to find a source in the official Cardano documentation with the invalidAfter keyword. I do see the “after” and “before” keywords however..
I'm looking to generate a policy similar to this one:
{
   all: [
      {
         pubKeyHash: "721d21508287404332f35f43054bhc223g9ab3z73ad8333c160039f0"
      },
      {
         invalidAfter: 49422890
      }
   ]
}

Would anyone be able to shed some light on this for me, or point me to the right direction?
Thanks all!


text:
Lucid-Cardano --> TypeError: _this_walletAPI.experimental.on is not a function
Looking for a bit of assistance to understand what I'm doing wrong here..
I imported the Lucid and WalletAPI types using
import { Lucid, WalletApi } from 'lucid-cardano';

And am attempting to use it as such:
this.walletAPI?.experimental.on('accountChange', () => {

However when running my app in browser & trying to change wallets I get the following error: TypeError: _this_walletAPI.experimental.on is not a function..
Would anyone be able to provide a bit of insight on where I'm going wrong with this?
I'm working with Lucid v. 10.9.0


text:
Error `'config' is not a recognised command` received when installing `cardano-node` using Cardano-EZ-Installer (via Jambhala command `j setup)`:
I've been working my way through the installation instructions in order to get up and running with Plutus programming. As instructed, I ran j setup and cardano-cli was installed successfully. But when it tries to install cardano-node I get the following error:
** Cardano-EZ-Installer v0.3 **

2024-09-12 07:58:29  Checking nix.conf...
error: 'config' is not a recognised command
Try 'nix --help' for more information.
Traceback (most recent call last):
  File "/home/eric/Desktop/MyProjects/2024/cardano/jambhala/cardano-ez-installer/main.py", line 46, in <module>
    install()
  File "/home/eric/Desktop/MyProjects/2024/cardano/jambhala/cardano-ez-installer/main.py", line 25, in install
    nix_conf_ready = check_nix_conf()
  File "/home/eric/Desktop/MyProjects/2024/cardano/jambhala/cardano-ez-installer/src/nix_conf.py", line 80, in check_nix_conf
    nix_conf_output = subprocess.check_output(["nix", "config", "show", "--json"])
  File "/nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['nix', 'config', 'show', '--json']' returned non-zero exit status 1.
error: Recipe `install-cardano` failed on line 73 with exit code 1
error: Recipe `setup` failed on line 136 with exit code 1

Can anyone help?


text:
Can temporary forking occur in Cardano's protocol?
In Bitcoin's protocol (and similar PoW systems), at one point chain might temporarily split in two and two different chains will be maintained up until one outpaces the other and proves itself as the correct one.
I thought this phenomena is not possible in Cardano since for every slot a delegator is already selected beforehand so we theoretically know from which validator/delegator to expect new block i.e. we cannot have two validators creating the same block for the slot. This is what I thought up until watching a video by Cardano's chief scientist who made be doubt my premise (https://youtu.be/nB6eDbnkAk8?t=1563).
I would love to know if I am getting something wrong? From the video it seems he is explaining the scenario that I thought cannot even happen in Cardano's protocol.

That's incorrect. The ouroboros praos protocol is based on random distribution, and there's still a low probability of multiple pools being assigned the same slot. With as many slots as there are, even with a low probability this still happens fairly regularly. Furthermore you can not have a collision on the exact slot and not have consensus with the next pool and have a fork because a pool after yours made a block without yours in the chain. The security window is 3k/f which is the largest a chain can ever rollback which is 36 hours on Cardano mainnet.

Cardano is a permissionless public blockchain with a fully dynamic validator set, which means that the validators/miners can join/leave the network at any time. Much like Bitcoin and Ethereum, this means that anyone can join and contribute to block production. However, this also means that it is possible for honest parties to propose multiple valid chain extensions, thus creating a fork. The network must then employ some kind of chain-selection rule to eventually converge on a canonical chain.
Cardano can have two validators creating the same block for the same slot, even though the leadership scheduled is (privately) known. Such temporary (a.k.a. "shallow") forking is healthy and natural behavior for permissionless systems with probabilistic finality, like Bitcoin, Ethereum, or Cardano. In such systems, security guarantees are probabilistic in nature - the deeper a given block is from the current local height, the higher the probability of that block being on the canonical chain.


text:
How do I make a Sidechain
I want to make a side chain on Cardano to so something that the protocol says should be done on a sidechain, but how do I make one?
Can I use Plutus or am I limited to the CLI?

To create a side chain, you need a smart contract language both on the Cardano side and also on the side chain side. You also need off-chain code (e.g. a website) for people to interact with those contracts. The general idea is on the Cardano side you create a native token (or use one already in existence), and you have a smart contract that burns that native token, and a corresponding smart contract on your chain that mints that token, and vice-versa. Each chain is independent aside from the interaction of the two smart contracts. You probably also want some logic that prevents the user from minting funds until the other chain can guarantee there won't be a rollback, etc... On the cardano side, that would be the security window of 3k/f slots or 36 hours to have an absolute guarantee that transaction is permanent.

Can you please link to a github or other example so I can figure it out? thanks.

There aren't any :) You're treading new ground! I'm just explaining from a high level how it is designed to work.

Okay idint know that sorry. I was waiting to accept the answer with the link, but inlight of your comment I should change that.


text:
Error loading cardano-serialization-lib
Trying a few different examples out there and I am getting the error:
The requested module '/node_modules/@emurgo/cardano-serialization-lib-browser/cardano_serialization_lib_bg.wasm?import' does not provide an export named '__wbg_address_free'
Using this project:
https://github.com/HarmonicPool/cardano-wallet-interface
Loader:

let private_wasm = undefined;
/**
 * *.wasm module can only be imported asyncronously
 * Loader class allow to load the cardano serializaton lib once and make it aviable every time
 */
 class Loader {

    // always call this method to be shure the wasm has been loaded;
    static async load() {

      //load once
      if ( private_wasm !== undefined ) return;

      /**
       * @private
       */
       private_wasm = await import(
        "@emurgo/cardano-serialization-lib-browser/cardano_serialization_lib"
      );
    }

    static get Cardano() {
      return private_wasm;
    }
  }

  module.exports = Loader;

Any ideas why? The loader looks same as every example I've seen out there.

If you are using nodeJs then you are NOT in the browser, right? you are in the backend? if thats the case you might consider NOT using the browser library and in that case there is no need of a Loader. I have used just loader in ES6 versions, and always is a little of a mess to get it up working, because you have to configure so many things like Webpack etc.. package.json ... I would recommend to include a little bit more of the configuration of your project. Also check the webpack.config of the project you are using as a template as well as package.json and of course node version.

I was trying to do it with Vue + Vite and I think something about importing it with Vite is what wasn't working out, I thought I was follow the Vite docs but obvs not! Switched to Vue and Webpack and it's working now.

Thanks you for your answer you are amazing using WASM was horrible this implementation is much better

I found that using WASM comes with a lot of headaches ...
There is a non-wasm version of the same lib which I have installed and have been using. Here is my github repo with an example:
https://github.com/dynamicstrategies/cardano-wallet-connector
The non-wasm npm to install is here:
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs


text:
How do I export my .hs contract to .Plutus?
How do I export my .hs contract to .Plutus? Please provide step by step guidance.

You can find a good example in Exercise4-solution of Alonzo-testnet program.
Source code is here: plutus-helloworld, if you have any doubt check the code to understand what it does.
Basically you need to:

Create an executable plutus-helloworld as defined in plutus-helloworld.cabal file
Compile the plutus file using: cabal run plutus-helloworld -- 1 helloworld2.plutus
Build the address: cardano-cli address build --payment-script-file helloworld2.plutus --testnet-magic 8 --out-file helloworld2.addr

Then you can follow the exercise solution.


text:
Where can I find Cardano's academic research papers?
Where can I find the academic research papers related to Cardano?  I tried Google Scholar with no success.

Just out of curiosity. What search terms did you use on Google Scholar?

IOHK has a list of papers and currently I see 103 of them:
https://iohk.io/en/research/library/

In addition to https://iohk.io/en/research/library/ (as Joshua Chia mentions), you can then utilize Google Scholar to search for a paper's title and/or author names to also get a list of citing articles. I'm surprised you didn't have success with the site. Of course, you can also just search for cardano blockchain to get papers that are not necessarily written by IOG staff.
If Scite.ai would implement a better search and index more databases, I'd recommend them over Google Scholar due to the fact that there's also a sentiment analysis (supporting/contrasting in addition to Goggle's only type: mentioning cites) on citations.
Getting an idea on how other academics approach the paper you are interested in can aid in pre-digesting the Cardano-related papers.

You gotta go to crypto and or other tertiary domain specific archives. https://eprint.iacr.org/complete/ is one that I use myself quite frequently. Just look up IOG scientists if you're looking for Cardano specific papers.


text:
What role will WMT have within the ecosystem short term, but more so in the coming 5-10 years?
I would love a clearer picture of the integration of the world mobile token.
As well as short/long term plans, or specific goals that you guys might have?
Are there rivals/competitors in this niche? Including within the ADA ecosystem? I haven't seen one, if there are any, I'd love to see how they compare to each other. Please explain simply

This is not really the right place for the type of question you are asking.  Perhaps you and your friend can change it to fit in with the guidelines for asking

It may be better to ask the same question in one of the Cardano forums


text:
Hardcoding currency symbol and token name in validator script
I want to be able to make calls to my custom native token module inside the validator script as I do with the Ada.hs module, but if I try I get a "E042:Error: Unsupported feature: Type constructor: GHC.Prim.ByteArray#" Error. Details below:
Currently I am trying to build a simple contract that once funded with X initial amount of X currency, the contract burn one coin each time an action is executed. For this I created a simple module for my dummy currency similar to the Ada module in Plutus.Ledger:
{-# LANGUAGE DataKinds         #-}
{-# LANGUAGE DeriveAnyClass    #-}
{-# LANGUAGE DeriveGeneric     #-}
{-# LANGUAGE DerivingVia       #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell   #-}
{-# LANGUAGE GeneralizedNewtypeDeriving   #-}
{-# LANGUAGE ScopedTypeVariables   #-}
{-# LANGUAGE MultiParamTypeClasses   #-}
{-# LANGUAGE OverloadedStrings   #-}
{-# OPTIONS_GHC -Wno-identities #-}
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}

module Week05.Seals(
      Seals (..)
    , getSeals
    , sealsSymbol
    , sealsToken
    -- * Constructors
    , fromValue
    , toValue
    , sealsOf
    , sealsValueOf
    -- * Num operations
    , divide
    -- * Etc.
    , isZero
    , policy
    ) where

import qualified Prelude                          as Haskell

import           Data.Fixed

import           Codec.Serialise.Class            (Serialise)
import           Data.Aeson                       (FromJSON, ToJSON)
import           Data.Tagged
import           Data.Text.Prettyprint.Doc.Extras
import           GHC.Generics                     (Generic)
import qualified Plutus.V1.Ledger.Value           as TH
import qualified PlutusTx                         as PlutusTx
import           PlutusTx.Lift                    (makeLift)
import           PlutusTx.Prelude                 hiding (divide)
import qualified Ledger.Typed.Scripts             as Scripts
import           Ledger                           (txId, PubKeyHash, Tx, TxOutTx (..), ValidatorHash, Address(..), ScriptContext, scriptAddress, mkMonetaryPolicyScript)
import qualified Ledger.Contexts                  as V
import qualified PlutusTx.Prelude                 as P
import qualified Data.ByteString.Char8 as C

-- | Mint Policies

mkPolicy :: ScriptContext -> Bool
mkPolicy _ = True

policy :: Scripts.MonetaryPolicy
policy = mkMonetaryPolicyScript $$(PlutusTx.compile [|| Scripts.wrapMonetaryPolicy mkPolicy ||])

{-# INLINABLE sealsSymbol #-}
-- | The 'CurrencySymbol' of the 'Seals' currency.
sealsSymbol :: TH.CurrencySymbol
sealsSymbol = V.scriptCurrencySymbol policy

{-# INLINABLE sealsToken #-}
-- | The 'TokenName' of the 'Seals' currency.
sealsToken :: TH.TokenName
sealsToken = TH.TokenName "Seal"

-- | The special currency on the Cardano blockchain. The unit of Seals is Seal
newtype Seals = Seals { getSeals :: Integer }
    deriving (Enum)
    deriving stock (Haskell.Eq, Haskell.Ord, Show, Generic)
    deriving anyclass (ToJSON, FromJSON)
    deriving newtype (Eq, Ord, Haskell.Num, AdditiveSemigroup, AdditiveMonoid, AdditiveGroup, MultiplicativeSemigroup, MultiplicativeMonoid, Integral, Real, Serialise, PlutusTx.IsData)

instance Haskell.Semigroup Seals where
    Seals a1 <> Seals a2 = Seals (a1 + a2)

instance Semigroup Seals where
    Seals a1 <> Seals a2 = Seals (a1 + a2)

instance Haskell.Monoid Seals where
    mempty = Seals 0

instance Monoid Seals where
    mempty = Seals 0

makeLift ''Seals

{-# INLINABLE toValue #-}
-- | Create a 'Value' containing only the given 'Seals'.
toValue :: Seals -> TH.Value
toValue (Seals i) = TH.singleton sealsSymbol sealsToken i

{-# INLINABLE fromValue #-}
-- | Get the 'Seals' in the given 'Value'.
fromValue :: TH.Value -> Seals
fromValue v = Seals (TH.valueOf v sealsSymbol sealsToken)

{-# INLINABLE sealsOf #-}
-- | Create 'Seals' representing the given quantity of Seals (the unit of the currency Seals).
sealsOf :: Integer -> Seals
sealsOf = Seals

{-# INLINABLE sealsValueOf #-}
-- | A 'Value' with the given amount of Seals (the currency unit).
--
--   @sealsValueOf == toValue . sealsOf@
--
sealsValueOf :: Integer -> TH.Value
sealsValueOf = TH.singleton sealsSymbol sealsToken

{-# INLINABLE divide #-}
-- | Divide one 'Seals' value by another.
divide :: Seals -> Seals -> Seals
divide (Seals a) (Seals b) = Seals (P.divide a b)

{-# INLINABLE isZero #-}
-- | Check whether an 'Seals' value is zero.
isZero :: Seals -> Bool
isZero (Seals i) = i == 0

Then I start my contract as follows:
mint :: Contract () Schema T.Text ()
mint = do
    MintParams name amount <- endpoint @"mint"
    let val     = Value.singleton Seals.sealsSymbol Seals.sealsToken amount
        datum   = MyDatum 100
        lookups =  Constraints.scriptInstanceLookups starterInstance <> Constraints.monetaryPolicy Seals.policy
        tx      = (Constraints.mustForgeValue val) <> (Constraints.mustPayToTheScript datum val)
    ledgerTx <- submitTxConstraintsWith @Starter lookups tx

    void $ awaitTxConfirmed $ txId ledgerTx
    Contract.logInfo @String $ printf "forged Sym:%s %s" (show Seals.sealsSymbol) (show val)

The "Datum" and the name field in the mint parameters are not being used for anything special, the important part here is that this transaction will create "amount" tokens and pay them to the script.
So my objective is to:

Keep the native tokens inside the contract, they can not be transferred to any other address

The transaction must burn one of the tokens each time.

I am implementing with this some sort of counter, where the contract is started with X funds, then every transaction will decrease the currency by one and won't allow the funds to be transferred to any other address.
This is the validation code:
validateSpend :: MyDatum -> MyRedeemer -> ScriptContext -> Bool
validateSpend (MyDatum num) (MyRedeemer num2) ctx@ScriptContext{scriptContextTxInfo=txInfo@TxInfo{txInfoValidRange}} =
    let
        forged            = V.txInfoForge txInfo
        expected          = Seals.sealsValueOf (-1)
        newValueLocked    = getSeals $ Seals.fromValue (Validation.valueLockedBy txInfo (Validation.ownHash ctx))
        valueSpent        = getSeals $ Seals.fromValue (Validation.valueSpent txInfo)
        valPaidToScript   = getSeals $ Seals.fromValue (valuePaidToScript txInfo (Validation.ownHash ctx))
    in traceIfFalse "Value burned different than 1" (valPaidToScript == (valueSpent - 1)) &&
       traceIfFalse "Wrong number" (num == num2) &&
       traceIfFalse "Value forged different from expected" (expected == forged)

If I try to run this, I get the following error while compiling the contract:
GHC Core to PLC plugin: E042:Error: Unsupported feature: Type constructor: GHC.Prim.ByteArray#
Context: Compiling type: GHC.Prim.ByteArray#
Context: Compiling data constructor type: GHC.Integer.Type.BN#
Context: Compiling type: GHC.Integer.Type.BigNat
Context: Compiling data constructor type: GHC.Natural.NatJ#
Context: Compiling type: GHC.Natural.Natural
Context: Compiling data constructor type: PlutusCore.Core.Type.Version
Context: Compiling type: PlutusCore.Core.Type.Version ann
Context: Compiling data constructor type: UntypedPlutusCore.Core.Type.Program
Context: Compiling type: UntypedPlutusCore.Core.Type.Program
                           PlutusCore.DeBruijn.Internal.DeBruijn
                           PlutusCore.Universe.Default.DefaultUni
                           PlutusCore.Builtins.DefaultFun
                           ()
Context: Compiling type: Plutus.

If I replace the calls to my custom module for my native token with calls to the ADA module (and use the ADA currency) it works (without the burning token part). It seems that any code I execute inside the validator script that calls any of these functions:
{-# INLINABLE sealsSymbol #-}
-- | The 'CurrencySymbol' of the 'Seals' currency.
sealsSymbol :: TH.CurrencySymbol
sealsSymbol = V.scriptCurrencySymbol policy

{-# INLINABLE sealsToken #-}
-- | The 'TokenName' of the 'Seals' currency.
sealsToken :: TH.TokenName
sealsToken = TH.TokenName "Seal"

Causes the error. Both the token name and the currency symbol are stored as ByteStrings, so I am thinking that I can't compile hardcoded bytestrings on the contract validator script?
How can I use my custom currency module inside the validator script?

You can derive (Semigroup, Monoid) via Sum Integer using DerivingVia

The problem is in your sealsToken function, where you use a ByteString-literal. This is not possible if you want to compile to Plutus Script.
A trick to work around this issue is to add an additional argument to your validateSpend function of type TokenName, where you pass in the Seal token name as an additional argument.
I have used this trick in Lecture #7 of the Plutus Pioneer Program.

Yes, I saw it in the lecture and solved it that way. Thanks

@Lars Brünjes : Doesn't that also mean that the token name cannot be enforced by the on chain validator. Is there a way for validator to check for a particular AssetClass?

@lambda No it can still enforce a TokenName, because the TokenName is now being embedded in the script at compile time. So the validator just checks that any tokens being minted match the TokenName supplied when it was compiled.


text:
How do I calculate the fingerprint of an asset?
If I have an asset with
policy id: 2697bec9e609932eaaaafb34c8e1ea706549d268166ef60285026b85
asset name: redomgrun
How do I calculate the fingerprint asset107k0vzcplp8rjc3d2y8cew6z2gdhvnqru2uluu?

As per CIP14: User-Facing Asset Fingerprint, we calculate it as:
assetFingerprint := encodeBech32
  ( datapart = hash
    ( algorithm = 'blake2b'
    , digest-length = 20
    , message = policyId | assetName
    )
  , humanReadablePart = 'asset'
  )

Or you can just use an existing library, such as cip14-js by Emurgo.

do you know of any java implementation of it?

See Satya's answer to the question, he could not reply a comment as his user is too new.

A Java implementation will be available in cardano-client-lib next release. (0.2.0)
For now, you can refer to "calculateFingerPrint" method of this class (see here for tests).