4
votes
Accepted
When is an eUTXO consumed?
The question was also answered by a member of the IOHK team, on a secondary channel. I will post the answer here for community reference.
Answer
UTxO entries are consumed "immediately after"...
Community wiki
4
votes
When is an eUTXO consumed?
Great questions.
When does oRef get consumed? Would oRef exist until the next block?
oRef will be consumed when a transaction spends it. If txn1 is executed before txn2, even in the same block, txn2 ...
3
votes
Accepted
Can temporary forking occur 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, ...
3
votes
Accepted
on multiple eUTxO and the validation proces
Datums are stored in a hash map per transaction, so if a transaction uses the same datum multiple times, the datum is stored once and only the hashes are stored multiple times. The same goes for ...
2
votes
Can you specify an upper and lower bound for the validity period of a transaction?
I discovered this cool function named hull. Here is the function definition from the docs.
-- The function hull gives the smallest interval containing both the given intervals.
hull :: Ord a => ...
2
votes
Accepted
Is there a way for a validator to get the current time?
The usual way to handle time in Plutus is using Slot ranges. This means that the script does not query the time. Instead it checks that the validation happens in a given slot interval that corresponds ...
2
votes
StateMachine validation failing
My StateMachine does not need any additional checks with the smCheck so I completely removed the field. The compiler complained only a little bit and gave me a warning that I had an uninitialized ...
2
votes
Accepted
StateMachine validation failing
The problem is most probably caused by an omitted check function. Even if you do not use it, you have to specify it.
Example:
check :: FreelanceContract -> FContractDatum -> FContractRedeemer -&...
2
votes
Can temporary forking occur in Cardano's protocol?
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 ...
2
votes
What is where executed and when?
One detail to add here:
In short:
if another Tx generator wants to use the same script, but one or more blocks later, it will need the datum (previous state of the script), which must be exposed by ...
1
vote
Contract is not stopping execution if validation script fails (happened after 2022-04-06 PAB Release)
Found the way to address this problem
statusChange <- awaitTxStatusChange . getCardanoTxId $ ledgerTx
case statusChange of
Committed TxInvalid () -> logError @String "Transaction ...
1
vote
Accepted
Script Witness Not Validating for Multisig
Finally I was able to sort this out.
You can use this library to create the multisig: https://github.com/tango-crypto/cardano-wallet-js
The code I ran was the following:
multisig.js
const { ...
1
vote
Accepted
How to retrieve an addresses transaction history inside a plutus contract
The current state of Plutus makes this impossible to do. Instead, you have to try and use a custom DB-sync server, and then construct the off-chain code in such a way that it passes the looked-up ...
1
vote
What is where executed and when?
The blockchain does not only store hashes. It also stores the datum and the script of spent UTxOs. It would otherwise not be possible to validate the transaction in retrospect. So while you don't need ...
1
vote
Why is there no mechanism available to restrict creation of UTXOs at a script address?
Because the purpose of a script is to determine the conditions a UTxO can be spent.
If you want to deter people from creating arbitrary UTxOs at your script address, you can write the script in a way ...
1
vote
Is there a way for a validator to get the current time?
How about parameterizing the validator with Slot or POSIXTime and passing the current time from the contract to the validator script using Contract.currentTime or Contract.currentSlot?
That way, the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
validation × 19plutus × 6
transaction × 4
plutus-pioneer-program × 3
validator × 3
on-chain × 3
smart-contract × 2
utxo × 2
minting × 2
script-addresses × 2
time × 2
offchain × 2
mkvalidator × 2
wallet × 1
security × 1
api × 1
proof-of-stake × 1
mint × 1
script × 1
blockfrost × 1
contracts × 1
terminology × 1
eutxo × 1
transactions-per-second × 1
slottime × 1