Transaction costs and determinism | Cardano Docs (2024)

Cardano’s approach to price setting mainly relies on market demand over actualsupply. On Cardano, more than one type of demand competes for the common supply.Thus, it is crucial to consider both relative and absolute pricing. One wayto do this is to inspect the effects of smart contract pricing, non-fungibletoken (NFT) operations, and so on, with respect to some common value – in ourcase, the consumption of Cardano’s processing power.

The Cardano ledger's design is focused on high assurance, security, and provenformal verification. In alignment with this strategy, it is also important toensure that transaction processing is deterministic, meaning that a user canpredict the impact and outcome of a transaction before its actual execution.

The ability to guarantee the cost of transaction execution and how thetransaction behaves on the ledger before it is submitted became even moreprominent with the introduction of smart contract support in 2021. This featureis different from other blockchains, including Ethereum, where other networkactivity can influence the gas cost. This ability is also guaranteed by thedeterministic nature of Cardano and Plutus scripts.

Determinism

Determinism, in the context of transaction and script processing, is a synonymfor predictability. This means that a user can predict locally (off-chain) howtheir transaction will impact the on-chain state of the ledger, withoutencountering the following:

  • unexpected script validation outcomes or failures
  • unexpected fees
  • unexpected ledger or script state updates.

Validation

An important aspect of processing a transaction is validating the actions it istaking. A transaction is taking an action when it contains data in thespecific field to that action. For example, a transaction is spending UTXO Uwhen it contains a reference to U in its input field, and it is minting atoken X when its mint field contains X.

Cardano uses scripts to validate actions. These scripts, which are pieces ofcode, implement pure functions with True or False outputs. Scriptvalidation is the process of invoking the script interpreter to run a givenscript on appropriate arguments.

Script validation can be performed for the following actions:

  • Spending a UTXO locked by a script address: the script that is run is the onewhose hash forms the address.
  • Minting a token: the script that is run is the one whose hash forms the policyID of the token being minted.
  • Reward withdrawal: the script that is run is the one whose hash forms thestaking address.
  • Applying a certificate: the script that is run is the one whose hash forms thecertificate author’s credential.

Besides letting the node know which script to run, all transaction actionsindicate how to assemble arguments passed to that script. Alonzo introduced anew approach to transaction validation on Cardano due to the implementation ofPlutus scripts.

Ledger features

The Alonzo upgrade changed the data on the ledger as follows:

  1. Plutus scripts can lock UTXOs.
  2. A component, added to the contents of the output parts of UTXOs, enablesscript state-like functionality. In addition to assets and an address, a UTXOlocked by Plutus scripts also contains a datum. A datum is a piece of datathat can be thought of as an interpretation of the script state.
  3. There are a number of protocol parameters used to impose additionalvalidation requirements on transactions. These include upper limits oncomputational resources that scripts can consume.

To support Plutus scripts, transactions have the following features:

  1. For each of its actions, the transaction carries a user-specified argument,called a redeemer. Depending on the script, a redeemer can serve a differentpurpose. For example, it can act as the bid the user places in an auction, orthe user’s guess in a guessing game, among many other functions.
  2. The transaction specifies computational execution budgets for each script.
  3. To ensure that a transaction can pay its execution fee, Alonzo introducedcollateral.
  4. Transactions contain an integrity hash, needed to ensure that it has not beencompromised, outdated, etc.

With the Vasil upgrade, Plutus scripts were upgraded to V2 functionality with animproved cost model and new built-ins. The use of reference inputs, inlinedatums, and reference scripts allowed for efficient throughput and significantlyincreased performance.See the complete Vasil feature overview here.

The node performs the checks that ensure the transaction is constructedcorrectly. For example, it must not exceed the maximum execution resourcebudget. It also invokes the Plutus script interpreter to run the scripts.

The non-deterministic gas model can charge users unpredictably large fees. InCardano scripts, this source of indeterminism is addressed by requiring that theresource budget itself, as well as the fee required to cover this budget, areincluded in the transaction. Script execution necessarily returns either Trueor False, and will not loop indefinitely. The reason for this is that everyoperation a script performs takes a non-zero amount of resources, which aretracked by the interpreter. If the budget specified by the transaction isexceeded, script execution terminates and returns False.

The following key points make the outcomes of script and transaction validationpredictable:

  • the script interpreter will always terminate and return the same validationresult when applied to the same arguments
  • a transaction necessarily fixes all arguments that will be passed to thescript interpreter during validation
  • a transaction specifies all the actions it is taking that require scriptvalidation
  • compulsory signatures on a transaction ensure that it cannot be altered by anadversary in a way that causes scripts to fail
  • applying a transaction in the EUTXO ledger model is deterministic.

Script validation failure or success does affect how a transaction is processed.However, the True or False outcome, as well as ledger changes associatedwith either outcome, are predictable for a given transaction.

Transaction costs and determinism | Cardano Docs (2024)
Top Articles
Passkeys FAQs: What they are, and other frequently asked questions | 1Password
How to Create a Dating App Like Tinder and Succeed ❤️
Katie Pavlich Bikini Photos
Pet For Sale Craigslist
Garrison Blacksmith Bench
Inducement Small Bribe
Autobell Car Wash Hickory Reviews
More Apt To Complain Crossword
ExploreLearning on LinkedIn: This month's featured product is our ExploreLearning Gizmos Pen Pack, the…
Sams Early Hours
Busted Barren County Ky
Tamilrockers Movies 2023 Download
Simplify: r^4+r^3-7r^2-r+6=0 Tiger Algebra Solver
Epro Warrant Search
Tygodnik Polityka - Polityka.pl
White Pages Corpus Christi
Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
Xfinity Outage Map Fredericksburg Va
Kingdom Tattoo Ithaca Mi
Scripchat Gratis
15 Primewire Alternatives for Viewing Free Streams (2024)
Gs Dental Associates
Acurafinancialservices Com Home Page
§ 855 BGB - Besitzdiener - Gesetze
Dashboard Unt
Evil Dead Rise Showtimes Near Sierra Vista Cinemas 16
Tamil Movies - Ogomovies
Where to eat: the 50 best restaurants in Freiburg im Breisgau
Things to do in Pearl City: Honolulu, HI Travel Guide by 10Best
Albertville Memorial Funeral Home Obituaries
Insidious 5 Showtimes Near Cinemark Southland Center And Xd
Vlacs Maestro Login
Craigslist/Phx
Craigslist Cars And Trucks Mcallen
Manuel Pihakis Obituary
Teenbeautyfitness
Jay Gould co*ck
Morlan Chevrolet Sikeston
Hermann Memorial Urgent Care Near Me
Ukg Dimensions Urmc
Ludvigsen Mortuary Fremont Nebraska
Deshuesadero El Pulpo
Cranston Sewer Tax
Gfs Ordering Online
Shipping Container Storage Containers 40'HCs - general for sale - by dealer - craigslist
Craigslist/Nashville
Candise Yang Acupuncture
Go Nutrients Intestinal Edge Reviews
Lagrone Funeral Chapel & Crematory Obituaries
Factorio Green Circuit Setup
What Responsibilities Are Listed In Duties 2 3 And 4
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 5739

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.