Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validity and timelocks #3249

Merged
merged 31 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7a5407b
add proper usage of validity interval - part 1
paweljakubas Apr 21, 2022
fe2e7d6
handle invalid validity bounds
paweljakubas Apr 21, 2022
dcc8eef
add next check
paweljakubas Apr 21, 2022
129db26
simplify how asset quantity is called during construction
paweljakubas Apr 22, 2022
c0a8232
deal with negative slots
paweljakubas Apr 22, 2022
f4a7b15
make validity bound optional
paweljakubas Apr 22, 2022
da4a945
some improvements
paweljakubas Apr 25, 2022
c1f3a54
fist timelock minting working
paweljakubas Apr 25, 2022
c0cce62
introduce lower bound to transaction context
paweljakubas Apr 26, 2022
7b027cd
refine integration test
paweljakubas Apr 26, 2022
33c7d9b
add support of validity in decodeTx - part 1
paweljakubas Apr 27, 2022
7a0fe61
add support of validity in decodeTx - part 2
paweljakubas Apr 27, 2022
4405d40
adding slot interval computation in scripts
paweljakubas Apr 28, 2022
20ff5bf
Regenerate nix
Apr 28, 2022
1845728
compare tx validity with timelocks
paweljakubas Apr 28, 2022
bf848b0
add integration test showing the interval/timelock case
paweljakubas Apr 28, 2022
1a6378a
add toSlotInterval unit tests
paweljakubas Apr 28, 2022
e864c88
add unit testing for withinSlotInterval
paweljakubas Apr 28, 2022
c9dc7f4
Regenerate nix
Apr 28, 2022
400dace
Formatting fixes.
jonathanknowles Apr 29, 2022
92d0365
Simplify definition of `fromValidityBound`.
jonathanknowles Apr 29, 2022
d57012d
Use eta-reduction to simplify `withinSlotInterval`.
jonathanknowles Apr 29, 2022
310b7fd
Use list append in `toSlotInterval` instead of concatenation.
jonathanknowles Apr 29, 2022
baece1b
Use `LambdaCase` to simplify definitions within `toSlotInterval`.
jonathanknowles Apr 29, 2022
2f13c08
Revise API validity interval descriptions and error messages.
jonathanknowles Apr 29, 2022
1b83219
Replace `fromIntegral` with safer `intCast` and `Finite` constructor.
jonathanknowles Apr 29, 2022
99cf447
Rename `slotInterval` to `scriptSlotIntervals`.
jonathanknowles Apr 29, 2022
dba91a2
scriptSlotIntervals enhancement
paweljakubas Apr 29, 2022
b4be703
integration code reshuffling to soothe plutus
paweljakubas Apr 29, 2022
2586145
remove unspecified from swagger
Apr 29, 2022
a50537e
Addtional comment to validity_interval
Apr 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/core-integration/src/Test/Integration/Framework/TestData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ module Test.Integration.Framework.TestData
, errMsg403CreatedWrongPolicyScriptTemplatePolicyId
, errMsg403AssetNameTooLong
, errMsg403MintOrBurnAssetQuantityOutOfBounds
, errMsg403InvalidValidityBounds
, errMsg403ValidityIntervalNotInsideScriptTimelock
) where

import Prelude
Expand Down Expand Up @@ -700,6 +702,21 @@ errMsg403MintOrBurnAssetQuantityOutOfBounds = mconcat
, "not exceed 9223372036854775807 (2^63 - 1)."
]

errMsg403InvalidValidityBounds :: String
errMsg403InvalidValidityBounds = unwords
[ "Attempted to create a transaction with invalid validity bounds."
, "Please make sure that the 'invalid_before' bound precedes the"
, "'invalid_hereafter' bound, and that you have not used negative"
, "time values."
]

errMsg403ValidityIntervalNotInsideScriptTimelock :: String
errMsg403ValidityIntervalNotInsideScriptTimelock = unwords
[ "Attempted to create a transaction with a validity interval"
, "that is not a subinterval of an associated script's timelock"
, "interval."
]

--------------------------------------------------------------------------------
-- Transaction metadata
--------------------------------------------------------------------------------
Expand Down
Loading