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

feat(coinjoin): merge coinjoin features #261

Merged
merged 73 commits into from
Sep 27, 2024
Merged

Conversation

HashEngineering
Copy link
Collaborator

Issue being fixed or feature implemented

What was done?

All previous PR's

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

…thods (#181)

* fix: use correct constructor to create hardened children with identity keychain

Signed-off-by: HashEngineering <[email protected]>

* feat: improve CoinJoin message classes

* feat: add CoinJoin helper and base classes

* feat: add CoinJoin coin selector classes

* feat: add DIP9 derivation path for CoinJoin keys

* feat: add CoinJoin related network parameters

* feat: add TransactionDestination classes

* feat: add CoinJoin support to Wallet (keychain, balance, etc)

* tests: fix CoinJoin coin selection tests

* feat: add getScript to TransactionDestination subclasses

* refactor: fix spelling on CoinJoinConstants

* feat: add Coin methods for <= and >=

* feat: add isTrusted and isEmpty to Transaction

* feat: add PendingDsaRequest class

* refactor: fix naming of CoinJoinConstants in CoinJoinQueue

* feat: add CoinControl and CoinType classes

* feat: add KeyHolder, KeyHolderStorage, ReservedDestination, ReserveScript, NoDestination classes

* feat: add more support classes for CoinJoin

* add CompactTallyItem
* add InputCoin
* add TransactionBuilder
* add TransactionBuilderOutput

* feat: add Balance and Recipient classes

* feat: add CoinJoinClientSession classes

* feat: add CoinJoinTransactionInput class

* feat: add CoinJoinClientManager class

* feat: add CoinJoinClientManager object to Context

* feat: add to method that takes a list of recipients

* feat: add more CoinJoin helper methods to Wallet

* tests: add tests for CoinJoin taken from Dash Core source

* fix: simplify some coinjoin logging

* chore: remove commented code

* chore: remove invalid author comments

Signed-off-by: HashEngineering <[email protected]>
* feat: first set of changes for mix 1 round

* fix: use CoinJoinTransactionInput in CoinJoinEntry

* refactor: make some fields final

* feat: add overloaded containsMN to SimplifiedMasternodeList

* feat: add CoinJoinTransactionInput constructor

* feat: add equals and hashCode to CoinJoinStatusUpdate

* show names of enums rather than int values in toString()

* feat: add support for masternodeOutpoints

* fix: isTransactionSelectable in DenominatedCoinSelector

* fix: make members public in KeyHolderStorage

* fix: make NoDestination constructor private

* feat: convert from masternodeOutPoint to proTxHash

* fix: add more info to CoinJoinQueue.toString

* feat: add method for signing inputs without outputs

* feat: support sending senddsq messages optionally

* feat: support handling of coinjoin messages in Peer

* feat: add CoinJoinManager to manage CoinJoin from a high level

* docs: fix comment typo

* fix: improve null checking in PendingDsaRequest

* fix: add missing imports in PeerGroup

* feat: add toString to Balance

* build: add json support to tools module

* fix: fees should be in duffs/byte, not duffs/1000 bytes

* feat: add equalsWithoutParent methods

* fix: update logging and handle exceptions in scheduled thread

* feat: add MasternodeGroup to manage mixing masternode connections

* feat: add many missing methods of Session related classes

* fix: signing transactions and fees

* feat: add CoinJoinTransactionSigner class

* fix: update Jack Daniels and add Ouzo devnets

* feat: support Jack Daniels masternodeOutPoint <--> proTxHash

* fix: connect outputs to parent transaction

* feat: add overloaded toString to CoinJoinEntry that shows inputs/outputs

* chore: remove unused import

* feat: add more CoinJoin support methods to Wallet

* feat: add ability to disconnect from a mixing masternode

* disconnect when Complete or after a timeout period

* chore: remove commented code and update logging

* feat: add basic mix functionality to WalletTool

* ci: use ubuntu-22.04 instead of latest

* docs: remove javadoc link on MasternodeGroup constructor

* chore: remove unused import

* tests: add before method before CoinJoinClientOptionsTests

* chore: remove commented code

* chore: add license to many CoinJoin files
* fix: repair bitcoinSerializeToStream in CoinJoinComplete

* tests: add basic CoinJoin messaging tests

* tests: add other merkleRoot support in CoinbaseTx payloads

* tests: add signing support to CoinJoinQueue and CoinJoinBroadcastTx

* fix: add support for handling CoinJoin server messages in tests

* fix: add CoinJoinClientOptions reset method

* fix: add new best block listener to CoinJoinManager

* keep track of DSTX

* add close method to CoinJoinManager

* refactor: setExtraPayload in Transaction

* fix: add unittest support to ProTxToOutpoint

* refactor: remove unnecessary variables in TransactionBuilder

* fix: make Random a static field of several classes

* fix: add a few parameters to UnitTestParams

* DIP24 height
* interval update to match TestNet values

* feat: add Bintang Devnet support

* tests: add coinjoin unit test

* tests: reset CoinJoinClientOptions before each test

* tests: use 30 second timeout on CoinJoinSessionTest

* tests: use 30 second timeout on CoinJoinSessionTest

* tests: add logging to CoinJoinSessionTest

* tests: add idea wallettool mix configuration

* tests: add test logging to debug

* tests: fix bug in CoinJoinSessionTest

* tests: fix another bug in CoinJoinSessionTest

* tests: add more CoinJoinServer functionality

* tests: dont use localhost connection and use only 1 session

* tests: add other wallet tool configurations, remove some startup

* tests: refactor more functionality to CoinJoinServer

* tests: update CoinJoinServer functionality

* chore: add more run configs

* tests: add log output

* tests: add a block on each loop in sessionTestTwo

* tests: ignore failing test loadFromBootStrapFileV3
* feat: add CoinJoinClientSession.toString for debugging

* feat: add PendingDsaRequest.toString for debugging

* fix: collaterial tx must not be in mempool or a block

* fix: allow a masternode to be reused if it is available to mix later

* feat: process inv to request dstx messages

* feat: process inv to request dstx messages

* docs: update wallet-tool-help.txt with new mix command line options

* feat(wallettool): set default mix options

* fix(coinjoin): improve connectivity for mixing masternodes

* feat(coinjoin): add means of stopping mixing

* feat(coinjoin): add toString to Balance

* fix(coinjoin): fix balance calculations for denominated coins

* tests(coinjoin): add balance tests to CoinJoinSessionTest

* feat(wallettool): add ability to stop the mix operation when it is complete

* test(coinjoin): move the denominated balance check down

* chore: update WalletTool CJ Mix (devnet) parameters

* tests(coinjoin): remove a denominated balance check at the end

* chore: add run configurations for testnet

* fix: update testnet protx:outpoint map

* fix: prevent connecting to the same node several times

* refactor: calculate balances

* feat: add coinjoin reporting

* onSessionComplete

* fix: add --rounds to dump function for proper balance calculation

* feat(wallettool): add coinjoin reporting support

* feat: more logging for client sessions

* refactor: use isGreaterThanOrEqualTo rather than !isNegative

* tests: disable mixed coins test
* feat: add KeyChainWalletExtension and derived classes

* feat: add CoinJoin Extension

* refactor:  Add WalletEx class to handle coinjoin related functionality

* refactor:  add wallet object to AbstractKeyChainExtension and subclasses

* refactor:  add more methods to KeyChainWalletExtension

* remove from Wallet

* feat: add reporting for Mixing/Session Started and Mixing Complete

* feat: support coinjoin send

* support empty wallet on unmixed or mixed funds only

* refactor:  Move coinjoin specific code to WalletEx

* tests:  fix tests related to Wallet

* chore: add and update run configurations

* feat: add status to sessions

* tests:  add not enough balance mixing test

* chore: remove logging of dstx in CoinJoin

* fix(wallettool): fixed bug that sent unmixed for coinjoin

* chore: remove commented line

* chore: update bintang protx-outpoint map

* chore: removed commented code
* fix: use isCoinJoin on all output candidates in CoinJoinCoinSelector

* Start 0.18.3-CJ-SNAPSHOT

* fix: prevent NPE's by checking for keychain groups
* fix: prevent NullPointerException if blockChain is not initialized

* fix: add more methods to KeyChainWalletExtension

* include tests for these methods

* feat: allow CoinJoin to work with encrypted wallets

* feat: improve coinjoin initialization on encrypted wallets

* refactor: improve keychain extension support

* fix: set default action of not enough funds to continue

* previous action was to stop CoinJoin

* fix(WalletTool): set default multi-session value to false

* feat(coinjoin): add an overload for isLockedCoin

* feat(coinjoin): add another CoinJoinClientManager constructor

* fix(coinjoin): don't count locked coins in CoinJoinCoinSelector

* fix: eliminate NPE and other crashes associated with shutdown.

* feat(coinjoin): allow customization of coinjoin stopping on errors

* fix(coinjoin): change when max connections are updated
* update ProTxToOutpoint map for testnet
* feat: add default HP masternode lists to NetworkParameters

* feat: add getters for HPMN fields in SimplifiedMasternodeListEntry
* feat: add setWallet to AbstractKeyChainGroupExtension

* feat: add static id to AuthenticationGroupExtension
…me extension methods to Wallet (#217)

* fix: make getKeyChainType public

* fix: make getKeyChainGroup public

* feat: add hasExtension and getChainExtension methods to Wallet

* tests: fix quorum*state related tests by closing context
…242)

* fix(coinjoin): remove duplicate get functions in SimplifiedMasternodeListEntry

* fix (coinjoin): remove ProTxToOutPoint and update CoinJoinQueue and CoinJoinBroadcastTx

* fix(coinjoin): add account index to coinjoin path

* refactor(coinjoin): manually call CoinJoinManager.start and stop

* refactor: use lambdas and add exception handling in CoinJoinExtension

* fix: improve dry run to include creating denominations

* fix(coinjoin): make dry skip key creation

* fix(coinjoin): improve stopping mixing

* fix(coinjoin): remove checks from checkAutomaticBackup

* tests(coinjoin): update coinjoin transaction type tests

* fix(coinjoin): fix NPE in CoinJoinManager.stopAsync

* tests: ignore LevelDB tests

* tests(coinjoin): add dry run check to CoinJoinSessionTest
* feat: improve asset lock handling to match v20 updates

* refactor: rename credit funding to asset lock
* tests: update tests

* fix(coinjoin): add missing is spent check to countInputsWithAmount

* feat(wallet-tool): add parameter to return change with coinjoin send

* feat(coinjoin): add tx history at the end of a wallet dump

* refactor: improve AssetLockTransaction for multiple credit outputs

* refactor: rename setAssetLockPublicKey to addAssetLockPublicKey

* tests: add more tests to AuthenticationGroupExtensionTest

* fix: fix incorrect inequality check in createDenominate

* fixes bug that prevented creation of more denominations past the goal count

* feat: add txid to the transaction history report
* feat(coinjoin): add mixing progress method to CoinJoinExtension

* fix(coinjoin): reduce logging
* tests(coinjoin): add tests for CoinJoinEntry, CoinJoinQueue, CoinJoinClientOptions

* tests(coinjoin): rename dsq tests
* fix: consider non-denominated coins in mixing progress calc

* tests: add coinjoin-unmixed.wallet

* tests: fix context
* feat: sign coinjoin mixing tx with anyone can pay

* tests: add CoinJoinSignedInputsTest

* test was made with anyoneCanPay = false
fix: platform items and merge master
* feat(coinjoin): Improve CoinJoinMonitor

* track blocks
* silence logging
* improve stats
* log times

* feat(coinjoin): add block information to CoinJoinReporter

* feat(examples): add mixing estimates to CoinJoinMonitor

* tests: fix CoinJoinSessionTest
* denomination map count were not updated

* first loop was infinite in some cases
feat: add asset lock empty wally

fix: eliminate infinite loop when creating denominations
* enforcement should be after receiving the chainlock
fix: chainlock and islock issues and increase coinjoin look ahead
@HashEngineering HashEngineering self-assigned this Sep 27, 2024
@HashEngineering HashEngineering merged commit ece4345 into master Sep 27, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant