feat!: add an implementation of DIP 0027 Credit Asset Locks#5026
feat!: add an implementation of DIP 0027 Credit Asset Locks#5026PastaPastaPasta merged 37 commits intodashpay:developfrom
Conversation
|
Please change PR title to follow conventional commits :) |
src/chainparams.cpp
Outdated
src/chainparams.cpp
Outdated
There was a problem hiding this comment.
I'm confused... I thought all of these should be llmq_devnet...
18e1141 to
16478ce
Compare
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
53f5d52 to
d2e9e20
Compare
879f60f to
d894f13
Compare
`tx.GetHash()` exclude hash from serialization at all, while previous implementation assumes zeroes on sig's place
Co-authored-by: UdjinM6 <[email protected]>
assert can be triggered if Add() is called without validation of SkipSet conditions
src/evo/creditpool.cpp
Outdated
Co-authored-by: UdjinM6 <[email protected]>
Now blocks mined and transaction are created by different nodes to be sure that transaction are relayed
|
Looks good! 👍 What about
? |
added just now, thanks for reminding! |
|
Ok, so this diff --git a/test/functional/feature_asset_locks.py b/test/functional/feature_asset_locks.py
index 725d290f6e..32176e309c 100755
--- a/test/functional/feature_asset_locks.py
+++ b/test/functional/feature_asset_locks.py
@@ -295,7 +295,7 @@ class AssetLocksTest(DashTestFramework):
self.log.info("Generating several txes by same quorum....")
self.validate_credit_pool_amount(locked_1)
- asset_unlock_tx = self.create_assetunlock(101, COIN, pubkey)
+ asset_unlock_tx = self.create_assetunlock(101, COIN, pubkey, fee=1)
asset_unlock_tx_late = self.create_assetunlock(102, COIN, pubkey)
asset_unlock_tx_too_late = self.create_assetunlock(103, COIN, pubkey)
asset_unlock_tx_too_big_fee = self.create_assetunlock(104, COIN, pubkey, fee=int(Decimal("0.1") * COIN))results in failures like
That's exactly what I was worried about. 0f35ff3 should help. Or maybe we need to think more about unlocking vs min fees. |
https://github.com/dashpay/dash/pull/5026/files#r1269915571 oh, so it's ok for unlock tx to fail? for example when fees are high or mempool is full |
PastaPastaPasta
left a comment
There was a problem hiding this comment.
utACK for squash merge
Issue being fixed or feature implemented
This is an implementation of DIP0027 "Credit Asset Locks".
It's a mechanism to fluidly exchange between Dash and credits.
What was done?
This pull request includes:
- Asset Lock transaction
- Asset Unlock transaction (withdrawal)
- Credit Pool in coinbase
- Unit tests for Asset Lock/Unlock tx
- New functional test
feature_asset_locks.pyRPC: currently locked amount (credit pool) is available through rpc call
getblock.How Has This Been Tested?
There added new unit tests for basic checks of transaction validity (asset lock/unlock).
Also added new functional test "feature_asset_locks.py" that cover typical cases, but not all corner cases yet.
Breaking Changes
This feature should be activated as soft-fork because:
Checklist:
To release DIP 0027