Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: add an implementation of DIP 0027 Credit Asset Locks
Squashed commit of the following: commit 903f132 Author: pasta <[email protected]> Date: Tue Jan 3 14:55:50 2023 -0600 fix: resolve gitian compilation error commit befd1fb Author: Konstantin Akimov <[email protected]> Date: Mon Dec 26 16:58:02 2022 +0700 refactor: make a dependency of checking special transactions on credit pool visible and clear commit 390e0d0 Author: Konstantin Akimov <[email protected]> Date: Mon Dec 26 15:53:54 2022 +0700 fix!: add a missing validation of Asset Unlock limits for externally mined blocks Also added a functional test to be sure that this bug won't be made again (regression) commit 3d79d6c Author: Konstantin Akimov <[email protected]> Date: Fri Dec 23 15:43:18 2022 +0700 refactoring: CCreditPoolManager doesn't call calculations recursively for big amount of blocks commit 29a0ee5 Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 23:49:15 2022 +0700 adds a fixed limit for height of Asset Unlock transaction: 48 blocks commit 786c577 Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 16:16:50 2022 +0700 Code style fixes for Credit Pool - added a comment about logic of sliding window - replaced in-out params to a struct - let miner to copy CreditPool rather than create a copy when possible commit 01eb537 Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 15:54:40 2022 +0700 Fixed initialization of data in CAssetUnlockPayload + return const reference in getters commit f47085a Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 15:47:40 2022 +0700 Improved implementation of SkipSet accordingly review: - removed `state` dependency - renamed SkipSet -> CSkipSet - renamed `right` to `current_max` commit b856cec Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 15:33:17 2022 +0700 More fixes accodingly code review - renamed CreditPoolCb -> CCreditPool - renamed CreditPoolCbDiff -> CCreditPoolDiff - ordered private/public sections in classes - replaced std::set -> std::unordered_set - using util function IsV19 instead duplicated code commit 24836ab Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 14:54:31 2022 +0700 Fixed data type for asset-unlock transation: the fee is unsigned number 32 bit as specified in DIP commit c67160f Author: Konstantin Akimov <[email protected]> Date: Thu Dec 22 14:47:36 2022 +0700 Code style fixes based on code review + unit test improvement commit 9cfd130 Author: Konstantin Akimov <[email protected]> Date: Tue Dec 20 17:15:04 2022 +0700 fixes accordingly review - call constructor CreditPoolCb with proper initialization list - move data to private section - code alignment commit d082091 Author: Konstantin Akimov <[email protected]> Date: Wed Dec 14 13:15:02 2022 +0700 generate blocks by batch of 10, not 20 commit 2c49333 Author: Konstantin Akimov <[email protected]> Date: Tue Dec 13 18:12:30 2022 +0700 Stabilize functional test 'feature_asset_locks.py' for CI - blocks are generated by smaller batches (not by 500 once) - reduced total amount of generated blocks when it is not necessary - added some extra logs and comments commit a1b8c7f Author: Konstantin Akimov <[email protected]> Date: Mon Dec 12 21:35:24 2022 +0700 refactoring: moved common "send tx" code in a new function for functional test feature_asset_locks.py commit f718236 Author: Konstantin Akimov <[email protected]> Date: Mon Dec 12 19:30:33 2022 +0700 Improved functional test 'feature_asset_locks'. - now this test is more reliable when choosing unspent coins to create asset-lock tx - now this test is more strict about size of mempool for capacity of SkipSet test commit e64b9ea Author: Konstantin Akimov <[email protected]> Date: Mon Dec 12 17:15:25 2022 +0700 Fixes for index processing for assset-unlocks. - Changed logic of processing indexes to make it independent from order: tx in current block do not change status of SkipSet and related code won't fail occasionally depends on order of transactions - Passing CreditPoolCb externally for Check Asset Unlock (before it was retrieved for each transaction from cache) - Fix type int64_t -> uint64_t in many locations commit 1e20644 Author: Konstantin Akimov <[email protected]> Date: Mon Dec 12 01:43:11 2022 +0700 feat: improvement and refactorings for asset-locks unit tests commit c411570 Author: Konstantin Akimov <[email protected]> Date: Tue Nov 29 16:24:39 2022 +0700 Added an unit test for SkipSet commit 4c18229 Author: Konstantin Akimov <[email protected]> Date: Tue Nov 29 16:56:56 2022 +0700 Added limit for SkipSet and updated functional test feature_asset_locks.py commit 98090e9 Author: Konstantin Akimov <[email protected]> Date: Fri Dec 9 03:29:33 2022 +0700 Refactoring of functional test feature_asset_locks: better function to check mempool usage commit ca9154e Author: Konstantin Akimov <[email protected]> Date: Tue Nov 22 23:48:28 2022 +0700 Adds functional test with duplicated indexes in Asset Unlock txes commit 46b6ad1 Author: Konstantin Akimov <[email protected]> Date: Tue Nov 22 21:06:20 2022 +0700 fix: indexes also validated before beeing added to txmempool commit 286cd74 Author: Konstantin Akimov <[email protected]> Date: Thu Nov 3 20:23:20 2022 +0700 feat: implemented an index validation for asset-unlock + refactoring of CCreditPoolManager + saving CreditPoolCb to evo db commit 1dedab6 Author: Konstantin Akimov <[email protected]> Date: Wed Nov 2 00:39:47 2022 +0700 feat: improved functional tests for asset locks feature - reconsider/invalide blocks - manually created block with invalid transaction commit dbf6c51 Author: Konstantin Akimov <[email protected]> Date: Tue Nov 1 18:22:28 2022 +0700 feat: improved functional tests for feature asset locks commit 87c7d0d Author: Konstantin Akimov <[email protected]> Date: Tue Nov 1 18:05:36 2022 +0700 fix!: for validation asset unlock transaction is used now the exactly quorum that specified in a message and this quorum should be active It is breaking changes with previous implementation, because it changes consensus rules commit 04375aa Author: Konstantin Akimov <[email protected]> Date: Tue Nov 1 17:31:06 2022 +0700 feat: removing expired asset-unlock transaction from mempool It will reduce memory usage, improve performance. Also, that's just good that transaction that won't be ever mined (because expired) are kept on all nodes commit 5bab728 Author: Konstantin Akimov <[email protected]> Date: Tue Nov 1 18:19:02 2022 +0700 feat!: update rules for asset unlock limits: min(max(100, min(.10 * assetlockpool, 1000)), assetlockpool) Before it was: min(max(1000, 0.10 * assetlockpool), assetlockpool) It's breaking changes, because changes rules of consensus commit 82491d9 Author: Konstantin Akimov <[email protected]> Date: Thu Oct 20 03:30:16 2022 +0700 feat: add new functional test to check Asset Lock limits commit e9df864 Author: Konstantin Akimov <[email protected]> Date: Thu Oct 20 03:29:14 2022 +0700 feat!: implement limits for asset unlock (withdrawal) txes This changes are breaking because it changes consensus rules commit 5353ff9 Author: Konstantin Akimov <[email protected]> Date: Tue Oct 4 01:41:53 2022 +0700 feat: improve improved funtional test feature_asset_locks.py to test more - rollback of block with tx Asset Lock - rollback of block with tx Asset Unlock - duplicate 'asset unlock' tx for new block asset unlock rollback and reconsider commit 7160305 Author: Konstantin Akimov <[email protected]> Date: Fri Sep 30 01:29:34 2022 +0700 fix: adds missing creditpool data to coinbase tx python's binding (message.py) It also fixes functional tests 'feature_nulldummy.py', 'feature_llmq_is_cl_conflicts.py' commit 8ce03a7 Author: Konstantin Akimov <[email protected]> Date: Thu Sep 29 19:25:05 2022 +0700 Adds implementation of DIP 0027 Credit Asset Locks This commit 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.py` - RPC for Credit Pool (currently locked amount) Co-authored-by: pasta <[email protected]> commit 13dba82 Author: Konstantin Akimov <[email protected]> Date: Thu Sep 29 19:25:05 2022 +0700 Refactors special tx manager: tidy up header dependencies and move general code
- Loading branch information